IRC.Client.Connect C# (CSharp) Method

Connect() public method

public Connect ( ) : void
return void
        public new void Connect()
        {
            // todo ensure required filds are populated

            // create the tcp connection
            base.Connect();

            // start listening
            _listener = new Listener(this, TcpClient.GetStream());
            _listener.ReceivedReply += ProcessReply;
            // todo instead of passing client maybe lisenter subscribe to client events?
            _listenerThread = new Thread(_listener.Listen);
            _listenerThread.Start();

            // offical RFC 2812 doesn't support a message to start the
            // client registration. additionally CAP does.

            Thread.Sleep(500);
            // send the password is there is one
            if (!string.IsNullOrEmpty(ServerPass))
                this.Pass(ServerPass);

            // register nickname message
            this.Nick(Nickname);

            // send user message
            this.User(Nickname, (User.Mode) 8, RealName);
        }