Skip to content
Snippets Groups Projects
Commit 67c16158 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

better "hello i am here" statement

parent 45284f12
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,8 @@ public class TcpExample1Telnet ...@@ -34,6 +34,8 @@ public class TcpExample1Telnet
{ {
try try
{ {
System.out.println("TcpExample1Telnet has started and is waiting for a connection: telnet localhost 2317" );
// The ServerSocket waits for a connection from a client. // The ServerSocket waits for a connection from a client.
// It returns a Socket object when the connection occurs. // It returns a Socket object when the connection occurs.
ServerSocket serverSocket = new ServerSocket(2317); ServerSocket serverSocket = new ServerSocket(2317);
......
Program response:
run:
TcpExample1Telnet has started and is waiting for a connection: telnet localhost 2317
This server response was written by server TcpExample1
BUILD SUCCESSFUL (total time: 13 seconds)
Telnet window:
don@it154928 /cygdrive/c/Program Files/NetBeans 8.2 don@it154928 /cygdrive/c/Program Files/NetBeans 8.2
$ telnet localhost 2317 $ telnet localhost 2317
Trying ::1... Trying ::1...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment