Esempio n. 1
0
        /// <summary>
        /// Connect to the IRC server and start listening for messages asynchronously
        /// </summary>
        public void Connect()
        {
            lock (this)
            {
                if (Connected)
                {
                    throw new Exception("Connection with IRC server already opened.");
                }
                _properties = new ServerProperties();
                _activityTimer.Start();
                Debug.WriteLineIf(Rfc2812Util.IrcTrace.TraceInfo,
                                  string.Format("[{0}] Connection::Connect()", Thread.CurrentThread.Name));

                Connect(_connectionArgs.Hostname, _connectionArgs.Port, _connectionArgs.Ssl);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Connect to the IRC server and start listening for messages asynchronously
        /// </summary>
        public void Connect()
        {
            lock (this)
            {
                if (Connected)
                    throw new Exception("Connection with IRC server already opened.");
                _properties = new ServerProperties();
                _activityTimer.Start();
                Debug.WriteLineIf(Rfc2812Util.IrcTrace.TraceInfo,
                                  string.Format("[{0}] Connection::Connect()", Thread.CurrentThread.Name));

                Connect(_connectionArgs.Hostname, _connectionArgs.Port, _connectionArgs.Ssl);
            }
        }