1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-10 21:24:12 +01:00
Arduino/libraries/Ethernet/Client.h

35 lines
685 B
C
Raw Normal View History

#ifndef client_h
#define client_h
2011-03-02 01:52:13 +01:00
#include "Arduino.h"
2008-07-30 16:47:36 +02:00
#include "Print.h"
class Client : public Stream {
2008-07-30 16:47:36 +02:00
public:
Client();
Client(uint8_t sock);
2008-07-30 16:47:36 +02:00
uint8_t status();
int connect(IPAddress ip, uint16_t port);
int connect(const char *host, uint16_t port);
virtual size_t write(uint8_t);
virtual size_t write(const char *str);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
virtual int read(uint8_t *buf, size_t size);
virtual int peek();
virtual void flush();
2008-07-30 16:47:36 +02:00
void stop();
uint8_t connected();
operator bool();
2008-07-30 16:47:36 +02:00
friend class Server;
private:
static uint16_t _srcport;
uint8_t _sock;
2008-07-30 16:47:36 +02:00
};
#endif