Is there any Examples / Documentation for implementing LAN Discovery?

I have gone through the documentation and except the API references , there is nothing about how to set it up. A link was provided in another answer which just takes me to a dead webpage/

Thank You!

Comments

  • It is more or less not documented but not very difficult.

    First you have to start Bolt on the server and the client (StartServer / StartClient)
    You then use EnableLanBroadcast() on the server and the client
    http://doc-api.photonengine.com/en/BOLT/current/class_bolt_network.html#a535b7b8462dc124649a7c71ff31a0f13
    On the client the server (aka UdpSessions) are then automatically added to BoltNetwork.SessionList

    Technically the server will send to a specific IP on the local network and the client is listening for messages there

    Note: it does not work if both the client and the server are running on the same machine / ip
    Note: you can start the client without directly connecting to a server / session. This was the most confusing part for me

    Maybe there is a more elegant way as I'm not sure if I got it completely right myself. Atm I always have to make sure bolt is running on the client even if he is just in the server browser menu. But it seems Bolt is completely shutting itself down after disconnecting from a server. So I'm not sure how this is intended to be done.
    Currently it's: start bolt - find lan server - connect - play - disconnect - start bolt again
Sign In or Register to comment.