Tag Archives: sockets

Fun with Sockets

Whilst doing some coding today for my semester research project I found a need to check for incoming data on a socket without taking any data out of the stream. Here’s the code I came up with: cp.sock.setblocking(False) try: cp.sock.recv(0) … Continue reading

Posted in programming | Tagged , | 2 Comments