Subj : Re: network programming in c To : comp.programming From : mwojcik Date : Mon Oct 10 2005 09:34 pm In article <1128912114.769467.127110@g14g2000cwa.googlegroups.com>, "dajava" writes: > Michael Wojcik wrote: > > > Personally, for TCP/IP and sockets programming > > I am not sure if this novice's question is suitable for this thread. It's a new question; it should be in a new thread. At least it's a related question, and more or less topical for the group. > I was reading Jonathan Bartlett' message when I got the question about > telnet and tcp/ip. > > Say, there is a chess playing server. Choose any one. Which protocol > does it use? There are many possibilities. "a chess playing server" doesn't provide enough constraints to decide what characteristics an appropriate protocol would have, so you haven't given us any grounds on which to select one. It's not even clear what you mean by "a chess playing server". Is it a system that simulates a chess game and lets two people play chess remotely? Does it play chess itself? Does it exchange messages describing play with some chess-game client, or does it drive a generic front end which only handles rendering (such as a web browser), or something else again? > I thought that kind of server used telnet. I can imagine something that might reasonably be called a "chess server" using Telnet, which is a remote terminal protocol. Telnet would not be my first choice for most of the things I might call "chess servers", but without knowing a great deal more about the application this is all idle speculation. > But a professional programer > told me his own server useed tcp/ip. So, coincidentally, do the vast majority of Telnet clients and servers. Telnet is an application-layer protocol (or possibly a combination of application- and presentation-layer protocols, for OSI fans). TCP is a session-layer protocol. They're not mutually exclusive. > Therefore, a chess playing can use > telent or tcp/ip. It relly up to its developers. Is that true? Distributed chess games have been played in letters sent by mail. If you can communicate information, you can use it to describe the moves in a chess game. Generally speaking, a channel is a channel. One protocol may be more convenient for a given purpose than another (and, indeed, usually will be, which is why we have more than one protocol, and why we have protocol stacks, rather than simply stuffing bits down a wire). > What is > the advantages and disavantages between telnet and tcp/ip for a chess > server. The question as stated is nonsensical. In general, what you're asking is how to choose a protocol for data communication. That's a tremendously broad question - I have a shelf full of books that deal with it. I suggest you go to a decent library and get a book on data communications, computer networks, or network programming; you need the basic background before you can make informed decisions about protocols. > >I "grew up" with the > > BSD man pages, Douglas Comer, and Rich Stevens; with liberal doses > > (i.e., when generalized PIU trace data is included)" - brilliant! I believe this is the most bizarre snipping of a Usenet post I've ever seen. -- Michael Wojcik michael.wojcik@microfocus.com Be sure to push the button of the bottom, and push the button of the settlement page indicated next only once, there is fear of the bottom rhinoceros multiplex lesson money. -- Sukebe Net .