TTMSMCPHTTPServerCommandEvent Event Type
Handles one incoming request and fills in the answer.
API unit family: TMS.MCP.HTTPServer
Remarks
All three objects belong to the server and are valid only while the handler runs, so nothing may be freed and no reference should outlive the call - except the connection, which may deliberately be kept when the answer is a long-lived stream. The handler is called on a connection thread and several may run at once, so it must be safe to run concurrently and must not touch the user interface directly.
Parameters
| Name | Description |
|---|---|
AConnection |
Connection the request arrived on, for a handler that goes on writing after returning. |
ARequest |
The request. Read-only apart from its headers. |
AResponse |
The answer to fill in. Set a status code on every path; leaving it untouched expresses no outcome. |