积极答复者
关于绑定套接字到本地的问题

问题
答案
-
MSDN上是这样写的.
The bind function is used on an unconnected socket before subsequent calls to the connect or listen functions. It is used to bind to either connection-oriented (stream) or connectionless (datagram) sockets. When a socket is created with a call to the socket function, it exists in a namespace (address family), but it has no name assigned to it. Use the bind function to establish the local association of the socket by assigning a local name to an unnamed socket.
注意最后一句话.若不用bind,你的socket是未命名的,不能通信.
0xBAADF00D- 已标记为答案 法拉利贵族 2009年7月31日 0:38
全部回复
-
MSDN上是这样写的.
The bind function is used on an unconnected socket before subsequent calls to the connect or listen functions. It is used to bind to either connection-oriented (stream) or connectionless (datagram) sockets. When a socket is created with a call to the socket function, it exists in a namespace (address family), but it has no name assigned to it. Use the bind function to establish the local association of the socket by assigning a local name to an unnamed socket.
注意最后一句话.若不用bind,你的socket是未命名的,不能通信.
0xBAADF00D- 已标记为答案 法拉利贵族 2009年7月31日 0:38
-
MSDN上是这样写的.
The bind function is used on an unconnected socket before subsequent calls to the connect or listen functions. It is used to bind to either connection-oriented (stream) or connectionless (datagram) sockets. When a socket is created with a call to the socket function, it exists in a namespace (address family), but it has no name assigned to it. Use the bind function to establish the local association of the socket by assigning a local name to an unnamed socket.
注意最后一句话.若不用bind,你的socket是未命名的,不能通信.
0xBAADF00D
哥们 我看不懂英文 不过你最后一句话我注意到了 呵呵 谢谢
法拉利 法拉利 法拉利