[Ada] Add socket options to control keepalive on TCP connection
authorDmitriy Anisimkov <anisimko@adacore.com>
Tue, 18 May 2021 05:03:31 +0000 (11:03 +0600)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 7 Jul 2021 16:23:12 +0000 (16:23 +0000)
commitf3ff72939e52a381d28f3c4879f2eaa1d154ff73
treeca226ec60e920afb3b26a143d70d67bee623c98e
parentf8776eeb3613b557cea367f01d7d1b6b2fe9d33b
[Ada] Add socket options to control keepalive on TCP connection

gcc/ada/

* libgnat/g-socket.ads (Option_Name): Add Keep_Alive_Count,
Keep_Alive_Idle, and Keep_Alive_Interval items to enumeration.
(Option_Type): Add Keep_Alive_Count, Keep_Alive_Idle, and
Keep_Alive_Interval alternatives to the case of discriminated
record.
* libgnat/g-socket.adb (Options): Add Keep_Alive_Count,
Keep_Alive_Idle, and Keep_Alive_Interval to items enumerator to
OS constant converter.
(Set_Socket_Option): Process Keep_Alive_Count, Keep_Alive_Idle,
and Keep_Alive_Interval socket options.
(Get_Socket_Option): Idem.
gcc/ada/libgnat/g-socket.adb
gcc/ada/libgnat/g-socket.ads