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; }
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); }
public SocketRemotingServer(string name, IPEndPoint listeningEndPoint) { _serverSocket = new ServerSocket(listeningEndPoint, HandleRemotingRequest); _requestHandlerDict = new Dictionary<int, IRequestHandler>(); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(name ?? GetType().Name); }