Skip to content

Commit 75fefe6

Browse files
gdsportsfpistm
authored andcommitted
Add EthernetClient functions: localPort, remoteIP, remotePort
SSLClient needs these functions
1 parent 3ebfc7b commit 75fefe6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/EthernetClient.h

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class EthernetClient : public Client {
3131
virtual bool operator==(const EthernetClient&);
3232
virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); };
3333
uint8_t getSocketNumber();
34+
virtual uint16_t localPort() { return (_tcp_client->pcb->local_port); };
35+
virtual IPAddress remoteIP() { return (IPAddress(_tcp_client->pcb->remote_ip.addr)); };
36+
virtual uint16_t remotePort() { return (_tcp_client->pcb->remote_port); };
3437

3538
friend class EthernetServer;
3639

0 commit comments

Comments
 (0)