cn.tom.transport.Session Maven / Gradle / Ivy
The newest version!
package cn.tom.transport;
import java.io.Closeable;
import java.io.IOException;
public interface Session extends Closeable{
long id();
String getRemoteAddress();
String getLocalAddress();
void write(T msg);
void writeAndFlush(T msg);
void read();
void flush() throws Exception ;
boolean isActive();
boolean isServer();
void asyncClose() throws IOException;
void catchError(Throwable e);
V getAttr(String key);
void setAttr(String key, V value);
}