Add missing build_opt.h to define the compile macro that is required to
actually enable SSL support. Also, add a comment to the source file
detailing this same requirement for Arduino projects using AsyncTCPSock.
This example opens an encrypted TLS connection to www.eff.org on port
443. Once the secure connection is negotiated and verified with the
embedded server certificate, this example is very similar to the earlier
raw_async_http_request example for plaintext. The compile-time define
ASYNC_TCP_SSL_ENABLED must be defined and enabled project-wide for this
example to actually enable and use the TLS support.
This is a bare-bones program that opens a basic TCP/IP socket to a
particular non-encrypted web server, on port 80, sends a hardcoded
HTTP/1.1 request, dumps the response, and should disconnect when the
remote side closes the connection. All necessary callbacks for this are
installed. The main loop() starts a connection attempt every 20 seconds,
and otherwise just outputs stars to show it is still running while the
AsyncClient does its thing.