udpHTML.mur

/* Welcome to Murmur, this new program has
   an empty setup method ready for you to
   use.
 */


int hitCount 0;

void setup
() {

    // Fill in your setup method

    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
();
}