hengineer / CaptainsMess

A local multiplayer networking library for making games like Spaceteam in Unity
MIT License
184 stars 20 forks source link

Cannot connect through specific Wifi #12

Open jimingli846 opened 5 years ago

jimingli846 commented 5 years ago

I am developing in Unity 2019.1.4f1, and when I am trying to connect different devices through specific Wifi connection, the connection will be blocked and all devices cannot connect to the same lobby. But when I switch to other Wifi including mobile hotspot, the local connection works properly. Are there any solutions like changing the protocol to avoid being blocked by firewalls or secure system? I tried connecting through Unity editor and also the space team app in different Wifi environments, it only works in specif wifi connections and didn't report any errors or warnings during the connection. Thanks for your time!

hengineer commented 5 years ago

Yes, this is a known issue. If you're using a public Wifi network (eg. at a school or café) then the router may not support “multicast protocols”, or it may have “wireless isolation” turned on for security (which allows devices to connect to the internet, but not each other). If this is the case, the only alternative is to use a different connection mode like Bluetooth, Internet or, as you mention, a Wifi hotspot. This version of CaptainsMess still doesn't support Bluetooth or Internet modes but it will soon!