packages feed

network 3.2.3.0 → 3.2.4.0

raw patch · 6 files changed

+56/−16 lines, 6 files

Files

CHANGELOG.md view
@@ -1,8 +1,18 @@+## Version 3.2.4.0++* New API: setSockOptValue.+  [#588](https://github.com/haskell/network/issues/588)++## Version 3.2.3.0++* Making getAddrInfo polymorphic+  [#587](https://github.com/haskell/network/issues/587)+ ## Version 3.2.2.0  * New API: waitReadSocketSTM, waitAndCancelReadSocketSTM,   waitWriteSocketSTM, waitAndCancelWriteSocketSTM-  [#586](https://github.com/haskell/network/issues/585)+  [#586](https://github.com/haskell/network/issues/586) * Checking the length of ASCII string allowing trailing 0.   [#585](https://github.com/haskell/network/issues/585) 
Network/Socket.hs view
@@ -173,14 +173,18 @@         RecvIPv6TClass,         RecvIPv6PktInfo     ),-    StructLinger (..),-    SocketTimeout (..),     isSupportedSocketOption,     whenSupported,     getSocketOption,     setSocketOption,+    -- ** General socket options+    StructLinger (..),+    SocketTimeout (..),     getSockOpt,     setSockOpt,+    -- ** Integrated socket options+    SockOptValue (..),+    setSockOptValue,      -- * Socket     Socket,
Network/Socket/Options.hsc view
@@ -3,6 +3,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE GADTs #-}  #include "HsNet.h" ##include "HsNetDef.h"@@ -25,6 +26,8 @@   , setSocketOption   , getSockOpt   , setSockOpt+  , SockOptValue (..)+  , setSockOptValue   , StructLinger (..)   , SocketTimeout (..)   ) where@@ -408,6 +411,22 @@           throwSocketErrorIfMinus1_ "Network.Socket.setSockOpt" $           c_setsockopt fd level opt ptr sz +-- | Set a socket option value+--+-- The existential 'SockOptValue' enables things like:+--+-- @+-- mapM_ (uncurry $ 'setSockOptValue' sock) [+--       ('NoDelay', 'SockOptValue' @Int 1)+--     , ('Linger', 'SockOptValue' ('StructLinger' 1 0))+--     ]+-- @+setSockOptValue :: Socket+                     -> SocketOption+                     -> SockOptValue+                     -> IO ()+setSockOptValue s opt (SockOptValue v) = setSockOpt s opt v+ ----------------------------------------------------------------  -- | Get a socket option that gives an 'Int' value.@@ -456,8 +475,8 @@ {-# COMPLETE CustomSockOpt #-} #endif #ifdef SO_LINGER--- | Low level 'SO_LINBER' option value, which can be used with 'setSockOpt'.---+-- | Low level @SO_LINGER@ option value, which can be used with 'setSockOpt' or+-- @'setSockOptValue' . 'SockOptValue'@. data StructLinger = StructLinger {     -- | Set the linger option on.     sl_onoff  :: CInt,@@ -480,6 +499,13 @@         (#poke struct linger, l_onoff)  p onoff         (#poke struct linger, l_linger) p linger #endif++-- | A type that can hold any 'Storable' socket option value (e.g.+-- 'StructLinger' and 'CInt')+--+-- See 'setSocOptValue'+data SockOptValue where+  SockOptValue :: Storable a => a -> SockOptValue  ---------------------------------------------------------------- 
configure view
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles.-# Generated by GNU Autoconf 2.72 for Haskell network package 3.2.2.0.+# Generated by GNU Autoconf 2.72 for Haskell network package 3.2.4.0. # # Report bugs to <libraries@haskell.org>. #@@ -603,8 +603,8 @@ # Identity of this package. PACKAGE_NAME='Haskell network package' PACKAGE_TARNAME='network'-PACKAGE_VERSION='3.2.2.0'-PACKAGE_STRING='Haskell network package 3.2.2.0'+PACKAGE_VERSION='3.2.4.0'+PACKAGE_STRING='Haskell network package 3.2.4.0' PACKAGE_BUGREPORT='libraries@haskell.org' PACKAGE_URL='' @@ -1258,7 +1258,7 @@   # Omit some internal or obsolete options to make the list less imposing.   # This message is too long to be a string in the A/UX 3.1 sh.   cat <<_ACEOF-'configure' configures Haskell network package 3.2.2.0 to adapt to many kinds of systems.+'configure' configures Haskell network package 3.2.4.0 to adapt to many kinds of systems.  Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1324,7 +1324,7 @@  if test -n "$ac_init_help"; then   case $ac_init_help in-     short | recursive ) echo "Configuration of Haskell network package 3.2.2.0:";;+     short | recursive ) echo "Configuration of Haskell network package 3.2.4.0:";;    esac   cat <<\_ACEOF @@ -1409,7 +1409,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then   cat <<\_ACEOF-Haskell network package configure 3.2.2.0+Haskell network package configure 3.2.4.0 generated by GNU Autoconf 2.72  Copyright (C) 2023 Free Software Foundation, Inc.@@ -1809,7 +1809,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Haskell network package $as_me 3.2.2.0, which was+It was created by Haskell network package $as_me 3.2.4.0, which was generated by GNU Autoconf 2.72.  Invocation command line was    $ $0$ac_configure_args_raw@@ -4699,7 +4699,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log="-This file was extended by Haskell network package $as_me 3.2.2.0, which was+This file was extended by Haskell network package $as_me 3.2.4.0, which was generated by GNU Autoconf 2.72.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES@@ -4754,7 +4754,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\-Haskell network package config.status 3.2.2.0+Haskell network package config.status 3.2.4.0 configured by $0, generated by GNU Autoconf 2.72,   with options \\"\$ac_cs_config\\" 
configure.ac view
@@ -1,5 +1,5 @@ AC_INIT([Haskell network package],-        [3.2.2.0],+        [3.2.4.0],         [libraries@haskell.org],         [network]) 
network.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.18 name:               network-version:            3.2.3.0+version:            3.2.4.0 license:            BSD3 license-file:       LICENSE maintainer:         Kazu Yamamoto, Tamar Christina