This commit is contained in:
Ziver Koc 2008-11-14 16:38:36 +00:00
commit 613bef2496
108 changed files with 8397 additions and 0 deletions

View file

@ -0,0 +1,29 @@
package zutil.network.nio.server;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
public class ClientData {
private SocketChannel socketChannel;
private long lastMessageReceived;
public ClientData(SocketChannel socketChannel){
this.socketChannel = socketChannel;
}
public SocketChannel getSocketChannel(){
return socketChannel;
}
public InetSocketAddress getAddress(){
return (InetSocketAddress) socketChannel.socket().getRemoteSocketAddress();
}
public void setLastMessageReceived(long time){
lastMessageReceived = time;
}
public long getLastMessageReceived(){
return lastMessageReceived;
}
}