|
MySensors Library & Examples
2.3.2-62-ge298769
|
22 #ifndef EthernetServer_h
23 #define EthernetServer_h
28 #include "IPAddress.h"
30 #ifdef ETHERNETSERVER_MAX_CLIENTS
31 #define ETHERNETSERVER_BACKLOG ETHERNETSERVER_MAX_CLIENTS
33 #define ETHERNETSERVER_MAX_CLIENTS 10
34 #define ETHERNETSERVER_BACKLOG 10
52 EthernetServer(uint16_t port, uint16_t max_clients = ETHERNETSERVER_MAX_CLIENTS);
82 virtual size_t write(uint8_t b);
90 virtual size_t write(
const uint8_t *buffer,
size_t size);
97 size_t write(
const char *str);
105 size_t write(
const char *buffer,
size_t size);
109 std::list<int> new_clients;
110 std::vector<int> clients;
111 uint16_t max_clients;
EthernetServer(uint16_t port, uint16_t max_clients=ETHERNETSERVER_MAX_CLIENTS)
EthernetServer constructor.
EthernetClient available()
Get the new connected client.
bool hasClient()
Verifies if a new client has connected.
virtual size_t write(uint8_t b)
Write a byte to all clients.
A class to make it easier to handle and pass around IP addresses.
virtual void begin()
Listen for inbound connection request.