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

35 lines
679 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);
2008-07-30 16:47:36 +02:00
virtual void write(uint8_t);
virtual void write(const char *str);
virtual void 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