/// <summary> /// Initializes a new instance of the <see cref="IrcClient"/> class. /// </summary> public IrcClient() { this.textEncoding = Encoding.UTF8; this.messageProcessors = new Dictionary<string, MessageProcessor>( StringComparer.InvariantCultureIgnoreCase); this.numericMessageProcessors = new Dictionary<int, MessageProcessor>(1000); this.floodPreventer = null; InitializeMessageProcessors(); }
/// <summary> /// Initializes a new instance of the <see cref="IrcClient"/> class. /// </summary> public IrcClient() { this.socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); this.sendTimer = new Timer(new TimerCallback(WritePendingMessages), null, Timeout.Infinite, Timeout.Infinite); this.textEncoding = Encoding.UTF8; this.disconnectedEvent = new AutoResetEvent(false); this.messageProcessors = new Dictionary<string, MessageProcessor>( StringComparer.InvariantCultureIgnoreCase); this.numericMessageProcessors = new Dictionary<int, MessageProcessor>(1000); this.messageSendQueue = new Queue<Tuple<string, object>>(); this.floodPreventer = null; InitializeMessageProcessors(); }