Module moonwalk.connection
Connection between host and client.
Extends a base object implementing the interface described in connection.abstract .
The base object is determined at run time. It could be a built-in connection type, or a new type defined by the API author.
Functions
constructor (hostdata) | Set up connection. |
fail (reason, status) | Send a failure message. |
handle_request () | Handle the request. |
Functions
- constructor (hostdata)
-
Set up connection.
Sets
self.hostdata
and populatesself.request
.deal with the connection.
Parameters:
- hostdata Information the host environments may need to
- fail (reason, status)
-
Send a failure message.
Parameters:
- reason Human-readable reason why the request failed.
- status
HTTP status code and reason; defaults to
400 Bad Request
- handle_request ()
- Handle the request.