When the handset is inside a mobile operator network, we can close the websocket to reduce battery comsuption and also network resources.
So, when the NS has messages to the WA installed on a concrete UA it will send a UDP Datagram to the handset.
When the mobile receives this datagram, it SHALL connect to the websocket interfaces in order to pull all pending messages.
The WakeUp server offers a simple HTTP API:
This method is used to check if the server is available or not. Is designed to be used by load balancers when the server is under maintance.
The server will responde 200 (OK) if the server is enabled or 503 (Under Maintance).
To set the server into maintance mode (tell the load balancer that the server is not available) is needed to send a SIGUSR1 signal to the proccess:
kill -SIGUSR1 <pid>
To set the server into normal mode (tell the load balancer that the server is available) is needed to send a SIGUSR2 signal to the proccess:
kill -SIGUSR2 <pid>
To wakeup a device, sent a HTTP GET method to the WakeUp server with the ip and port parameters. The protocol is optional:
http(s)://server:port/?ip=1.2.3.4&port=5678&protocol=[PROTOCOL_TCPv4 | PROTOCOL_UDPv4]
ip and port are mandatory and refers to the device ip and port where the Wakeup agent is listening.
protocol is optional (by default UDPv4 is used) the numeric values:
PROTOCOL_UDPv4 = 1
PROTOCOL_TCPv4 = 2