Connecting to server
Hello, so I have not used Java in over four years. Actually done very little programming or computers in that time period. Anyways, I was going through some of my old code and I am having a very newbie issue with one of my programs.
It is a Socket code that creates a server which listens for a connection for 1 minute and then expires.
Thats great fine dandy.. compiles - i understand it because I have great comments. However, I never created a README file on steps I have to take to connect to the server.
Basically, I remember that I used to go to File->Run and typing in something (I am guessing it involves servers IP Adress and port #) to connect to the server. BUT, I dont remember how to do that anymore. Ya, I feel stupid but it has been so long since I played with computers. Was wondering if someone can help me figure out?
In summary,
My code creates a server that is waiting for a connections from others
But I dont know how to connect to it anymore!
This is the snippet that creates the server:
try {
myServer = new ServerSocket(portNumber);
myServer.setSoTimeout(30000);//server times out after 30 seconds
}
catch (IOException e) {
System.out.println("Got exception trying to create serversocket: " + e);
}
I tried using
1) "telnet ip port"
2) "telnet ip:port"
but to no avail.
Message was edited by:
StreetFighter
Message was edited by:
StreetFighter

