Skip to content

Commit 3a08cd0

Browse files
committed
SocketImpl: fd()
1 parent 31cd2b1 commit 3a08cd0

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

ArduinoCore-Linux/cores/arduino/Ethernet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ class EthernetClient : public Client {
194194

195195
void setInsecure() {}
196196

197+
int fd() { return sock.fd(); }
198+
197199
protected:
198200
const char* WIFICLIENT = "EthernetClient";
199201
SocketImpl sock;

ArduinoCore-Linux/cores/arduino/SocketImpl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class SocketImpl {
3535
// determines the IP Adress
3636
const char* getIPAddress(const char* validEntries[]);
3737

38+
int fd() { return sock; }
39+
3840
protected:
3941
bool is_connected = false;
4042
int sock = -1, valread;

0 commit comments

Comments
 (0)