i have a socket client and a socket server.
(the server is in python, and is synchroneous.)
sometimes the clients send an empty string. i'm required to identify this situation, and return a response.
with this code, the server just keeps on waiting, and the client's don't get anything in return, unless it sends something mroe "fat" ;)
how can i capture the empty message? is it at all possible?
that's my server code:
import SocketServer
def multi_threaded_socket_server():
class MyRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
while True:
print 'waiting for client calls...'
received = self.request.recv( PACKET_SIZE )
(handle request... )