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