public Connection(TcpRpcServer server, TcpClient client, FramePump pump, OutboundTcpEndpoint outboundEp, RpcEngine.RpcEndpoint inboundEp)
            {
                Client     = client;
                Pump       = pump;
                OutboundEp = outboundEp;
                InboundEp  = inboundEp;

                PumpRunner = new Thread(o =>
                {
                    try
                    {
                        Thread.CurrentThread.Name = $"TCP RPC Server Thread {Thread.CurrentThread.ManagedThreadId}";

                        Pump.Run();
                    }
                    finally
                    {
                        OutboundEp.Dismiss();
                        InboundEp.Dismiss();
                        Pump.Dispose();
                        lock (server._reentrancyBlocker)
                        {
                            --server.ConnectionCount;
                            server._connections.Remove(this);
                        }
                    }
                });
            }
Пример #2
0
 public Connection(TcpRpcServer server, TcpClient client, FramePump pump, OutboundTcpEndpoint outboundEp, RpcEngine.RpcEndpoint inboundEp)
 {
     _server    = server;
     Client     = client;
     Pump       = pump;
     OutboundEp = outboundEp;
     InboundEp  = inboundEp;
 }
Пример #3
0
 public OutboundTcpEndpoint(TcpRpcServer server, FramePump pump)
 {
     _server = server;
     _pump   = pump;
 }
Пример #4
0
 public Connection(TcpRpcServer server, TcpClient client)
 {
     _server = server;
     Client  = client;
     _stream = client.GetStream();
 }