|
4 | 4 | #include <IPAddress.h>
|
5 | 5 | #include <Print.h>
|
6 | 6 |
|
7 |
| -class lwipClient : public Client { |
| 7 | +// TODO improve documentation |
8 | 8 |
|
| 9 | +class lwipClient : public arduino::Client { |
9 | 10 | public:
|
10 | 11 | lwipClient();
|
11 | 12 | lwipClient(uint8_t sock);
|
12 |
| - lwipClient(struct tcp_struct* tcpClient); // FIXME this should be a private constructor, friend of Server |
| 13 | + lwipClient(struct tcp_pcb* tcpClient); // FIXME this should be a private constructor, friend of Server |
13 | 14 |
|
14 | 15 | // disable copy constructor
|
15 |
| - LWIPTCPClient(const LWIPTCPClient&) = delete; |
16 |
| - void operator=(const LWIPTCPClient&) = delete; |
| 16 | + lwipClient(const lwipClient&) = delete; |
| 17 | + void operator=(const lwipClient&) = delete; |
17 | 18 |
|
18 | 19 | // keep move constructor
|
19 |
| - LWIPTCPClient(LWIPTCPClient&&); |
20 |
| - void operator=(LWIPTCPClient&&); |
| 20 | + lwipClient(lwipClient&&); |
| 21 | + void operator=(lwipClient&&); |
21 | 22 |
|
22 |
| - virtual ~LWIPTCPClient(); |
| 23 | + virtual ~lwipClient(); |
23 | 24 |
|
24 | 25 | virtual uint8_t status();
|
25 | 26 | virtual int connect(IPAddress ip, uint16_t port);
|
@@ -54,13 +55,13 @@ class lwipClient : public Client {
|
54 | 55 |
|
55 | 56 | uint8_t getSocketNumber();
|
56 | 57 | virtual uint16_t localPort() {
|
57 |
| - return (_tcp_client->pcb->local_port); |
| 58 | + return (this->pcb->local_port); |
58 | 59 | };
|
59 | 60 | virtual IPAddress remoteIP() {
|
60 |
| - return (IPAddress(_tcp_client->pcb->remote_ip.addr)); |
| 61 | + return (IPAddress(this->pcb->remote_ip.addr)); |
61 | 62 | };
|
62 | 63 | virtual uint16_t remotePort() {
|
63 |
| - return (_tcp_client->pcb->remote_port); |
| 64 | + return (this->pcb->remote_port); |
64 | 65 | };
|
65 | 66 | void setConnectionTimeout(uint16_t timeout) {
|
66 | 67 | _timeout = timeout;
|
|
0 commit comments