Skip to content

BaseProtocol

[Source]

class ref BaseProtocol

Constructors

create

[Source]

new ref create(
  notifier': Notifier tag)
: BaseProtocol ref^

Parameters

Returns


Public fields

let buffer: Reader ref

[Source]


let notifier: Notifier tag

[Source]


var headers: HashMap[String val, String val, HashEq[String val] val] ref

[Source]


var receiving_mode: (ReceivingModeHeader val | ReceivingModeContent val)

[Source]


Public Functions

apply

[Source]

fun ref apply(
  data: Array[U8 val] iso)
: None val

Parameters

Returns


parse

[Source]

fun ref parse()
: (Message val | InvalidJson val | NoContentLength val | 
    InvalidContentLength val | InvalidMessage val | NeedMore val)

Returns


receive_headers

[Source]

fun ref receive_headers()
: (Message val | InvalidJson val | NoContentLength val | 
    InvalidContentLength val | InvalidMessage val | NeedMore val)

Returns


receive_content

[Source]

fun ref receive_content()
: (Message val | InvalidJson val | NoContentLength val | 
    InvalidContentLength val | InvalidMessage val | NeedMore val)

Returns


parse_message

[Source]

fun ref parse_message(
  json: JsonObject val)
: (Message val | InvalidJson val | NoContentLength val | 
    InvalidContentLength val | InvalidMessage val)

Parameters

Returns


parse_response_error

[Source]

fun box parse_response_error(
  json: JsonObject val)
: (ResponseError val | InvalidJson val | NoContentLength val | 
    InvalidContentLength val | InvalidMessage val)

Parameters

Returns