Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions Http1WriterBase.putResultResponse

1
2
3
4
5
module juptune.http.v1;

Result putResultResponse(
    Result result
);

Documentation

Writes the HTTP message stored within the provided resultto the socket.

State

The writer must be in the startLinestate. It will still be in the startLinestate after this function is called.

Assertions

The provided resultmust be an Http1Errorresult.

Notes

This function assumes that the result was created by a Http1Readeror a Http1Writer, as these types ensure that the error response is a valid HTTP message.

Technically there is nothing stopping the user from homebrewing their own Http1Errorresult, but this is not recommended.

Params

Throws

If an error occurs, the writer will be in an invalid state and should not be used again.

Anything the underlying I/O functions can throw. See juptune.event.io.IoError.

Returns

A Resultdescribing if an error ocurred. Any Http1Errorwill contain a valid HTTP error response.