سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top