简体   繁体   中英

mono(c#) detect if users are on same network

Does anyone know how to detect programmatically in C# whether 2 or more users are on the same network. I have a use case for this in my application. I found this sof question link question which might be a good starting point as mentioned in some of the comments, spoofing might be an issue. So any solution that deters that will be very helpful. Also the question in the link talks about detecting users by ip address while I' looking for users on the same Wifi Network. As always thanks in advance.

EDIT: For a little more Clarity. Say i have UserA, UserB and UserC using my app. UserA and UserB are on WIFI Network name "Foo" while UserC is on Network named "Bar". Of the 3 users using my application, is there a way to detect that the first two users are on the same network. i hope this offers a little more.

您有许多选择,可以使用MonoTouch.MultipeerConnectivity功能,也可以发送广播UDP数据包并等待响应。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM