Skip to content

Commit 9ddb843

Browse files
author
Mirela Chirica
committed
Cellular: Added explanatory comment for AT cellular stack's socket_open routine
1 parent 31da50e commit 9ddb843

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

features/cellular/framework/AT/AT_CellularStack.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ class AT_CellularStack : public NetworkStack, public AT_CellularBase {
5252
*/
5353
virtual nsapi_error_t socket_stack_init();
5454

55+
/**
56+
* Note: Socket_open does not actually open socket on all drivers, but that's deferred until calling `sendto`.
57+
* The reason is that IP stack implementations are very much modem specific and it's quite common that when a
58+
* socket is created (via AT commands) it must also be given remote IP address, and that is usually known
59+
* only when calling `sendto`.
60+
*/
5561
virtual nsapi_error_t socket_open(nsapi_socket_t *handle, nsapi_protocol_t proto);
5662

5763
virtual nsapi_error_t socket_close(nsapi_socket_t handle);

0 commit comments

Comments
 (0)