7_API REFERENCE MANUAL
OJMAR 175
// Accept incoming requests and handle them as child
processes
$client = socket_accept($sock);
// Read the input from the client
$input = socket_read($client, 65535);
// Process request and write response to $output.
// Write response
socket_write($client, $output, strlen($output));
// Close the master sockets
socket_close($sock);
7.5.2
Java
public class TcpExample {
private Socket socket;
public static void main (String[] args) {
// Port is assumed to come as first argument
Socket socket = new Socket("127.0.0.1", args[1]);
// Pre-cook response
List<String> whitelist = new ArrayList<String>();
whitelist.add("A1B2C3D4");
whitelist.add("A1B2C3D4");
whitelist.add("A1B2C3D4");
whitelist.add("A1B2C3D4");
// Receive data
byte[] data = readBytes();
// Send response
Gson gson = new Gson();
String rawResponse = gson.toJson(whitelist);
sendBytes(rawResponse.getBytes());
}
Summary of Contents for Nexo NLX1
Page 1: ...E S P INSTRUCTIONS MANUAL VERSION 2 0 NEXO NLX1 SYSTEM...
Page 2: ......
Page 3: ...INSTRUCTIONS MANUAL VERSION 1 0 NEXO NLX1 SYSTEM...
Page 7: ...CONTENTSOJMAR 7 PAGE LEFT BLANK INTENTIONALLY...
Page 39: ...2_MANUAL DE INSTALACI N OJMAR 39 PAGE LEFT BLANK INTENTIONALLY...
Page 57: ...3_PUESTA EN MARCHA OJMAR 57 PAGE LEFT BLANK INTENTIONALLY...
Page 62: ...5_MANUAL DE MANTENIMIENTO 1 2 3 User key master or service 4...
Page 70: ...5_MANUAL DE MANTENIMIENTO...
Page 74: ...5_MANUAL DE MANTENIMIENTO PAGE LEFT BLANK INTENTIONALLY...
Page 150: ...7_API REFERENCE MANUAL options BT group 1 range_from 1 range_to 100...
Page 184: ...7_API REFERENCE MANUAL PAGE LEFT BLANK INTENTIONALLY...
Page 186: ...7_API REFERENCE MANUAL Option b...
Page 187: ...7_API REFERENCE MANUAL OJMAR 187 Option c INSTALLING ONE ROUTER PER 50 LOCKS IS RECOMMENDED...
Page 188: ...7_API REFERENCE MANUAL...