homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: socket.recvfrom(0) waits for data
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, deleted250130
Priority: normal Keywords:

Created on 2015年01月06日 02:58 by deleted250130, last changed 2022年04月11日 14:58 by admin.

Messages (3)
msg233500 - (view) Author: (deleted250130) Date: 2015年01月06日 02:58
For example on sending ICMP packets and receiving the data socket.recv(1) does wait for data while socket.recv(0) doesn't. socket.recvfrom(1) does wait for data too but I'm also seeing that socket.recvfrom(0) is waiting for data which doesn't look correct (at least it seems not to be consistent with socket.recv()).
msg233502 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2015年01月06日 03:49
That's not surprising, since revcfrom uses select() on the socket regardless of the value its argument. I'm not sure what the use of calling revcfrom(0) is.
msg233503 - (view) Author: (deleted250130) Date: 2015年01月06日 04:13
If there is no real use for socket.recvfrom(0) (and then probably socket.recv(0) too) maybe a bufsize argument of 0 should throw an exception?
History
Date User Action Args
2022年04月11日 14:58:11adminsetgithub: 67365
2015年01月06日 04:13:22deleted250130setmessages: + msg233503
2015年01月06日 03:49:15benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg233502
2015年01月06日 02:58:37deleted250130create

AltStyle によって変換されたページ (->オリジナル) /