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