C# Socket Server
- by Snoopy
In .NET 3.5 a new socket classes was released:
http://msdn.microsoft.com/en-us/library/bb968780.aspx
i found a sample but some questions regarding best practicses are remaining:
http://code.msdn.microsoft.com/nclsamples/Wiki/View.aspx?title=Socket%20Performance
m_numConnections (the maximum number of connections the sample is designed to handle simultaneously) is probably equal to the amount of cpu cores i have.
m_receiveBufferSize is the size for one packet? like 8kb? how should i handle a length byte?
opsToPreAlloc i dont understand. is this if i code a transparent proxy?
Regarding the multithreading, what should be used? The reactive extension seem to be a good choice. Has anyone tried this in a real world project? Are there better options?
I had bad experiences with the .NET thread pool in the past.