Python Socket API参考出处:http://blog.csdn.net/xiangpingli/article/details/47706707
使用socket.recv(pack_length)接收不定长的数据,如果数据包长度超过一定值,则接收的数据不全,同时还会多触发一次 socket.recv().
参照python3.4的文档可发现:
-
socket.recv(bufsize[, flags])
-
Receive data from the socket. The return value is a bytes object representing the data received. The maximum amount of data to be received at once is specified by bufsize.
上述的英文的大体意思为:从socket中接收数据。返回值是byts类型。接收的