Skip to content

HTTPSession

[Source]

An HTTP Session is the external API to the communication link between client and server. A session can only transfer one message at a time in each direction. The client and server each have their own ways of implementing this interface, but to application code (either in the client or in the server 'back end') this interface provides a common view of how information is passed into the http package.

trait tag HTTPSession

Public Behaviours

apply

[Source]

Start sending a request or response. The Payload must have all its essential fields filled in at this point, because ownership is being transferred to the session actor. This begins an outbound message.

be apply(
  payload: Payload val)

Parameters


finish

[Source]

Indicate that all outbound add_chunk calls have been made and submission of the HTTP message is complete.

be finish()

dispose

[Source]

Close the connection from this end.

be dispose()

write

[Source]

Write raw byte stream to the outbound TCP connection.

be write(
  data: (String val | Array[U8 val] val))

Parameters


cancel

[Source]

Tell the session to stop sending an outbound message.

be cancel(
  msg: Payload val)

Parameters