gxPL  1.0
Tools, Application and Framework for xPL
Hub

Detailed Description

xPL hub on a system using ethernet networking.
The primary purpose of a xPL hub is to bind to port 3865, receive xPL messages from the network at that port and redistribute those messages to all xPL applications running on the same computer. A hub must perform the following functions:

Functions

gxPLApplication * gxPLHubApplication (gxPLHub *hub)
 Returns the application. More...
 
int gxPLHubClose (gxPLHub *hub)
 Close a gxPLHub object and release all ressources. More...
 
gxPLHub * gxPLHubOpen (gxPLSetting *setting)
 Opens a new gxPLHub object. More...
 
int gxPLHubPoll (gxPLHub *hub, int timeout_ms)
 Polling event of a hub. More...
 

Function Documentation

gxPLApplication* gxPLHubApplication ( gxPLHub *  hub)

Returns the application.

Parameters
hubpointer to a gxPLHub object
Returns
the application
Examples:
hub/gxpl-hub.c.
int gxPLHubClose ( gxPLHub *  hub)

Close a gxPLHub object and release all ressources.

Parameters
hubpointer to a gxPLHub object
Returns
0, -1 if an error occurs
Examples:
hub/gxpl-hub.c.
gxPLHub* gxPLHubOpen ( gxPLSetting setting)

Opens a new gxPLHub object.

Parameters
settingpointer to a configuration, this configuration can be modified by the function to return the actual configuration.
Returns
the object or NULL if error occurs
Examples:
hub/gxpl-hub.c.
int gxPLHubPoll ( gxPLHub *  hub,
int  timeout_ms 
)

Polling event of a hub.

Parameters
hubpointer to a gxPLHub object
timeout_mswaiting period in ms before output if no event occurs
Returns
0, -1 if an error occurs
Examples:
hub/gxpl-hub.c.