问题
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