I'm trying to have a TCP-Client that listens on a socket but without being blocked by it. meaning - if something is waiting, read it. if not, do something else and come back and check later. I couldn't find any reference to this question.
The best thing, obviously would be to have a "peek" ability the client knows if something is waiting, and how many bytes. I guess this capability is not implemented in TCP, but if there anything that might help me with that?