我很好奇,为什么系统中默认的发送缓冲区大小为212992字节,但是在使用SOCK_DGRAM套接字的同时,我只能使用sendto()函数最多发送65507字节?
import socket
udpsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print('Udp send buffer :- ', udpsock.getsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF))
len = 69000
msg = 'A'*len
host = '127.0.0.1'
port = 62900
count = udpsock.sendto(msg.encode(), (host, port))