Draft
Conversation
4922418 to
8c882d9
Compare
1457ee7 to
e3130a4
Compare
3a5da22 to
48a90d4
Compare
73ca077 to
80735e5
Compare
007701a to
8ee2746
Compare
cb7cf84 to
613d50b
Compare
b6d702d to
307e26d
Compare
ede02b4 to
3469b55
Compare
fa28ad3 to
9e02eef
Compare
…g, polyfills Enable nullable reference types across the solution and set C# language version to 14.0. Replace TinyJson with System.Text.Json source-generated serialization (SipSorceryJsonSerializerContext) and add a single-pass sanitizer in RTCSessionDescriptionInit.TryParse that escapes raw CR/LF inside JSON string values without allocating when no escaping is needed. Introduce compile-time logging extensions (LoggerMessage) for every subsystem (Media, DTLS-SRTP, ICE, RTCP, RTP, SCTP, SDP, STUN, WebRTC, sys/Net) to eliminate boxing and string formatting on hot paths. Add Meziantou.Polyfill and CommunityToolkit.HighPerformance packages to back-fill modern APIs (Span, FrozenDictionary, SearchValues, etc.) on older target frameworks. Add System.Text.Json, System.IO.Pipelines, and Microsoft.Bcl.Cryptography conditional references per TFM. Extract reusable low-level helpers into sys/: ValueStringBuilder, MemoryOperations, BinaryOperations, EncodingExtensions, HashExtensions, BouncyCastleExtensions, PolyfillExtensions, SocketConnection hierarchy, IPAddressExtension, and more. Move UdpReceiver from net/RTP to sys/Net. Convert file-scoped namespaces throughout. Update all projects and test infrastructure accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEW FEATURES:
PERFORMANCE OPTIMIZATIONS:
Memory Management:
PooledSegmentedBuffer<T>for efficient buffer pooling withArrayPool<T>integrationMemoryOperationshelper for optimized memory operationsValueStringBuilderfor stack-allocated string building to reduce heap allocationsSearchValuesfor optimized span-based searchingenumusage.Socket and Network Layer:
NetServiceswith connection pooling and reduced allocationsSocketConnectionabstraction with concrete implementations (SocketTcpConnection,SocketUdpConnection,SocketTlsConnection) for better resource managementIPSocketwith span-based parsing and reduced string allocationsPortRangewith improved allocation patternsSystem Utilities:
BinaryOperationsfor bit manipulation optimizationsEncodingExtensionsfor efficient encoding/decoding operationsHashExtensionsfor streamlined hash computationsCrypto and Security:
SslClientAuthenticationOptionsandSslStreamExtensionsfor down-level targetsData Serialization:
SipSorceryJsonSerializerContextfor AOT-friendly JSON serializationJSONWriterandJsonParserin favor ofSystem.Text.JsonProtocol Implementations:
ValueStringBuilderCodec Optimizations:
AudioEncoderwith more efficient buffer handlingHIGH-PERFORMANCE LOGGING:
Structured Logging Infrastructure:
LoggerMessageAttributesource generator pattern across all modulesBenefits:
MODERNIZATION:
BouncyCastleExtensionsfor down-level targetsRETARGETING:
SUPPORTING CHANGES:
Type System:
TypeExtensionsIByteSerializableinterface for consistent serializationProtocolTypeExtensionsfor protocol type handlingTesting:
Supersedes #1335, #1338, #1407, #1414, #1423