all listed channels. Note that the channel portion of the URL will
*not* have a leading '#' unless the channel name itself does.
-Message transmission is normally via UDP, optimizing for lowest
-latency and network load by avoiding TCP connection setup time; the
-cost is that delivery is not reliable in the face of packet loss.
-The -t option changes this, telling the daemon to use TCP instead.
-
-Other options: -p sets the listening port, -n sets the name suffix
-for the nicks that irker uses. The default suffix is derived from the
-FQDN of the site on which irker is running; the intent is to avoid
-nick collisions by instances running on different sites. The -V
-option prints the program version and exits.
+Options: -p sets the listening port, -n sets the name suffix for the
+nicks that irker uses. The default suffix is derived from the FQDN of
+the site on which irker is running; the intent is to avoid nick
+collisions by instances running on different sites. The -V option
+prints the program version and exits.
Requires Python 2.6 and the irc.client library: see
port = PORT
namesuffix = None
debuglevel = 0
- tcp = False
- (options, arguments) = getopt.getopt(sys.argv[1:], "d:p:n:t:V")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "d:p:n:V")
for (opt, val) in options:
if opt == '-d': # Enable debug/progress messages
debuglevel = int(val)
port = int(val)
elif opt == '-n': # Set the name suffix for irker nicks
namesuffix = val
- elif opt == '-t': # Use TCP rather than UDP
- tcp = True
elif opt == '-V': # Emit version and exit
sys.stdout.write("irker version %s\n" % version)
sys.exit(0)
irker = Irker(debuglevel=debuglevel, namesuffix=namesuffix)
- if tcp:
- server = SocketServer.TCPServer((host, port), IrkerTCPHandler)
- else:
- server = SocketServer.UDPServer((host, port), IrkerUDPHandler)
- try:
- server.serve_forever()
- except KeyboardInterrupt:
- pass
+ tcpserver = SocketServer.TCPServer((host, port), IrkerTCPHandler)
+ udpserver = SocketServer.UDPServer((host, port), IrkerUDPHandler)
+ threading.Thread(target=tcpserver.serve_forever).start()
+ threading.Thread(target=udpserver.serve_forever).start()
# end
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
- <command>irker</command>
- <arg>-t</arg>
+ <command>irker.py</command>
<arg>-p <replaceable>number</replaceable></arg>
<arg>-n <replaceable>namesuffix</replaceable></arg>
<arg>-d <replaceable>debuglevel</replaceable></arg>
daemon will listen.</para></listitem>
</varlistentry>
<varlistentry>
-<term>-t</term>
-<listitem><para>Accept TCP connections. The default is UDP. This choice
-trades slightly increased latency for reliability of delivery.</para></listitem>
-</varlistentry>
-<varlistentry>
<term>-d</term>
<listitem><para>Takes a following value, seting the debugging level from
it. This option will generally only be of interest to developers;
library </para>
</refsect1>
-<refsect1 id='bugs'><title>LIMITATIONS</title>
-<para>We accept requests via UDP, optimizing for lowest latency and
-network load by avoiding TCP connection setup time; the cost is that
-delivery is not reliable in the face of packet loss. But see the
-description of the <option>-t</option> option above.</para>
+<refsect1 id='limitations'><title>LIMITATIONS</title>
+<para>Requests via UDP optimizes for lowest latency and network load
+by avoiding TCP connection setup time; the cost is that delivery is
+not reliable in the face of packet loss.</para>
<para>No attempt at a content-based spam-filtering facility has been
made, since IRC servers have to do that anyway. An