1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Changes on WiFi API after review. Add driver utility implementation

This commit is contained in:
mlafauci
2011-03-08 22:13:54 +01:00
parent 9d60bbb0dc
commit 765e848fdb
22 changed files with 1904 additions and 350 deletions

View File

@ -1,35 +1,37 @@
#ifndef Client_h
#define Client_h
#include "IPAddress.h"
#include "Print.h"
class Client : public Print {
private:
static uint16_t _srcport;
uint8_t _sock; //not used
uint8_t *_ip;
uint16_t _port;
uint16_t _socket;
public:
Client(uint8_t);
Client(uint8_t *, uint16_t);
Client(uint8_t sock);
Client(IPAddress& ip, uint16_t port);
uint8_t status();
uint8_t connect();
virtual void write(uint8_t);
virtual void write(const char *str);
virtual void write(const uint8_t *buf, size_t size);
int available();
int read();
int readBuf(uint8_t* buf, uint16_t* len);
virtual int available();
virtual int read();
virtual int read(uint8_t* buf, size_t size);
void flush();
void stop();
uint8_t connected();
uint8_t operator==(int);
uint8_t operator!=(int);
operator bool();
uint8_t getFirstSock();
friend class Server;
private:
static uint16_t _srcport;
uint8_t _sock; //not used
IPAddress _ip;
uint16_t _port;
uint16_t _socket;
uint8_t getFirstSocket();
};
#endif