udpHTML.mur
int hitCount = 0;
void setup() {
add("UDPServer", "udpServer", "udpCallback");
set("udpServer", "port", 10000);
start("udpServer");
add("HTTPServer", "httpServer", "httpCallback");
set("httpServer", "port", 8080);
start("httpServer");
}
void udpCallback(ServerEvent se) {
hitCount = hitCount + 1;
}
void httpCallback(ServerEvent se) {
HTTPServerEvent hse = (HTTPServerEvent)se;
hse.OK();
hse.send("UDP Hits:" + hitCount);
hse.finish();
}