Exemple #1
0
        //
        // Methods
        //

        public void SendUserRegistration( )
        {
            if (null == _protocolHandler)
            {
                throw new InvalidOperationException("Server.ProtocolHandler property must be set before using SendUserRegistration method");
            }

            Debug.Print("Server.SendUserRegistration");

            if (!string.IsNullOrWhiteSpace(ServerPassword))
            {
                _protocolHandler.SendToServer("PASS {0}", ServerPassword);
            }

            var capNego = new CapNegotiator {
                Server = this,
            };

            capNego.Complete += CapNegotiatorComplete;

            _protocolHandler.SaveAndClearHandlers( );
            capNego.RegisterMessages( );
            capNego.Start( );
        }