use MOONLIGHT symbol
[mono.git] / mcs / class / System / System.Net.Sockets / ChangeLog
1 2010-03-16  Jb Evain  <jbevain@novell.com>
2
3         * Socket_2_1.cs, SocketAsyncEventArgs.cs: use MOONLIGHT symbol to
4         disambiguate MonoTouch and Moonlight code.
5
6 2010-03-10  Sebastien Pouliot  <sebastien@ximian.com>
7
8         * SocketAsyncEventArgs.cs: Remove the use of reflection to check
9         xdomain poilicy on sockets (since the policy code now resides in
10         System.Net.dll)
11
12 2010-01-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13
14         * NetworkStream.cs: Our explicit impl of IDisposable.Dispose belongs
15         to 1.0/1.1 only. Also move the call to GC.SupressFinalize to
16         Dispose(bool), as expected and as done by other Stream children
17         implementing a destructor.
18         Fixes #564637.
19
20 2010-01-21  Sebastien Pouliot  <sebastien@ximian.com>
21
22         * SocketAsyncEventArgs.cs: Apply Gendarme's ProtectCallToEventDelegatesRule
23
24 2009-12-04  Sebastien Pouliot  <sebastien@ximian.com>
25
26         * System.Net.Sockets/SocketAsyncEventArgs.cs: Implement 
27         ConnectByNameError property for Moonlight 3 (and fx 4.0)
28
29 2009-11-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
30
31         * Socket_2_1.cs: throw when shutting down a socket that is not
32         connected. Don't linger if the socket is not connected.
33
34 2009-11-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
35
36         * Socket_2_1.cs: stop any blocking thread before closing the socket.
37
38 2009-11-03  Sebastien Pouliot  <sebastien@ximian.com>
39
40         * SocketAsyncEventArgs.cs: Set error back to SocketError.Success
41         once CheckEndPoint succeed.
42         [Fix bug #549586]
43
44 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
45
46         * Socket.cs: implement *SendFile().
47
48 2009-09-28  Sebastien Pouliot  <sebastien@ximian.com>
49
50         * SocketAsyncEventArgs.cs: Default SocketError.AccessDenied on 
51         Connect in case none of the DnsEndPoint provides an adequate 
52         address (family).
53
54 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
55
56         * Socket_2_1.cs: Close(int timeout) blocks up to timeout ms if there's
57         pending data to be written to the socket. If there's no pending data,
58         it closes and returns right away. Instead of using Timer and then
59         doing a 'hard' close(), we set the linger option for the socket.
60
61 2009-09-27  Sebastien Pouliot  <sebastien@ximian.com>
62
63         * SocketAsyncEventArgs.cs: Don't use Socket.Poll for NET_2_1.
64         Throw NIE for use of BufferList in Receive.
65         * Socket.cs: Move Close(int) to Socket_2_1.cs. Remove NET_2_1
66         defines since the file is not used by Moonlight
67         * Socket_2_1.cs: Add Close(int) from Socket. Define out Poll
68         and Blocking.
69
70 2009-09-26  Sebastien Pouliot  <sebastien@ximian.com>
71
72         * SocketAsyncEventArgs.cs: Fix paramater validations and default 
73         values
74
75 2009-09-23  Sebastien Pouliot  <sebastien@ximian.com>
76
77         * Socket_2_1.cs: Remove NET_2_1 socket policy checks from here.
78         * SocketAsyncEventArgs.cs: Support DnsEndPoint correctly (NET_2_1 but
79         that will be useful for NET_4_0 soon). Add socket policy checks here
80         since it could be called several times to connect to a host.
81
82 2009-09-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
83
84         * NetworkStream.cs: after disposing the stream, CanRead/CanWrite
85         return false.
86
87 2009-09-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
88
89         * SocketAsyncEventArgs.cs: fix check for non-null.
90         Fixes bug #516455.
91
92 2009-07-14  Sebastien Pouliot  <sebastien@ximian.com>
93
94         * Socket_2_1.cs, SocketAsyncEventArgs.cs: A bit more NET_2_1 defines
95         to help the tuner remove some extra types for moonlight.
96
97 2009-06-28  Gert Driesen  <drieseng@users.sourceforge.net>
98
99         * Socket.cs: Modified some argument names to match MS. Moved disposed
100         check before argument checks in Receive. Use SocketError.InvalidArgument
101         instead of using magic numbers. Added back comments that was
102         accidentally removed in my previous commit.
103         * Socket_2_1.cs: Modified some argument names to match MS.
104
105 2009-06-28  Gert Driesen  <drieseng@users.sourceforge.net>
106
107         * Socket.cs: In GetSocketOption, throw SocketException when (byte [])
108         option value is null. Use SocketError fields instead of using "magic"
109         number. In SetSocketOption (SocketOptionLevel, SocketOptionName, object)
110         only accept Linger, AddMembership, DropMembership and verify option
111         value.
112         * MulticastOption.cs: Added argument checks. Save interfaceIndex that is
113         passed to .ctor, and removed MonoTODO. Renamed arguments to match MS.
114         Reset InterfaceIndex when LocalAddress is modified, and reset
115         LocalAddress when InterfaceIndex is modified.
116         * UdpClient.cs: Modified exception to more closely match MS. Fixed
117         (int, AddressFamily) .ctor to construct IPv6 endpoint when family is
118         InterNetworkV6. Added null check for multicastAddr to (IPAddress)
119         JoinMulticastGroup overload. In (int, IPAddress) and (IPAddress,
120         IPAddress) overloads of JoinMulticastGroup throw SocketException when
121         client is IPv4. Added null check for multicastAddr to (IPAddress, int),
122         overload, and moved JoinMulticastGroup call after argument checks.
123         * IPv6MulticastOption.cs: Renamed argument names to match MS. Added
124         null check to set_Group. Added range check to set_InterfaceIndex.
125
126 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
127
128         * Socket.cs: turn WSAEINVAL into ArgumentException.
129
130 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
131
132         * Socket.cs: MS throws a SocketException in the byte[] overload when
133         the value is null.
134
135 2009-05-22  Sebastien Pouliot  <sebastien@ximian.com>
136
137         * Socket_2_1.cs: Do not throw a SecurityException if the security
138         policy check fails in NET_2_1 but set the SocketError to AccessDenied
139         ensure the EndPoint has a valid policy before connecting.
140         * SocketAsyncEventArgs.cs: Don't recurse endlessly in SendCallback
141         and ReceiveCallback if the socket is not connected. Check for
142         AccessDenied in ConnectCallback (needed for the security policy
143         check in NET_2_1).
144
145 2009-05-14  Sebastien Pouliot  <sebastien@ximian.com>
146
147         * Socket_2_1.cs: Add ConnectAsync support for NET_2_1 which will
148         ensure the EndPoint has a valid policy before connecting.
149         * SocketAsyncEventArgs.cs: Add support for IList<ArraySegment<byte>>
150         when sending. Add ConnectSocket for NET_2_1
151
152 2009-05-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
153
154         * TcpClient.cs:
155         * Socket.cs:
156         * UdpClient.cs: use GetHostAddresses() instead of Resolve or
157         GetHostEntry.
158
159 2009-05-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
160
161         * UdpClient.cs: if possible, avoid DNS lookups when the host name is
162         an IP address. Related to bug #502866.
163
164 2009-04-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
165
166         * Socket.cs: return the last error if a connect to multiple addresses
167         fails.
168
169 2009-04-22  Sebastien Pouliot  <sebastien@ximian.com>
170
171         * Socket_2_1.cs: Use old-n-simple CheckProtocolSupport to implement
172         OSSupportsIP[v4|v6] for Moonlight (NET_2_1 only) so we can avoid 
173         including a bunch of types (22) from System.Net.NetworkInformation 
174         and drop the number of [SecuritySafeCritical] methods to audit (the 
175         same 22) and [SecurityCritical] (8) beside getting a smaller 
176         System.Net.dll assembly :)
177
178 2009-04-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
179
180         * Socket.cs: End* methods can only be called once per IAsyncResult.
181         Bug #466031 fixed.
182
183 2009-04-09  Sebastien Pouliot  <sebastien@ximian.com>
184
185         * Socket.cs: Split socket class into two files (this one and the
186         new Socket_2_1.cs). This let us remove (some) existing #if in the
187         sources and avoid (a lot) of new ones for Moonlight.
188         * Socket_2_1.cs: Just enough of socket for NET_2_1. This helps
189         the tuner not to bring a lot of extra stuff (some visible)
190         into Moonlight.
191         * SocketAsyncEventArgs.cs: Ifdef out some cases for NET_2_1 so 
192         Moonlight can use it's own (smaller) SocketAsyncOperation enum
193
194 2009-02-17 Gonzalo Paniagua Javier <gonzalo@novell.com>
195
196         * Socket.cs: instead of clearing the sockets form the output and then
197         adding them back, we just remove the ones that have not been signaled.
198         Fixes bug #354090 and bug #476138.
199
200 2009-01-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
201
202         * Socket.cs: don't throw when there's no ipv6 configuration.
203
204 2009-01-09  Dick Porter  <dick@ximian.com>
205
206         * Socket.cs: Special case 0-length receive requests in the
207         BeginAccept overloads that wait for data, so they behave as the
208         non-waiting version.  Seems to match MS behaviour, fixes bug
209         464201.
210
211 2009-01-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
212
213         * TcpClient.cs: use IPv6Any when the family is IPv6.
214         Bug #462688 fixed.
215
216 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
217
218         * Socket.cs (Accept_internal) :  Changing the signature to pass 
219           the blocking state.
220
221         Code is contributed under MIT/X11 license.
222
223 2008-12-20  Miguel de Icaza  <miguel@novell.com>
224
225         * SocketException.cs: Add missing API.
226
227         * SocketAsyncEventArgs.cs (Dispose): this has to be a public
228         member according to the specs.
229
230 2008-12-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
231
232         * Socket.cs: add a new ReceiveFrom_nocheck that does not throw an
233         exception in case of error.
234
235 2008-12-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
236
237         * Socket.cs: if Blocking is set, translate a WouldBlock into a
238         TimedOut.
239
240 2008-12-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
241
242         * UdpClient.cs: don't Poll() in Receive(), the call to ReceiveFrom
243         will block anyway. Fixes bug #455894.
244
245 2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
246
247         * Socket.cs: mark the socket as not connected when there is a pending
248         error or exception about to be thrown.
249         Bug #443346 fixed.
250
251 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
252
253         * Socket.cs : Adding a comment to provide locations where
254           changes to MonoSocketAsyncResult need to be synced.
255
256         Code is contributed under MIT/X11 license.
257
258 2008-09-06  Atsushi Enomoto  <atsushi@ximian.com>
259
260         * Socket.cs : (SocketAsyncResult) release byte buffer early so that
261           it does not have to store extra data in pool. Fixed bug #397627.
262
263 2008-07-31  Jb Evain  <jbevain@novell.com>
264
265         * Socket.cs
266         * NetworkStream.cs: cleanup for NET_2_1
267
268         * SocketException_2_1.cs: new specific version for NET_2_1.
269
270 2008-06-19  Dick Porter  <dick@ximian.com>
271
272         * Socket.cs: Implement generic Send() and Receive() methods.
273         Fixes bug 395168.
274
275 2008-06-12  Stephane Delcroix  <sdelcroix@novell.com>
276
277         * Socket.cs: minimal changes to run in the 2.1 profile
278
279 2008-06-11  Stephane Delcroix  <sdelcroix@novell.com>
280
281         * SocketAsyncEventArgs.cs: catch SocketException in ConnectAsync
282         and set the SocketError accordingly.
283
284 2008-05-09  Marek Habersack  <mhabersack@novell.com>
285
286         * SocketAsyncEventArgs.cs: implemented support for executing
287         asynchronous socket actions, called from the new xxxxAsync methods
288         in Socket. The asynchronous operations do not use the ThreadPool
289         as I can't get the sample applications to work (send/receive
290         callbacks don't work) - it may change in the future.
291
292         * Socket.cs: implemented several xxxxAsync 2.0sp1 methods. The
293         ones not implemented for now are: ReceiveMessageFromAsync and
294         SendPacketsAsync. AcceptAsync doesn't perform the check for the
295         buffer size for now - need to implement runtime support for that.
296         Made several methods internal, so that they can be accessed from
297         SocketAsyncEventArgs code.
298
299 2008-05-08  Marek Habersack  <mhabersack@novell.com>
300
301         * SocketAsyncOperation.cs, SendPacketsElement.cs,
302         SocketAsyncEventArgs.cs: added initial implementations for
303         2.0SP1/3.5 classes used in the (to be implemented) new xxxAsync
304         methods of the Socket class.
305
306 2008-04-17  Miguel de Icaza  <miguel@novell.com>
307
308         * NetworkStream.cs: Throw an IOException if the socket is not
309         connected, not an ArgumentException.   
310
311         Fixes #371923, it is also the way its documented on MSDN. 
312
313 2008-04-13  Jb Evain  <jbevain@novell.com>
314
315         * Socket.cs: ifdef out the Sys.Config part for the
316         2.1 profile.
317         Merged from the Moonlight 2 branch.
318
319 Wed Mar 12 20:06:07 CET 2008 Paolo Molaro <lupus@ximian.com>
320
321         * Socket.cs: add a static ctor so that ipv4Supported and ipv6Supported
322         are initialized (they are used by the runtime).
323
324 2008-02-01  Dick Porter  <dick@ximian.com>
325
326         * TcpClient.cs: If the Connect fails (when given an array of
327         addresses) leave the socket object in a usable state.  Fixes bug
328         355473.
329
330 2007-11-13  Atsushi Enomoto  <atsushi@ximian.com>
331
332         * NetworkStream.cs : in 2.0 Close() is not needed and does not exist.
333
334 2007-11-01  Miguel de Icaza  <miguel@novell.com>
335
336         * Socket.cs: Do not set the Send and Receive buffer sizes for the
337         socket to the defaults set on Windows, they kill our performance.
338
339         Thanks to Zoltan Varga for tracking the performance issue down.
340         The bug was #325032
341
342 2007-10-30  Dick Porter  <dick@ximian.com>
343
344         * UdpClient.cs: Don't set the multicast option twice.  Fixes bug
345         324033.
346
347 2007-10-21  Robert Jordan  <robertj@gmx.net>
348
349         * Socket.cs: Remove GetHashCode override from the NET_2_0
350         profile. Add LAMESPEC comment. Fixes bug #325113.
351
352 2007-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
353
354         * Socket.cs: Removed unused method.
355
356 2007-08-02  Dick Porter  <dick@ximian.com>
357
358         * Socket.cs: Patch from Brian Nickel (brian.nickel@gmail.com) to
359         improve EndPoint handling.
360
361 2007-07-08  Gert Driesen  <drieseng@users.sourceforge.net>
362
363         * Socket.cs: Code formatting. Marked not implemented methods as TODO.
364         Removed extra spaces.
365
366 2007-07-04  Dick Porter  <dick@ximian.com>
367
368         * Socket.cs: Don't set DontFragment by default for IPv6 sockets.
369         Fixes bug 81985.
370
371 2007-05-16 Adar Wesley <adarw@mainsoft.com>
372
373         * Socket.jvm.cs: added missing methods EndDisconnect, IOControl,
374         Send 2.0 overloads, Receive 2.0 overloads, ReceiveMessageFrom,
375         BeginReceiveMessageFrom, EndReceiveMessageFrom, 
376         EndAccept 2.0 overloads, BeginSend, EndSend, BeginReceive, 
377         EndReceive, SendFile, BeginSendFile, EndSendFile, Disconnect,
378         DuplicateAndClose
379
380 2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
381
382         * Socket.jvm.cs: Handle property throws NotImplementedException.        
383
384 2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
385
386         * NetworkStream.cs:
387         * TcpClient.cs:
388         * TcpListener.cs:
389         * UdpClient.cs:                 
390         added MonoNotSupported attribute for TARGATE_JVM.       
391                 
392 2007-03-11  Gert Driesen  <drieseng@users.sourceforge.net>
393
394         * TcpClient.cs: Do not initialize network stream in Connect. In
395         Dispose, only nullify client if network stream was not obtained.
396         Fixes bug #81105.
397
398 2007-01-30  Ilya Kharmatsky <ilyak -at- mainsoft.com>
399
400         * Socket.jvm.cs: additional stubs for net_2_0 properties,
401         bug fixes (EnsureStillUsable method inserted)
402
403 2007-01-28  Ilya Kharmatsky <ilyak -at- mainsoft.com>
404
405         * Socket.jvm.cs: added stubs for net_2_0 properties and methods.
406
407 2007-01-26  Dick Porter  <dick@ximian.com>
408
409         * Socket.cs: SupportsIPv6 is obsolete in the 2.0 profile.  Stub
410         out BeginReceiveMessageFrom(), BeginSendFile(),
411         EndReceiveMessageFrom(), EndSendFile(), ReceiveMessageFrom(), and
412         SendFile().
413
414         * IPPacketInformation.cs: New in the 2.0 profile
415
416         * SocketFlags.cs: Remove useless (and empty) inline documentation,
417         and add 2.0 items.
418
419         * TcpListener.cs: Mark Server as public in the 2.0 profile.
420
421         * UdpClient.cs: Mark Dispose(bool) as protected in the 2.0
422         profile.
423
424         System.Net.Sockets should now be 2.0-complete.
425
426 2007-01-26  Dick Porter  <dick@ximian.com>
427
428         * Socket.cs: There's no point checking the SO_ERROR status of a
429         socket after poll() or select() if we already know that connected
430         == true.
431
432 2007-01-24  Dick Porter  <dick@ximian.com>
433
434         * IOControlCode.cs: 
435         * SocketInformationOptions.cs: 
436         * TransmitFileOptions.cs: Fix enum values
437
438         * AddressFamily.cs: Not Serializable in the 2.0 profile
439
440 2007-01-24  Dick Porter  <dick@ximian.com>
441
442         * NetworkStream.cs: 2.0 profile updates, based on a patch by
443         Sridhar Kulkarni (sridharkulkarni@gmail.com)
444
445 2007-01-23  Dick Porter  <dick@ximian.com>
446
447         * TcpListener.cs: 
448         * TcpClient.cs: 2.0 profile updates, based on a patch by Sridhar
449         Kulkarni (sridharkulkarni@gmail.com)
450
451 2007-01-22  Miguel de Icaza  <miguel@novell.com>
452
453         * Socket.cs: Move the throw new NotImplementedException ()
454         elsewhere to prevent Moma reports.
455
456 2007-01-20  Dick Porter  <dick@ximian.com>
457
458         * Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions
459         thrown from setting default socket options - some platforms might
460         not support a particular default we're trying to set.
461
462 2007-01-11  Dick Porter  <dick@ximian.com>
463
464         * IOControlCode.cs: 
465         * SocketInformation.cs: 
466         * Socket.cs: 
467         * UdpClient.cs: 2.0 profile updates, loosely based on a patch by
468         Sridhar Kulkarni.
469
470         * SocketInformationOptions.cs: 
471         * TransmitFileOptions.cs: Implemented by Sridhar Kulkarni
472         (sridharkulkarni@gmail.com)
473
474 Wed Dec 13 12:04:02 CET 2006 Paolo Molaro <lupus@ximian.com>
475
476         * Socket.cs: stub ReceiveBufferSize and SendBufferSize to
477         get ironpython to compile.
478
479 2006-11-23  Dick Porter  <dick@ximian.com>
480
481         * Socket.cs: Only set Connected = true in Poll() and Select() if
482         the socket error status is 0.  Fixes bug 79878.
483
484 2006-09-28 Andrew Skiba <andrews@mainsoft.com>
485
486         * Socket.cs,NetworkStream.cs,SocketException.cs: TARGET_JVM
487
488 2006-09-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
489
490         * Socket.cs: update the SocketOperation enum.
491
492 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
493
494         * Socket.cs: replace hardcoded error numbers with the SocketError
495         values. When ReceiveTimeout is set on a blocking socket, correctly
496         report timeouts in the generated exception.
497         
498         * SocketException.cs: add new internal ctor (int, string).
499
500 2006-08-12  Miguel de Icaza  <miguel@novell.com>
501
502         * Socket.cs (NoDelay): Implement.
503
504 2006-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
505
506         * Socket.cs: patch from Sanghyeon Seo that implements
507         (Send|Receive)Timeout for 2.0.
508         * MulticastOption.cs: more 2.0 stuff.
509
510 2006-06-28  Atsushi Enomoto  <atsushi@ximian.com>
511
512         * Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
513           Also make sure to avoid NRE.
514
515 2006-06-24  Zoltan Varga  <vargaz@gmail.com>
516
517         * Socket.cs: Add stubs for net 2.0 SendTimeout and ReceiveTimeout properties.
518
519 2006-06-20  Zoltan Varga  <vargaz@gmail.com>
520
521         * ProtocolType.cs SocketOptionName.cs: Add missing net 2.0 fields.
522
523 2006-05-30  Gert Driesen  <drieseng@users.sourceforge.net>
524
525         * NetworkStream.cs: Marked Dispose (bool) virtual on 1.x profile.
526
527 2006-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
528
529         * Socket.cs:
530         * SocketError.cs: implemented Reseive/Send overloads that do not throw
531         in case of error. Patch by Tomi Valkeinen.
532
533 2006-03-11  Miguel de Icaza  <miguel@novell.com>
534
535         * NetworkStream.cs (Dispose): Use the right signature depending on
536         the profile being built.
537
538 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
539
540         * Socket.cs: pass something not empty to the unixep ctor.
541
542 2006-03-03  Dick Porter  <dick@ximian.com>
543
544         * UdpClient.cs: Fix IPv6 family check.  Fixes bug 77689.
545
546 2006-02-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
547
548         * TcpClient.cs: when the socket is not connected, don't try to set the
549         socket options, as they are ignored on linux. Wait until Connect
550         succeeds and then apply the options.
551
552 2006-02-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
553
554         * Socket.cs: added a missing overload for SetSocketOption.
555
556 2006-01-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
557
558         * Socket.cs: use the 2.0 configuration classes when checking for IPv6
559         support.
560
561 2006-01-04  Sebastien Pouliot  <sebastien@ximian.com>
562
563         * TcpClient.cs: The Client property is public in 2.0 while it was
564         protected in earlier release. Fix bug #77048.
565
566 2005-12-07  Robert Jordan  <robertj@gmx.net>
567
568         * SocketError.cs: Added.
569         * SocketException: Implemented SocketErrorCode. Fixes bug #76915.
570
571 2005-10-11  Dick Porter  <dick@ximian.com>
572
573         * Socket.cs: Don't call connect(2) twice for non-blocking sockets,
574         it breaks on macos (and probably other bsd-based stacks too,) use
575         poll() and getsockopt() to check if it worked.
576
577 2005-09-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
578
579         * Socket.cs: add checks for 'disposed' all over. Fixes bug #76249.
580
581 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
582
583         * TcpClient.cs: patch by Hans Kratz that uses an integer when setting
584         NoDelay instead of a bool, which is only handled in 2.0.
585
586 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
587
588         * Socket.cs: disallow connecting to .Any addresses. Fixes bug #75154.
589
590 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
591
592         * Socket.cs: adapted Select to the new Select_internal that uses poll()
593         instead of select(). Managed part of the fix for bug #71203.
594
595 2005-05-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
596
597         * Socket.cs: apply the same hack on blocking Connect calls as the one
598         used in Accept.
599
600 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
601
602         * Socket.cs: see bug #74842, which is fixed with this patch for details
603         and test cases on the blocking behavior of accept() when close() is
604         called from another thread. The solution applied is to Abort the thread
605         that is blocking in Accept_internal() when someone calls Close (), then
606         reset the abort state if the socket is disposed and return the same
607         error as MS (10004 - interrupted).
608
609 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
610
611         * Socket.cs: match MS behavior on SetSocketOption with a boolean
612         argument. MS 1.1 throws an ArgumentException, but 2.0 turns true/false
613         into 1/0 and works fine. Fixes bug #71753. Added checks for disposed
614         in the 3 SetSocketOption.
615
616 2005-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
617
618         * Socket.cs: if there are outstanding aio requests and one of them gets
619         an ObjectDisposedException, throw the same exception for the rest.
620
621 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
622
623         * Socket.cs: removed hack added to fix bug #53229 (more than a year ago)
624         that kept sockets opened until all AIO operations where finished. If
625         the socket is closed, Receive returns 0 in EndReceive, the rest throw
626         the ObjectDisposedException. Set the socket handle to -1 when closing.
627
628 2005-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
629
630         * Socket.cs: Begin/End Send/SendTo guarantee that all bytes are written
631         or an exception is thrown. Fixes bug #74475.
632
633 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
634
635         * Socket.cs: no need for locking in Worker. The actual read / write for
636         Receive / Send is performed in the runtime time.
637
638 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
639
640         * Socket.cs: added a 'blocking' field that is passed to the runtime.
641
642 2005-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
643
644         * Socket.cs: invoke the callback after scheduling the next request for
645         the socket. Fixes bug #74539.
646
647 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
648
649         * Socket.cs: update socket connected status in an async request finishes
650         synchronously. Use 'callback' instead of 'real_callback' field, which is
651         now unused.
652
653 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
654
655         * Socket.cs: added SocketOperation enum and 2 new fields to
656         SocketAsyncResult that are used by the runtime. Asynchronous read/write
657         are serialized so that only 1 of each kind is really 'active'.
658         Handle non-blocking connects in BeginConnect instead of doing 2 Poll()
659         in the threadpool.
660
661         * NetworkStream.cs: better message for the exception.
662
663 2005-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
664
665         * Socket.cs: remove unused async IO code.
666
667 2005-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
668
669         * Socket.cs: don't Poll/block in Connect aither.
670
671 2005-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
672
673         * Socket.cs: don't block on Accept if the socket is non-blocking.
674         Fixes bug #73053. Patch by Ankit Jain.
675
676 2005-02-23  Dick Porter  <dick@ximian.com>
677
678         * UdpClient.cs: Set the Broadcast option, as apparently the MS
679         runtime defaults make UDP sockets broadcastable.
680
681 2004-12-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
682
683         * Socket.cs: for Receive*/Send*, don't set the connected status to false
684         when the error is EINPROGRESS or EWOULDBLOCK.
685
686 2004-12-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
687
688         * NetworkStream.cs: Write should ensure that writes all the contents
689         of the buffer. Fixes bug #70123. Besos para Miguelito.
690
691 2004-10-14  Dick Porter  <dick@ximian.com>
692
693         * Socket.cs (Sockets ): Set Accept()ed socket blocking status to
694         be the same as the listening socket.  This follows MS behaviour.
695
696 2004-08-04  Dick Porter  <dick@ximian.com>
697
698         * Socket.cs: Update Connected state in Select and Poll; this is
699         when we find out that non-blocking Connects succeed.  Fixes bug
700         62398.
701
702 2004-07-28  Dick Porter  <dick@ximian.com>
703
704         * Socket.cs: ReceiveFrom might not return a valid EndPoint.  Patch
705         by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61608.
706
707 2004-07-15  Dick Porter  <dick@ximian.com>
708
709         * Socket.cs: Don't try and dereference a null array in Select()
710         (possible if a descriptor list of length 0 was passed.)  Patch by
711         Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61595.
712
713 2004-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
714
715         * Socket.cs: if'ed RemoveReferences calls.
716
717 2004-07-09  Dick Porter  <dick@ximian.com>
718
719         * Socket.cs: Slight tweak to allow unknown objects to be returned
720         by GetSocketOption().
721
722 2004-06-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
723
724         * Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes
725         bug #60811.
726
727 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
728
729         * Socket.cs: wrong error code in connect and accept. EWOULDBLOCK is
730         10035. Fixes bug #60563.
731
732 2004-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
733
734         * Socket.cs: fixed Accept for non-blocking sockets.
735
736 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
737
738         * LingerOption.cs: marked field private to fix API signature
739         * MulticastOption.cs: marked field private to fix API signature
740
741 2004-06-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
742
743         * Socket.cs: throw ArgumentNullException if all the list are null OR
744         empty. Fixes bug #59632.
745
746 2004-05-21  Patrik Torstensson <totte@hiddenpeaks.com>
747
748         * TcpListener.cs: Fixes a lot of the problems with remoting nunit tests.
749         
750         (AcceptTcpClient): Don't create TcpClient before a
751         connection is accepted.
752         
753         (LocalEndPoint): Use Server LocalEndPoint if connected
754         otherwise use endpoint from ctor.
755         
756         (Init): Save end point, not server endpoint. This did
757         cause TcpListener to ignore port sent via constructor.
758
759         (Pending): Fixed wait time (method should return directly)
760         
761         (Start): Moved Bind here instead of Init method; old method
762         caused us to bind ports even if the listener was stopped.
763         
764         (Stop): Null server when stopping
765
766 2004-05-13  Dick Porter  <dick@ximian.com>
767
768         * UdpClient.cs: 
769         * TcpClient.cs: Public API fixes
770
771 2004-05-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
772
773         * Socket.cs: fixed Connect for non-blocking sockets. Closes bug #58169.
774
775 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
776
777         * Socket.cs: fix for BeginConnect and non-blocking sockets.
778
779 2004-05-03  Lluis Sanchez Gual <lluis@ximian.com>
780
781         * Socket.cs: Use assembly name const to load Mono.Posix.
782
783 2004-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
784
785         * Socket.cs: only enable socket AIO if MONO_ENABLE_SOCKET_AIO is there.
786         I will remove this once THE bug is hunted.
787
788 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
789
790         * Socket.cs: added support for unmanaged asynchronous IO. Speed up
791         error checking.
792         * UdpClient.cs: fixed Dispose so that it only closes the socket when
793         called explicitly.
794
795 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
796
797         * Socket.cs: added GetSupportsAsync and Poll_internal internal calls.
798         Cleaned up Worker class: moved fields to SocketAsyncResult and use Poll
799         when the socket is non-blocking before getting EWOULDBLOCK error.
800
801 2004-04-08  Dick Porter  <dick@ximian.com>
802
803         * Socket.cs: Rearrange the internal calls so that the exceptions
804         are thrown from managed code
805
806 2004-03-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
807
808         * Socket.cs: when Dispose (bool) is called from the finalizer, always
809         do the cleanup. Fixes yet another nullref with xsp.
810
811 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
812
813         * Socket.cs: implemented IOControl.
814
815 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
816
817         * Socket.cs: use the threadpool for asynchronous calls instead of
818         creating new threads.
819
820 2004-02-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
821
822         * Socket.cs: added locks around waithandle assign and comparison in
823         class Worker. Handle other exceptions than SocketException for
824         non-blocking sockets.
825
826 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
827
828         * Socket.cs: handle WSAEWOULDBLOCK for non-blocking sockets. Fixes
829         bug #53168. Avoid the creation of the ManualResetEvent in class Worker
830         whenever possible.
831
832 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
833
834         * Socket.cs: if we have a pending async event, delay socket closing
835         until EndX is called. Fixes bug #53229. Check parameters and if the
836         socket has been disposed. Implemented IDisposable explicitly. The
837         threads created have IsBackground = true now.
838
839 2004-01-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
840
841         * Socket.cs: patch from Brad Fitzpatrick <brad@danga.com> episode 2.
842
843 2003-12-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
844
845         * Socket.cs: fix for several asynchronous methods to delay exception
846         throwing.  Patch by Brad Fitzpatrick <brad@danga.com>.
847
848 2003-12-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
849
850         * TcpListener.cs: get the LocalEndPoint from the socket after binding.
851         Fixes bug #52329.
852
853 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
854
855         * TcpClient.cs: Fix void Dispose (bool disposing) to follow the
856         pattern.  It was shutting down the managed resources even in the
857         finalizer case, it should only do that when called from
858         IDisposable.Dipose.
859
860 2003-09-11  Lluis Sanchez Gual <lluis@ximian.com>
861
862         * NetworkStream.cs: Added [In,Out] attributes to Read method.
863
864 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
865
866         * TcpListener.cs: various fixes to make the new tests pass. Closes
867         bug #47848.
868
869 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
870
871         * UdpClient.cs (Receive): Fix Bug 45633;  We should do a blocking
872         call until a datagram is arrives from the remote host.  This
873         removes the 512 "magic" buffer size when we did not have any data.
874  
875 2003-07-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
876
877         * NetworkStream.cs:
878         * Socket.cs: fixed array boundary checks. 0 sized arrays are allowed.
879
880 2003-07-18  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
881
882         * Socket.cs: Added GetHashCode method
883
884 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
885
886         * Socket.cs:
887         * ProtocolType.cs:
888         * SocketOptionLevel.cs:
889         * TcpListener.cs:
890         * TcpClient.cs:
891         * UdpClient.cs:
892         
893         Added IPv6 support.
894
895         * IPv6MulticastOption.cs: Added for IPv6 support.
896
897 2003-05-16  Dick Porter  <dick@ximian.com>
898
899         * Socket.cs: Use Mono.Posix.UnixEndPoint if its available
900
901 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
902
903         * MulticastOption.cs: patch by Jerome Laban included in bug #42393.
904
905 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
906
907         * Socket.cs:
908         (Select): don't create arrays if not needed.
909         (Poll): call Select_internal directly.
910
911         Warning: you need an up to date runtime for this to work!
912
913 2003-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
914
915         * UdpClient.cs: don't bind the socket unless .ctor (IPEndPoint) is used.
916         Added more checks and throws.
917         Small fixes in Send to avoid duplicating the buffer.
918         Moved CheckIfDisposed calls to the start of the methods instead of doing
919         the check inside a finally clause.
920
921 2003-03-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
922
923         * Socket.cs:
924         (SendTo): fix from Jerome Laban <jlaban@wanadoo.fr>.
925
926 2003-02-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
927
928         * Socket.cs: patch from Elan Feingold <efeingold@mn.rr.com>. Fixes
929         NullReferenceException when the callback is null.
930
931 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
932
933         * NetworkStream.cs: allow 0 size array in Write.
934
935 2003-02-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
936
937         * Socket.cs: make Worker.Connect and Receive work with non-blocking
938         sockets. May be Receive* and Send* in Worker need to do the same. I'll
939         wait for bug reports. Set IsCompleted to true before invoking the end
940         callback. Fixes bug #38136.
941
942 2003-01-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
943
944         * NetworkStream.cs: the check for disposed should not be done in the
945         finally clause.
946
947 2003-01-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
948
949         * UdpClient.cs: fixed bug #36226.
950
951 2002-11-13  Dick Porter  <dick@ximian.com>
952
953         * Socket.cs: Only close the socket in one place, ie the Dispose
954         method.  Fixes bug 32054.
955
956 2002-11-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
957
958         * Socket.cs: offset == size == 0 it's ok in Send ().
959
960 2002-11-03  Phillip Pearson  <pp@myelin.co.nz>
961
962         * TcpClient.cs: Fixed SetTcpClient() to pass through to the Client 
963         property, which now sets stream to null (it's set by GetStream()).  This 
964         should make GetStream() work on a TcpClient which has had the socket set 
965         by assignment to the Client property, not only one that has been created 
966         by TcpListener.AcceptTcpClient().
967
968 2002-10-08  Dick Porter  <dick@ximian.com>
969
970         * Socket.cs: 
971         * NetworkStream.cs: Bounds checking fixes, and better exception
972         texts.  Changes by timothyjmills@hotmail.com (Timothy J. Mills).
973
974 2002-10-03  Dick Porter  <dick@ximian.com>
975
976         * TcpClient.cs: NoDelay is a TCP option, not Socket
977
978 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
979
980         * SocketFlags.cs: Add missing enumeration.
981
982         * UdpClient.cs: Make Dispose private.
983
984 2002-08-20  Dick Porter  <dick@ximian.com>
985
986         * Socket.cs: Fix deadlock when the AsyncResult callback calls
987         End*().  Set the async request's worker property so it can return
988         results.  These two fixes combined fix bug 28092.
989
990 2002-06-24  Dick Porter  <dick@ximian.com>
991
992         * Socket.cs: Make SetSocketOption cope with boolean values (they
993         are passed as objects, not the ints the runtime was expecting)
994
995 2002-05-17  Lawrence Pit <loz@cable.a2000.nl>
996         * TcpListener.cs: Renamed LocalEndPoint to LocalEndpoint
997         * NetworkStream.cs, UdpClient.cs and TcpClient.cs: modified disposable 
998         routines, added checks for disposed state.
999         * UdpClient.cs: commented out GetHashCode and Equals as it's not
1000         overriden in ms.net implementation.
1001
1002 2002-05-17  Jaroslaw Kowalski <jarek@atm.com.pl>
1003         * TcpClient.cs: fixed SetTcpClient so that
1004         TcpListener.AcceptTcpClient works and allows
1005         you to call GetStream() on its result
1006
1007 2002-04-24  Dick Porter  <dick@ximian.com>
1008
1009         * Socket.cs (Poll): Give correct argument to Select(), as spotted
1010         by Jaroslaw Kowalski <jarek@atm.com.pl>
1011
1012 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1013
1014         * UdpClient.cs: implemented.
1015
1016 2002-04-02  Dick Porter  <dick@ximian.com>
1017
1018         * TcpListener.cs: in Start(), set the socket listen backlog value
1019         to a sane value (noticed by Jonathan Stowe <gellyfish@gellyfish.com>)
1020
1021 2002-02-13  Dick Porter  <dick@ximian.com>
1022
1023         * Socket.cs: Implemenent Select, Blocking, Connected,
1024         GetSocketOption, Poll, SetSocketOption and Shutdown
1025
1026         * MulticastOption.cs: 
1027         * LingerOption.cs: Delete override methods that don't need to be
1028         implemented
1029
1030 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
1031
1032         * NetworkStream.cs: Implement class.
1033
1034 2002-01-23  Dick Porter  <dick@ximian.com>
1035
1036         * SocketException.cs: Implemented
1037
1038         * Socket.cs: Implemented most methods
1039
1040         * LingerOption.cs: Made compile
1041
1042         * AddressFamily.cs: Removed empty auto-generated comments
1043
1044 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
1045
1046         * SocketException.cs: Reimplemented.
1047
1048 2002-01-06  Ravi Pratap  <ravi@ximian.com>
1049
1050         * ChangeLog : Add to this directory.
1051
1052         * SocketException.cs, TcpClient.cs, TcpListener.cs : MonoTODO
1053         attribute decoration.