Please do i need a new SocketAsyncEventArgs for each client connection i make.
I’m making several client connections in a loop, filling in the UserToken for each clients state from a database.
Is there a way to reuse the SocketAsyncEventArgs and still maintain separate UserToken state for each connection.
Thanks.
This question is slightly old but it’s still relevant in my opinion. I suggest the following links for reference:
I do recommend the codeproject link as the server implements a SocketAsyncEventArgs pool (which answers your question). Do note however that that code has issues that need to be resolved.