在https://docs.python.org/2/library/socket.html , socket.bind(address) 条目说:
Bind the socket to address. The socket must not already be bound. (The format of address depends on the address family — see above.)
这就是它所说的,“将套接字绑定(bind)到地址”是什么意思?
请您参考如下方法:
它基本上只是为它分配一个地址,这样您就可以接受该地址上的传入连接。看看:man bind
