Inheritance: IDisposable
Ejemplo n.º 1
0
        public static void Shutdown()
        {
            if (_tcpChannel != null)
            {
                _tcpChannel.Dispose();
                _tcpChannel = null;
            }

            lock (_syncLock)
            {
                foreach (var tcpClient in _clients)
                {
                    tcpClient.TcpClient.Close();
                }
                _clients.Clear();
            }
        }
Ejemplo n.º 2
0
        public static void Init(int port)
        {
            Profile.NetworkMode = true;

            _tcpChannel = new TcpChannel(port);
            _tcpChannel.ClientConnected += OnClientConnected;

            _frameTime = Stopwatch.StartNew();
            _frameData = new FrameData {FrameEvents = new List<FrameEvent>()};
            _hasBeenInitialized = true;
        }