|
typedef void(* | tr_close_fp )(void *socket) |
|
typedef void(* | tr_free_fp )(struct tr_socket *tr_sock) |
|
typedef const char *(* | tr_ident_fp )(void *socket) |
|
typedef int(* | tr_open_fp )(void *socket) |
|
typedef int(* | tr_recv_fp )(const void *socket, void *pdu, const size_t len, const time_t timeout) |
|
typedef int(* | tr_send_fp )(const void *socket, const void *pdu, const size_t len, const time_t timeout) |
|
Before using the transport socket, a tr_socket must be initialized based on a protocol-dependent init function (e.g., tr_tcp_init()).
The tr_* functions call the corresponding function pointers, which are passed in the tr_socket struct, and forward the remaining arguments.
typedef void(* tr_close_fp)(void *socket) |
A function pointer to a technology specific close function.
- See Also
- tr_close
typedef void(* tr_free_fp)(struct tr_socket *tr_sock) |
A function pointer to a technology specific free function. All memory associated with the tr_socket will be freed.
- See Also
- tr_free
typedef const char*(* tr_ident_fp)(void *socket) |
A function pointer to a technology specific info function.
- See Also
- tr_send
typedef int(* tr_open_fp)(void *socket) |
A function pointer to a technology specific open function.
- See Also
- tr_open
typedef int(* tr_recv_fp)(const void *socket, void *pdu, const size_t len, const time_t timeout) |
A function pointer to a technology specific recv function.
- See Also
- tr_recv
typedef int(* tr_send_fp)(const void *socket, const void *pdu, const size_t len, const time_t timeout) |
A function pointer to a technology specific send function.
- See Also
- tr_send
The return values for tr_ functions.
Enumerator |
---|
TR_SUCCESS |
Operation was successful.
|
TR_ERROR |
Error occured.
|
TR_WOULDBLOCK |
No data is available on the socket.
|
TR_INTR |
Call was interrupted from a signal
|
TR_CLOSED |
Connection closed
|