Commit 7cfc9f76 authored by Matti Pulkkinen's avatar Matti Pulkkinen
Browse files

fixed comments and removed needless method in SocketHandler

parent 9aafa234
......@@ -35,6 +35,7 @@ public class SocketHandler {
} catch (UnknownHostException ex) {
System.err.println("Failed in creating InetAddress");
ex.printStackTrace();
System.exit(3);
}
return null;
} // bytesToAddress(byte[])
......@@ -43,9 +44,9 @@ public class SocketHandler {
private Socket socket;
/**
* TODO
* Creates a new SocketHandler.
*
* @throws IOException If opening the ServerSocket fails.
* @throws IOException If creating the SocketHandler fails.
*/
public SocketHandler() throws IOException {
this.serverSocket = new ServerSocket(LOCALPORT);
......@@ -53,7 +54,7 @@ public class SocketHandler {
} // SocketHandler()
/**
* Closes the resources handled by this ConnectionHandler.
* Closes the resources handled by this SocketHandler.
*
* @throws IOException If closing either the Socket or the ServerSocket fails.
*/
......@@ -67,13 +68,9 @@ public class SocketHandler {
}
} // close()
// TODO is this needed?
public boolean localPortIsClosed() {
return this.serverSocket.isClosed();
} // localPortIsClosed()
/**
* TODO
* Uses this SocketHandler to create a StreamHandler object that contains the streams from this
* SocketHandler's socket.
*
* @throws IOException if opening one of the sockets fails.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment