Ejemplo n.º 1
0
 public SocketRemotingServer(string name, SocketSetting socketSetting, ISocketEventListener socketEventListener = null)
 {
     _serverSocket = new ServerSocket(socketEventListener);
     _requestHandlerDict = new Dictionary<int, IRequestHandler>();
     _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(name ?? GetType().Name);
     _serverSocket.Bind(socketSetting.Address, socketSetting.Port).Listen(socketSetting.Backlog);
     _started = false;
 }
Ejemplo n.º 2
0
 public SocketRemotingServer(string name, IPEndPoint listeningEndPoint, SocketSetting setting = null)
 {
     _setting = setting ?? new SocketSetting();
     _receiveDataBufferPool = new BufferPool(_setting.ReceiveDataBufferSize, _setting.ReceiveDataBufferPoolSize);
     _serverSocket = new ServerSocket(listeningEndPoint, _setting, _receiveDataBufferPool, HandleRemotingRequest);
     _requestHandlerDict = new Dictionary<int, IRequestHandler>();
     _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(name ?? GetType().Name);
 }
Ejemplo n.º 3
0
 public SocketRemotingServer(string name, IPEndPoint listeningEndPoint)
 {
     _serverSocket = new ServerSocket(listeningEndPoint, HandleRemotingRequest);
     _requestHandlerDict = new Dictionary<int, IRequestHandler>();
     _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(name ?? GetType().Name);
 }