

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345# System.Net.Sockets — Folder-Specific Guidance67## Async Socket Operations89- Prefer SocketAsyncEventArgs-based operations over Task-based wrappers on hot paths to avoid allocations10- SocketAsyncEventArgs instances must be reused — allocating a new one per operation defeats the purpose11- When an async socket operation completes synchronously (returns false), invoke the continuation inline without posting to the thread pool12- Cancellation must close the socket to unblock pending operations — there is no other reliable mechanism to cancel in-flight I/O1314## Buffer Management1516- Pin buffers for the duration of the native I/O operation — use GCHandle or fixed statements, not just Memory<T>17- Prefer ArrayPool<byte> for receive and send buffers; return buffers in finally blocks even on exception paths18- Multi-buffer (scatter/gather) send and receive must handle partial completions — the OS may transfer fewer bytes than requested1920## Dual-Stack and Address Families2122- Support dual-stack sockets (IPv6 with IPv4-mapped addresses) as the default where the OS supports it23- When creating sockets, handle AddressFamily.InterNetworkV6 with DualMode=true rather than creating separate IPv4/IPv6 sockets24- Test with both IPv4-only and IPv6-only endpoints — do not assume dual-stack availability2526## Platform-Specific Behavior2728- Socket option names and behaviors differ between Windows (Winsock) and Unix (POSIX) — guard platform-specific options with runtime checks29- Linux uses epoll, macOS uses kqueue, and Windows uses IO completion ports — async completion models differ per platform30- Connection reset behavior varies: Windows returns WSAECONNRESET immediately, Linux may return it on the next read31- SO_REUSEADDR semantics differ between platforms — document expected behavior clearly3233## Connection and State Management3435- Socket disposal must cancel all pending operations and release the native handle36- Track socket state (created → bound → listening/connected → shutdown → disposed) explicitly to prevent invalid operations37- Do not issue concurrent reads or concurrent writes on the same socket unless the protocol explicitly requires it38- LingerOption and shutdown sequences must be tested on all platforms — graceful close behavior varies3940## Error Handling4142- Map platform-specific error codes (WSA* on Windows, errno on Unix) to SocketException with the correct SocketError43- Distinguish between transient errors (EWOULDBLOCK, EINTR) and fatal errors (ECONNREFUSED, ENETUNREACH) in retry logic44- SocketException.SocketErrorCode must be set correctly — callers depend on it for error classification45
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotnet/runtime.github/copilot-instructions.md · 18k | Copilot instructions | buildteststylearch+2 | 78/100 | 14 days ago | |
| dotnet/runtime.github/instructions/cdac.instructions.md · 18k | Copilot instructions | typesgitapidocs | 52/100 | 14 days ago | |
| dotnet/runtime.github/instructions/compression.instructions.md · 18k | Copilot instructions | testlint-formatstylesecurity+1 | 60/100 | 14 days ago | |
| dotnet/runtime.github/instructions/conventions.instructions.md · 18k | Copilot instructions | stylearchagent-behaviourdocs | 56/100 | 7 days ago | |
| dotnet/runtime.github/instructions/core-runtime.instructions.md · 18k | Copilot instructions | styleperformance | 43/100 | 14 days ago | |
| dotnet/runtime.github/instructions/csharp.instructions.md · 18k | Copilot instructions | lint-formatstylearchsecurity+3 | 59/100 | 7 days ago | |
| dotnet/runtime.github/instructions/extensions-caching.instructions.md · 18k | Copilot instructions | styleperformanceagent-behaviour | 48/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-common.instructions.md · 18k | Copilot instructions | styledependencies | 48/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-configuration.instructions.md · 18k | Copilot instructions | no sections | 44/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-di.instructions.md · 18k | Copilot instructions | teststyletesting-strategy | 52/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-hosting.instructions.md · 18k | Copilot instructions | teststyleagent-behaviour | 52/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-logging.instructions.md · 18k | Copilot instructions | securityperformance | 44/100 | 14 days ago | |
| dotnet/runtime.github/instructions/extensions-options.instructions.md · 18k | Copilot instructions | style | 48/100 | 14 days ago | |
| dotnet/runtime.github/instructions/illink.instructions.md · 18k | Copilot instructions | no sections | 16/100 | 7 days ago | |
| dotnet/runtime.github/instructions/jit.instructions.md · 18k | Copilot instructions | buildgit | 29/100 | 14 days ago | |
| dotnet/runtime.github/instructions/system-net-common.instructions.md · 18k | Copilot instructions | styledependenciesapi | 48/100 | 14 days ago | |
| dotnet/runtime.github/instructions/system-net-interop.instructions.md · 18k | Copilot instructions | stylearchperformance | 56/100 | 14 days ago | |
| dotnet/runtime.github/instructions/system-net-quic.instructions.md · 18k | Copilot instructions | teststyleperformance | 56/100 | 14 days ago | |
| dotnet/runtime.github/instructions/system-security-cryptography.instructions.md · 18k | Copilot instructions | stylesecurity | 48/100 | 8 days ago | |
| dotnet/runtimeeng/common/AGENTS.md · 18k | AGENTS.md | no sections | 4/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| dotnet/roslyn.github/instructions/Compiler.instructions.md · 21k | Copilot instructions | buildteststylearch+3 | 99/100 | 7 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 14 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/dotnet-runtime-github-instructions-system-net-sockets-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.