简体   繁体   English

Socket vs Wcf通信

[英]Socket vs Wcf communication

Did Wcf replace socket? Wcf取代了插座吗? for client server application i need that client send some messages to server and the server can do the same thing without waiting request from any client. 对于客户端服务器应用程序我需要客户端向服务器发送一些消息,服务器可以做同样的事情而无需等待任何客户端的请求。 So can i do this or wcf can only expose many services that client need and the communication can't be interactif and bidirectionnal? 那么我可以这样做,或者wcf只能暴露客户需要的许多服务,而且通信不能是交互和双向的? thanks 谢谢

Do you want the connection to be persistant? 你想要连接是否持久? If so then this doesn't sound like a good case for WCF. 如果是这样,那对于WCF来说听起来不是一个好例子。 Perhaps take a look at something like ZeroMQ instead. 也许看看像ZeroMQ这样的东西。

Wcf will never replace the sockets. Wcf永远不会替换套接字。 The WCF just implements some concrete protocols over the TCP so if you need something else like IP or even UDP you still need to use the sockets. WCF只是在TCP上实现了一些具体的协议,所以如果你需要其他东西,比如IP甚至UDP,你仍然需要使用套接字。

If you need a stable TCP connection you still need a socket. 如果您需要稳定的TCP连接,仍需要套接字。 Also this discussion could be helpful for you. 此讨论也可能对您有所帮助。 http://forums.silverlight.net/t/17502.aspx/2/10 http://forums.silverlight.net/t/17502.aspx/2/10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM