Exemplo n.º 1
0
 public ProxyManager(ProxyContext context, int connectionsPerThread = 64, int selectTimeout = 1, int receiveBufferSize = 4096)
 {
     Context     = context;
     Receiver    = new SocketSelectReceiver(connectionsPerThread, selectTimeout, receiveBufferSize);
     Connections = new ConnectionTable();
     Receiver.Subscribe(Connections);
 }
Exemplo n.º 2
0
        public ProxyConnection(Socket socket, ProxyContext context, ConnectionTable assignedTable)
        {
            Socket         = socket;
            Context        = context;
            AssignedTabled = assignedTable;

            IsClient    = true;
            DataHandler = new CryptoSetupHandler(this);
        }
Exemplo n.º 3
0
        public ProxyConnection(Socket socket, ProxyContext context, ConnectionTable assignedTable)
        {
            ActivityTime = AcceptedTime = DateTime.Now;

            Socket         = socket;
            Context        = context;
            AssignedTabled = assignedTable;

            IsClient    = true;
            DataHandler = new CryptoSetupHandler(this);
        }
Exemplo n.º 4
0
 public SocketServer(
     EndPoint localEndPoint,
     ConnectionTable connections,
     AddressFamily addressFamily = AddressFamily.InterNetwork,
     int backlog          = 128,
     ProxyContext context = null)
 {
     LocalEndPoint = localEndPoint;
     AddressFamily = addressFamily;
     Backlog       = backlog;
     Context       = context;
     Connections   = connections;
 }