|
@@ -12,8 +12,8 @@ namespace ET
|
|
|
self.SessionStreamDispatcherType = sessionStreamDispatcherType;
|
|
self.SessionStreamDispatcherType = sessionStreamDispatcherType;
|
|
|
|
|
|
|
|
self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Outer);
|
|
self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Outer);
|
|
|
- self.Service.ErrorCallback += self.OnError;
|
|
|
|
|
- self.Service.ReadCallback += self.OnRead;
|
|
|
|
|
|
|
+ self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
|
|
|
|
|
+ self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
|
|
|
|
|
|
|
|
NetThreadComponent.Instance.Add(self.Service);
|
|
NetThreadComponent.Instance.Add(self.Service);
|
|
|
}
|
|
}
|
|
@@ -27,9 +27,9 @@ namespace ET
|
|
|
self.SessionStreamDispatcherType = sessionStreamDispatcherType;
|
|
self.SessionStreamDispatcherType = sessionStreamDispatcherType;
|
|
|
|
|
|
|
|
self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Outer);
|
|
self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Outer);
|
|
|
- self.Service.ErrorCallback += self.OnError;
|
|
|
|
|
- self.Service.ReadCallback += self.OnRead;
|
|
|
|
|
- self.Service.AcceptCallback += self.OnAccept;
|
|
|
|
|
|
|
+ self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
|
|
|
|
|
+ self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
|
|
|
|
|
+ self.Service.AcceptCallback += (channelId, IPAddress) => self.OnAccept(channelId, IPAddress);
|
|
|
|
|
|
|
|
NetThreadComponent.Instance.Add(self.Service);
|
|
NetThreadComponent.Instance.Add(self.Service);
|
|
|
}
|
|
}
|