NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: Socket.h
- Revision:
- 90:0a988e4abb72
- Parent:
- 89:b1d417383c0d
- Child:
- 91:cad29ce6a01c
--- a/Socket.h Tue Apr 19 18:20:38 2016 -0500 +++ b/Socket.h Tue Apr 19 18:22:15 2016 -0500 @@ -27,6 +27,11 @@ /** Socket lifetime */ virtual ~Socket(); + + /** Open the socket + * @param iface Interface to open socket on + */ + virtual int open(NetworkInterface *iface) = 0; /** Set blocking or non-blocking mode of the socket * @param blocking true for blocking mode, false for non-blocking mode. @@ -60,7 +65,8 @@ int close(bool shutdown=true); protected: - Socket(NetworkInterface *iface, nsapi_protocol_t proto); + Socket(); + int open(NetworkInterface *iface, nsapi_protocol_t proto); static void thunk(void *);