Skip to content

Commit 501f5ae

Browse files
author
Seppo Takalo
committed
Add more documentation to Socket classes.
1 parent db67332 commit 501f5ae

File tree

6 files changed

+26
-4
lines changed

6 files changed

+26
-4
lines changed

features/netsocket/DNS.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,5 @@ class DNS {
100100
};
101101

102102
#endif
103+
104+
/** @} */

features/netsocket/DTLSSocket.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
#if defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY)
3131

3232
/**
33-
* \brief DTLSSocket implement DTLS stream over the existing Socket transport
33+
* \brief DTLSSocket implement DTLS stream over UDP Socket.
34+
*
35+
* This is a easy to use helper class that uses DTLSSocketWrapper with
36+
* internal UDPSocket.
3437
*/
3538

3639
class DTLSSocket : public DTLSSocketWrapper {

features/netsocket/DTLSSocketWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#if defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY)
2929

3030
/**
31-
* \brief DTLSSocketWrapper implement DTLS stream over the existing Socket transport
31+
* \brief DTLSSocketWrapper implement DTLS stream over the existing Socket transport.
3232
*/
3333
class DTLSSocketWrapper : public TLSSocketWrapper {
3434
public:

features/netsocket/Socket.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@
2525
#include "netsocket/SocketAddress.h"
2626
#include "Callback.h"
2727

28-
/** Abstract socket class
28+
/** Socket interface.
29+
*
30+
* This class defines the Mbed OS Socket API.
31+
* Socket is an abstract interface for communicating to remote endpoints.
32+
*
33+
* This API is intented to use for applications and libraries instead of
34+
* using some protocol specific implementation of it. For example TCPSocket
35+
* and UDPSocket are implementations of Socket interface.
36+
* Socket API is intentionally not protocol specific and allows all protocol
37+
* to provide same API regardless of underlying transport mechanism.
2938
*/
3039
class Socket {
3140
public:

features/netsocket/TLSSocket.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636

3737
/**
3838
* \brief TLSSocket a wrapper around TCPSocket for interacting with TLS servers.
39+
*
40+
* TLSSocket uses the TLSSocketWrapper with internal TCP socket. This is a
41+
* easy to use helper for creating commonly used TLS connection over TCP.
42+
*
3943
*/
4044
class TLSSocket : public TLSSocketWrapper {
4145
public:

features/netsocket/TLSSocketWrapper.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
#if defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY)
3636

3737
/**
38-
* \brief TLSSocket a wrapper around Socket for interacting with TLS servers
38+
* TLSSocket a wrapper around Socket for interacting with TLS servers.
39+
*
40+
* TLSSocketWrapper can use any Socket as a transport and after
41+
* completing the TLS handshake, can be used as any Socket would be used.
42+
*
3943
*/
4044
class TLSSocketWrapper : public Socket {
4145
public:

0 commit comments

Comments
 (0)