Skip to content

Commit 17d8fcb

Browse files
committed
Pulled out Server API into the NetServer base class, and a few minor changes to get the NetClient API to work well with the WiFly library
1 parent a5f6a42 commit 17d8fcb

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

hardware/arduino/cores/arduino/NetClient.h

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class NetClient : public Stream {
2020
virtual void flush() = 0;
2121
virtual void stop() = 0;
2222
virtual uint8_t connected() = 0;
23-
virtual uint8_t operator==(int) = 0;
24-
virtual uint8_t operator!=(int) = 0;
2523
virtual operator bool() = 0;
2624
};
2725

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#ifndef netserver_h
2+
#define netserver_h
3+
4+
class NetClient;
5+
6+
class NetServer {
7+
public:
8+
virtual void begin() =0;
9+
};
10+
11+
#endif

libraries/Ethernet/Server.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#ifndef server_h
22
#define server_h
33

4-
#include "Print.h"
4+
#include "NetServer.h"
55

66
class Client;
77

88
class Server :
9-
public Print {
9+
public NetServer {
1010
private:
1111
uint16_t _port;
1212
void accept();
1313
public:
1414
Server(uint16_t);
1515
Client available();
16-
void begin();
16+
virtual void begin();
1717
virtual void write(uint8_t);
1818
virtual void write(const char *str);
1919
virtual void write(const uint8_t *buf, size_t size);

0 commit comments

Comments
 (0)