Module Messaging

The modules communicate to the server by sending messages over a socket. Modules that are on the same host as the server will use a local socket (or Unix domain socket) and remote modules will use a TCP socket.

The message has a simple header that consists of two 4 byte numbers. The first is the size of the message. The size should equal the number of bytes in the entire message including the header. The second 4 byte number is command function to be performed. Both the size and the command are to be sent across the network in network byte order.

Following the header is the payload data area. There is no fixed size for this area, but there is a maximum size. (see Definitions). The data area is where the command specific data is contained. Each command will treath the information in this area differently, refer to the individual message command definitions for details.