ap
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: TCPSocket.cpp
- Revision:
- 126:636a06d0aa42
- Parent:
- 118:96627c4b83d5
--- a/TCPSocket.cpp Wed May 25 02:45:51 2016 +0000 +++ b/TCPSocket.cpp Sun Oct 01 20:55:24 2017 +0000 @@ -50,6 +50,25 @@ return connect(addr); } +int TCPSocket::connectSSL(const char *host, uint16_t port) +{ + SocketAddress addr(_iface, host, port); + if (!addr) { + return NSAPI_ERROR_DNS_FAILURE; + } + + return connectSSL(addr); +} + +int TCPSocket::connectSSL(const SocketAddress &addr) +{ + if (!_socket) { + return NSAPI_ERROR_NO_SOCKET; + } + + return _iface->socket_connectSSL(_socket, addr); +} + int TCPSocket::send(const void *data, unsigned size) { mbed::Timer timer;