套接字编程有哪些替代方案?

时间:2021-08-14 16:57:21

I was browsing around for programming troubleshooters, and I was wondering what the alternate would be for Socket Programming; if there is one.

我正在浏览编程故障排除程序,我想知道插槽编程的替代方案是什么;如果有的话。

3 个解决方案

#1


4  

Assuming you have control over the protocol being used, you could go for a higher level of abstraction like .NET's Remoting or WCF.

假设您可以控制正在使用的协议,那么您可以采用更高级别的抽象,例如.NET的Remoting或WCF。

#2


2  

The question is rather vague and does not explain what MrM's issues with socket programming are, or what he is trying to accomplish.

这个问题相当模糊,并没有解释MrM与套接字编程的问题,或者他想要实现的目标。

An actual alternative to sockets would e.g. be (Win)Pcap, for which .net wrappers exist and that does not sit on top of the socket layer, as the other answers given so far.

套接字的实际替代方案例如是是(Win)Pcap,其中.net包装器存在并且不会位于套接字层之上,因为到目前为止给出了其他答案。

There is also RDMA, which also does not use sockets, or much of the network stack at all, geared towards highest performance, but is not compatible with common IP networking.

还有RDMA,它也不使用套接字或大部分网络堆栈,以实现最高性能,但与常见的IP网络不兼容。

Then there is the opposite approach: Getting high performance while still using standard sockets, by changing the underbelly with vendor-specific network stacks such as OpenOnload's. Many of these stacks however only run on the hardware of the specific vendor.

然后是相反的方法:通过使用标准套接字获得高性能,通过使用特定于供应商的网络堆栈(如OpenOnload)更改底层。但是,其中许多堆栈只能在特定供应商的硬件上运行。

#3


2  

TCPClient and UDPClient abstract you from the underlying sockets to some degree. They're nice to work with.

TCPClient和UDPClient在某种程度上从底层套接字中抽象出来。他们很高兴能与之合作。

#1


4  

Assuming you have control over the protocol being used, you could go for a higher level of abstraction like .NET's Remoting or WCF.

假设您可以控制正在使用的协议,那么您可以采用更高级别的抽象,例如.NET的Remoting或WCF。

#2


2  

The question is rather vague and does not explain what MrM's issues with socket programming are, or what he is trying to accomplish.

这个问题相当模糊,并没有解释MrM与套接字编程的问题,或者他想要实现的目标。

An actual alternative to sockets would e.g. be (Win)Pcap, for which .net wrappers exist and that does not sit on top of the socket layer, as the other answers given so far.

套接字的实际替代方案例如是是(Win)Pcap,其中.net包装器存在并且不会位于套接字层之上,因为到目前为止给出了其他答案。

There is also RDMA, which also does not use sockets, or much of the network stack at all, geared towards highest performance, but is not compatible with common IP networking.

还有RDMA,它也不使用套接字或大部分网络堆栈,以实现最高性能,但与常见的IP网络不兼容。

Then there is the opposite approach: Getting high performance while still using standard sockets, by changing the underbelly with vendor-specific network stacks such as OpenOnload's. Many of these stacks however only run on the hardware of the specific vendor.

然后是相反的方法:通过使用标准套接字获得高性能,通过使用特定于供应商的网络堆栈(如OpenOnload)更改底层。但是,其中许多堆栈只能在特定供应商的硬件上运行。

#3


2  

TCPClient and UDPClient abstract you from the underlying sockets to some degree. They're nice to work with.

TCPClient和UDPClient在某种程度上从底层套接字中抽象出来。他们很高兴能与之合作。