HTTPSession¶
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.
Public Behaviours¶
apply¶
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.
Parameters¶
- payload: Payload val
finish¶
Indicate that all outbound add_chunk
calls have been made and
submission of the HTTP message is complete.
dispose¶
Close the connection from this end.
write¶
Write raw byte stream to the outbound TCP connection.
Parameters¶
cancel¶
Tell the session to stop sending an outbound message.
Parameters¶
- msg: Payload val