开发者

Is there a C# secure socket other than SSLStream?

开发者 https://www.devze.com 2022-12-30 19:55 出处:网络
.NET 2.0 provides only the System.Net.Security.SslStream class for secure sockets in .NET 2.0 and higher, but this uses the Stream interface, which provides the blocking Read/Write members and asynchr

.NET 2.0 provides only the System.Net.Security.SslStream class for secure sockets in .NET 2.0 and higher, but this uses the Stream interface, which provides the blocking Read/Write members and asynchronous Begin{Read,Write} members.

I'm looking for a class that provides functionality similar to System.Net.Sockets.Socket. Specifically, something resembling Poll/Select, so I can handle multiple sockets in a single thread without blocking.

The mentalis security library supplies a SecureSocket class, but is explicitly unsupported for versions greater than .NET 1.1.开发者_运维百科


This answer to a related question suggests using a secure 3rd-party library on top of Socket:

If you don't like how SSLStream is implemented (it's really limited in functionality), you can take SSL/TLS components of SecureBlackbox (our product) and use them on top of Socket class of .NET framework. This way you'll be able to get SSL in asynchronous mode etc for both client-side and server-side sockets.

0

精彩评论

暂无评论...
验证码 换一张
取 消