class TCPEndPoint
Defined at line 89 of file gen/third_party/openweave-core/src/include/InetLayer/TCPEndPoint.h
Objects of this class represent TCP transport endpoints.
Public Members
bool ReceiveEnabled
State
OnConnectCompleteFunct OnConnectComplete
OnDataReceivedFunct OnDataReceived
OnDataSentFunct OnDataSent
OnConnectionClosedFunct OnConnectionClosed
OnPeerCloseFunct OnPeerClose
OnConnectionReceivedFunct OnConnectionReceived
OnAcceptErrorFunct OnAcceptError
Public Methods
INET_ERROR Bind (IPAddressType addrType, IPAddress addr, uint16_t port, bool reuseAddr)
Bind the endpoint to an interface IP address.
On LwIP, this method must not be called with the LwIP stack lock
already acquired.
Parameters
INET_ERROR Listen (uint16_t backlog)
Prepare the endpoint to receive TCP messages.
On some platforms, the
argument is not used (the depth of
the queue is fixed; only one connection may be accepted at a time).
On LwIP systems, this method must not be called with the LwIP stack
lock already acquired
Parameters
INET_ERROR Connect (IPAddress addr, uint16_t port, InterfaceId intf)
Initiate a TCP connection.
Parameters
INET_ERROR GetPeerInfo (IPAddress * retAddr, uint16_t * retPort)
Extract IP address and TCP port of remote endpoint.
Parameters
INET_ERROR GetLocalInfo (IPAddress * retAddr, uint16_t * retPort)
Extract IP address and TCP port of local endpoint.
Parameters
INET_ERROR Send (Weave::System::PacketBuffer * data, bool push)
Send message text on TCP connection.
Parameters
void DisableReceive ()
Disable reception.
void EnableReceive ()
Enable reception.
INET_ERROR EnableNoDelay ()
EnableNoDelay
INET_ERROR EnableKeepAlive (uint16_t interval, uint16_t timeoutCount)
Enable the TCP "keep-alive" option.
See RFC 1122, section 4.2.3.6 for specification details.
Parameters
INET_ERROR DisableKeepAlive ()
Disable the TCP "keep-alive" option.
INET_ERROR SetUserTimeout (uint32_t userTimeoutMillis)
Set the TCP TCP_USER_TIMEOUT socket option.
Parameters
INET_ERROR AckReceive (uint16_t len)
Acknowledge receipt of message text.
Parameters
INET_ERROR PutBackReceivedData (Weave::System::PacketBuffer * data)
Push message text back to the head of the receive queue.
Parameters
uint32_t PendingSendLength ()
Extract the length of the data awaiting first transmit.
Returns
Number of untransmitted bytes in the transmit queue.
uint32_t PendingReceiveLength ()
Extract the length of the unacknowledged receive data.
Returns
Number of bytes in the receive queue that have not yet been
acknowledged with
AckReceive(uint16_t len)
.
INET_ERROR Shutdown ()
Initiate TCP half close, in other words, finished with sending.
INET_ERROR Close ()
Initiate TCP full close, in other words, finished with both send and
receive.
void Abort ()
Abortively close the endpoint, in other words, send RST packets.
void Free ()
Initiate (or continue) TCP full close, ignoring errors.
bool IsConnected ()
Extract whether TCP connection is established.
Defined at line 715 of file gen/third_party/openweave-core/src/include/InetLayer/TCPEndPoint.h
void SetConnectTimeout (const uint32_t connTimeoutMsecs)
void SetIdleTimeout (uint32_t timeoutMS)
Set timer event for idle activity.
void MarkActive ()
Note activity, in other words, reset the idle timer.
Defined at line 725 of file gen/third_party/openweave-core/src/include/InetLayer/TCPEndPoint.h
uint16_t LogId ()
Obtain an identifier for the endpoint.
Returns
Returns an opaque unique identifier for use logs.
Defined at line 720 of file gen/third_party/openweave-core/src/include/InetLayer/TCPEndPoint.h
Enumerations
enum
| Name | Value |
|---|---|
| kState_Ready | kBasisState_Closed |
| kState_Bound | 1 |
| kState_Listening | 2 |
| kState_Connecting | 3 |
| kState_Connected | 4 |
| kState_SendShutdown | 5 |
| kState_ReceiveShutdown | 6 |
| kState_Closing | 7 |
| kState_Closed | 8 |
Basic dynamic state of the underlying endpoint.
Defined at line 110 of file gen/third_party/openweave-core/src/include/InetLayer/TCPEndPoint.h
Friends
class InetLayer