Skip to content
Snippets Groups Projects
Commit 1b93a0ab authored by rswindell's avatar rswindell
Browse files

Example static service.

parent 0e8f6df7
No related branches found
No related tags found
No related merge requests found
// staticservice.js
// Example Synchronet "Static" Service module
// You configure it by adding a line to your ctrl/services.cfg file:
// ;protocol port max_clients options(hex) command-line
// static 8001 10 802 staticservice.js
while(!server.terminated) {
if(server.socket.poll(10)<1)
continue;
if(server.terminated)
break;
log("Incoming...");
sock = server.socket.accept();
sock.write("Enter a string: ");
sock.write("\r\nYou sent: '" + sock.readline() + "'\r\n");
sock.close();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment