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