• msg = conn.recv(BUFSIZE) 一次程序能接收的最大数据


     msg = conn.recv(BUFSIZE) #接受消息的内容
    		 
    		 
    -----------------------
    <socket._socketobject object at 0x7fdd08d8cad0>
    ('192.168.137.1', 57504)
    接到来自192.168.137.1的链接
    -----------------------
    123456789
    -----------------------
    -----------------------
    0
    -----------------------
    
    客户端发送
    s.send('1234567890') 10位数字
    
    Receive data from the socket. The return value is a string representing the data received.
    
     The maximum amount of data to be received at once is specified by bufsize.
    
     See the Unix manual page recv(2) for the meaning of the optional argument flags; it defaults to zero.
    
    Note For best match with hardware and network realities, the value of bufsize should be a relatively small power of 2, for example, 4096.
    
    从socket接收数据,返回值是一个字符串反应接收的数据。
    
    通过设置bufsize 表示一次能接收的最大数据
  • 相关阅读:
    jmeter参数化关联
    电商
    mysql联查
    购物车
    冒泡排序、二分查找、选择排序、斐波那契
    python数据转换/9*9表/for循环
    python三角形
    mysql语句
    Selenium 8
    Selenium 7
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348537.html
Copyright © 2020-2023  润新知