2009-05-26 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System / System.Net.Sockets / ChangeLog
index 24839d26bd77b01dc1895225c50d4b59ab33ff14..0c40cec58cd66ac405daa449471422191038855d 100644 (file)
@@ -1,3 +1,496 @@
+2009-05-22  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs: Do not throw a SecurityException if the security
+       policy check fails in NET_2_1 but set the SocketError to AccessDenied
+       ensure the EndPoint has a valid policy before connecting.
+       * SocketAsyncEventArgs.cs: Don't recurse endlessly in SendCallback
+       and ReceiveCallback if the socket is not connected. Check for
+       AccessDenied in ConnectCallback (needed for the security policy
+       check in NET_2_1).
+
+2009-05-14  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs: Add ConnectAsync support for NET_2_1 which will
+       ensure the EndPoint has a valid policy before connecting.
+       * SocketAsyncEventArgs.cs: Add support for IList<ArraySegment<byte>>
+       when sending. Add ConnectSocket for NET_2_1
+
+2009-05-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * TcpClient.cs:
+       * Socket.cs:
+       * UdpClient.cs: use GetHostAddresses() instead of Resolve or
+       GetHostEntry.
+
+2009-05-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * UdpClient.cs: if possible, avoid DNS lookups when the host name is
+       an IP address. Related to bug #502866.
+
+2009-04-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: return the last error if a connect to multiple addresses
+       fails.
+
+2009-04-22  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs: Use old-n-simple CheckProtocolSupport to implement
+       OSSupportsIP[v4|v6] for Moonlight (NET_2_1 only) so we can avoid 
+       including a bunch of types (22) from System.Net.NetworkInformation 
+       and drop the number of [SecuritySafeCritical] methods to audit (the 
+       same 22) and [SecurityCritical] (8) beside getting a smaller 
+       System.Net.dll assembly :)
+
+2009-04-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: End* methods can only be called once per IAsyncResult.
+       Bug #466031 fixed.
+
+2009-04-09  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket.cs: Split socket class into two files (this one and the
+       new Socket_2_1.cs). This let us remove (some) existing #if in the
+       sources and avoid (a lot) of new ones for Moonlight.
+       * Socket_2_1.cs: Just enough of socket for NET_2_1. This helps
+       the tuner not to bring a lot of extra stuff (some visible)
+       into Moonlight.
+       * SocketAsyncEventArgs.cs: Ifdef out some cases for NET_2_1 so 
+       Moonlight can use it's own (smaller) SocketAsyncOperation enum
+
+2009-02-17 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: instead of clearing the sockets form the output and then
+       adding them back, we just remove the ones that have not been signaled.
+       Fixes bug #354090 and bug #476138.
+
+2009-01-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: don't throw when there's no ipv6 configuration.
+
+2009-01-09  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Special case 0-length receive requests in the
+       BeginAccept overloads that wait for data, so they behave as the
+       non-waiting version.  Seems to match MS behaviour, fixes bug
+       464201.
+
+2009-01-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * TcpClient.cs: use IPv6Any when the family is IPv6.
+       Bug #462688 fixed.
+
+2008-12-30  Bill Holmes  <billholmes54@gmail.com>
+
+       * Socket.cs (Accept_internal) :  Changing the signature to pass 
+         the blocking state.
+
+       Code is contributed under MIT/X11 license.
+
+2008-12-20  Miguel de Icaza  <miguel@novell.com>
+
+       * SocketException.cs: Add missing API.
+
+       * SocketAsyncEventArgs.cs (Dispose): this has to be a public
+       member according to the specs.
+
+2008-12-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: add a new ReceiveFrom_nocheck that does not throw an
+       exception in case of error.
+
+2008-12-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: if Blocking is set, translate a WouldBlock into a
+       TimedOut.
+
+2008-12-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * UdpClient.cs: don't Poll() in Receive(), the call to ReceiveFrom
+       will block anyway. Fixes bug #455894.
+
+2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: mark the socket as not connected when there is a pending
+       error or exception about to be thrown.
+       Bug #443346 fixed.
+
+2008-09-10  Bill Holmes  <billholmes54@gmail.com>
+
+       * Socket.cs : Adding a comment to provide locations where
+         changes to MonoSocketAsyncResult need to be synced.
+
+       Code is contributed under MIT/X11 license.
+
+2008-09-06  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * Socket.cs : (SocketAsyncResult) release byte buffer early so that
+         it does not have to store extra data in pool. Fixed bug #397627.
+
+2008-07-31  Jb Evain  <jbevain@novell.com>
+
+       * Socket.cs
+       * NetworkStream.cs: cleanup for NET_2_1
+
+       * SocketException_2_1.cs: new specific version for NET_2_1.
+
+2008-06-19  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Implement generic Send() and Receive() methods.
+       Fixes bug 395168.
+
+2008-06-12  Stephane Delcroix  <sdelcroix@novell.com>
+
+       * Socket.cs: minimal changes to run in the 2.1 profile
+
+2008-06-11  Stephane Delcroix  <sdelcroix@novell.com>
+
+       * SocketAsyncEventArgs.cs: catch SocketException in ConnectAsync
+       and set the SocketError accordingly.
+
+2008-05-09  Marek Habersack  <mhabersack@novell.com>
+
+       * SocketAsyncEventArgs.cs: implemented support for executing
+       asynchronous socket actions, called from the new xxxxAsync methods
+       in Socket. The asynchronous operations do not use the ThreadPool
+       as I can't get the sample applications to work (send/receive
+       callbacks don't work) - it may change in the future.
+
+       * Socket.cs: implemented several xxxxAsync 2.0sp1 methods. The
+       ones not implemented for now are: ReceiveMessageFromAsync and
+       SendPacketsAsync. AcceptAsync doesn't perform the check for the
+       buffer size for now - need to implement runtime support for that.
+       Made several methods internal, so that they can be accessed from
+       SocketAsyncEventArgs code.
+
+2008-05-08  Marek Habersack  <mhabersack@novell.com>
+
+       * SocketAsyncOperation.cs, SendPacketsElement.cs,
+       SocketAsyncEventArgs.cs: added initial implementations for
+       2.0SP1/3.5 classes used in the (to be implemented) new xxxAsync
+       methods of the Socket class.
+
+2008-04-17  Miguel de Icaza  <miguel@novell.com>
+
+       * NetworkStream.cs: Throw an IOException if the socket is not
+       connected, not an ArgumentException.   
+
+       Fixes #371923, it is also the way its documented on MSDN. 
+
+2008-04-13  Jb Evain  <jbevain@novell.com>
+
+       * Socket.cs: ifdef out the Sys.Config part for the
+       2.1 profile.
+       Merged from the Moonlight 2 branch.
+
+Wed Mar 12 20:06:07 CET 2008 Paolo Molaro <lupus@ximian.com>
+
+       * Socket.cs: add a static ctor so that ipv4Supported and ipv6Supported
+       are initialized (they are used by the runtime).
+
+2008-02-01  Dick Porter  <dick@ximian.com>
+
+       * TcpClient.cs: If the Connect fails (when given an array of
+       addresses) leave the socket object in a usable state.  Fixes bug
+       355473.
+
+2007-11-13  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * NetworkStream.cs : in 2.0 Close() is not needed and does not exist.
+
+2007-11-01  Miguel de Icaza  <miguel@novell.com>
+
+       * Socket.cs: Do not set the Send and Receive buffer sizes for the
+       socket to the defaults set on Windows, they kill our performance.
+
+       Thanks to Zoltan Varga for tracking the performance issue down.
+       The bug was #325032
+
+2007-10-30  Dick Porter  <dick@ximian.com>
+
+       * UdpClient.cs: Don't set the multicast option twice.  Fixes bug
+       324033.
+
+2007-10-21  Robert Jordan  <robertj@gmx.net>
+
+       * Socket.cs: Remove GetHashCode override from the NET_2_0
+       profile. Add LAMESPEC comment. Fixes bug #325113.
+
+2007-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * Socket.cs: Removed unused method.
+
+2007-08-02  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Patch from Brian Nickel (brian.nickel@gmail.com) to
+       improve EndPoint handling.
+
+2007-07-08  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * Socket.cs: Code formatting. Marked not implemented methods as TODO.
+       Removed extra spaces.
+
+2007-07-04  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Don't set DontFragment by default for IPv6 sockets.
+       Fixes bug 81985.
+
+2007-05-16 Adar Wesley <adarw@mainsoft.com>
+
+       * Socket.jvm.cs: added missing methods EndDisconnect, IOControl,
+       Send 2.0 overloads, Receive 2.0 overloads, ReceiveMessageFrom,
+       BeginReceiveMessageFrom, EndReceiveMessageFrom, 
+       EndAccept 2.0 overloads, BeginSend, EndSend, BeginReceive, 
+       EndReceive, SendFile, BeginSendFile, EndSendFile, Disconnect,
+       DuplicateAndClose
+
+2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * Socket.jvm.cs: Handle property throws NotImplementedException.        
+
+2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * NetworkStream.cs:
+       * TcpClient.cs:
+       * TcpListener.cs:
+       * UdpClient.cs:                 
+       added MonoNotSupported attribute for TARGATE_JVM.       
+               
+2007-03-11  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * TcpClient.cs: Do not initialize network stream in Connect. In
+       Dispose, only nullify client if network stream was not obtained.
+       Fixes bug #81105.
+
+2007-01-30  Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+       * Socket.jvm.cs: additional stubs for net_2_0 properties,
+       bug fixes (EnsureStillUsable method inserted)
+
+2007-01-28  Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+       * Socket.jvm.cs: added stubs for net_2_0 properties and methods.
+
+2007-01-26  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: SupportsIPv6 is obsolete in the 2.0 profile.  Stub
+       out BeginReceiveMessageFrom(), BeginSendFile(),
+       EndReceiveMessageFrom(), EndSendFile(), ReceiveMessageFrom(), and
+       SendFile().
+
+       * IPPacketInformation.cs: New in the 2.0 profile
+
+       * SocketFlags.cs: Remove useless (and empty) inline documentation,
+       and add 2.0 items.
+
+       * TcpListener.cs: Mark Server as public in the 2.0 profile.
+
+       * UdpClient.cs: Mark Dispose(bool) as protected in the 2.0
+       profile.
+
+       System.Net.Sockets should now be 2.0-complete.
+
+2007-01-26  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: There's no point checking the SO_ERROR status of a
+       socket after poll() or select() if we already know that connected
+       == true.
+
+2007-01-24  Dick Porter  <dick@ximian.com>
+
+       * IOControlCode.cs: 
+       * SocketInformationOptions.cs: 
+       * TransmitFileOptions.cs: Fix enum values
+
+       * AddressFamily.cs: Not Serializable in the 2.0 profile
+
+2007-01-24  Dick Porter  <dick@ximian.com>
+
+       * NetworkStream.cs: 2.0 profile updates, based on a patch by
+       Sridhar Kulkarni (sridharkulkarni@gmail.com)
+
+2007-01-23  Dick Porter  <dick@ximian.com>
+
+       * TcpListener.cs: 
+       * TcpClient.cs: 2.0 profile updates, based on a patch by Sridhar
+       Kulkarni (sridharkulkarni@gmail.com)
+
+2007-01-22  Miguel de Icaza  <miguel@novell.com>
+
+       * Socket.cs: Move the throw new NotImplementedException ()
+       elsewhere to prevent Moma reports.
+
+2007-01-20  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions
+       thrown from setting default socket options - some platforms might
+       not support a particular default we're trying to set.
+
+2007-01-11  Dick Porter  <dick@ximian.com>
+
+       * IOControlCode.cs: 
+       * SocketInformation.cs: 
+       * Socket.cs: 
+       * UdpClient.cs: 2.0 profile updates, loosely based on a patch by
+       Sridhar Kulkarni.
+
+       * SocketInformationOptions.cs: 
+       * TransmitFileOptions.cs: Implemented by Sridhar Kulkarni
+       (sridharkulkarni@gmail.com)
+
+Wed Dec 13 12:04:02 CET 2006 Paolo Molaro <lupus@ximian.com>
+
+       * Socket.cs: stub ReceiveBufferSize and SendBufferSize to
+       get ironpython to compile.
+
+2006-11-23  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Only set Connected = true in Poll() and Select() if
+       the socket error status is 0.  Fixes bug 79878.
+
+2006-09-28 Andrew Skiba <andrews@mainsoft.com>
+
+       * Socket.cs,NetworkStream.cs,SocketException.cs: TARGET_JVM
+
+2006-09-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: update the SocketOperation enum.
+
+2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: replace hardcoded error numbers with the SocketError
+       values. When ReceiveTimeout is set on a blocking socket, correctly
+       report timeouts in the generated exception.
+       
+       * SocketException.cs: add new internal ctor (int, string).
+
+2006-08-12  Miguel de Icaza  <miguel@novell.com>
+
+       * Socket.cs (NoDelay): Implement.
+
+2006-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: patch from Sanghyeon Seo that implements
+       (Send|Receive)Timeout for 2.0.
+       * MulticastOption.cs: more 2.0 stuff.
+
+2006-06-28  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
+         Also make sure to avoid NRE.
+
+2006-06-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * Socket.cs: Add stubs for net 2.0 SendTimeout and ReceiveTimeout properties.
+
+2006-06-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * ProtocolType.cs SocketOptionName.cs: Add missing net 2.0 fields.
+
+2006-05-30  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * NetworkStream.cs: Marked Dispose (bool) virtual on 1.x profile.
+
+2006-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs:
+       * SocketError.cs: implemented Reseive/Send overloads that do not throw
+       in case of error. Patch by Tomi Valkeinen.
+
+2006-03-11  Miguel de Icaza  <miguel@novell.com>
+
+       * NetworkStream.cs (Dispose): Use the right signature depending on
+       the profile being built.
+
+2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: pass something not empty to the unixep ctor.
+
+2006-03-03  Dick Porter  <dick@ximian.com>
+
+       * UdpClient.cs: Fix IPv6 family check.  Fixes bug 77689.
+
+2006-02-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * TcpClient.cs: when the socket is not connected, don't try to set the
+       socket options, as they are ignored on linux. Wait until Connect
+       succeeds and then apply the options.
+
+2006-02-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: added a missing overload for SetSocketOption.
+
+2006-01-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: use the 2.0 configuration classes when checking for IPv6
+       support.
+
+2006-01-04  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * TcpClient.cs: The Client property is public in 2.0 while it was
+       protected in earlier release. Fix bug #77048.
+
+2005-12-07  Robert Jordan  <robertj@gmx.net>
+
+       * SocketError.cs: Added.
+       * SocketException: Implemented SocketErrorCode. Fixes bug #76915.
+
+2005-10-11  Dick Porter  <dick@ximian.com>
+
+       * Socket.cs: Don't call connect(2) twice for non-blocking sockets,
+       it breaks on macos (and probably other bsd-based stacks too,) use
+       poll() and getsockopt() to check if it worked.
+
+2005-09-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: add checks for 'disposed' all over. Fixes bug #76249.
+
+2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * TcpClient.cs: patch by Hans Kratz that uses an integer when setting
+       NoDelay instead of a bool, which is only handled in 2.0.
+
+2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: disallow connecting to .Any addresses. Fixes bug #75154.
+
+2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: adapted Select to the new Select_internal that uses poll()
+       instead of select(). Managed part of the fix for bug #71203.
+
+2005-05-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: apply the same hack on blocking Connect calls as the one
+       used in Accept.
+
+2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: see bug #74842, which is fixed with this patch for details
+       and test cases on the blocking behavior of accept() when close() is
+       called from another thread. The solution applied is to Abort the thread
+       that is blocking in Accept_internal() when someone calls Close (), then
+       reset the abort state if the socket is disposed and return the same
+       error as MS (10004 - interrupted).
+
+2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: match MS behavior on SetSocketOption with a boolean
+       argument. MS 1.1 throws an ArgumentException, but 2.0 turns true/false
+       into 1/0 and works fine. Fixes bug #71753. Added checks for disposed
+       in the 3 SetSocketOption.
+
+2005-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: if there are outstanding aio requests and one of them gets
+       an ObjectDisposedException, throw the same exception for the rest.
+
+2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: removed hack added to fix bug #53229 (more than a year ago)
+       that kept sockets opened until all AIO operations where finished. If
+       the socket is closed, Receive returns 0 in EndReceive, the rest throw
+       the ObjectDisposedException. Set the socket handle to -1 when closing.
+
 2005-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Socket.cs: Begin/End Send/SendTo guarantee that all bytes are written