/*
* Hello World!
*/
// HTTP応答ヘッダを定義
header=`HTTP 1.0 200 OK
Server: MAS Server 1.0
Control-cache: noCache
Content-type: text/html
`
// HTMLの本体を定義
body=`
Artisoc HTTP Test
Hello World!
`
// コールバックを定義
function hello(commands)
{
::out.write(header.getBytes())
::out.write(body.getBytes())
}
// サービス /hello にそのコールバック関数helloを登録
registService("/hello", hello)
// HTTPサーバスレッドを起動
child = fork(HttpServiceThread)