← All compilation units

Flyology.Postgres.Transports.Sockets

Description

PostgreSQL transport adapter for an already-open Flyology socket.

Receive_Exactly

procedure Receive_Exactly
  (Item    : in out Socket_Transport;
   Data    : out Ada.Streams.Stream_Element_Array;
   Timeout : Duration;
   On_Wait : access Wait_Observer'Class := null)

Fill Data from Item's socket.

Parameters
Item

Socket adapter to read.

Data

Buffer filled with exactly Data'Length bytes.

Timeout

Maximum time allowed for the complete read.

On_Wait

Send_All

procedure Send_All
  (Item    : in out Socket_Transport;
   Data    : Ada.Streams.Stream_Element_Array;
   Timeout : Duration)

Write every byte of Data to Item's socket.

Parameters
Item

Socket adapter to write.

Data

Complete buffer to transmit.

Timeout

Maximum time allowed for the complete write.

Socket_Transport

type Socket_Transport
  (Socket : not null access Flyology.IO.Sockets.Socket_Type)
is limited new Transport with private;

Non-owning transport view of Socket.