Skip to content

Commit 02d1627

Browse files
fixing lwipClient
1 parent d07249a commit 02d1627

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

libraries/lwIpWrapper/src/lwipClient.h

+11-10
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
#include <IPAddress.h>
55
#include <Print.h>
66

7-
class lwipClient : public Client {
7+
// TODO improve documentation
88

9+
class lwipClient : public arduino::Client {
910
public:
1011
lwipClient();
1112
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
1314

1415
// 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;
1718

1819
// keep move constructor
19-
LWIPTCPClient(LWIPTCPClient&&);
20-
void operator=(LWIPTCPClient&&);
20+
lwipClient(lwipClient&&);
21+
void operator=(lwipClient&&);
2122

22-
virtual ~LWIPTCPClient();
23+
virtual ~lwipClient();
2324

2425
virtual uint8_t status();
2526
virtual int connect(IPAddress ip, uint16_t port);
@@ -54,13 +55,13 @@ class lwipClient : public Client {
5455

5556
uint8_t getSocketNumber();
5657
virtual uint16_t localPort() {
57-
return (_tcp_client->pcb->local_port);
58+
return (this->pcb->local_port);
5859
};
5960
virtual IPAddress remoteIP() {
60-
return (IPAddress(_tcp_client->pcb->remote_ip.addr));
61+
return (IPAddress(this->pcb->remote_ip.addr));
6162
};
6263
virtual uint16_t remotePort() {
63-
return (_tcp_client->pcb->remote_port);
64+
return (this->pcb->remote_port);
6465
};
6566
void setConnectionTimeout(uint16_t timeout) {
6667
_timeout = timeout;

0 commit comments

Comments
 (0)