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