DateServer.java
import java.io.*;
import java.net.*;
import java.util.*;
public class DateServer extends Thread {
private ServerSocket dateServer;
public static void main(String argv[]) throws Exception {
new DateServer();
}
public DateServer() throws Exception {
dateServer = new ServerSocket(3000);
System.out.println("Server listening on port 3000.");
this.start();
}
public void run() {
while(true) {
try {
System.out.println("Waiting for connections.");
Socket client = dateServer.accept();
System.out.println("Accepted a connection from: "+
client.getInetAddress());
Connect c = new Connect(client);
} catch(Exception e) {}
}
}
}
class Connect extends Thread {
private Socket client...