WebRequest.borg

WebRequest.borg


{
a:agent(router_placename()+"/webdispatcher");
sock:0;
display@text::socket_send(sock,displaytable(text,""));
agentmove(place)::
  {
  display("Agent ");
  display(agentself);
  display(" cannot move to ",place,eoln)
  };

handlehtmlrequestwithsocket(s,brol)::
  {
  sock:=s;
  display("",eoln);
  display("");
  a->handlehtmlrequest(agentself,brol)
  };

finish()::
  {
  display("");
  socket_close(sock);
  uiagent->agentdie();
  agentdie()
  }
}