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