STM32Ethernet
Arduino Ethernet library for STM32 boards
Loading...
Searching...
No Matches
EthernetServer.h
Go to the documentation of this file.
1
8#ifndef ethernetserver_h
9#define ethernetserver_h
10
11#include "Server.h"
12
13class EthernetClient;
14
16 public Server {
17 private:
18 uint16_t _port;
19 struct tcp_struct _tcp_server;
20 struct tcp_struct *_tcp_client[MAX_CLIENT];
21
28 void accept(void);
29 public:
37 EthernetServer(uint16_t port = 80);
54 virtual void begin();
60 virtual void begin(uint16_t port);
67 void end(void);
74 virtual size_t write(uint8_t b);
86 virtual size_t write(const uint8_t *buffer, size_t size);
92 virtual operator bool();
93 using Print::write;
94};
95
96#endif
Definition EthernetClient.h:16
Definition EthernetServer.h:16
void end(void)
Stops the server.
Definition EthernetServer.cpp:57
EthernetClient available()
Returns a client that has data ready to read.
Definition EthernetServer.cpp:87
virtual void begin()
Starts listening on the current port.
Definition EthernetServer.cpp:26
virtual size_t write(uint8_t b)
Writes one byte to every accepted client.
Definition EthernetServer.cpp:109
#define MAX_CLIENT
Definition stm32_eth.h:112
Definition stm32_eth.h:77