views:

380

answers:

3

I've created a very simple sockets server in C# that, when given a number, returns the number doubled. I'm using TCPListener. This server currently works with a simple Winform client I put together, using TCPClient.

I tried to connect to the server with Absolute Telnet while it was running. It connects, however the telnet program doesn't appear to let me enter any text, etc.

Should a basic sockets server like this be accessible via a regular telnet or SSH client app? If not, what would it take to add that support to my server?

+1  A: 

Not necessarily. There are several Telnet protocols in existence and it varies from client to client which one is used by default. Windows Telnet assumes it's a plain text protocol (straight TCP data transfer) until it sees some data it recognizes as a telnet protocol so if you want to test this app of yours try that. Keep in mind as you type nothing will show up if local echo is turned off and your server doesn't echo.

Try to determine the protocols that the SSH and Telnet clients you're using are running and look up their RFCs.

Spencer Ruport
A: 

Do you have "local echo" turned on?

rice
+2  A: 

A tool like Wireshark is good for debugging network I/O -- it lets you see exactly what packets are entering and leaving your network interface in near real time.

You definitely don't want to use SSH -- you haven't coded anything to account for SSH authentication or encryption.

Jim Lewis