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.
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
M2MConnectionSecurity Class Reference
M2MConnectionSecurity. More...
#include <m2mconnectionsecurity.h>
Public Member Functions | |
| M2MConnectionSecurity (SecurityMode mode) | |
| Default Constructor. | |
| ~M2MConnectionSecurity () | |
| Default Destructor. | |
| void | reset () |
| Resets the socket connection states. | |
| int | init (const M2MSecurity *security) |
| Initiatlizes the socket connection states. | |
| int | start_connecting_non_blocking (M2MConnectionHandler *connHandler) |
| Starts the connection in non-blocking mode. | |
| int | continue_connecting () |
| Continues connectivity logic for secure connection. | |
| int | connect (M2MConnectionHandler *connHandler) |
| Connects the client to the server. | |
| int | send_message (unsigned char *message, int len) |
| Sends data to the server. | |
| int | read (unsigned char *buffer, uint16_t len) |
| Reads the data received from the server. | |
Detailed Description
This class provides a method to create a secure socket connection to handle connectivity for the mbed Client. It will handle sending, receiving and establishing a secure connection for the mbed Client on top of the normal socket connection.
Definition at line 31 of file m2mconnectionsecurity.h.
Constructor & Destructor Documentation
| M2MConnectionSecurity | ( | SecurityMode | mode ) |
Default Constructor.
Definition at line 24 of file m2mconnectionsecurity.cpp.
Default Destructor.
Definition at line 29 of file m2mconnectionsecurity.cpp.
Member Function Documentation
| int connect | ( | M2MConnectionHandler * | connHandler ) |
Connects the client to the server.
- Parameters:
-
connHandler,ConnectionHandler object that maintains the socket.
- Returns:
- Returns the state of the connection. Successful or not.
Definition at line 51 of file m2mconnectionsecurity.cpp.
| int continue_connecting | ( | ) |
Continues connectivity logic for secure connection.
- Returns:
- Returns error code if any while continuing connection sequence.
Definition at line 46 of file m2mconnectionsecurity.cpp.
| int init | ( | const M2MSecurity * | security ) |
Initiatlizes the socket connection states.
Definition at line 37 of file m2mconnectionsecurity.cpp.
| int read | ( | unsigned char * | buffer, |
| uint16_t | len | ||
| ) |
Reads the data received from the server.
- Parameters:
-
message,Data to be read. len,Length of the data.
- Returns:
- Indicates whether the data is read successfully or not.
Definition at line 59 of file m2mconnectionsecurity.cpp.
| void reset | ( | ) |
Resets the socket connection states.
Definition at line 33 of file m2mconnectionsecurity.cpp.
| int send_message | ( | unsigned char * | message, |
| int | len | ||
| ) |
Sends data to the server.
- Parameters:
-
message,Data to be sent. len,Length of the data.
- Returns:
- Indicates whether the data is sent successfully or not.
Definition at line 55 of file m2mconnectionsecurity.cpp.
| int start_connecting_non_blocking | ( | M2MConnectionHandler * | connHandler ) |
Starts the connection in non-blocking mode.
- Parameters:
-
connHandler,ConnectionHandler object that maintains the socket.
- Returns:
- Returns the state of the connection. Successful or not.
Definition at line 41 of file m2mconnectionsecurity.cpp.
Generated on Tue Jul 12 2022 13:53:53 by
1.7.2
