c# - 是否有 SSLStream 以外的 C# 安全套接字?

标签 c# sockets ssl

.NET 2.0 只为 .NET 2.0 及更高版本中的安全套接字提供 System.Net.Security.SslStream 类,但这使用 Stream 接口(interface),它提供阻塞读/写成员和异步 Begin{Read,Write}成员。

我正在寻找一个提供类似于 System.Net.Sockets.Socket 功能的类。具体来说,类似于 Poll/Select 的东西,因此我可以在一个线程中处理多个套接字而不会阻塞。

mentalis security library提供 SecureSocket 类,但明确不支持高于 .NET 1.1 的版本。

最佳答案

This answer一个相关的问题建议在 Socket 之上使用安全的第 3 方库:

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.

关于c# - 是否有 SSLStream 以外的 C# 安全套接字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2851120/

相关文章:

c# - 报告处理程序架构问题

c - linux C套接字不在循环内打印

c# - 页面之间的套接字?

linux - 为 Linux 套接字调用读取后会发生什么

ssl - 如何配置 Kubernetes Ingress Nginx 白名单只适用于 http

python - Python请求抛出SSLError

java - 连接到 MySQL 数据库时有关 SSL 连接的警告

c# - 有可能摆脱这个 Nuget Hell 场景吗?

c# - 为什么 XmlDocument 有一个未在任何地方声明的命名空间(AFAIK)?

c# - 上传时从视频中抓取缩略图。 (Azure Blob 存储)