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