Inheritance: INowinServer
Esempio n. 1
0
 public SaeaLayerCallback(ITransportLayerHandler handler, Socket listenSocket, Server server, int handlerId, ExecutionContextFlow contextFlow)
 {
     _handler = handler;
     _listenSocket = listenSocket;
     _server = server;
     _handlerId = handlerId;
     _contextSuppresser = ExecutionContextFlowSuppresser.CreateContextSuppresser(contextFlow);
     RecreateSaeas();
     handler.Callback = this;
 }
Esempio n. 2
0
 public SaeaLayerCallback(ITransportLayerHandler handler, Socket listenSocket, Server server, int handlerId)
 {
     _handler = handler;
     _listenSocket = listenSocket;
     _server = server;
     _handlerId = handlerId;
     _receiveEvent.Completed += IoCompleted;
     _sendEvent.Completed += IoCompleted;
     _disconnectEvent.Completed += IoCompleted;
     _receiveEvent.DisconnectReuseSocket = true;
     _sendEvent.DisconnectReuseSocket = true;
     _disconnectEvent.DisconnectReuseSocket = true;
     _receiveEvent.UserToken = this;
     _sendEvent.UserToken = this;
     _disconnectEvent.UserToken = this;
     handler.Callback = this;
 }
Esempio n. 3
0
 public IDisposable Start()
 {
     var s = new Server(this);
     s.Start();
     return s;
 }