How to make a server discoverable to LAN clients

前端 未结 1 1931
栀梦
栀梦 2020-12-15 12:00

I am working on a multiplayer game in python that uses the socket library for its networking. The game will support play over LAN. One player will set up the server and othe

相关标签:
1条回答
  • 2020-12-15 12:55

    You could try a UDP broadcast. You can e.g. send a broadcast from the client. The server should then broadcast a response with its address so the client can use a regular connection.

    See here for some example code: http://wiki.python.org/moin/UdpCommunication

    0 讨论(0)
提交回复
热议问题