public TcpSession() { SessionData = new DataContainer(); ReceiveEventArgs = new SocketAsyncEventArgs(); SendEventArgs = new SocketAsyncEventArgs(); SendEventArgs.Completed += SendComplate;//数据发送完成事件 ReceiveEventArgs.Completed += ReceiveComplate; }
public TcpSession(ILoger loger) { this.loger = loger; SessionId = ObjectId.GenerateNewId().ToString();//生成唯一sesionId SessionData = new DataContainer(); ReceiveEventArgs = new SocketAsyncEventArgs(); SendEventArgs = new SocketAsyncEventArgs(); }
public RUdpSession() { SessionData = new DataContainer(); }