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:
- Receive xPL network messages
- Deliver/Rebroadcast those messages to all xPL applications on the same computer
- Discovery of new xPL applications on the computer and adding them to the list of recipients of received xPL messages
- Track known local xPL applications and determine when they have died and remove them from the list of local applications
- The hub is only involved in receiving messages, it is not involved in sending messages whatsoever.
gxPLApplication* gxPLHubApplication |
( |
gxPLHub * |
hub | ) |
|
Returns the application.
- Parameters
-
hub | pointer 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
-
hub | pointer to a gxPLHub object |
- Returns
- 0, -1 if an error occurs
- Examples:
- hub/gxpl-hub.c.
Opens a new gxPLHub object.
- Parameters
-
setting | pointer 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
-
hub | pointer to a gxPLHub object |
timeout_ms | waiting period in ms before output if no event occurs |
- Returns
- 0, -1 if an error occurs
- Examples:
- hub/gxpl-hub.c.