1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

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

This commit is contained in:
amcewen 2011-03-31 16:19:17 +01:00
parent a5f6a42dd7
commit 17d8fcb46d
3 changed files with 14 additions and 5 deletions

View File

@ -20,8 +20,6 @@ public:
virtual void flush() = 0;
virtual void stop() = 0;
virtual uint8_t connected() = 0;
virtual uint8_t operator==(int) = 0;
virtual uint8_t operator!=(int) = 0;
virtual operator bool() = 0;
};

View File

@ -0,0 +1,11 @@
#ifndef netserver_h
#define netserver_h
class NetClient;
class NetServer {
public:
virtual void begin() =0;
};
#endif

View File

@ -1,19 +1,19 @@
#ifndef server_h
#define server_h
#include "Print.h"
#include "NetServer.h"
class Client;
class Server :
public Print {
public NetServer {
private:
uint16_t _port;
void accept();
public:
Server(uint16_t);
Client available();
void begin();
virtual void begin();
virtual void write(uint8_t);
virtual void write(const char *str);
virtual void write(const uint8_t *buf, size_t size);