socket: connection reset by server before client gets response

Hendrik van Rooyen mail at microcorp.co.za
Mon Jul 9 01:59:57 EDT 2007


 "ahlongxp" <ah...p at gmail.com> wrote:


> 
> > Try to wait a while in the server thread, after sending the
> > message before closing the connection, to give the message
> > time to get transmitted.
> >
> > time.sleep(0.5) should do it...
> >
> > - Hendrik
> 
> OMG, it works.
> I can't believe the problem can be solved so easily.
> 
> Thanks very much.

It's a pleasure.

Sometimes I think that all would be programmers should be
forced to write a "Hello World" to transmit out of a serial port
in assembler on hardware that carries no OS - just to teach 
them about interrupts and time.

I would require them to hand assemble the code too, to make
them appreciate what a compiler or an interpreter does.

And if you fail the test, you get taken out and fed to the 
sacred crocodiles.

- Hendrik

--
For training with a bite, enrol now in Heavy Henry's 
Wholesome Hackadamy for Precocious Programmers






More information about the Python-list mailing list