python - 套接字绑定(bind)是什么意思?

标签 python sockets network-programming

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

关于python - 套接字绑定(bind)是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22996593/

相关文章:

python - Pandas 切片的奇怪行为

python - 将 pandas DataFrame 列拆分为 OneHot/Binary 列

linux - 两台linux机器之间使用wlan进行数据通信

JavaEE面向对象网络

python - 如何从html中提取文本并在需要的地方添加空格?

Java 重新启动套接字

sockets - WinRT 写入 TCP 流不起作用

linux - TCP RST 段发送到 peer over socket 的情况有多少?

c - 为什么代码显示段错误?

python - networkx代码python的解释