示例#1
0
        private static void startProxyServer()
        {
            monitor = new Middleman(ctsMiddleman.Token);

            scheduler = new Scheduler(monitor, ctsScheduler.Token);
            listener  = new Listener(address, port, monitor, ctsListener.Token);
        }
示例#2
0
        public CommandProcessor(Middleman _monitor, CancellationTokenSource _cts)
        {
            monitor = _monitor;
            cts     = _cts;
            token   = cts.Token;

            startThread();
        }
示例#3
0
        public Listener(string _address, string _port, Middleman _monitor, CancellationToken _token)
        {
            address = _address;
            port    = _port;
            monitor = _monitor;
            token   = _token;

            startService();
        }
示例#4
0
        public ClientHandler(Middleman _monitor, Socket _socket, CancellationTokenSource _cts)
        {
            socket   = _socket;
            cts      = _cts;
            token    = cts.Token;
            cmdTrans = new CommandTransceiver(socket, true);
            cmdProc  = new CommandProcessor(_monitor, cts);

            startThread();
        }
示例#5
0
 public DataServerHandler(Middleman _monitor, Scheduler _scheduler, CancellationToken _token, string _address, int _port, int _id)
 {
     monitor   = _monitor;
     scheduler = _scheduler;
     token     = _token;
     address   = _address;
     port      = _port;
     state     = States.idle;
     serverID  = _id;
 }
示例#6
0
        public Scheduler(Middleman _monitor, CancellationToken _token)
        {
            monitor        = _monitor;
            proxytoken     = _token;
            dshtoken       = dshtksrc.Token;
            linkedsrc      = CancellationTokenSource.CreateLinkedTokenSource(proxytoken, dshtoken);
            token          = linkedsrc.Token;
            fragSizeDwn    = 1 * 1024 * 10;
            fragSizeUpl    = 1 * 1024 * 4;
            fileBufferSize = 10;

            startService();
        }