This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

ChatterSocket Element Documentation


ChatterSocket -- Click element; reports chatter messages to connected sockets


ChatterSocket("UNIX", FILENAME [, KEYWORDS])

Ports: none
Drivers: userlevel
Package: userlevel (core)


Opens a chatter socket that allows other user-level programs to receive copies of router chatter traffic. Depending on its configuration string, ChatterSocket will listen on TCP port PORTNUMBER, or on a UNIX-domain socket named FILENAME. The "server" (that is, the ChatterSocket element) simply echoes any messages generated by the router configuration to any existing "clients". The server does not read any data from its clients. When a connection is opened, ChatterSocket responds by stating its protocol version number with a line like "Click::ChatterSocket/1.0\r\n". The current version number is 1.0. ChatterSocket broadcasts copies of messages generated by the default ErrorHandler or the click_chatter function. Most elements report messages or run-time errors using one of these mechanisms. If a client falls more than 500,000 bytes behind, ChatterSocket automatically closes its connection. ChatterSocket supports hot-swapping, meaning you can change configurations without interrupting existing clients. The hot-swap will succeed only if the old ChatterSocket and the new ChatterSocket have the same element name, and the same socket type, port/filename, and chatter channel parameters. Additionally, the new ChatterSocket must have RETRIES set to 1 or more, since the old ChatterSocket has already bound the relevant socket. Keyword arguments are:

Text word. The socket outputs messages sent to this chatter channel. Default is the default channel, which corresponds to click_chatter(). Channels help you organize extensive debugging output. For example, you could send extremely verbose messages to a `verbose' channel, then only connect to that channel when you want verbosity. To send messages to a particular channel, you should fetch the ErrorHandler object corresponding to that channel, using the Router member function Router::chatter_channel(const String &channel_name).
Boolean. Messages sent to a non-default channel are not normally printed on standard error. If QUIET_CHANNEL is false, however, the channel's messages do go to standard error, along with chatter messages. Default is true.
Boolean. Determines whether the Click::ChatterSocket/1.0 greeting is sent. Default is true.
Integer. If greater than 0, ChatterSocket won't immediately fail when it can't open its socket. Instead, it will attempt to open the socket once a second until it succeeds, or until RETRIES unsuccessful attempts (after which it will stop the router). Default is 0.
Boolean. If true, ChatterSocket will print warning messages every time it fails to open a socket. If false, it will print messages only on the final failure. Default is true.


  ChatterSocket(unix, /tmp/clicksocket);



Generated by 'click-elem2man' from '../elements/userlevel/chattersocket.hh' on 24/May/2007.


elements/chattersocket.txt · Last modified: 2007/05/24 00:16 (external edit)
Recent changes RSS feed Driven by DokuWiki