Embedded Wireless Framework
Macros | Functions
ewf_adapter_api_tcp.c File Reference

The Embedded Wireless Framework adapter TCP API implementation. More...

#include "ewf_adapter.h"

Macros

#define EWF_VALIDATE_TCP_API_POINTER(adapter_ptr, function_ptr)
 

Functions

ewf_result ewf_adapter_tcp_open (ewf_adapter *adapter_ptr, ewf_socket_tcp *socket_ptr)
 Open a TCP socket. More...
 
ewf_result ewf_adapter_tcp_close (ewf_socket_tcp *socket_ptr)
 Close a TCP socket. More...
 
ewf_result ewf_adapter_tcp_control (ewf_socket_tcp *socket_ptr, const char *command_str, const uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 Control a TCP socket This is mainly used to funnel implementation specific functionality. More...
 
ewf_result ewf_adapter_tcp_set_tls_configuration (ewf_socket_tcp *socket_ptr, uint32_t tls_configuration_id)
 Set the TLS context for the socket. More...
 
ewf_result ewf_adapter_tcp_bind (ewf_socket_tcp *socket_ptr, uint32_t port)
 Binds a TCP socket to a port. More...
 
ewf_result ewf_adapter_tcp_listen (ewf_socket_tcp *socket_ptr)
 Listens to incomming connections on a socket. More...
 
ewf_result ewf_adapter_tcp_accept (ewf_socket_tcp *socket_ptr, ewf_socket_tcp *socket_new_ptr)
 Accept a new connection on a listening TCP socket. More...
 
ewf_result ewf_adapter_tcp_connect (ewf_socket_tcp *socket_ptr, const char *server_str, uint32_t port)
 Connect a TCP socket to a server. More...
 
ewf_result ewf_adapter_tcp_shutdown (ewf_socket_tcp *socket_ptr)
 Shutdown a TCP socket. More...
 
ewf_result ewf_adapter_tcp_send (ewf_socket_tcp *socket_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
 Send data over a TCP socket. More...
 
ewf_result ewf_adapter_tcp_receive (ewf_socket_tcp *socket_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length, bool wait)
 Receive data over a TCP socket. More...
 
ewf_result ewf_adapter_tcp_receive_callback_set (ewf_socket_tcp *socket_ptr, ewf_adapter_tcp_receive_callback callback)
 Register a user TCP receive callback function. More...
 
ewf_result ewf_adapter_tcp_disconnect_callback_set (ewf_socket_tcp *socket_ptr, ewf_adapter_tcp_disconnect_callback callback)
 Register a user TCP disconnect callback function. More...
 

Detailed Description

The Embedded Wireless Framework adapter TCP API implementation.

Version
Preview

Macro Definition Documentation

◆ EWF_VALIDATE_TCP_API_POINTER

#define EWF_VALIDATE_TCP_API_POINTER (   adapter_ptr,
  function_ptr 
)
Value:
do { \
if ((adapter_ptr->tcp_api_ptr == NULL) || \
(adapter_ptr->tcp_api_ptr->function_ptr == NULL)) \
{ \
EWF_LOG_ERROR("The function is not implemented.\n"); \
} \
} while(0)
@ EWF_RESULT_NOT_SUPPORTED
Definition: ewf.h:71