Beispiel #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);
 }
        public ProxyConnection(Socket socket, ProxyContext context, ConnectionTable assignedTable)
        {
            Socket         = socket;
            Context        = context;
            AssignedTabled = assignedTable;

            IsClient    = true;
            DataHandler = new CryptoSetupHandler(this);
        }
Beispiel #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);
        }
Beispiel #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;
 }