* System.Net.Sockets/Socket_2_1.cs: Fix, by explicitely throwing an NRE,
the checks in [Receive|Send]Async methods - otherwise an exception would
occur later, on another thread and close the socket (leading to other,
unexpected, exceptions)
* Test/System.Net.Sockets/SocketTest.cs: Add parameter validation test
cases for both ReceiveAsync and SendAsync
We didn't keep the endpoint around for non-blocking connects and later,
when Poll() was called, we didn't have the information. Also 'isbound'
wasn't being set in a few places and UDP sockets needed to be marked as
not connected after a call to Connect() with an Any address.
Removed an old test for Connect(Any) with UDP sockets, since this is
used to disconnect them now.
Fixes bug #640749.
for disposed socket.
* 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.
svn path=/trunk/mcs/; revision=137051
MulticastOptionTest.cs.
* 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.
* IPv6MulticastOptionTest.cs: Added .ctor and property tests.
* MulticastOptionTest.cs: Added .ctor and property tests.
* SocketTest.cs: Fixed compiler warnings. Improved tests for
closed socket. Added tests fr GetSocketOption, and SetSocketOption
overloads (for Linger, DontLinger, AddMembership and DropMembership).
* UdpClientTest.cs: Added .ctor and JoinMulticastGroup tests.
svn path=/trunk/mcs/; revision=137048
* 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.
svn path=/trunk/mcs/; revision=101082
* UdpClient.cs: Don't set the multicast option twice. Fixes bug
324033.
2007-10-30 Dick Porter <[email protected]>
* UdpClientTest.cs: Test for 324033.
svn path=/trunk/mcs/; revision=88456
2007-10-21 Robert Jordan <[email protected]>
* Socket.cs: Remove GetHashCode override from the NET_2_0
profile. Add LAMESPEC comment. Fixes bug #325113.
In Test/System.Net.Sockets:
2007-10-21 Robert Jordan <[email protected]>
* SocketTest.cs: Enable GetHashCodeTest.
svn path=/trunk/mcs/; revision=87865
Dispose, only nullify client if network stream was not obtained.
Fixes bug #81105.
* TcpClientTest.cs: Added test for bug #81105.
svn path=/trunk/mcs/; revision=74062
* 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-26 Dick Porter <[email protected]>
* SocketTest.cs: New test for SO_ERROR reading, returning the same
value over and over.
svn path=/trunk/mcs/; revision=71751
* NetworkStream.cs: 2.0 profile updates, based on a patch by
Sridhar Kulkarni ([email protected])
2007-01-24 Dick Porter <[email protected]>
* NetworkStreamTest.cs: Test 2.0 ReadTimeout property
svn path=/trunk/mcs/; revision=71598
* TcpListener.cs: 2.0 profile updates, based on a patch by Sridhar
Kulkarni ([email protected])
2007-01-23 Dick Porter <[email protected]>
* TcpListenerTest.cs: Test 2.0 Start(int) overload
svn path=/trunk/mcs/; revision=71565
* TcpClient.cs: 2.0 profile updates, based on a patch by Sridhar
Kulkarni ([email protected])
2007-01-23 Dick Porter <[email protected]>
* TcpClientTest.cs: Test 2.0 Connect(IPAddress[], port) overload
svn path=/trunk/mcs/; revision=71557
* SocketTest.cs: Add a test for async non blocking connects that
should fail, leaving Socket.Connected == false. Based on test
case in bug 79878.
svn path=/trunk/mcs/; revision=68433