src/Tools/WWW_Find/echo.ML
author wenzelm
Fri, 23 Sep 2011 17:23:54 +0200
changeset 45066 11f622794ad6
parent 33823 24090eae50b6
permissions -rw-r--r--
discontinued stream-based Socket_IO, which causes too many problems with Poly/ML and SML/NJ (reverting major parts of 5c0b0d67f9b1);

(*  Title:      Tools/WWW_Find/echo.ML
    Author:     Timothy Bourke, NICTA

Install simple echo server.
*)

local
fun echo (req, content, send) =
  (send (ScgiReq.show req);
   send "--payload-----\n";
   send (Byte.bytesToString content);
   send "\n--------------\n")
in
val () = ScgiServer.register ("echo", SOME Mime.plain, echo);
end;