Re: network programming in c




In article <NNSdnTTy2eNudNfeRVnyhA@xxxxxxxxx>, moi <avk@localhost> writes:
> dajava wrote:
> >
> > Say, there is a chess playing server. Choose any one. Which protocol
> > does it use?
> > I thought that kind of server used telnet. But a professional programer
> > told me his own server useed tcp/ip.
>
> The chess and go -servers that I know (Fics and derivatives, for short)
> have a listening port open (5000, IIRC for Fics). After accept() they
> communicate with their client with CRLF-delimited ASCII-strings.

Of course, this is very common with application protocols designed
for TCP/IP, though it's a cultural thing - there's nothing inherent
in TCP/IP that makes it more suited for text-based application
protocols (or ASCII, for that matter, though since eg DNS uses ASCII
there's an ASCII bias in practice). FTP, SMTP, HTTP, and so on use
plain-text commands.

Ironically, Telnet itself doesn't use plain-text commands.

> That allows people to connect to the server, using /usr/bin/telnet as
> their client program.
> The server recognises but ignores most (all but one ...) of the telnet
> options. (which is allowed by the RFC, IIRC)

Typical Telnet clients by default don't attempt to initiate Telnet
option negotiation when connecting to a port other than 23, which is
why you can use them to drive SMTP, HTTP, POP3, NNTP, and so forth.
(I use a Telnet client relatively frequently to do POP3 and NNTP,
when I want to quickly check something on the server or perform some
administrative action that's not convenient through a conventional
client.)

A Telnet implementation is always free to refuse to enable an option,
AFAIK, so it should be legal for one to support no Telnet options at
all, just NVT mode. (It can't actually "ignore" them - it has to
send DONT or WONT - but it can reject them.)

> That is why the clients are sometimes called 'telnet clients', which is
> confusing. To say the least.

That may indeed be why the OP believed the server used Telnet. And
for all I know, the server in question might have an actual Telnet
implementation; that'd be an odd choice, IMO, if it always drives a
chess-game application, but it would provide a standard way to handle
things like negotiating terminal type.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

Some there are, brave, high-souled fellows, who could borrow the world to
play at ball, and never feel the responsibility, whereas others are uneasy
and not themselves with a single shilling that does not belong to them.
-- Arthur Ransome
.



Relevant Pages

  • Re: Socket Server with Encryption help
    ... Authentication protocols are fiercely difficult to get right. ... "Practical Cryptography" book, that was suggested to you earlier, could be ... Client connects into Server and Server accepts the connection. ...
    (microsoft.public.dotnet.security)
  • Re: Socket Server with Encryption help
    ... Before the client ... Authentication protocols are fiercely difficult to get right. ... by Needham and Schroeder "Using encryption for authentication in large ... Client connects into Server and Server accepts the connection. ...
    (microsoft.public.dotnet.security)
  • Re: SBS 2003 SP 1 on MSDN disks
    ... the PPPoE client, which I believe it operate as, even if Earthlink does not know it, and stop using the Windows Server 2003 PPPoE client to connect. ... I have started the Telnet service on my client computer ... I have started the Telnet service on the SBS2003 server. ...
    (microsoft.public.windows.server.sbs)
  • Re: Kerberos V5 Authentication for a Telnet Session
    ... Neither Microsoft's Telnet Server nor their Telnet client support ... Kerberos authentication. ...
    (comp.protocols.kerberos)
  • Re: Kerberos V5 Authentication for a Telnet Session
    ... I think neither Windows telnet client nor Windows telnet server support ... Kerberos authentication - with the built-ins, ...
    (microsoft.public.windows.server.security)