Function anjay_server_schedule_reconnect
Defined in File core.h
Function Documentation
-
int anjay_server_schedule_reconnect(anjay_t *anjay, anjay_ssid_t ssid)
Reconnects sockets associated with a specific LwM2M Server.
The reconnection will be performed during the next anjay_sched_run call and will trigger sending any messages necessary to maintain valid registration (DTLS session resumption and/or Register or Update operations).
If the server connection is disconnected due to queue mode, and there are no outstanding messages (Register, Update, Notify or Send), the socket will not be reconnected.
If the server is in a disabled state, an error will be returned. Use anjay_enable_server if you want to re-enable such a server.
- Parameters:
anjay – Anjay object to operate on.
ssid – Short Server ID of the server to reconnect.
- Returns:
0 on success, a negative value in case of error.