Client connection of network message server.
More...
|
typedef struct vtm_nm_stream_con | vtm_nm_stream_con |
|
VTM_API void vtm_nm_stream_con_set_usr_data |
( |
vtm_nm_stream_con * |
con, |
|
|
void * |
data |
|
) |
| |
Stores arbitrary user data with the connection.
- Parameters
-
con | the connection that should store the user data |
data | the data that should be stored |
VTM_API void* vtm_nm_stream_con_get_usr_data |
( |
vtm_nm_stream_con * |
con | ) |
|
Retrieves the stored user data.
- Parameters
-
- Returns
- the previous saved user data
-
NULL if no data was stored
VTM_API int vtm_nm_stream_con_send |
( |
vtm_nm_stream_con * |
con, |
|
|
vtm_dataset * |
msg |
|
) |
| |
Sends a message to the client.
- Parameters
-
con | the connection |
msg | the message that sould be sent |
- Returns
- VTM_OK if the message was sent successfully
-
VTM_E_IO_UNKOWN or VTM_ERROR if an error occured
VTM_API void vtm_nm_stream_con_close |
( |
vtm_nm_stream_con * |
con | ) |
|
Closes the client connection gracefully.
- Parameters
-
con | the connection that should be closed |