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-client 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.
Default Destructor.
Member Function Documentation
| int connect | ( | M2MConnectionHandler * | connHandler ) |
Connects the client to the server.
- Parameters:
-
connHandler The ConnectionHandler object that maintains the socket.
- Returns:
- Returns the state of the connection. Successful or not.
| int continue_connecting | ( | ) |
Continues connectivity logic for secure connection.
- Returns:
- Returns an error code if any while continuing the connection sequence.
| int init | ( | const M2MSecurity * | security ) |
Initiatlizes the socket connection states.
| int read | ( | unsigned char * | buffer, |
| uint16_t | len | ||
| ) |
Reads the data received from the server.
- Parameters:
-
message The data to be read. len The length of the data.
- Returns:
- Indicates whether the data is read successfully or not.
| void reset | ( | ) |
Resets the socket connection states.
| int send_message | ( | unsigned char * | message, |
| int | len | ||
| ) |
Sends data to the server.
- Parameters:
-
message The data to be sent. len The length of the data.
- Returns:
- Indicates whether the data is sent successfully or not.
| int start_connecting_non_blocking | ( | M2MConnectionHandler * | connHandler ) |
Starts the connection in non-blocking mode.
- Parameters:
-
connHandler The ConnectionHandler object that maintains the socket.
- Returns:
- Returns the state of the connection. Successful or not.
Generated on Tue Jul 12 2022 18:07:00 by
1.7.2
