Skip to content

Commit 6583b9f

Browse files
committed
Added trivial get_stack member function to ESP8266Interface
Matches added requirement to the network-socket API
1 parent 1cf9de7 commit 6583b9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ESP8266Interface.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
165165
* @note Callback may be called in an interrupt context.
166166
*/
167167
virtual void socket_attach(void *handle, void (*callback)(void *), void *data);
168+
169+
/** Provide access to the NetworkStack object
170+
*
171+
* @return The underlying NetworkStack object
172+
*/
173+
virtual NetworkStack *get_stack()
174+
{
175+
return this;
176+
}
168177

169178
private:
170179
ESP8266 _esp;

0 commit comments

Comments
 (0)