【发布时间】:2020-01-08 23:20:36
【问题描述】:
我正在根据设备的 IP 地址和端口与设备建立 UDP 连接(成功)。 我可以成功地向它发送消息(以字节编码)。 但是,我没有看到从 client.Receive() 方法返回的响应。
我向您提出的技术问题与Receive() 方法有关。
也许我的理解是完全错误的,但我想我用来连接设备的IP地址+端口应该是相同的,当我调用Receive()方法时。
但根据示例,情况似乎并非如此。
谁能解释一下为什么不使用相同的 IP 地址 + 端口 调用 Receive() 时?
A) Note that i can see a response using a sniffer like Wireshark. But i just dont see the response returning from the C# udpClient.Receive(ref endpoint) method itself.
B) Also, i am using this API document which says that the device (drone) can receive and send a response on the same IPAddress + port.
【问题讨论】:
标签: c# .net udp datagram udpclient