• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can you test a server program  RSS feed

 
Jeff Slominsky
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a small chat server and attempted to telnet using
localhost as the server name, but the connection kept failing. When I pinged my computer(localhost), it worked, can anybody tell me how to telnet into my own ports, say from 2000 and above??
thank you,
Jeff
 
Joel Peach
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff,
The way the telnet command works is platform specific but something that usually works is:
> telnet localhost port
Where port is the numeric value of the port you're trying to reach. Sometimes, an alternate URI-like syntax is used like the following:
> telnet localhost:port
This is almost identical except the colon is used as a delimiter between the hostname and the port.
If these don't work, let me know which platform and telnet software you're using and I'll see if we can't pinpoint the issue.
As a note, localhost is an internet alias that always points to the loopback IP address: 127.0.01 It's basically the IP standard way of saying the destination is "the host that originated the request." Although it shouldn't make a difference, you could always try substituting the numeric IP equivalent of 127.0.0.1 for localhost.
Best of luck!
-Joel
jpeach@traceris.com
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can write a chat server, you should be able implement a basic sort of telnet yourself in just a few lines of java. I once wrote a bit of a chat server and found my two programs for making myself a client or a server indispensable.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!