Getting one character at a time from sockets
Erno Kuusela
erno-news at erno.iki.fi
Wed Feb 7 01:48:19 EST 2001
In article <95qim7$i38$1 at nnrp1.deja.com>, penman <pen_man at my-deja.com>
writes:
| In article <95qg45$5b0$0 at 216.39.151.169>,
| Donn Cave <donn at oz.net> wrote:
|| Don't mess around with non-blocking. Even recv(8000) will return
|| more or less immediately if you send any data at all, so it seems
|| kind of likely you're sending no data until the CR. Substitute a
|| test client that has its data built in, and just send('i') to the
|| server. I bet recv() will get it right away, Nagel algorithms
|| notwithstanding.
| Thank you, Donn. But the problem is that I have to use ordinary telnet
| clients, such as CRT, Netterm, so let the users access to the server
| without any specialy programs.
the telnet protocol provides a mechanism to negotiate options such
as the character-at-a-time mode. the default is line at a time,
i believe. the rfcs have the details...
| I wonder why nobody ever had the need to recv 1 character "unbuffered"
| in Python.
again: there is no buffering on the python side here.
-- erno
More information about the Python-list
mailing list