Example #1
0
        public void AddListener(INetworkListener listener, bool start)
        {
            if (this.Disposed)
            {
                throw new ObjectDisposedException(nameof(NetworkManager));
            }

            this.NetworkListeners.Add(listener);

            NetworkManager.Logger.Info($"Listener binded on {listener.Bind} was added");

            if (start)
            {
                listener.StartListening();
            }
        }