ap
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: Socket.h
- Branch:
- api-changes
- Revision:
- 32:2c5fc105fc50
- Parent:
- 28:163fbe3263f4
- Child:
- 34:c17745683385
--- a/Socket.h Mon Feb 22 22:51:03 2016 +0000 +++ b/Socket.h Mon Feb 22 19:07:36 2016 -0600 @@ -56,6 +56,16 @@ uint16_t getPort() const; + /** Open a connection to the underlying address + * @return 0 on success + */ + int32_t open(); + + /** Close an open connection + * @return 0 on success + */ + int32_t close(); + /** Send data over the socket * @param data Buffer of data to send * @param len Size of data to send @@ -77,8 +87,6 @@ Socket(NetworkInterface *iface, socket_protocol_t proto); ~Socket(); - SocketInterface *_get_socket(); - private: NetworkInterface *_iface; socket_protocol_t _proto;