Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::net::DataReceivedEvent Class Reference

Event for when data is received on a TCP socket. More...

#include <tcp.h>

Inheritance diagram for MaxOS::net::DataReceivedEvent:
MaxOS::common::Event< TCPPayloadHandlerEvents >

Public Member Functions

 DataReceivedEvent (TCPSocket *socket, uint8_t *data, uint16_t size)
 Construct a new Data Received Event object.
 
- Public Member Functions inherited from MaxOS::common::Event< TCPPayloadHandlerEvents >
 Event (TCPPayloadHandlerEvents type)
 Constructs a new Event object.
 

Public Attributes

TCPSocketsocket
 The socket that received the data.
 
uint8_t * data
 The data received.
 
uint16_t size
 The size of the data received.
 
- Public Attributes inherited from MaxOS::common::Event< TCPPayloadHandlerEvents >
TCPPayloadHandlerEvents type
 
uint8_tbuffer_value
 
uint32_t int_value
 
bool bool_value
 
union { 
 
   uint8_t *   buffer_value 
 
   uint32_t   int_value 
 
   bool   bool_value 
 
return_value 
 

Detailed Description

Event for when data is received on a TCP socket.

Definition at line 123 of file tcp.h.

Constructor & Destructor Documentation

◆ DataReceivedEvent()

DataReceivedEvent::DataReceivedEvent ( TCPSocket socket,
uint8_t data,
uint16_t  size 
)

Construct a new Data Received Event object.

Parameters
socketThe socket that received the data
dataThe data that was received
sizeThe size of the data

Definition at line 594 of file tcp.cpp.

595 : Event(TCPPayloadHandlerEvents::DATA_RECEIVED) {
596 this->socket = socket;
597 this->data = data;
598 this->size = size;
599}
Used to store information about an event, has a type and a return value.
uint16_t size
The size of the data received.
Definition tcp.h:127
TCPSocket * socket
The socket that received the data.
Definition tcp.h:125
uint8_t * data
The data received.
Definition tcp.h:126

References data, size, and socket.

Member Data Documentation

◆ data

uint8_t* MaxOS::net::DataReceivedEvent::data

The data received.

Definition at line 126 of file tcp.h.

Referenced by DataReceivedEvent().

◆ size

uint16_t MaxOS::net::DataReceivedEvent::size

The size of the data received.

Definition at line 127 of file tcp.h.

Referenced by DataReceivedEvent().

◆ socket

TCPSocket* MaxOS::net::DataReceivedEvent::socket

The socket that received the data.

Definition at line 125 of file tcp.h.

Referenced by DataReceivedEvent().


The documentation for this class was generated from the following files: