[Edu-sig] writing an chat-server
A[r]TA
arta@x-stream.nl
Fri, 14 Apr 2000 12:51:54 +0200
> This looks like a problem with Windows sockets. I know
> the program works perfectly on Unix -- i tested it.
>
> Does it work if you implement the readline() routine
> without makefile()? That is, add this:
>
> def readline(sock):
> line = ""
> while 1:
> ch = sock.recv(1)
> line = line + ch
> if ch == "\n" or not ch: return line
>
> and replace this:
>
> text = sock.makefile().readline()
>
> with this:
>
> text = readline(sock)
That's fine. And now I've to got a clientprogram.
I know it must be the same way as the server. A whole loop and stuff like
that.
But how do I get something like raw_input that doesn't desturb the loop and
waits till
the enterbutton is hit?
A[r]TA
We shall not cease from exploration, and the end of all our exploring will
be to arrive where we started and know the place for the first time.
- T. S. Eliot