5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
TCP packet comms

Functions

wiced_result_t wiced_tcp_receive (wiced_tcp_socket_t *socket, wiced_packet_t **packet, uint32_t timeout)
 
wiced_result_t wiced_tcp_send_packet (wiced_tcp_socket_t *socket, wiced_packet_t *packet)
 

Detailed Description

Functions for communication over TCP in packet mode

Function Documentation

◆ wiced_tcp_receive()

wiced_result_t wiced_tcp_receive ( wiced_tcp_socket_t * socket,
wiced_packet_t ** packet,
uint32_t timeout )

Receives a TCP data packet

Attempts to receive a TCP data packet from the remote host. If a packet is returned successfully, then ownership of it has been transferred to the caller, and it must be released with wiced_packet_delete as soon as it is no longer needed.

Parameters
[in,out]socket: A pointer to an open socket handle.
[in]packet: A pointer to a packet pointer which will be filled with the received packet.
[in]timeout: Timeout value in milliseconds or WICED_NEVER_TIMEOUT
Returns
wiced_result_t

◆ wiced_tcp_send_packet()

wiced_result_t wiced_tcp_send_packet ( wiced_tcp_socket_t * socket,
wiced_packet_t * packet )

Send a TCP data packet

Sends a TCP packet to the remote host. Once this function is called, the caller must not use the packet pointer again, since ownership has been transferred to the IP stack.

Parameters
[in,out]socket: A pointer to an open socket handle.
[in]packet: A pointer to a packet to be sent.
Returns
wiced_result_t