Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Add TCP_NODELAY flag
Browse files Browse the repository at this point in the history
src/sockets.ads
- At type Socket_Option add value TCP_NODELAY
src/sockets.adb
- Add element for new Socket_Option value TCP_NODELAY
  in constant arrays Socket_Option_Match and Socket_Option_Size
  • Loading branch information
Karlheinz Kessler authored and samueltardieu committed Aug 2, 2014
1 parent b532e94 commit db8431b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/sockets.adb
Expand Up @@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2011 Samuel Tardieu <sam@rfc1149.net> --
-- Copyright (C) 1998-2013 Samuel Tardieu <sam@rfc1149.net> --
-- Copyright (C) 1999-2003 Télécom ParisTech --
-- --
-- AdaSockets is free software; you can redistribute it and/or modify --
Expand Down Expand Up @@ -80,7 +80,8 @@ package body Sockets is
SO_KEEPALIVE => Constants.So_Keepalive,
TCP_KEEPCNT => Constants.Tcp_Keepcnt,
TCP_KEEPIDLE => Constants.Tcp_Keepidle,
TCP_KEEPINTVL => Constants.Tcp_Keepintvl);
TCP_KEEPINTVL => Constants.Tcp_Keepintvl,
TCP_NODELAY => Constants.Tcp_Nodelay);

Socket_Option_Size : constant array (Socket_Option) of Natural :=
(SO_REUSEADDR => 4,
Expand All @@ -94,7 +95,8 @@ package body Sockets is
SO_KEEPALIVE => 4,
TCP_KEEPCNT => 4,
TCP_KEEPIDLE => 4,
TCP_KEEPINTVL => 4);
TCP_KEEPINTVL => 4,
TCP_NODELAY => 4);

CRLF : constant String := CR & LF;

Expand Down
4 changes: 2 additions & 2 deletions src/sockets.ads
Expand Up @@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2011 Samuel Tardieu <sam@rfc1149.net> --
-- Copyright (C) 1998-2013 Samuel Tardieu <sam@rfc1149.net> --
-- Copyright (C) 1999-2003 Télécom ParisTech --
-- --
-- AdaSockets is free software; you can redistribute it and/or modify --
Expand Down Expand Up @@ -95,7 +95,7 @@ package Sockets is
IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP,
IP_MULTICAST_LOOP, SO_SNDBUF, SO_RCVBUF,
SO_KEEPALIVE, TCP_KEEPCNT, TCP_KEEPIDLE,
TCP_KEEPINTVL);
TCP_KEEPINTVL, TCP_NODELAY);

procedure Getsockopt
(Socket : Socket_FD'Class;
Expand Down

0 comments on commit db8431b

Please sign in to comment.