Introduction This document describes the IRCConnection utility class dened and implemented in ir- cLib.h and ircLib.cpp respectively. There is an old yet powerful open-specication chat facility, called Internet Relay Chat (IRC), that allows any user with appropriate client software to connect to an IRC network and \chat" with other connected users (exchange typed text messages in real time). IRC has existed on the Internet since 1989 (nally being standardized in 1993) and remains a popular real-time chat service to the present day. A couple of features of IRC that distinguish it from other chat services (Java-driven web applications or something like Microsoft Instant Messenger for example) is that IRC clients and servers are typically free, and the specications for an IRC client, IRC server and the IRC messaging protocol are not proprietary. They are openly available on the web, and anyone can use them to develop custom IRC clients or servers. IRC is also an extremely powerful messaging service, o*ering many capabilities not found in other, proprietary solutions. Many open-source implementations of IRC servers and IRC clients exist. For some time now, the PNNL development team has been running a private IRC server (The InspIRCd server | see http://www.inspircd.org) in-house to provide a convenient way for team members, who are split across multiple buildings, to communicate. The IRCConnection class was developed to provide a framework for the development of custom IRC client applications. The chief driver for this was to provide a way for the the system event logging server (see design document DES-0007, The System Event Logger) to report its messages to an IRC channel in addition to writing them to the system's event log le. The IRCConnection class provides methods that allow the IRC application writer to connect to an IRC server, send \chat" (and other) messages to the server, and receive and act upon messages received from the server. In order to gain a good understanding of the IRCConnection class, the reader should already be familiar with the IRC communication protocol. Unfortunately, a thorough description of the protocol is beyond the scope of this document. However, like so many early Internet pro- tocols and capabilities, the IRC specication is published as an RFC (request for comment) document, and can be easily found on the web as document RFC-1459. Developers should be familiar with that document before making changes or additions to the IRCConnection class. Also, there are many places throughout the class' implementation where it is necessary to parse strings. This is typically done using a suitable regular expression. In the code base, regular expressions are implemented by the RE c utility class which is fully described by design document DES-0008, The RE c Utility Class. Developers that want to create, modify or just understand the regular expressions in the IRCConnection code, should read that document for details.
Revised: September 30, 2014 |
Published: April 1, 2010