class WeaveConnection

Defined at line 199 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

The definition of the Weave Connection class. It represents a TCP or BLE

connection to another Weave node.

Public Members

uint64_t PeerNodeId
IPAddress PeerAddr
WeaveMessageLayer * MessageLayer
void * AppState
uint16_t PeerPort
uint16_t DefaultKeyId
WeaveAuthMode AuthMode
uint8_t DefaultEncryptionType
uint8_t State
uint8_t NetworkType
bool ReceiveEnabled
bool SendSourceNodeId
bool SendDestNodeId
ConnectionCompleteFunct OnConnectionComplete
ConnectionClosedFunct OnConnectionClosed
MessageReceiveFunct OnMessageReceived
TunneledMsgReceiveFunct OnTunneledMessageReceived
ReceiveErrorFunct OnReceiveError

Public Methods

void AddRef ()
void Release ()
WEAVE_ERROR Connect (uint64_t peerNodeId)

Note: a downcall to Connect() may call OnConnectionComplete before it returns.

WEAVE_ERROR Connect (uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, const IPAddress & peerAddr, uint16_t peerPort, InterfaceId intf)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, const char * peerAddr, uint16_t defaultPort)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, const char * peerAddr, uint16_t peerAddrLen, uint16_t defaultPort)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, const char * peerAddr, uint16_t peerAddrLen, uint8_t dnsOptions, uint16_t defaultPort)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, HostPortList hostPortList, InterfaceId intf)
WEAVE_ERROR Connect (uint64_t peerNodeId, WeaveAuthMode authMode, HostPortList hostPortList, uint8_t dnsOptions, InterfaceId intf)
WEAVE_ERROR GetPeerAddressInfo (IPPacketInfo & addrInfo)
void GetPeerDescription (char * buf, size_t bufSize)
WEAVE_ERROR SendMessage (WeaveMessageInfo * msgInfo, PacketBuffer * msgBuf)
WEAVE_ERROR SendTunneledMessage (WeaveMessageInfo * msgInfo, PacketBuffer * msgBuf)

Function to send a Tunneled packet over a Weave connection.

void EnableReceive ()

TODO COM-311: implement EnableReceived/DisableReceive for BLE WeaveConnections.

void DisableReceive ()
WEAVE_ERROR Shutdown ()
WEAVE_ERROR Close ()
WEAVE_ERROR Close (bool suppressCloseLog)
void Abort ()
void SetConnectTimeout (const uint32_t connTimeoutMsecs)
WEAVE_ERROR SetIdleTimeout (uint32_t timeoutMS)
WEAVE_ERROR EnableKeepAlive (uint16_t interval, uint16_t timeoutCount)
WEAVE_ERROR DisableKeepAlive ()
uint16_t LogId ()

Defined at line 309 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

TCPEndPoint * GetTCPEndPoint ()

Defined at line 311 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

bool IsIncoming ()

Defined at line 405 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

WEAVE_ERROR SetUserTimeout (uint32_t userTimeoutMillis)
WEAVE_ERROR ResetUserTimeout ()
WEAVE_ERROR ConnectBle (void * connObj, WeaveAuthMode authMode, bool autoClose)
void SetIncoming (bool val)

Defined at line 406 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

Enumerations

enum State
Name Value Comments
kState_ReadyToConnect 0

State after initialization of the Weave connection.

kState_Resolving 1

State when DNS name resolution is being performed.

kState_Connecting 2

State when connection is being attempted.

kState_EstablishingSession 3

State when a secure session is being established.

kState_Connected 4

State when the connection has been established.

kState_SendShutdown 5

State when the connection is being shut down.

kState_Closed 6

State when the connection is closed.

The State of the Weave connection object.

Defined at line 211 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

enum NetworkType
Name Value Comments
kNetworkType_Unassigned 0

Unassigned network type.

kNetworkType_IP 1

TCP/IP network type.

kNetworkType_BLE 2

BLE network type.

The network type of the Weave connection object.

Defined at line 229 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

enum (unnamed)
Name Value
kGetPeerDescription_MaxLength nl::Weave::kWeavePeerDescription_MaxLength

Defined at line 272 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h

Friends

class WeaveMessageLayer