Statistics
| Branch: | Revision:

root / arduino-1.0 / libraries / Ethernet / EthernetClient.h @ 58d82c77

History | View | Annotate | Download (800 Bytes)

1
#ifndef ethernetclient_h
2
#define ethernetclient_h
3
#include "Arduino.h"        
4
#include "Print.h"
5
#include "Client.h"
6
#include "IPAddress.h"
7

    
8
class EthernetClient : public Client {
9

    
10
public:
11
  EthernetClient();
12
  EthernetClient(uint8_t sock);
13

    
14
  uint8_t status();
15
  virtual int connect(IPAddress ip, uint16_t port);
16
  virtual int connect(const char *host, uint16_t port);
17
  virtual size_t write(uint8_t);
18
  virtual size_t write(const uint8_t *buf, size_t size);
19
  virtual int available();
20
  virtual int read();
21
  virtual int read(uint8_t *buf, size_t size);
22
  virtual int peek();
23
  virtual void flush();
24
  virtual void stop();
25
  virtual uint8_t connected();
26
  virtual operator bool();
27

    
28
  friend class EthernetServer;
29
  
30
  using Print::write;
31

    
32
private:
33
  static uint16_t _srcport;
34
  uint8_t _sock;
35
};
36

    
37
#endif