Is SocketAsyncEventArgs a good choice for a client application?
-
01-03-2021 - |
Question
Is it a good solution to use SocketAsyncEventArgs for a Client application receiving market quotes ? Or a traditional while(true) is better ?
I am looking for the fastest solution in order to receive thousand of messages per second.
Solution
For high volume messaging, SocketAsyncEventArgs
is best. MS did a lot of work to make the API as light on memory thrashing as possible, so GC will need to fire much less often than with other approaches. IIRC it's the only API Silverlight supports, so if that's a possibility then it's your only option.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow