mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-17 06:42:21 +03:00
WiFi API first draft
This commit is contained in:
35
WiFi/Client.h
Executable file
35
WiFi/Client.h
Executable file
@@ -0,0 +1,35 @@
|
||||
#ifndef Client_h
|
||||
#define Client_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);
|
||||
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);
|
||||
void flush();
|
||||
void stop();
|
||||
uint8_t connected();
|
||||
uint8_t operator==(int);
|
||||
uint8_t operator!=(int);
|
||||
operator bool();
|
||||
uint8_t getFirstSock();
|
||||
friend class Server;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user