|
|
@@ -26,7 +26,7 @@ public class SendAndReceiveMessage { |
|
|
public static void main(String[] args) throws Exception { |
|
|
public static void main(String[] args) throws Exception { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void sendMessage(){ |
|
|
|
|
|
|
|
|
public void sendMessage(Message message){ |
|
|
/* |
|
|
/* |
|
|
* The following section of code establishes a server listening |
|
|
* The following section of code establishes a server listening |
|
|
* on port 1011 for new connections, and then "handles" them by |
|
|
* on port 1011 for new connections, and then "handles" them by |
|
|
@@ -128,7 +128,7 @@ public class SendAndReceiveMessage { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void receiveMessage(){ |
|
|
|
|
|
|
|
|
public void receiveMessage(Message message){ |
|
|
/* |
|
|
/* |
|
|
* The following section of code establishes a server listening |
|
|
* The following section of code establishes a server listening |
|
|
* on port 1011 for new connections, and then "handles" them by |
|
|
* on port 1011 for new connections, and then "handles" them by |
|
|
|