Exemplo n.º 1
0
        /// <summary>
        /// When a client connection opens.
        /// </summary>
        public override void OnOpen()
        {
            // There is no server yet...
            if (_clients.Count > 1 && string.IsNullOrEmpty(_server))
            {
                _clients.Clear();
                this.Close();
            }

            if (_clients.Count < 3)
            {
                // Add client.
                _clients.Add(this);
            }
            else
            {
                this.Close();
            }
        }
Exemplo n.º 2
0
 public void Stop()
 {
     clientsWS.Clear();
 }