gecco.communication.server
Class ClientConnection
java.lang.Object
|
+--gecco.communication.server.ClientConnection
- public class ClientConnection
- extends Object
A class that keeps track of the 'physical' connection to a client
- Author:
- Niklas Hallenfur
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClientConnection
public ClientConnection(Socket sock,
String r,
int n1)
throws IOException
- Parameters:
sock
- The client's socketr
- The client's rolen1
- the client's unique id- Throws:
IOException
- Description of Exception
getId
public int getId()
- Gets the Id attribute of the ClientConnection object
- Returns:
- The Id value
getRole
public String getRole()
- Gets the Role attribute of the ClientConnection object
- Returns:
- The Role value
getDataOutputStream
public DataOutputStream getDataOutputStream()
- Gets the DataOutputStream attribute of the ClientConnection object
- Returns:
- The DataOutputStream value
getDataInputStream
public DataInputStream getDataInputStream()
- Gets the DataInputStream attribute of the ClientConnection object
- Returns:
- The DataInputStream value