protected virtual void OnConnectionEstablished(Namespace socket)
 {
     ConnectionEstablishedHandler handler = ConnectionEstablished;
     if (handler != null) handler(socket);
 }
        public Namespace Of(string name)
        {
            if (name == null || string.IsNullOrEmpty(name.Trim()))
            {
                name = DefaultNamespace;
            }

            if (m_nameSpaces.ContainsKey(name))
            {
                return m_nameSpaces[name];
            }

            m_nameSpaces[name] = new Namespace(name, this);

            if (name != DefaultNamespace)
            {
                m_nameSpaces[name].Connect();
            }

            return m_nameSpaces[name];
        }