#include <m2mconnectionobserver.h>
Data Structures | |
struct | SocketAddress |
The M2MSocketAddress struct. A unified container for holding socket address data across different platforms. More... | |
Public Types | |
enum | ServerType { Bootstrap, LWM2MServer } |
enum | NetworkInterfaceStatus { NetworkInterfaceConnected, NetworkInterfaceDisconnected } |
Public Member Functions | |
virtual void | data_available (uint8_t *data, uint16_t data_size, const M2MConnectionObserver::SocketAddress &address)=0 |
Indicates that data is available from socket. More... | |
virtual void | socket_error (int error_code, bool retry=true)=0 |
Indicates an error occured in socket. More... | |
virtual void | address_ready (const M2MConnectionObserver::SocketAddress &address, M2MConnectionObserver::ServerType server_type, const uint16_t server_port)=0 |
Indicates that the server address resolving is ready. More... | |
virtual void | data_sent ()=0 |
Indicates that data has been sent successfully. | |
virtual void | network_interface_status_change (NetworkInterfaceStatus status)=0 |
The observer class for passing the socket activity to the state machine.
, Defines the type of the server that the client wants to use.
|
pure virtual |
Indicates that the server address resolving is ready.
address | The resolved socket address. |
server_type | The type of the server. |
server_port | The port of the resolved server address. |
|
pure virtual |
Indicates that data is available from socket.
data | The data read from the socket. |
data_size | The length of the data read from the socket. |
address | The address of the server where the data is coming from. |
|
pure virtual |
Indicates an error occured in socket.
error_code | The error code from socket, it cannot be used any further. |
retry | Indicates whether to re-establish the connection. |