Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PtConnectorCreate()
Create a connector
Synopsis:
PtConnector_t *PtConnectorCreate(
const char *name,
PtConnectorCallbackFunc_t *cb,
void *data );
Arguments:
- name
- The name to register, or NULL for a nameless connector. If name isn't NULL, it must be unique; an attempt to create a connector with a name that's already registered will fail.
- cb
- A callback to call for each client that connects.
PtConnectorCallbackFunc_t is a function type:
typedef void PtConnectorCallbackFunc_t( PtConnector_t *, PtConnectionServer_t *, void * );The callback is called each time a new server connection object is created as a response to a connection request from a client.
- data
- Extra data to pass to the callback as the last argument.
Library:
ph
Description:
This function creates a connector.
Returns:
A pointer to a PtConnector_t structure that describes the connector.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PtConnectorDestroy(), PtConnectorGetId()
"Connections" in the Interprocess Communication chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)