gecco.communication.client
Class ServerConnection
java.lang.Object
|
+--gecco.communication.client.ServerConnection
- public class ServerConnection
- extends Object
This class keeps track of the connection to the server
- Author:
- Niklas Hallenfur, Jon Åslund
Constructor Summary |
ServerConnection()
Constructor for the ServerConnection object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerConnection
public ServerConnection()
- Constructor for the ServerConnection object
getDataOutputStream
public DataOutputStream getDataOutputStream()
- Gets the DataOutputStream attribute of the ServerConnection object
- Returns:
- The DataOutputStream value
getDataInputStream
public DataInputStream getDataInputStream()
- Gets the DataInputStream attribute of the ServerConnection object
- Returns:
- The DataInputStream value
connectToServer
public void connectToServer(String hostname,
int port)
throws Exception
- Tries to connect to a server
- Parameters:
port
- the port to connect tohostname
- Description of Parameter- Throws:
Exception
- Description of Exception