How to send a simple message from WinRT Client( .NET 4.5) to Desktop Server(.NET 4.0) using Sockets?

大城市里の小女人 提交于 2020-01-23 17:49:09

问题


I am trying to make a Chat Client-Server application using C#. The Client will be a simple metro application (WinRT) and the server will be "oldfashioned" desktop application. Can you provide a simple code how to establish connection between the server and the client at first and then how to send a 'hello world' message from the Client to the Server. I am looking for solution for this problem from 3 days. I read almost anything about StreamSockets, TcpClient and sockets, and still cant handle the problem. The limitaions of the different platforms are the biggest problem. WinRT can not use TcpClient objects, and the old desktop applications can not create StreamSockets to receive the data from the server. Thank you in advance.


回答1:


this is not possible. microsoft has explicitly blocked communicating from winrt apps to other apps on localhost.



来源:https://stackoverflow.com/questions/10350465/how-to-send-a-simple-message-from-winrt-client-net-4-5-to-desktop-server-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!