Device: Client 🧪
Channel representing an HTTPS connection to a client.
Type: Poll
Variants (int)
Continue- Keep polling.Hangup- Hang up connection.
- Respond with informational response status code
100-199(FIXME: full list) - Respond with successful response status code
200-299(FIXME: full list) - Respond with redirection message status code
300-399(FIXME: full list) - Respond with client error response status code
400-499(FIXME: full list) - Respond with server error response status code
500-599(FIXME: full list)
Readiness
Becomes ready once either
- The client has headers and possible content body ready to be retrieved (no error is set to 0).
- The client has headers, but they are too large for
request(request.capacityset to required capacity) - Errors have overflown (at least one error set to
255) - The client hung up (
pollset toHangup) - The client is ready for more data (
pollset toContinue)
Command: Client
Fields
content: List[byte]Content body to send.poll: opt[Poll](In/Out) Pointer to poll state (In:Server, Out:Client)request: opt[_]Request buffercapacity: ptr[int](In/Out) Pointer to capacity ofheaders_content.headers_content: ptr[Text](In/Out) Pointer to headers and content.
Traps
- If
pollinvalid/unknown variant - If
pollis not0or1after response headers already sent - If
pollis non-null and not a reponse status code before headers sent - If
request.size > request.capacity - If address at
content.addr + content.sizehas no page - If address at
error + 3has no page - If address at
request + 7has no page - If address at
request.capacity + 3has no page - If address at
request.headers_content.addr + request.capacityhas no page