[corlib] Improve CancellationTokenSource test
[mono.git] / mcs / class / System / System.Net.Sockets / ChangeLog
index 64c566af08884951d24f2b8f0786902595c44094..e3b6399a178f055bdfcc9907f931c8fda76c7dd3 100644 (file)
@@ -1,3 +1,370 @@
+2010-04-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Add check for elevated permissions on
+       sockets (unrestricted). Add handling of new (SL4) 
+       SocketClientAccessPolicyProtocol and pass this option to the
+       CrossDomainPolicyManager
+
+2010-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: error handling was totally broken in the synchronous
+       Connect() call.  Fixes bug #590488.
+
+2010-03-19  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket.cs: Remove some NET_2_0 defines (using) and add a few
+       MOONLIGHT defines needed to reuse Socket in the client http stack
+       * Socket_2_1.cs: Remove some MOONLIGHT defines
+       * SocketAsyncEventArgs.cs: For Moonlight check policy if outside
+       System.dll (the client stack use sockets with it's own web 
+       xdomain policy)
+
+2010-03-16  Jb Evain  <jbevain@novell.com>
+
+       * Socket_2_1.cs, SocketAsyncEventArgs.cs: use MOONLIGHT symbol to
+       disambiguate MonoTouch and Moonlight code.
+
+2010-03-10  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Remove the use of reflection to check
+       xdomain poilicy on sockets (since the policy code now resides in
+       System.Net.dll)
+
+2010-01-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * NetworkStream.cs: Our explicit impl of IDisposable.Dispose belongs
+       to 1.0/1.1 only. Also move the call to GC.SupressFinalize to
+       Dispose(bool), as expected and as done by other Stream children
+       implementing a destructor.
+       Fixes #564637.
+
+2010-01-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Apply Gendarme's ProtectCallToEventDelegatesRule
+
+2009-12-04  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * System.Net.Sockets/SocketAsyncEventArgs.cs: Implement 
+       ConnectByNameError property for Moonlight 3 (and fx 4.0)
+
+2009-11-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket_2_1.cs: throw when shutting down a socket that is not
+       connected. Don't linger if the socket is not connected.
+
+2009-11-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket_2_1.cs: stop any blocking thread before closing the socket.
+
+2009-11-03  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Set error back to SocketError.Success
+       once CheckEndPoint succeed.
+       [Fix bug #549586]
+
+2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: implement *SendFile().
+
+2009-09-28  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Default SocketError.AccessDenied on 
+       Connect in case none of the DnsEndPoint provides an adequate 
+       address (family).
+
+2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket_2_1.cs: Close(int timeout) blocks up to timeout ms if there's
+       pending data to be written to the socket. If there's no pending data,
+       it closes and returns right away. Instead of using Timer and then
+       doing a 'hard' close(), we set the linger option for the socket.
+
+2009-09-27  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Don't use Socket.Poll for NET_2_1.
+       Throw NIE for use of BufferList in Receive.
+       * Socket.cs: Move Close(int) to Socket_2_1.cs. Remove NET_2_1
+       defines since the file is not used by Moonlight
+       * Socket_2_1.cs: Add Close(int) from Socket. Define out Poll
+       and Blocking.
+
+2009-09-26  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SocketAsyncEventArgs.cs: Fix paramater validations and default 
+       values
+
+2009-09-23  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs: Remove NET_2_1 socket policy checks from here.
+       * SocketAsyncEventArgs.cs: Support DnsEndPoint correctly (NET_2_1 but
+       that will be useful for NET_4_0 soon). Add socket policy checks here
+       since it could be called several times to connect to a host.
+
+2009-09-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * NetworkStream.cs: after disposing the stream, CanRead/CanWrite
+       return false.
+
+2009-09-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * SocketAsyncEventArgs.cs: fix check for non-null.
+       Fixes bug #516455.
+
+2009-07-14  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs, SocketAsyncEventArgs.cs: A bit more NET_2_1 defines
+       to help the tuner remove some extra types for moonlight.
+
+2009-06-28  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * Socket.cs: Modified some argument names to match MS. Moved disposed
+       check before argument checks in Receive. Use SocketError.InvalidArgument
+       instead of using magic numbers. Added back comments that was
+       accidentally removed in my previous commit.
+       * Socket_2_1.cs: Modified some argument names to match MS.
+
+2009-06-28  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * Socket.cs: In GetSocketOption, throw SocketException when (byte [])
+       option value is null. Use SocketError fields instead of using "magic"
+       number. In SetSocketOption (SocketOptionLevel, SocketOptionName, object)
+       only accept Linger, AddMembership, DropMembership and verify option
+       value.
+       * MulticastOption.cs: Added argument checks. Save interfaceIndex that is
+       passed to .ctor, and removed MonoTODO. Renamed arguments to match MS.
+       Reset InterfaceIndex when LocalAddress is modified, and reset
+       LocalAddress when InterfaceIndex is modified.
+       * UdpClient.cs: Modified exception to more closely match MS. Fixed
+       (int, AddressFamily) .ctor to construct IPv6 endpoint when family is
+       InterNetworkV6. Added null check for multicastAddr to (IPAddress)
+       JoinMulticastGroup overload. In (int, IPAddress) and (IPAddress,
+       IPAddress) overloads of JoinMulticastGroup throw SocketException when
+       client is IPv4. Added null check for multicastAddr to (IPAddress, int),
+       overload, and moved JoinMulticastGroup call after argument checks.
+       * IPv6MulticastOption.cs: Renamed argument names to match MS. Added
+       null check to set_Group. Added range check to set_InterfaceIndex.
+
+2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: turn WSAEINVAL into ArgumentException.
+
+2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Socket.cs: MS throws a SocketException in the byte[] overload when
+       the value is null.
+
+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