You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`DTLSSocket` and `DTLSSocketWrapper` are implementing DTLS stream over existing `Socket` transport. Design and implementation details are explained in [Secure Socket](../reference/securesocket.html) page.
4
+
5
+
For using secure DTLS connections, application utilise the `DTLSSocketWrapper` through Socket API, so existing applications and libraries should be compatible.
6
+
7
+
`DTLSSocketWrapper` is inheriting `TLSSocketWrapper` and uses exactly same API. Only difference is that it uses timers for keeping track of DTLS timeouts. See TLSSocket for usage example.
`TLSSocket` and `TLSSocketWrapper` are implementing TLS stream over existing `Socket` transport. Design and implementation details are explained in [Secure Socket](../reference/securesocket.html) page.
4
+
5
+
For using secure TLS connections, application utilise the `TLSSocketWrapper` through Socket API, so existing applications and libraries should be compatible.
Copy file name to clipboardExpand all lines: docs/reference/technology/connectivity/securesocket.md
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
1
## Secure Socket
2
2
3
-
Mbed OS provides an interface for creating secure connections in the form of TLS stream. The `TLSSocket` class provides the ability to secure any stream-based socket connection, for example TCP stream. This allows you to use existing protocol libraries through a secure connections.
3
+
Mbed OS provides an interface for creating secure connections in the form of TLS stream. The `TLSSocketWrapper` class provides the ability to secure any stream-based socket connection, for example TCP stream. This allows you to use existing protocol libraries through a secure connections.
4
4
5
-
`TLSSocket` inherits the `Socket` class, which allows any application that uses `Socket` to use `TLSSocket` instead. Secure socket both uses Socket interface as its transport layer and implements it. This makes it transport independent, and there is no direct dependency on the IP stack. For example, you can use the HTTP library and give `TLSSocket` to it to covert it to HTTPS.
5
+
`TLSSocketWrapper` inherits the `Socket` class, which allows any application that uses `Socket` to use `TLSSocketWrapper` instead. Secure socket both uses Socket interface as its transport layer and implements it. This makes it transport independent, and there is no direct dependency on the IP stack. For example, you can use the HTTP library and give `TLSSocketWrapper` to it to covert it to HTTPS.
6
6
7
-
### API
8
-
9
-
`TLSSocketWrapper` implements Mbed OS Socket API and extends it with functions that allow configuring security certificates. Please note that for most of the use cases, you are using these methods through `TLSSocket` class.
7
+
For easy to use API there is helper class called `TLSSocket` that contains internal TCP socket for transport stream.
10
8
11
9
### Usage example
12
10
13
-
The TLSSocket API follows the Socket API, so it is straightforward to use after setting up:
11
+
`TLSSocketWrapper` implements Mbed OS Socket API and extends it with functions that allow configuring security certificates, so it is straightforward to use after setting up. Please note that for most of the use cases, you are using these methods through `TLSSocket` class.
14
12
15
13
```
16
14
TLSSocket *socket = new TLSSocket();
@@ -35,7 +33,8 @@ The `TLSSocketWrapper` can use any `Socket` as its transport. `TLSSocket` is a h
35
33
One use case of `TLSSocketWrapper` is that existing TCP socket can be upgraded to TLS, by wrapping it like this:
0 commit comments