Skip to content
Browse files

Added client name

  • Loading branch information...
1 parent 925a937 commit 928a3f7a5c8e8426c5cfb1110967fb07ec61861d @theanti9 committed Jan 31, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/com/snow/IO/SnowTcpClient.java
View
11 src/com/snow/IO/SnowTcpClient.java
@@ -12,6 +12,8 @@
private SocketChannel socket;
private ArrayList<ByteBuffer> toWrite;
+ private String name;
+
public SnowTcpClient(SelectionKey key) throws IOException {
this.selectionKey = key;
this.socket = (SocketChannel)this.selectionKey.channel();
@@ -48,4 +50,13 @@ public void Disconnect() throws IOException {
socket.close();
SnowTcpServer.clientDisconnected(this);
}
+
+ public void SetName(String n) {
+ this.name = n;
+ }
+
+ public String GetName() {
+ return this.name;
+ }
+
}

0 comments on commit 928a3f7

Please sign in to comment.
Something went wrong with that request. Please try again.