Esempio 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();
 }
Esempio n. 2
0
        private void Initialize()
        {
            if (spec.Side == NetworkSide.NONE)
            {
                ConsoleEx.WriteLine("Could not initialize connector : Side was not set");
                return;
            }

            try
            {
                hub   = new MessageHub(spec);
                udp   = new UDPLink(spec);
                tcp   = new TCPLink(spec);
                watch = new ReturnWatch(spec);
            }
            catch (Exception ex)
            {
                Kill();
                throw ex;
            }
        }