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