Module fsm

Source
Expand description

Finite state machine for get responses.

This is the low level API for getting data from a peer.

Initial
Initial
Connected
Connected
StartChild
StartChild
StartRoot
StartRoot
BlobHeader
BlobHeader
BlobContent
BlobContent
BlobEnd
BlobEnd
Closing
Closing
Stats
Stats
Error
Error
(hash)
(hash)
Text is not SVG - cannot display

Structs§

AtBlobContent
State while we are reading content
AtBlobHeader
State before reading a size header
AtClosing
State when finishing the get response
AtConnected
State of the get response machine after the handshake has been sent
AtEndBlob
State after we have read all the content for a blob
AtInitial
Initial state of the get response machine
AtStartChild
State of the get response when we start reading a child
AtStartRoot
State of the get response when we start reading a collection

Enums§

AtBlobHeaderNextError
Error that you can get from AtBlobHeader::next
BlobContentNext
The next state after reading a content item
ConnectedNext
Possible next states after the handshake has been sent
ConnectedNextError
Error that you can get from AtConnected::next
DecodeError
Decode error that you can get once you have sent the request and are decoding the response, e.g. from AtBlobContent::next.
EndBlobNext
The next state after the end of a blob

Functions§

start
The entry point of the get response machine