如何在Winsock中学习IP地址?

如何在Winsock中学习IP地址?

问题描述:

有5个登机门

门具有ip地址,并且端口号和数据相同

每个闸门都发送数据,但是我想了解哪个闸门向我发送数据(sendergate的地址是什么)


哪一个向我发送数据,这是什么门ip地址?

there are 5 gates

gates have ip adresses and same port number and data

each gates send data but ı want to learn which gate send me data(what is the ipadress of sendergate)


which one send me data what is this gate ip adress?

您好,

如果使用UdpClient而不是Socket,则可以使用Async EndReceive(ar,ref endPoint).完成后,端点将包含数据来自的地址(我相信问题是这样)

希望这会有所帮助.

干杯,AT
Hi,

If you use the UdpClient instead of the Socket you can use the Async EndReceive(ar, ref endPoint). After completion the endPoint will contain the address from where the data came (as I believe the question was)

Hope this helps.

Cheers, AT