Commit Graph
1563 Commits
Author SHA1 Message Date
Viktor Hofer 0964be0ae9 Update slngen and solution files (#60871)
Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
2021-10-26 21:23:54 +02:00
Bibletoon 9e795c014b Add ObjectDisposedException.Throw for object instance and type (#58684) 2021-10-24 23:15:40 -07:00
Elinor Fung 5a79d9623c Merge branch 'main' into feature/use-dllimport-generator 2021-10-15 14:16:34 -07:00
Elinor Fung 39048dd5de Undo solution and config changes from DllImportGenerator (#60481)
* Remove dotnet-experimental feed from NuGet.config
* Revert changes to solution files and restore configs
2021-10-15 11:06:12 -07:00
Tom Deseyn edc5a414f0 Socket: don't disconnect Socket for unknown/unsupported socket options. (#59925)
Fixes #59055.
2021-10-08 15:07:19 +02:00
Elinor Fung c97c4dfdb4 Change some P/Invokes back to non-blittable + GeneratedDllImport for better usability (#59876) 2021-10-01 15:50:04 -07:00
Jeremy Koritzinsky d924fbc7e9 Merge branch 'main' of github.com:dotnet/runtime into merge-main 2021-09-24 09:26:18 -07:00
Anton Firszov a8c2d1eae1 Disable more SendPacketsElement tests on Win11 (#59359) 2021-09-23 14:48:47 +02:00
Jeremy Koritzinsky 27034bc84b Run slngen to regenerate the solution files. 2021-09-22 17:02:14 -07:00
Jan Jahoda cf79661315 Suppress SendPacketsElement_FileStreamMultiPartMixed_MultipleFileStreams_Success test on windows 11 (#59203) 2021-09-20 19:48:25 +02:00
Andrii Kurdiumov 5588f94924 Remove usused rd.xml files (#59201)
Closes #51112
2021-09-16 16:53:54 -06:00
Jeremy Koritzinsky 84796a6306 Fix failures in the AllConfigurations build. 2021-09-14 16:41:28 -07:00
Jeremy Koritzinsky 81293bfc1e Merge branch 'main' of https://github.com/dotnet/runtime into merge-main 2021-09-14 16:29:42 -07:00
Bar Arnon 975aa549b6 Elide SocketFlags in Socket API (#57634)
* Elide SocketFlags in Socket API

Fix #43934

* Fix SocketAsyncEventArgs tests

* Cosmetics

* Elide SocketFlags in tests

* Comments
2021-09-14 21:32:22 +02:00
Viktor Hofer 36b6247cc7 Update solution files for correct ordering of elements (#58655)
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.

Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
2021-09-04 00:16:15 +02:00
Anton Firszov 566b3ebe2f Increase some of the DnsEndPointTest timeouts (#58129)
Long story short:
I have spent several hours trying to get a test run on SLES in order to repro #57929, no success so far, and it may take days to make progress, since I'm unfamiliar with SLES.

I recommend to bump the timeout values for now, and see if it helps with the issue. If not, we may invest into another round of investigation.

(hopefully) fixes #57929
2021-09-03 12:24:28 +02:00
Tom Deseyn b726f7b1c8 Socket: check connect result when non-blocking connect completes. (#57756)
* Socket: check connect result when non-blocking connect completes.

In addition to checking whether the socket is writable to know the
connect completed, also read SO_ERROR to know if the connect was
succesful before setting the Socket state to connected.

* Avoid EADDRNOTAVAIL on Windows/OSX by connecting to port 1 instead of 0.

* We don't expect InProgress result from reading SO_ERROR.

* Handle platform differences.

* Poll timeout is microseconds instead of milliseconds.

* PR feedback

* PR feedback
2021-08-31 14:46:51 +02:00
Anton Firszov 0d3ce719f4 Make SendFile_NonParallel<T> abstract (#58003) 2021-08-24 21:29:18 +02:00
Anton Firszov 918e6a9a27 Move GreaterThan2GBFile_SendsAllBytes to a non-parallel test collection (#57946)
Fixes #57907

Intentionally left out `***CancellableTask` and `***SyncForceNonBlocking` to somewhat counterpart the increased execution time. I don't think we need all the cases for this particular test.
2021-08-24 09:35:59 +02:00
Anton Firszov 9b93ac64e4 Move Select_AcceptNonBlocking_Success to non-parallel collection (#57503) 2021-08-17 11:13:40 +02:00
Dan Moseley e617017564 More xml docs (#57039)
* Update Handle docs

* Some easy xmldoc updates

* typo

* typo

* another

* Build breaks with M.IO.R.csproj

* updates
2021-08-12 17:49:53 -06:00
Anton Firszov ebc0f05ebc Define timeout for CreateSocket.Ctor_SafeHandle_Listening_Success (#56717) 2021-08-06 14:36:27 +02:00
Jeff Handley 895c99cc50 Remove old fwlink from Obsolete messages and make message improvements (#56690)
* Remove old fwlink from Obsolete messages and make message improvements

* Thorough review and update of Obsolete messages

* Cleanup

* Make messages about unsupported APIs more consistent

* Update RequiresUnreferencedCodeAttribute messages to be consistent between ref and src

* Cleanup

* Cleanup

* Use 'not supported' instead of 'no longer supported'

* Omit unnecessary error:false from Obsolete attributes. Fix message typo.

* Remove old comment

* PR feedback
2021-08-04 14:58:10 -04:00
Huo Yaoyuan 4b3db59e28 Use File.OpenHandle in Socket.SendFile directly (#56777)
* Directly open file handle in Windows.

* Directly open file handle on Unix.

* Dispose FileHandle.

* Update scope of using.
2021-08-03 16:00:20 -04:00
Anton Firszov c1185726b9 Enable BeginAcceptV4BoundToAnyV4_Success with better timeout handling (#56406) 2021-07-30 14:15:09 +02:00
Anton Firszov 6d79c7e210 Make LocalEndPointTest and some Connect tests non-parallel (#56399) 2021-07-30 14:11:24 +02:00
Jeremy Koritzinsky 108fcdb61c Merge branch 'main' of github.com:dotnet/runtime into feature/use-dllimport-generator 2021-07-29 10:44:59 -07:00
Stephen Toub f5ec451f88 Avoid capturing current SynchronizationContext in SocketPal.SendPacketsAsync (#56512) 2021-07-29 12:54:22 -04:00
Viktor Hofer a6b9a63f35 Update libraries solution and NuGet.config files (#56430)
* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen
2021-07-28 18:44:17 +02:00
Mitchell HwangandMitchell Hwang ee729c80dd Remove ActiveIssues from tests no longer failing (#56393)
Co-authored-by: Mitchell Hwang <[email protected]>
2021-07-27 15:04:37 -04:00
Anton Firszov a85d36fed4 Fix some DualMode connect test issues (#56226)
Fixes #55053, fixes #54677
2021-07-26 19:41:12 +02:00
Anton Firszov a2235e775b Disable BeginReceiveFrom_RemoteEpIsReturnedWhenCompletedSynchronously on catalyst (#56304) 2021-07-26 19:39:31 +02:00
Anton Firszov 1a3a042f92 Fix static Socket.ConnectAsync for DnsEndPoint containing IPv6-mapped address string (#56102)
Fixes #56099
2021-07-23 17:37:13 +02:00
Miha ZupanandStephen Toub 12c4e4cd63 Update System.Net.Security Telemetry tests (#55910)
* Update System.Net.Security Telemetry tests

* Always return Task from ProcessAuthenticationAsync

* Name bool arguments

Co-authored-by: Stephen Toub <[email protected]>

Co-authored-by: Stephen Toub <[email protected]>
2021-07-22 17:35:54 +00:00
Karel Zikmund 5e176538e7 Disable test Connect_DualMode_MultiAddressFamilyConnect_RetrievedEndPoints_Success on Linux (#56002)
* Disable test Connect_DualMode_MultiAddressFamilyConnect_RetrievedEndPoints_Success on Linux

Disabled test tracked by #55053

* Update Connect.cs
2021-07-20 22:13:10 -04:00
Karel Zikmund 5026c2582f Disable test Connect_DualMode_DnsConnect_RetrievedEndPoints_Success on Linux (#56003)
Disabled test tracked by #54677 and #55709
2021-07-20 22:31:55 +02:00
Anton Firszov 067aa165d9 Expose a global switch to disable IPV6 (#55012)
Fixes #47583. Resolves #52287, #54807 and similar issues, without changing customer application code.

Introduces an AppContext switch `System.Net.DisableIPv6` and environment variable `DOTNET_SYSTEM_NET_DISABLEIPV6` to emulate the lack of OS-level IPv6 support. This is useful to workaround dual-stack socket issues when the OS reports support of IPv6, but some other underlying infrastructure element (typically VPN) doesn't function well with IPv6 request.

For consistency, this switch also impacts NameResolution and Ping, not only Sockets.
2021-07-12 14:24:54 +02:00
Anton Firszov 30d770d738 Auto-enable SO_REUSE_UNICASTPORT for ConnectEx (#54903)
Fixes #48219.
2021-07-08 02:09:15 +02:00
Stephen Toub 164ce9db5a Fix a couple more unnecessary spilled locals (#55263) 2021-07-07 13:20:48 -04:00
Stephen Toub 61ea22a0fe Avoid FileStream allocations in Sockets (#55232)
Use File.OpenHandle, as all that's needed is the SafeFileHandle, not the FileStream that wraps it.
2021-07-06 22:42:06 -04:00
Stephen Toub 40bd417ad8 Delete stale references to System.IO.FileSystem.Primitives (#55041) 2021-07-01 23:31:27 -04:00
Anton Firszov 1b61065966 Fix Connect_DualMode_DnsConnect_RetrievedEndPoints_Success on Linux (#54681) 2021-06-29 15:03:09 +02:00
LateApexEarlySpeed b317d0624f UdpClient with span support (#53429)
Add API from #864
2021-06-24 14:30:55 +02:00
Miha Zupan f3af8d8b14 Fix telemetry for Socket connects to Dns endpoints (#54071) 2021-06-23 17:21:42 -07:00
Elinor Fung b3d6fb16c4 Merge remote-tracking branch 'upstream/main' into mergeMain 2021-06-18 10:37:13 -07:00
Adam SitnikandStephen Toub 9d771a26f0 Set of offset-based APIs for thread-safe file IO (#53669)
Co-authored-by: Stephen Toub <[email protected]>
2021-06-15 20:59:58 +02:00
Elinor Fung 6271751fca Merge remote-tracking branch 'upstream/main' into HEAD 2021-06-11 10:04:20 -07:00
ac87f000c9 cleanup cancellation handling in SocketAsyncContext (#53479)
* cleanup cancellation handling in SocketAsyncContext

* fix MacOS failback

* Apply suggestions from code review

Co-authored-by: Stephen Toub <[email protected]>

* Update src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs

Co-authored-by: Stephen Toub <[email protected]>

* address feedback

Co-authored-by: Geoffrey Kizer <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
2021-06-09 12:00:42 -07:00
Tom Deseyn 06cf0b0245 Sockets.tests: TcpReceiveSendGetsCanceledByDispose: remove Timeout. (#52599)
* Sockets.tests: TcpReceiveSendGetsCanceledByDispose: remove Timeout.

This timeout is not needed and masks a more useful exception thrown
by the test.

* Add WaitAsync to timeout on all async operations

* Add missing timeout
2021-06-08 16:47:16 +02:00
Elinor Fung 614ba846bb Use GeneratedDllImport in System.Net.Sockets (#53844) 2021-06-07 19:22:16 -07:00