C#: SSL with SocketAsyncEventArgs? -


i'm developing socket server using c# .net. i'm using async model provided socketasynceventargs class, because must high performance server support many connections in short periods of time. next, want secure communication between clients , server, , think use ssl.

is there way of using ssl socketasynceventargs model? know .net has sslstream class ssl securing, need use socketasynceventargs high performance.

is possible use ssl in upper level, without implementing in server code?

thanks in advance.

not sure if cares anymore since old needed week , not find on internet met needs. maybe there new in framework unable find... regardless, post source code since wrote company , tend frown on that, i'll outline approach took:

since sslstream takes stream in constructor, implemented own stream subtype underlying memorystream reads , writes. pass in tcpclient object well.

i used tcpclient handshake setting ssl connection. after authenticating server or client depending on how using it, use 2 memorystreams sslstream read/writes.

so async writes, first write payload sslstream populates memorystream writing encrypted data. encrypted data memorystream, populate socketasynceventargs buffer , call tcpclient sendasync method. reads, it's pretty opposite.

i can't particular excites me move data long don't let memorybuffer objects reallocated constantly, it's not performance issue. @ least way, can use framework , own code without relying on third party software.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -