reading from sockets

AndrewTK atkedzierski at gmail.com
Sat Aug 12 09:01:24 EDT 2006


> I'm assuming that your server waits to receive the word 'hello' before
> replying with the three strings (first, second, and third)?  So once your

Nope - actually it's a threaded "server", with the main thread simply
dumping network input to the console and command line input being
directly dumped to the network output stream.

I confess to having typed the three lines manually...!

It's at:
http://www.dcs.st-and.ac.uk/~atk1/perso/java/servers/RespondingServer.java

It launches on the command line with
java RespondingServer _port_

_port_ being the port number it should listen for data on.




More information about the Python-list mailing list