SocketDriver
Functions | |
int | socket_init (csp_socket_handle_t *socket_iface, uint8_t mode, uint16_t port) |
Initializes and connects a unix socket, returns socket handle. More... | |
int | socket_status (const csp_socket_handle_t *socket_iface) |
Attempts to check open/closed status of socket. More... | |
Function Documentation
int socket_init | ( | csp_socket_handle_t * | socket_iface, |
uint8_t | mode, | ||
uint16_t | port | ||
) |
Initializes and connects a unix socket, returns socket handle.
- Parameters
-
socket_iface socket interface to store handle in mode CSP_SOCKET_CLIENT or CSP_SOCKET_SERVER, which type of connection is created port socket interface port number
- Returns
- int CSP_ERR_NONE if successful, otherwise CSP_ERR_DRIVER
int socket_status | ( | const csp_socket_handle_t * | socket_iface | ) |
Attempts to check open/closed status of socket.
- Parameters
-
socket_iface socket interface containing socket handle
- Returns
- int CSP_ERR_NONE if socket open, otherwise CSP_ERR_DRIVER