public SocketServerBase(IAppServer appServer, ListenerInfo[] listeners) { AppServer = appServer; IsRunning = false; ListenerInfos = listeners; Listeners = new List<ISocketListener>(listeners.Length); }
public TcpSocketServerBase(IAppServer appServer, ListenerInfo[] listeners) : base(appServer, listeners) { var config = appServer.Config; uint dummy = 0; m_KeepAliveOptionValues = new byte[Marshal.SizeOf(dummy) * 3]; //whether enable KeepAlive BitConverter.GetBytes((uint)1).CopyTo(m_KeepAliveOptionValues, 0); //how long will start first keep alive BitConverter.GetBytes((uint)(config.KeepAliveTime * 1000)).CopyTo(m_KeepAliveOptionValues, Marshal.SizeOf(dummy)); //keep alive interval BitConverter.GetBytes((uint)(config.KeepAliveInterval * 1000)).CopyTo(m_KeepAliveOptionValues, Marshal.SizeOf(dummy) * 2); m_SendTimeOut = config.SendTimeOut; m_ReceiveBufferSize = config.ReceiveBufferSize; m_SendBufferSize = config.SendBufferSize; }
protected abstract ISocketListener CreateListener(ListenerInfo listenerInfo);
protected override ISocketListener CreateListener(ListenerInfo listenerInfo) { return new TcpAsyncSocketListener(listenerInfo); }
public TcpAsyncSocketListener(ListenerInfo info) : base(info) { m_ListenBackLog = info.BackLog; }
protected virtual ISocketListener CreateListener(ListenerInfo listenerInfo) { return new TcpAsyncSocketListener(listenerInfo); }
public AsyncSocketServer(IAppServer appServer, ListenerInfo[] listeners) : base(appServer, listeners) { }
public UdpSocketListener(ListenerInfo info, IPool<SaeState> saePool) : base(info) { m_SaePool = saePool; }
public UdpSocketListener(ListenerInfo info) : base(info) { }
protected SocketListenerBase(ListenerInfo info) { Info = info; }
public UdpSocketListener(ListenerInfo info, IPool<SocketAsyncEventArgs> saePool) : base(info) { m_SaePool = saePool; }
public TcpAsyncSocketListener(ListenerInfo info) { Info = info; m_ListenBackLog = info.BackLog; }