Hi,
I use asyncore to communicate with remote servers using "length:message"-type protocol. Can someone recommend me a way to read exact amount of bytes from socket? I was trying to use handle_read to fill internal buffer and call my function every time, checking for size of buffer, but it looked too ugly(Check if buffer is long enough to read length, check if buffer length is bigger than message length, read message, etc...). Is it possible to have something like "socket.read(bytes)" which would sleep until buffer is filled enough and return value?