Creating the Router Object

To create a Router Object using the C API, call the tibasRouter_Create() function. The tibasRouter_Create() function is defined as follows:

tibas_status tibasRouter_Create(
    tibasRouter* router,
    tibas_onAction onOpen,
    tibas_onAction onWrite,
    tibas_onAction onClose,
    tibas_onAction onAlter);

where:

router
 Returns a router object that can be associated with a space.
onOpen
 Specifies the function to be invoked when the tibasSpace_SetRouter() function is called to set the router for a space.Your application is responsible for making the necessary connections to the routed site.
onWrite
 Specifies the function to be invoked when the there is a Put or Take operation on the node to which data is routed. You function is responsible for performing the Put or Take actions that take effect on the other site.
onClose
 Specifies the function to be invoked when the connection to another node is terminated (the tibasRouter_Free() function is called).
onAlter
 Specifies the function to be invoked when a space definition is altered.
Note: The callback definition for a router does not provide an OnRead function. You cannot perform Get operations over a routed connection.