Hello everyone,
I'm trying to make a simple telnet chat program, but I quickly came to the realisation that I don't really know how to get the client to bind to the server. I understand the logic of how I'm going to send data to a connected client, but the challance I'm facing is how, when a client establishes a connection to the server, is it going to recognise that connection and prevent the client from assuming a login timeout and disconnecting. Is there some special command that needs to be dispatched to the client? Am I completely doing this wrong? Any help would be greatly appreciated, Thanks!
- Nicholas

Recommended Answers

All 3 Replies

Can you be more specific ?, are you planning to to develop the telnet clienet by your self or to use built in telnet, e.g (windows telnet)

The telnet protocol has a complete conversation between client and server on startup. When you connect, it (the server) sends you queries about what your (the client) capabilites are, and you need to catch them and reply accordingly. That is so the server knows what to do when you send it data. All of this goes on before you get the login prompt. If you don't respond to them, then eventually it will time you out and terminate your connection. Since I have in the past implemented the complete telnet protocol (both client and server) for a real-time operating system (back around 1990), I can assure you that this is not trivial - not difficult, but not easy. First, you need to find documentation for the protocol on the internet (or pay big $$ to purchase the DDN white books, courtesy of the US Department of Defense), and then you need to implement the client side of the conversation. In truth, there isn't much you need to be able to do, but handling the "can you" queries is essential.

Have fun! :-)

My confusion - are you trying to connect with a telnet server, or becomee one yourself?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.