HTTPParser¶
This is the HTTP parser that builds a message Payload
object
representing either a Request or a Response from received chunks of data.
Constructors¶
request¶
Expect HTTP requests to arrive on a session.
Parameters¶
- session': HTTPSession tag
Returns¶
- HTTPParser ref^
response¶
Expect HTTP responses to arrive on a session.
Parameters¶
- session': HTTPSession tag
Returns¶
- HTTPParser ref^
Public Functions¶
parse¶
Analyze new data based on the parser's current internal state.
Parameters¶
- buffer: Reader ref
Returns¶
- (ParseError val | None val)
restart¶
Restart parser state for the next message. It will be of the same kind as the last one.
Returns¶
- None val
closed¶
The connection has closed, which may signal that all remaining data is the payload body.
Parameters¶
- buffer: Reader ref
Returns¶
- None val