#include <rock.h>

Public Member Functions | |
| rock_datagram_factory (rock *parent) | |
| datagram_message * | create_datagram_message (size_t alloc_size) |
| this method is called by the datagram_server to create itself a new datagram_message, in this case, a rock_datagram_message. | |
Protected Attributes | |
| rock * | parent |
The datagram_server requires a factory for creating message objects specific for whatever system is using it, in this case a rock object. The datagram_server calls the factory to create an empty datagram_message object which gets the incoming data from a datagram received by the server. This datagram_message (which also inherits from pebble), is then added to the queue (also specified to the datagram_server along with the factory, by the rock). The queue will almost immediately run it, thus calling the rock_datagram_message::run() method which handles it appropriately for a rock.
1.5.8