Ejemplo n.º 1
0
        public RpcConnection(int id, RpcServer server, Socket socket, RpcListener listener, bool debug)
            : base(id, socket, debug)
        {
            _listener = listener;
            _server   = server;

            _readEventArgs = _listener.SocketAsyncReadEventArgsPool.Get() as PooledSocketAsyncEventArgs;
            _sendEventArgs = _listener.SocketAsyncSendEventArgsPool.Get() as PooledSocketAsyncEventArgs;

            _readAwait = new SocketAwaitable(_readEventArgs, Scheduler, debug);
            _sendAwait = new SocketAwaitable(_sendEventArgs, Scheduler, debug);
        }
Ejemplo n.º 2
0
 public RpcListener(int maxConnectionCount, int bufferSize, RpcServer server, bool debug = false)
     : base(maxConnectionCount, bufferSize, debug)
 {
     _debug  = debug;
     _server = server;
 }