The property leaks through the abstraction. It's rarely used. And it complicates things on Unix due to exposing the underlying socket instance combined with difficulties with multiple connect calls on a single socket instance.
Until we have good reason to expose it in the contract, we're removing it from the contract before it's stable.
Commit migrated from https://github.com/dotnet/corefx/commit/30abd30421289509cd3bd18a9114501afdc0fb7c
Now that these Connect* APIs are throwing on Unix, marking a bunch of tests as Windows-only. In doing so, I combined a bunch of tests using [Theory], so as to minimize boilerplate and the number of methods that need to be annotated as platform-specific.
Commit migrated from https://github.com/dotnet/corefx/commit/f69a6d73f8e4cbc97a79957322bd9f7303518bfd
- Separate the type out into its own file, to make it easier for others to consume
- Fix a bug that prohbited it from being used with Accept (removed min length validation in ctor)
- Added a test that does Connect/Accept and Send/Receive
- A few other cleanups in the existing tests
Commit migrated from https://github.com/dotnet/corefx/commit/627c008e69292a54d517541d2e0d6c14cc008a73
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.
Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.
Removed OutputType=Library property as it isn't necessary.
Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
With code separation into System.Net.Primitives and System.Net.Sockets,
EndPoint extensibility was broken because System.Net.Sockets started to
use its own copy of SocketAddress and didn't respect SocketAddress that
a custom EndPoint may provide.
The fix is to allow conversion between SocketAddress from System.Net.Primitives
and System.Net.Sockets. This way custom implementations of EndPoint will
be able to provide their own SocketAddress and it'll be honored by the
Socket APIs.
The fix also allows sockets to use 'Unspecified' protocol type which is
needed for Unix Domain Sockets. There are several changes in socket test
server to allow tests pass protocol type.
Add new unit tests that use end point extensibility to implement Unix
Domain Sockets.
Fixdotnet/corefx#4777
Commit migrated from https://github.com/dotnet/corefx/commit/0d07c5c5be8f74d25cd64f11b63975a9243da440
The System.Net.Sockets 4.1 contract (refs folder) does NOT have public methods for Socket.Close() or NetworkStream.Close().
However, the implementional DLL was still having public methods for these.
Removed the Close() methods and related fields.
Commit migrated from https://github.com/dotnet/corefx/commit/75522e90ec60b450b8eb070f6b257b12bd120615
On *nix, the SendTo APIs return ENETUNREACH instead of EFAULT when confronted
with a socket address with an invalid address family: these platforms check
the family of the provided socket address before checking its size (as long as
the socket address is large enough to store an address family).
Fixesdotnet/corefx#4003.
Commit migrated from https://github.com/dotnet/corefx/commit/2b6725de621c93d32ccb386d2ba5fe11598d689d
A change was made to DNX to no longer restore project.jsons
that are in nested folders. This caused my batch update to miss
a number of tests and reference assembly projects.
This fixes the stale lock files, but restore is still broken.
[tfs-changeset: 1540448]
Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
We need a new DNX to understand the latest packages.
We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.
The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.
[tfs-changeset: 1540388]
Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
CMSG_FIRSTHDR returns a non-null but empty message on OS X if there is
room in the control message buffer. Check for the empty message to avoid
looping forever.
This also changes an IPPacketInformation test to use IPv4 sockets (as
opposed to dual-stack IPv6 sockets) to get a non-default IPPacketInformation
value.
Commit migrated from https://github.com/dotnet/corefx/commit/754b8583155701eb50957ee4a85b38ff6d99a2a5
- GetHashCode() and Equals() both stood the chance of dereferencing a null
pointer when called on default values.
- GetHashCode() was using a weak method of combining hash codes. This has
been updated to use the same technique used by Roslyn.
- The equality and inequality operators were unnecessarily boxing input
parameters.
Commit migrated from https://github.com/dotnet/corefx/commit/c71e33bf580075bbee039ce7ea99e231dc9bbda4
Our common tests folder has gotten a bit unwieldy in its organization. This change simply moves files around to better map to how src\Common\src is organized. Files are now stored in a path based on functionality/namespace.
I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains. Such cleanup can be done separately on each individual area.
Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.
Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
We had a number of conflicts that could cause issues in the future
plus I wanted to clean out all the warnings.
This should take care of all the warnings of the form:
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5):
warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.
These reference conflicts are listed in the build log when log verbosity is set to detailed.
Commit migrated from https://github.com/dotnet/corefx/commit/b52306a2df60c2a73392ffe09364e2a8d4f6c03d