is it possible to know if a client connection is lost?
However the client, when quit send a message to the server, it may that the client crashes… in this case, how to know, on the server side, that the connection to the client is down?
you mean socks communication? just try to send a message and if you get an exception the connection is obviously lost. (this only works with tcp not udp)
if its about crashing because of the exception, try:
the code which sometimes throws an exception
what to do if there is an exception
in case you’r using the queuedconnectionmanger. it has a resetConnectionAvailable() method. which works quite well for me.
Can you post a piece a code with this method? I don’t see how it works.
""" poll for conections """
rendezvous = PointerToConnection()
netAddress = NetAddress()
newConnection = PointerToConnection()
newConnection = newConnection.p()
self.activeConnections[newConnection] = True # Remember connection
self.reader.addConnection(newConnection) # Begin reading connection
connPointer = PointerToConnection()
connection = connPointer.p()