1## Version 3.1.2.2
2
3* Allow bytestring 0.11
4  [#490](https://github.com/haskell/network/pull/490)
5* Export StructLinger
6  [#491](https://github.com/haskell/network/pull/491)
7* Fix a couple of broken tests on OpenBSD
8  [#498](https://github.com/haskell/network/pull/498)
9
10## Version 3.1.2.1
11
12* Increasing base lower bound to 4.9.
13  [#473](https://github.com/haskell/network/pull/473)
14* Suppressing errors from removeFile in UNIX bind.
15  [#478](https://github.com/haskell/network/pull/478)
16* Restoring UNIX stub functions on Windows.
17  [#489](https://github.com/haskell/network/pull/489)
18
19## Version 3.1.2.0
20
21* Added `-f devel` for test cases that are known to fail.
22  [#471](https://github.com/haskell/network/pull/471)
23* Improved precedence-compliant Read/Show instances. Verified via QuickCheck.
24  [#465](https://github.com/haskell/network/pull/465)
25  [#466](https://github.com/haskell/network/pull/466)
26* Removed the racing graceful close implementation to avoid issues with `CLOSE_WAIT`.
27  [#460](https://github.com/haskell/network/pull/438)
28* Gracefully handle binding of UNIX domain sockets.
29  [#460](https://github.com/haskell/network/pull/460)
30* Replace Socket type and family with extensible `CInt` pattern and synonyms.
31  [#459](https://github.com/haskell/network/pull/459)
32* Fixed race conditions in tests.
33  [#458](https://github.com/haskell/network/pull/458)
34* Removed many legacy uses of `undefined`.
35  [#456](https://github.com/haskell/network/pull/456)
36* Defined extensible `CustomSockOpt` via `ViewPatterns`.
37  [#455](https://github.com/haskell/network/pull/455)
38* Defined `openSocket` in terms of `AddrInfo`.
39  [5b0987197fe2ed7beddd7b2096522d624e71151e](https://github.com/haskell/network/commit/5b0987197fe2ed7beddd7b2096522d624e71151e)
40* Improved FreeBSD portability for Control Messages and tests
41  [#452](https://github.com/haskell/network/pull/452)
42* Support `sendMsg` and `recvMsg`
43  [#433](https://github.com/haskell/network/pull/433)
44  [#445](https://github.com/haskell/network/pull/445)
45  [#451](https://github.com/haskell/network/pull/451)
46    * Added `sendMsg` and `recvMsg` APIs
47    * Redefined `SocketOption` as pattern synonym
48* Implement total Show functions for SockAddr
49  [#441](https://github.com/haskell/network/pull/441)
50* Improve portability changing `u_int32_t` to `uint32_t`.
51  [#442](https://github.com/haskell/network/pull/442)
52* Removed obsolete CPP statements.
53  [d1f4ee60ce6a4a85abb79532f64d4a4e71e2b1ce](https://github.com/haskell/network/commit/d1f4ee60ce6a4a85abb79532f64d4a4e71e2b1ce)
54* Loads of improved test coverage.
55  [cbd67cc50a37770432eb978ac8b8eb6da3664817](https://github.com/haskell/network/commit/cbd67cc50a37770432eb978ac8b8eb6da3664817)
56  [fcc2d86d53a6bec793f6a979a9e8fdf7fe3f4c22](https://github.com/haskell/network/commit/fcc2d86d53a6bec793f6a979a9e8fdf7fe3f4c22)
57  [6db96969b3e8974abbfd50a7f073baa57376fd5e](https://github.com/haskell/network/commit/6db96969b3e8974abbfd50a7f073baa57376fd5e)
58
59## Version 3.1.1.1
60
61* Fix for GHCJS.
62  [#431](https://github.com/haskell/network/pull/431)
63
64## Version 3.1.1.0
65
66* A new API: `gracefulClose`.
67  [#417](https://github.com/haskell/network/pull/417)
68* `touchSocket`, `unsafeFdSocket`: Allow direct access to a socket's file
69  descriptor while providing tools to prevent it from being garbage collected.
70  This also deprecated `fdSocket` in favor of `unsafeFdSocket` and
71  `withFdSocket`.
72  [#423](https://github.com/haskell/network/pull/423)
73* `socketToFd`: Duplicates a socket as a file desriptor and closes the source
74  socket.
75  [#424](https://github.com/haskell/network/pull/424)
76
77## Version 3.1.0.1
78
79* getAddrInfo: raise exception if no AddrInfo returned.
80  [#410](https://github.com/haskell/network/pull/410)
81* Avoid catching SomeException.
82  [#411](https://github.com/haskell/network/pull/411)
83
84## Version 3.1.0.0
85
86* Making GC of socket safer.
87  [#399](https://github.com/haskell/network/pull/399)
88* Deprecating fdSocket. Use withFdSocket instead to ensure
89  that sockets are GCed in proper time.
90  [#399](https://github.com/haskell/network/pull/399)
91
92## Version 3.0.1.1
93
94* Fix blocking `if_nametoindex` errors on Windows
95  [#391](https://github.com/haskell/network/pull/391)
96
97## Version 3.0.1.0
98
99* Added `getSocketType :: Socket -> IO SocketType`.
100  [#372](https://github.com/haskell/network/pull/372)
101* Correcting manual and brushing up test cases
102  [#375](https://github.com/haskell/network/pull/375)
103* Fixed longstanded bug in `getContents` on mac
104  [#375](https://github.com/haskell/network/pull/375)
105* Fixing regression: set correct sockaddr length for abstract addresses
106  for Linux.
107  [#374](https://github.com/haskell/network/pull/374)
108
109## Version 3.0.0.1
110
111* Fixed a bug in `connect` where exceptions were not thrown
112  [#368](https://github.com/haskell/network/pull/368)
113
114## Version 3.0.0.0
115
116* Breaking change: the Network and Network.BSD are removed.
117  Network.BSD is provided a new package: network-bsd.
118* Breaking change: the signatures are changed:
119```
120old fdSocket :: Socket -> CInt
121new fdSocket :: Socket -> IO CInt
122
123old mkSocket :: CInt -> Family -> SocketType -> ProtocolNumber -> SocketStatus -> IO Socket
124new mkSocket :: CInt -> IO Socket
125```
126* Breaking change: the deprecated APIs are removed: send, sendTo, recv, recvFrom, recvLen, htonl, ntohl, inet_addr, int_ntoa, bindSocket, sClose, SocketStatus, isConnected, isBound, isListening, isReadable, isWritable, sIsConnected, sIsBound, sIsListening, sIsReadable, sIsWritable, aNY_PORT, iNADDR_ANY, iN6ADDR_ANY, sOMAXCONN, sOL_SOCKET, sCM_RIGHTS, packSocketType, getPeerCred.
127* Breaking change: SockAddrCan is removed from SockAddr.
128* Socket addresses are extendable with Network.Socket.Address.
129* "socket" is now asynchronous-exception-safe.
130  [#336](https://github.com/haskell/network/pull/336)
131* "recvFrom" returns (0, addr) instead of throwing an error on EOF.
132  [#360](https://github.com/haskell/network/pull/360)
133* All APIs are available on any platforms.
134* Build system is simplified.
135* Bug fixes.
136
137## Version 2.8.0.1
138
139* Eensuring that accept returns a correct sockaddr for unix domain.
140  [#400](https://github.com/haskell/network/pull/400)
141* Avoid out of bounds writes in pokeSockAddr.
142  [#400](https://github.com/haskell/network/pull/400)
143
144## Version 2.8.0.0
145
146* Breaking change: PortNumber originally contained Word16 in network
147  byte order and used "deriving Ord". This results in strange behavior
148  on the Ord instance. Now PortNumber holds Word16 in host byte order.
149  [#347](https://github.com/haskell/network/pull/347)
150* Breaking change: stopping the export of the PortNum constructor in
151  PortNumber.
152* Use bytestring == 0.10.* only.
153* Use base >= 4.7 && < 5.
154
155## Version 2.7.0.2
156
157* Removing withMVar to avoid the deadlock between "accept" and "close"
158   [#330](https://github.com/haskell/network/pull/330)
159* "close" does not throw exceptions. A new API: "close'" throws
160   exceptions when necessary.
161   [#337](https://github.com/haskell/network/pull/337)
162* Fixing the hang of lazy sendAll.
163   [#340](https://github.com/haskell/network/pull/340)
164* Installing NetDef.h (#334)
165   [#334](https://github.com/haskell/network/pull/334)
166
167## Version 2.7.0.1
168
169 * A new API: socketPortSafe.
170   [#319](https://github.com/haskell/network/pull/319)
171 * Fixing a drain bug of sendAll.
172   [#320](https://github.com/haskell/network/pull/320)
173 * Porting the new CALLCONV convention from master.
174   [#313](https://github.com/haskell/network/pull/313)
175 * Withdrawing the deprecations of packFamily and unpackFamily.
176   [#324](https://github.com/haskell/network/pull/324)
177
178## Version 2.7.0.0
179
180 * Obsoleting the Network module.
181 * Obsoleting the Network.BSD module.
182 * Obsoleting APIs: MkSocket, htonl, ntohl,
183              getPeerCred, getPeerEid,
184              send, sendTo, recv, recvFrom, recvLen,
185              inet_addr, inet_ntoa,
186              isConnected, isBound, isListening, isReadable, isWritable,
187              aNY_PORT, iNADDR_ANY, iN6ADDR_ANY, sOMAXCONN,
188              sOL_SOCKET, sCM_RIGHTS,
189              packFamily, unpackFamily, packSocketType
190 * Breaking change: do not closeFd within sendFd.
191   [#271](https://github.com/haskell/network/pull/271)
192 * Exporting ifNameToIndex and ifIndexToName from Network.Socket.
193 * New APIs: setCloseOnExecIfNeeded, getCloseOnExec and getNonBlock
194 * New APIs: isUnixDomainSocketAvailable and getPeerCredential
195 * socketPair, sendFd and recvFd are exported even on Windows.
196
197## Version 2.6.3.5
198
199 * Reverting "Do not closeFd within sendFd"
200   [#271](https://github.com/haskell/network/pull/271)
201
202## Version 2.6.3.4
203
204 * Don't touch IPv6Only when running on OpenBSD
205   [#227](https://github.com/haskell/network/pull/227)
206 * Do not closeFd within sendFd
207   [#271](https://github.com/haskell/network/pull/271)
208 * Updating examples and docs.
209
210## Version 2.6.3.3
211
212 * Adds a function to show the defaultHints without reading their undefined fields
213   [#291](https://github.com/haskell/network/pull/292)
214 * Improve exception error messages for getAddrInfo and getNameInfo
215   [#289](https://github.com/haskell/network/pull/289)
216
217## Version 2.6.3.2
218
219 * Zero memory of `sockaddr_un` if abstract socket
220   [#220](https://github.com/haskell/network/pull/220)
221
222 * Improving error messages
223   [#232](https://github.com/haskell/network/pull/232)
224
225 * Allow non-blocking file descriptors via `setNonBlockIfNeeded`
226   [#242](https://github.com/haskell/network/pull/242)
227
228 * Update config.{guess,sub} to latest version
229   [#244](https://github.com/haskell/network/pull/244)
230
231 * Rename `my_inet_ntoa` to avoid symbol conflicts
232   [#228](https://github.com/haskell/network/pull/228)
233
234 * Test infrastructure improvements
235   [#219](https://github.com/haskell/network/pull/219)
236   [#217](https://github.com/haskell/network/pull/217)
237   [#218](https://github.com/haskell/network/pull/218)
238
239 * House keeping and cleanup
240   [#238](https://github.com/haskell/network/pull/238)
241   [#237](https://github.com/haskell/network/pull/237)
242
243## Version 2.6.3.1
244
245 * Reverse breaking exception change in `Network.Socket.ByteString.recv`
246   [#215](https://github.com/haskell/network/issues/215)
247
248## Version 2.6.3.0
249
250 * New maintainers: Evan Borden (@eborden) and Kazu Yamamoto (@kazu-yamamoto).
251   The maintainer for a long period, Johan Tibell (@tibbe) stepped down.
252   Thank you, Johan, for your hard work for a long time.
253
254 * New APIs: ntohl, htonl,hostAddressToTuple{,6} and tupleToHostAddress{,6}.
255   [#210](https://github.com/haskell/network/pull/210)
256
257 * Added a Read instance for PortNumber. [#145](https://github.com/haskell/network/pull/145)
258
259 * We only set the IPV6_V6ONLY flag to 0 for stream and datagram socket types,
260   as opposed to all of them. This makes it possible to use ICMPv6.
261   [#180](https://github.com/haskell/network/pull/180)
262   [#181](https://github.com/haskell/network/pull/181)
263
264 * Work around GHC bug #12020. Socket errors no longer cause segfaults or
265   hangs on Windows. [#192](https://github.com/haskell/network/pull/192)
266
267 * Various documentation improvements and the deprecated pragmas.
268   [#186](https://github.com/haskell/network/pull/186)
269   [#201](https://github.com/haskell/network/issues/201)
270   [#205](https://github.com/haskell/network/pull/205)
271   [#206](https://github.com/haskell/network/pull/206)
272   [#211](https://github.com/haskell/network/issues/211)
273
274 * Various internal improvements.
275   [#193](https://github.com/haskell/network/pull/193)
276   [#200](https://github.com/haskell/network/pull/200)
277
278## Version 2.6.2.1
279
280 * Regenerate configure and `HsNetworkConfig.h.in`.
281
282 * Better detection of CAN sockets.
283
284## Version 2.6.2.0
285
286 * Add support for `TCP_USER_TIMEOUT`.
287
288 * Don't conditionally export the `SockAddr` constructors.
289
290 * Add `isSupportSockAddr` to allow checking for supported address types
291   at runtime.
292