From : Diego Uribe Gamez
To : La lista de python en castellano;
Subject : Re: [Python-es] UDPSock.recvfrom(buf) ??????? (buf) ???
To : La lista de python en castellano;
Subject : Re: [Python-es] UDPSock.recvfrom(buf) ??????? (buf) ???
Que determina el tamaño del paquete, si yo envió un dato de un computador a otro que tanto se abre buff para recibir el tirón completo.
--
Sobre la información de la documentación solo encontré esto buffer allocation on receive operations is automatic, and buffer length is implicit on send operations. y el ejemplo con buffer para mi caso al final del documento:
Running an example several times with too small delay between executions, could lead to this error:
This is because the previous execution has left the socket in a TIME_WAIT state, and can’t be immediately reused.
There is a socket flag to set, in order to prevent this, socket.SO_REUSEADDR:
the SO_REUSEADDR flag tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to expire.
El 7 de junio de 2012 08:45, mauricio rodriguez <[email protected]> escribió:
es la cantidad de datos que recibe o envía de un tirón ... no la totalidad del trafico sino el tamaño del paquete
2012/6/7 Diego Uribe Gamez <[email protected]>
_______________________________________________Estoy mirando una conexión por Soket y no logro entender que hace el buf? que es lo que cambia? el numero que se le asigna es que?host = "localhost"
port = 21567
buf = 1024
data = ''
addr = (host, port)
UDPSock = socket(AF_INET, SOCK_DGRAM)while (1):
data, addr = UDPSock.recvfrom(buf)--
Python-es mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/
_______________________________________________
Python-es mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/
_______________________________________________ Python-es mailing list [email protected] http://mail.python.org/mailman/listinfo/python-es FAQ: http://python-es-faq.wikidot.com/
