Http module

parse

procedure · 1 overloadSource

Reads from data and returns the number of bytes used and one event. Call again with the rest until NEED_MORE (the input is then used up); END and HEAD can come with no bytes used, so loop on the event, not on the byte count. BODY data is a slice of data.

parse :: (p: *Parser, data: [] u8) -> (consumed: int, event: Event)

Reads from data and returns the number of bytes used and one event. Call again with the rest until NEED_MORE (the input is then used up); END and HEAD can come with no bytes used, so loop on the event, not on the byte count. BODY data is a slice of data.

Parameters

p: *Parser
data: [] u8

Returns

consumed: int
event: Event

See also