Example #1
0
        public ThreadSocketHandler(int port, ThreadCoreHandler core_handler)
        {
            _CoreHandler = core_handler;
            _Port = port;

            _Sockets = new Queue<Socket>();

            _Peers = new PeerSet();

            _Spin = new PowerRegulator();
            _AutoPowerRegulator = new AutoPowerRegulator(_Spin);
        }
Example #2
0
        public ThreadCoreHandler(ICore core)
        {
            if(core == null)
            {
                throw new ArgumentNullException(nameof(core));
            }

            _Core = core;

            _RequesterHandlers = new Updater();
            _Spin = new PowerRegulator();
            _AutoPowerRegulator = new AutoPowerRegulator(_Spin);
            _Binders = new Queue<ISoulBinder>();
        }