This program shows how to use TLS_cyassl to connect to mbed.org
Dependencies: EthernetInterface6 TLS_cyassl mbed-rtos mbed
Fork of TLS_cyassl-Example by
main.cpp
- Committer:
- feb11
- Date:
- 2013-09-12
- Revision:
- 0:6fa35c8074ce
- Child:
- 1:a5e7369f39d9
File content as of revision 0:6fa35c8074ce:
#include "mbed.h" #include "EthernetInterface.h" #include "TLSConnection.h" const char host[] = "mbed.org"; int main() { EthernetInterface eth; if(eth.init() || eth.connect()) { printf("Error with EthernetInterface\n\r"); return -1; } TLSConnection con; if(!con.connect(host)) { printf("Failed to connect to %s\n", host); } else { printf("Connected to %s\n !", host); con.close(); } eth.disconnect(); return 0; }