Can bind() socket to remote address?
问题 With the following snapshot of C code, I understand that, the address that bind() call binds to listfd , is the logical address of the local machine where this server program is running. Subsequently, server listens on listfd socket of that same machine. struct sockaddr_in serv_addr; listfd = socket(AF_INET, SOCK_STREAM, 0); bzero(&serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(8000); retval = bind