The communication between each client and the Pedro server is via a pair of sockets. One is used for two-way data transfer (e.g. notifications, subscriptions), the other is used for the server to acknowledge messages from the client. This will be a 0
for invalid data from the client and non-zero for valid data.
The creation of the two sockets is done as follows. Examples are given in the code for the Python and Java APIs.
connect
to connect the socket to the Pedro server. Pedro will be listening for the connection on a given port. The default port is 4550.connect
to connect the socket to the Pedro server for acknowledgements. Pedro will be listening for the connection on the first of the two ports send by the server.connect
to connect the socket to the Pedro server for data. Pedro will be listening for the connection on the second of the two ports send by the server."ok\n"
.