Description
Adapts an owned plain Flyology connection to the HTTP transport boundary.
Connection_Transport
type Connection_Transport
(Channel : not null access Flyology.IO.Connections.Connection)
is limited new Flyology.HTTP.Server.Transport with private;
Borrowing adapter. Channel remains the sole closing owner and must outlive this object and every HTTP.Server.Connection that refers to it. The discriminant is the borrowed plain connection.
Receive
procedure Receive
(Item : in out Connection_Transport;
Data : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
Timeout : Duration;
Token : access Flyology.Cancellation.Token)
Forward a receive through the owned plain connection.
Parameters
- Item
Plain HTTP transport
- Data
Destination buffer
- Last
Last received byte or close sentinel
- Timeout
Operation deadline
- Token
Optional cancellation source
Send_All
procedure Send_All
(Item : in out Connection_Transport;
Data : Ada.Streams.Stream_Element_Array;
Timeout : Duration;
Token : access Flyology.Cancellation.Token)
Forward a complete send through the owned plain connection.
Parameters
- Item
Plain HTTP transport
- Data
Source bytes
- Timeout
Operation deadline
- Token
Optional cancellation source