Okay in the classical understanding of the server and the client - we create a socket and listen to a specific port, the client connects to us via our ip and the port that we listen to.
And how do we suppose to do in this case: we have a certain wifi coverage area, there may even be a number of repeaters. In this zone, we have cars - n pieces. Each of the n machines can be either a server or a client. And the client when he wants to connect to the server, he chooses a server from a variety of servers that exist within the coverage of wifi - which work in the local network.
The question is really bloated to the level of "we have wifi coverage", not necessarily wifi, maybe even ethernet, the main thing is that they are all on the same local network.
UPD
I specify at the request of the user Alexey : the client has no idea what server it is connected to, it does not have a port and ip address. It simply scans the local network for the presence of servers, and connects, the servers themselves may have, say, a name.