/* Internal interface implemented by objects communicating
with external connection servers. */
SIM_INTERFACE(external_connection_events) {
void (*on_accept)(conf_object_t *NOTNULL obj,
conf_object_t *NOTNULL server, uint64 id);
void (*on_input)(conf_object_t *NOTNULL obj,
ext_con_cookie_t *NOTNULL cookie);
void (*can_write)(conf_object_t *NOTNULL obj,
ext_con_cookie_t *NOTNULL cookie);
};
#define EXTERNAL_CONNECTION_EVENTS_INTERFACE "external_connection_events"
The on_accept method is called on every incoming connection, when
it is being set up. The server argument is the server object that
is handling the connection. The id value identifies this
connection in the server object. This value must be passed in the call to
accept in the external_connection_ctl interface.
The on_input method is called on the connection identified by cookie when there is some data available to read on it.
The can_write method is called on the connection identified by cookie when some data can be written to it.