Skip to content
Snippets Groups Projects
Commit 8cb12721 authored by danielcain's avatar danielcain
Browse files

Assignment 2 tcpClient and tcpServer with discussion (Javadocs)

parent 40783741
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,14 @@ import java.net.*;
public class CainTcpClient {
public final static String LOCALHOST = "0:0:0:0:0:0:0:1"; // String constant, i.e. 127.0.0.1
/*
* main class with client requesting to talk to server. After server accepts
* client's request to join on 2468, encoding enables both server and client
* to talk via messages below. A differentiating feature is to have the message
* show up on both the client and server output so the conversation between
* both makes sense and don't have to click back and forth to understand.
*/
public static void main(String[] args) {
try {
while (true) {
......
......@@ -12,6 +12,13 @@ import java.net.*;
public class CainTcpServer
{
/*
* main class with server listening for the client and will then stop blocking.
* After server accepts client's request to join on 2468, encoding enables both server and client
* to talk via messages below. A differentiating feature is to have the message
* show up on both the client and server output so the conversation between
* both makes sense and don't have to click back and forth to understand.
*/
public static void main(String[] args)
{
try
......
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