mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
The internal socket context struct modem_socket_config currently has members accessed directly by user. The modem_socket_init() function has been updated to take all user configurations as args. Thus removing the need for the user to directly access the internal context for initialization. The user also currently needs to know of internal modem socket libary behavior to determine if a socket has been allocated and assigned an id, this is documented, and is not safe. The functions: modem_socket_is_allocated() modem_socket_id_is_assigned() modem_socket_id_assign() have been added to the modem socket library API to perform these checks, and to assign socket ids. This commit makes use of the modem socket library safer and adds documentation to the API. Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>