WICED provides multiple APIs to implement a TCP connection. This blog discusses the TCP stream_read/write APIs which are more convenient for receiving/sending a large chunk of data.
The usual flow of sending TCP packets is: packet creation-> write data into packet-> set the end of the data portion-> send the packet -> delete the packet.
This method of sending TCP packets turns out to be cumbersome for large chunk of data as one has to go back and forth between packet creation and deletion. The TCP stream APIs provide a better way to stream successive data without worrying about the packet boundaries. The TCP stream APIs takes care of creating the packet and sending it unless the entire buffer is sent. The following diagram gives a simple overview of differences between existing APIs and stream APIs:
Please refer the wiced_tcpip.h file in 43xxx_Wi-Fi\include dir for description of the provided TCP APIs. Some of the stream APIs are listed below: