Exemplo n.º 1
0
 internal TCPLinkWatch(TCPLink _tcp, NetCoreSpec spec)
 {
     watchdog          = new System.Timers.Timer();
     watchdog.Interval = spec.ClientReconnectDelay;
     watchdog.Elapsed += Watchdog_Elapsed;
     tcp = _tcp;
     tcp.StartNetworking();
     watchdog.Start();
 }
Exemplo n.º 2
0
 internal MessageHub(NetCoreSpec _spec)
 {
     spec     = _spec;
     hubTimer = new Timer();
     hubTimer.SynchronizingObject = spec.syncObject;
     hubTimer.Interval            = spec.messageReadTimerDelay;
     hubTimer.Elapsed            += CheckMessages;
     hubTimer.Start();
 }
Exemplo n.º 3
0
        public NetCoreConnector(NetCoreSpec _spec)
        {
            ConsoleEx.WriteLine($"NetCore Initialization");

            spec           = _spec;
            spec.Connector = this;
            Initialize();

            ConsoleEx.WriteLine($"NetCore Started");
        }
Exemplo n.º 4
0
        public NetCoreConnector(NetCoreSpec _spec)
        {
            logger.Debug($"NetCore Initialization");

            spec           = _spec;
            spec.Connector = this;
            Initialize();

            logger.Debug($"NetCore Started");
        }
Exemplo n.º 5
0
        internal UDPLink(NetCoreSpec _spec)
        {
            spec = _spec;

            int port = (spec.Side == NetworkSide.SERVER ? PortServer : PortClient);

            Sender = new UdpClient(IP, port);
            ConsoleEx.WriteLine($"UDP Client sending at {IP}:{port}");
            ReaderThread = new Thread(new ThreadStart(ListenToReader));
            ReaderThread.IsBackground = true;
            ReaderThread.Name         = "UDP READER";
            ReaderThread.Start();
        }
Exemplo n.º 6
0
        internal UDPLink(NetCoreSpec _spec)
        {
            spec = _spec;

            int port = (spec.Side == NetworkSide.SERVER ? PortServer : PortClient);

            Sender = new UdpClient(IP, port);
            logger.Info("UDP Client sending at {IP}:{port}", IP, port);
            ReaderThread = new Thread(new ThreadStart(ListenToReader))
            {
                IsBackground = true,
                Name         = "UDP READER"
            };
            ReaderThread.Start();
        }
Exemplo n.º 7
0
        internal TCPLink(NetCoreSpec _spec)
        {
            spec = _spec;

            DefaultBoopMonitoringCounter = spec.DefaultBoopMonitoringCounter;
            BoopMonitoringCounter        = spec.DefaultBoopMonitoringCounter;

            if (spec.AutoReconnect)
            {
                linkWatch = new TCPLinkWatch(this, spec);
            }
            else
            {
                StartNetworking();
            }
        }
Exemplo n.º 8
0
 internal ReturnWatch(NetCoreSpec _spec)
 {
     spec = _spec;
 }