Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
coap_client.h
00001 #pragma once 00002 #include "../iot-baidu-ca/source/baidu_ca_coap.h" 00003 #include "../iot-baidu-ca/include/baidu_ca.h" 00004 #include "../iot-baidu-ca-adapter/baidu_ca_network_socket.h" 00005 class CoapsClient 00006 { 00007 public: 00008 CoapsClient(const char* ip, unsigned short port, 00009 const char* path, const char* cert); 00010 ~CoapsClient(); 00011 int connect(); 00012 int get(unsigned int nOffset, unsigned char chBuffer[], unsigned int nSize); 00013 int disconnect(); 00014 private: 00015 void network_signal_handler(const bca_addr_t *addr); 00016 bca_coap_handler m_coapInstance; 00017 bool m_bConnected; 00018 bca_addr_t m_peer; 00019 const char* m_szPath; 00020 const char* m_szCert; 00021 duer::SocketAdapter::Callback _on_network_data_signal; 00022 00023 };
Generated on Tue Jul 12 2022 16:28:53 by
1.7.2
