Last change
on this file since 449 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
939 bytes
|
Line | |
---|
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 | virtual bool operator==(const EthernetClient&);
|
---|
28 | virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); };
|
---|
29 |
|
---|
30 | friend class EthernetServer;
|
---|
31 |
|
---|
32 | using Print::write;
|
---|
33 |
|
---|
34 | private:
|
---|
35 | static uint16_t _srcport;
|
---|
36 | uint8_t _sock;
|
---|
37 | };
|
---|
38 |
|
---|
39 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.