Initialize()
Initializes a TCP endpoint. Calling this function causes OpenThread to keep track of this Endpoint and store and retrieve TCP data inside of it. The application should refrain from directly accessing or modifying the fields in this Endpoint. If the application needs to reclaim the memory backing this Endpoint, it should call otTcpEndpointDeinitialize(). @sa otTcpEndpointInitialize in include/openthread/tcp.h.
GetInstance() const
Obtains the Instance that was associated with this Endpoint upon initialization. @sa otTcpEndpointGetInstance.
GetContext()
Obtains the context pointer that was associated this Endpoint upon initialization. @sa otTcpEndpointGetContext.
GetLocalAddress() const
Obtains a pointer to a TCP endpoint's local host and port. The contents of the host and port may be stale if this socket is not in a connected state and has not been bound after it was last disconnected. @sa otTcpGetLocalAddress.
GetPeerAddress() const
Obtains a pointer to a TCP endpoint's peer's host and port. The contents of the host and port may be stale if this socket is not in a connected state. @sa otTcpGetPeerAddress.
Bind()
Binds the TCP endpoint to an IP address and port. @sa otTcpBind.
Connect()
Records the remote host and port for this connection. By default TCP Fast Open is used. This means that this function merely records the remote host and port, and that the TCP connection establishment handshake only happens on the first call to otTcpSendByReference(). TCP Fast Open can be explicitly disabled using @p aFlags, in which case the TCP connection establishment handshake is initiated immediately. @sa otTcpConnect.
SendByReference()
Adds data referenced by the linked buffer pointed to by @p aBuffer to the send buffer. Upon a successful call to this function, the linked buffer and data it references are owned by the TCP stack; they should not be modified by the application until a "send done" callback returns ownership of those objects to the application. It is acceptable to call this function to add another linked buffer to the send queue, even if the "send done" callback for a previous invocation of this function has not yet fired. Note that @p aBuffer should not be chained; its mNext field should be NULL. If additional data will be added right after this call, then the OT_TCP_SEND_MORE_TO_COME flag should be used as a hint to the TCP implementation. @sa otTcpSendByReference.
SendByExtension()
Adds data to the send buffer by extending the length of the final otLinkedBuffer in the send buffer by the specified amount. If the send buffer is empty, then the operation fails. @sa otTcpSendByExtension.
ReceiveByReference()
Provides the application with a linked buffer chain referencing data currently in the TCP receive buffer. The linked buffer chain is valid until the "receive ready" callback is next invoked, or until the next call to otTcpReceiveContiguify() or otTcpCommitReceive(). @sa otTcpReceiveByReference.
ReceiveContiguify()
Reorganizes the receive buffer to be entirely contiguous in memory. This is optional; an application can simply traverse the linked buffer chain obtained by calling @p otTcpReceiveByReference. Some applications may wish to call this function to make the receive buffer contiguous to simplify their data processing, but this comes at the expense of CPU time to reorganize the data in the receive buffer. @sa otTcpReceiveContiguify.
CommitReceive()
Informs the TCP stack that the application has finished processing @p aNumBytes bytes of data at the start of the receive buffer and that the TCP stack need not continue maintaining those bytes in the receive buffer. @sa otTcpCommitReceive.
SendEndOfStream()
Informs the connection peer that this TCP endpoint will not send more data. This should be used when the application has no more data to send to the connection peer. For this connection, future reads on the connection peer will result in the "end of stream" condition, and future writes on this connection endpoint will fail. The "end of stream" condition only applies after any data previously provided to the TCP stack to send out has been received by the connection peer. @sa otTcpSendEndOfStream.
Abort()
Forcibly ends the TCP connection associated with this TCP endpoint. This immediately makes the TCP endpoint free for use for another connection and empties the send and receive buffers, transferring ownership of any data provided by the application in otTcpSendByReference() calls back to the application. The TCP endpoint's callbacks and memory for the receive buffer remain associated with the TCP endpoint. @sa otTcpAbort.
Deinitialize()
Deinitializes this TCP endpoint. This means that OpenThread no longer keeps track of this TCP endpoint and deallocates all resources it has internally allocated for this TCP endpoint. The application can reuse the memory backing the TCP endpoint as it sees fit. If it corresponds to a live TCP connection, the connection is terminated unceremoniously (as in otTcpAbort()). All resources the application has provided for this TCP endpoint (linked buffers for the send buffer, memory for the receive buffer, this Endpoint structure itself, etc.) are immediately returned to the application. @sa otTcpEndpointDeinitialize.
FromTcb()
Converts a reference to a struct tcpcb to a reference to its enclosing Endpoint.
GetTcb()
Obtains a reference to this Endpoint's struct tcpcb.
GetTcb() const
Obtains a const reference to this Endpoint's struct tcpcb.
IsClosed() const
Checks if this Endpoint is in the closed state.
TimerFlagToIndex()
IsTimerActive()
SetTimer()
CancelTimer()
FirePendingTimers()
PostCallbacksAfterSend()
FirePendingCallbacks()
GetSendBufferBytes() const
GetInFlightBytes() const
GetBacklogBytes() const
GetLocalIp6Address()
GetLocalIp6Address() const
GetForeignIp6Address()
GetForeignIp6Address() const
Matches() const