public SocketConnector(BaseSocketConnectionHost host, string name, IPEndPoint remoteEndPoint, ProxyInfo proxyData, EncryptType encryptType, CompressionType compressionType, ICryptoService cryptoService, int reconnectAttempts, int reconnectAttemptInterval, IPEndPoint localEndPoint) : base(host, name, localEndPoint, encryptType, compressionType, cryptoService, remoteEndPoint) { FReconnectTimer = new Timer(new TimerCallback(ReconnectConnectionTimerCallBack)); FReconnectAttempts = reconnectAttempts; FReconnectAttemptInterval = reconnectAttemptInterval; FReconnectAttempted = 0; FProxyInfo = proxyData; }
public BaseSocketConnectionCreator(BaseSocketConnectionHost host, string name, IPEndPoint localEndPoint, EncryptType encryptType, CompressionType compressionType, ICryptoService cryptoService, IPEndPoint remoteEndPoint) { Context = new SocketCreatorContext { CompressionType = compressionType, CryptoService = cryptoService, Host = host, EncryptType = encryptType, Name = name, LocalEndPoint = localEndPoint, RemotEndPoint = remoteEndPoint }; //fWaitCreatorsDisposing = new ManualResetEvent(false); }
public BaseSocketConnection(BaseSocketConnectionHost host, BaseSocketConnectionCreator creator, Socket socket) { Context = new SocketContext { ConnectionId = host.Context.GenerateConnectionId(), SyncData = new object(), Host = host, Creator = creator, SocketHandle = socket, SyncActive = new object(), Active = false, WriteQueue = new Queue<MessageBuffer>(), WriteQueueHasItems = false, SyncReadPending = new object(), ReadPending = false, SyncEventProcessing = new object(), EventProcessing = EventProcessing.epNone, LastAction = DateTime.Now, }; FWriteOV = new SocketAsyncEventArgs(); FReadOV = new SocketAsyncEventArgs(); }
public BaseSocketConnectionCreator(BaseSocketConnectionHost host, string name, IPEndPoint localEndPoint, ICryptoService cryptoService) : this(host, name, localEndPoint, EncryptType.etNone, CompressionType.ctNone, cryptoService, null) { }
public SocketListener(BaseSocketConnectionHost host, string name, IPEndPoint localEndPoint, EncryptType encryptType, CompressionType compressionType, ICryptoService cryptoService, byte backLog, byte acceptThreads) : base(host, name, localEndPoint, encryptType, compressionType, cryptoService) { FBackLog = backLog; FAcceptThreads = acceptThreads; }
internal ClientSocketConnection(BaseSocketConnectionHost host, BaseSocketConnectionCreator creator, Socket socket) : base(host, creator, socket) { }
public BaseSocketConnection(BaseSocketConnectionHost host, Socket socket) : this(host, host.Context.SocketCreators[0], socket) { }
public ServerSocketConnection(BaseSocketConnectionHost host, BaseSocketConnectionCreator creator, Socket socket) : base(host, creator, socket) { //----- }
public ServerSocketConnection(BaseSocketConnectionHost host, Socket socket) : base(host, socket) { //----- }