我不知道该如何开始。谷歌搜索后,我发现这个here:同一台计算机上的两个程序之间的通信 - 如何?
//This is how you do it (kudos to sipwiz)
UdpClient udpServer = new UdpClient(localpt);
//This is what the proprietary (see question) sender would do (nothing special)
//!!! The following 3 lines is what the poster needs...
//(and the definition of localpt, of course)
UdpClient udpServer2 = new UdpClient();
udpServer2.Client.SetSocketOption(
SocketOptionLevel.Socket,
SocketOptionName.ReuseAddress, true);
udpServer2.Client.Bind(localpt);
但我不知道我需要什么。我尝试了一个here的示例,但收到了一条错误消息:“现有连接被远程主机强制关闭。”
我该如何继续?