1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-15 00:23:56 +01:00
Arduino/hardware/arduino/avr/libraries/Ethernet/EthernetClient.h

38 lines
800 B
C
Raw Normal View History

#ifndef ethernetclient_h
#define ethernetclient_h
2011-03-02 01:52:13 +01:00
#include "Arduino.h"
2008-07-30 16:47:36 +02:00
#include "Print.h"
#include "Client.h"
#include "IPAddress.h"
2008-07-30 16:47:36 +02:00
class EthernetClient : public Client {
2008-07-30 16:47:36 +02:00
public:
EthernetClient();
EthernetClient(uint8_t sock);
2008-07-30 16:47:36 +02:00
uint8_t status();
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);
virtual size_t write(uint8_t);
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();
virtual void stop();
virtual uint8_t connected();
virtual operator bool();
friend class EthernetServer;
using Print::write;
private:
static uint16_t _srcport;
uint8_t _sock;
2008-07-30 16:47:36 +02:00
};
#endif