Hi, do you know if it is possible to communicate between two smartphones by websocket on a 4G or wifi network ?
you don’t care about ip address recovery i know how to do just i would like to know if the connection between two smartphones is possible especially in 4g, or i’m not sure
The first issue is typically these devices are on a NAT network, which is often the case even when connected to 4G. So acting as a server of any kind is usually not practical for a mobile device unless the two devices were right next to each other connected to the same wifi as each other. The most direct work around for this is to use a relay server. So both smartphones both connect to the relay server as clients, even though one of them can act as the host for the purposes of the game.
As far as websockets specifically, I don’t know, as I typically use UDP for games. But acting as a websocket client, I wouldn’t anticipate any issues.
MLAPI was acquired by Unity, and is the official 1st party network API going forward for projects not using DOTS/ECS. But as already mentioned, there are several 3rd party API’s available.