#include "isisserver.h"
Functions | |
void | handleMessage (int sendHost, int destHost, char *msgBody) |
Handle messages received by the ISIS server. | |
void | broadcastMessage (int sendHost, char *msgBody) |
Broadcast a message to all clients. | |
void | sendMessage (int destHost, char *message) |
Send a message string to a client. |
The ISIS server passes messages between clients using the ICIMACS Messaging Protocol version 2 (IMPv2).
... more to come ...
|
Handle messages received by the ISIS server.
IMPv2 messages are terminated with return (\r = ASCII 13), not with a newline (\n = ASCII 10). Messages prepared for further routing by sendMessage() must be correctly terminated. Those printed to stdout do not require termination, as the printing routine will strip any termination and provide a \r as required. BEWARE: No terminination checking is done by sendMessage()! |
|
Broadcast a message to all clients.
XX>AL message_text\r
This is a key distinction: broadcasts are blind-sent to ports not hosts. We have to be careful not to echo a broadcast back to the sender, which risks starting infinite regressions. Designed to be lightweight and thread safe. All routines called by this (and the routine itself) must not alter global variables. this means that logging is the responsibility of calling programs upstream. |
|
Send a message string to a client.
XX>YY message_text\r The message must be properly terminated with \r (ASCII 13) as per the IMPv2 message format specification. Designed to be lightweight and thread safe. All routines called by this (and the routine itself) must not alter global variables. this means that logging is the responsibility of calling programs upstream. |