Hi, <div><br></div><div>I am using twisted in a cross-platform manner. I have written both the client and server. The client is twisted and the server uses python threads. I am using the select reactor and plain old TCP connections. I encode my messages to JSON to send them.</div>


<div><br></div><div>On Windows I get tons of un-clean connectionlost events, on Mac everything works perfectly. I am using the same data set in each case. </div><div><br></div><div>If I use the threaded server on windows and the twisted client on mac then I still get tons of errors. 99% of these times these errors happen after the last dataReceived when the socket should be closed cleanly. </div>
<div><br></div><div>My threaded code is:</div><div>        try:</div><div>            (clientsocket, address) = serversocket.accept()</div><div>        except Exception, e:</div><div>            print &quot;Exception &quot;, e, clientsocket</div>
<div>        try:</div><div>            p = processrequest()</div><div>            p.set_socket(clientsocket)</div><div>            p.start()</div><div> </div><div>and in processrequest</div><div>self.sock.send_all(my_json_message)</div>
<div>self.sock.close()</div><div><br></div><div>Is this the correct behavior for using plain sockets with twisted? Any reason why this would be perfectly fine on OSX and not Windows? Sorry for the long email. </div><div><br>
</div><div>Thank you very very much,</div><div>Dan </div><div><br></div><div><br></div>