mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
a642f0a15d
The switch from checking _sock against a default value, combined with the checking for unconnected clients in status(), broke the Client. I went back to checking the value of _sock against the default and removed the _connected member altogether because it was redundant (and therefore needed to be kept in sync with _sock).
26 lines
501 B
C++
26 lines
501 B
C++
#ifndef ethernet_h
|
|
#define ethernet_h
|
|
|
|
#include <inttypes.h>
|
|
//#include "w5100.h"
|
|
#include "Client.h"
|
|
#include "Server.h"
|
|
|
|
#define MAX_SOCK_NUM 4
|
|
|
|
class EthernetClass {
|
|
private:
|
|
public:
|
|
static uint8_t _state[MAX_SOCK_NUM];
|
|
static uint16_t _server_port[MAX_SOCK_NUM];
|
|
void begin(uint8_t *, uint8_t *);
|
|
void begin(uint8_t *, uint8_t *, uint8_t *);
|
|
void begin(uint8_t *, uint8_t *, uint8_t *, uint8_t *);
|
|
friend class Client;
|
|
friend class Server;
|
|
};
|
|
|
|
extern EthernetClass Ethernet;
|
|
|
|
#endif
|