[英]Sending data over a network connection from c# to unmanaged c++
I have ac# dll that needs to send a quite complex object over the network to an unmanaged c++ process. 我有一个ac#dll,需要通过网络将一个非常复杂的对象发送到一个不受管理的c ++进程。 I'm aware that there are a number of ways to do this but was wondering if anyone can recommend the best fit. 我知道有很多方法可以做到这一点,但我想知道是否有人可以推荐最合适的方法。 Important points to note: 注意事项:
Any help would be much appreciated. 任何帮助将非常感激。
As far as I understand about your question, you might mean LAN or WLAN by "network". 据我对您的问题的理解,您可能用“网络”来表示LAN或WLAN。 so, I suggest to use UDP/IP on both sides. 因此,我建议双方都使用UDP / IP。 and for "It is critical that the c# process is informed if data is not received by the c++ process", you need to handle it manually (eg via an acknowledge packet per receiving a packet or bunch of packets). 对于“如果c ++进程未接收到数据,则通知c#进程至关重要”,则需要手动进行处理(例如,通过每个接收到一个数据包或一堆数据包的确认数据包)。
there are a lot of samples available over internet for UDP/IP unde 'socket programming': like one here: http://www.abc.se/~m6695/udp.html 互联网上有很多用于UDP / IP的“套接字编程”的示例:就像这里的一个: http : //www.abc.se/~m6695/udp.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.