Example Connection Sequence

The example in the table that follows shows the TCP API functions and messages for a typical connection sequence between the Application Layer and the TCP Interface.

For more information about all the main TCP API functions, see TCP API Functions.

Sequence Originating Host Description
tcp_app_register() Local Registers Application Layer to accomplish all subsequent interaction with TCP Interface
tcp_connection_open() Local Opens a TCP connection between local and remote hosts
TCPC_IND_CONNECT_REQUEST Remote Interrupt received if passive open selected
TCPC_IND_ESTAB Remote Indication received for established connection (or TCPC_IND_ABORTED if the open fails)
tcp_receive_command_send() Local Indicates that the application is ready to receive one or more packets from remote host
tcp_data_send() or tcp_data_send_with_options() Local Functions used to send data
TCPC_IND_CONNECT_REQUEST Remote Indication status that application packets will be sent via interrupt data stream
tcp_receive_command_send() Local Allows more packets to be received
tcp_connection_close() Local Closes the connection
TCPC_IND_FIN_RECEIVED Remote Received after peer has called tcp_connection_close() and all packets have been received
TCPC_IND_CLOSED Remote Received when both sides have sent tcp_connection_close()
tcp_app_handle_destroy() Local Unregisters the Application Layer with the TCP Interface

Note: TCP_IND_ABORTED may be received at any point after tcp_connection_open() has been called.

For information about communication between the TCP Interface to the Application Layer, see Events from the TCP Interface to the Application Layer.

For more information in this section, see: