package edu.miamioh.cse283.htw;

public class Server {
	// networking code
	// 
	// connecting
	// handoff
}

@@ -28,16 +28,57 @@
 htw;%0D%0A%0D%0A
+import java.io.*;%0D%0Aimport java.net.*;%0D%0A%0D%0A
 public c
@@ -116,17 +116,16 @@
 ode%0D%0A%09//
- 
 %0D%0A%09// co
@@ -145,13 +145,1506 @@
  handoff
+%0D%0A%0D%0A%09protected ServerSocket socket;%0D%0A%0D%0A%09/**%0D%0A%09 * Create a new Server object that listens on the given port%0D%0A%09 * %0D%0A%09 * @param port%0D%0A%09 *            the port number on which to listen%0D%0A%09 * @throws IOException%0D%0A%09 */%0D%0A%09public Server(int port) throws IOException %7B%0D%0A%09%09socket = new ServerSocket(port);%0D%0A%09%7D%0D%0A%0D%0A%09/**%0D%0A%09 * Listen on the socket and returns a new %7B@link Client%7D socket%0D%0A%09 * %0D%0A%09 * @return new %7B@link Client%7D socket%0D%0A%09 */%0D%0A%09protected Socket getNewClient() %7B%0D%0A%09%09try %7B%0D%0A%09%09%09return socket.accept();%0D%0A%09%09%7D catch (IOException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%09return null;%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09/**%0D%0A%09 * Send a text message from this server to the given client.%0D%0A%09 * %0D%0A%09 * @param client%0D%0A%09 *            the %7B@link Client%7D to which the message should be sent%0D%0A%09 * @param message%0D%0A%09 *            the message that should be sent%0D%0A%09 */%0D%0A%09public void send(Socket client, String message) %7B%0D%0A%09%09try %7B%0D%0A%09%09%09new PrintWriter(client.getOutputStream()).println(message);%0D%0A%09%09%7D catch (IOException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09/**%0D%0A%09 * Listen on the given socket for a message from the %7B@link Client%7D%0D%0A%09 * %0D%0A%09 * @param client%0D%0A%09 *            the socket on which to listen%0D%0A%09 * @return the message that the %7B@link Client%7D sent. If there was a problem,%0D%0A%09 *         return %22ERR%22%0D%0A%09 */%0D%0A%09public String recieve(Socket client) %7B%0D%0A%09%09try %7B%0D%0A%09%09%09return new BufferedReader(new InputStreamReader(%0D%0A%09%09%09%09%09client.getInputStream())).readLine();%0D%0A%09%09%7D catch (IOException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%09return %22ERR%22;%0D%0A%09%09%7D%0D%0A%09%7D
 %0D%0A%7D%0D%0A

write some basic methods in the Server class