Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
M2MConnectionObserver Class Reference
M2MConnectionObserver Observer class for informing socket activity to the state machine. More...
#include <m2mconnectionobserver.h>
Inherited by M2MInterfaceImpl, TestObserver, TestObserver, and TestObserver.
Data Structures | |
| struct | SocketAddress |
| The M2MSocketAddress struct. More... | |
Public Types | |
| enum | ServerType |
, Defines the type of the server that the client wants to use. More... | |
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. | |
| virtual void | socket_error (uint8_t error_code, bool retry=true)=0 |
| Indicates an error occured in socket. | |
| 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. | |
| virtual void | data_sent ()=0 |
| Indicates that data has been sent successfully. | |
Detailed Description
M2MConnectionObserver Observer class for informing socket activity to the state machine.
Definition at line 26 of file m2mconnectionobserver.h.
Member Enumeration Documentation
| enum ServerType |
, Defines the type of the server that the client wants to use.
Definition at line 35 of file m2mconnectionobserver.h.
Member Function Documentation
| virtual void address_ready | ( | const M2MConnectionObserver::SocketAddress & | address, |
| M2MConnectionObserver::ServerType | server_type, | ||
| const uint16_t | server_port | ||
| ) | [pure virtual] |
Indicates that the server address resolving is ready.
- Parameters:
-
address The resolved socket address. server_type The type of the server. server_port The port of the resolved server address.
Implemented in M2MInterfaceImpl.
| virtual void data_available | ( | uint8_t * | data, |
| uint16_t | data_size, | ||
| const M2MConnectionObserver::SocketAddress & | address | ||
| ) | [pure virtual] |
Indicates that data is available from socket.
- Parameters:
-
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.
Implemented in M2MInterfaceImpl.
| virtual void data_sent | ( | ) | [pure virtual] |
Indicates that data has been sent successfully.
Implemented in M2MInterfaceImpl.
| virtual void socket_error | ( | uint8_t | error_code, |
| bool | retry = true |
||
| ) | [pure virtual] |
Indicates an error occured in socket.
- Parameters:
-
error_code The error code from socket, it cannot be used any further. retry Indicates whether to re-establish connection.
Implemented in M2MInterfaceImpl.
Generated on Tue Jul 12 2022 12:58:52 by
1.7.2