Austin Blackstone / Mbed 2 deprecated mbed-client-classic-example-lwip

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Fork of mbed-client-classic-example-lwip by sandbox

Embed: (wiki syntax)

« Back to documentation index

M2MConnectionObserver Class Reference

M2MConnectionObserver Class Reference

M2MConnectionObserver Observer class for informing socket activity to the state machine. More...

#include <m2mconnectionobserver.h>

Inherited by M2MInterfaceImpl.

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)=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,Resolvedsocket address.
server_type,Typeof server.
server_port,Portof 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,Thedata read from the socket.
data_size,Thelength of the data read from the socket.
address,Addressof 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 ) [pure virtual]

Indicates an error occured in socket.

Parameters:
error_code,Errorcode from socket, it cannot be used any further.

Implemented in M2MInterfaceImpl.