简体   繁体   English

mono(c#)检测用户是否在同一网络上

[英]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. 是否有人知道如何在C#中以编程方式检测两个或更多用户是否在同一网络上。 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. 链接中的问题还涉及在我在同一Wifi网络上寻找用户时通过ip地址检测用户的问题。 As always thanks in advance. 一如既往的感谢。

EDIT: For a little more Clarity. 编辑:为了更多的清晰度。 Say i have UserA, UserB and UserC using my app. 假设我使用我的应用程序有UserA,UserB和UserC。 UserA and UserB are on WIFI Network name "Foo" while UserC is on Network named "Bar". UserA和UserB在WIFI网络名称为“ Foo”上,而UserC在网络名为“ Bar”上。 Of the 3 users using my application, is there a way to detect that the first two users are on the same network. 在使用我的应用程序的3个用户中,有没有一种方法可以检测到前两个用户在同一网络上。 i hope this offers a little more. 我希望这能提供更多。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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