No P2P in Photon Products

Hi - I've seen a few threads and pages specific to PUN and Bolt describing how raised events pass through the server on their way from client -> client. For instance: https://doc.photonengine.com/en-us/bolt/current/in-depth/server-client-model

Can someone verify that this client -> server -> client model is consistent across Photon products? In other words, Photon in general does not facilitate direct peer to peer connections. Just want to make sure I understand the model correctly. Thanks!

Best Answers

  • Kaiserludi
    Kaiserludi admin
    Answer ✓
    Hi @minotter.

    The Photon Realtime C++ Client SDKs do support p2p connections in addition to the relay-server approach that is supported by all Photon products.

    When creating a room, you have the choice to either a) do not let the clients establish direct connections to each other (this is the default) or to b) let each client in that room establish a direct connection to the master client or to c) let each client in the room establish a direct connection with every other client inside the room. In cases b) and c) you can still also send relayed messages through the room. The relay is also used under the hood to exchange the IP addresses of the clients and to do NAT-punch-through and is functions as optional fallback, if no p2p connection could be established between some of the clients because NAT-punch-through has failed.

    This feature is not available in the Photon Realtime Client SDKs for other programming languages, like the C#, Lua or Javascript Client SDKs, nor is it available for any other Photon products , although Photon Bolt Pro has a very similar feature, as @JohnTube has already mentioned.

Answers

  • Kaiserludi
    Kaiserludi admin
    Answer ✓
    Hi @minotter.

    The Photon Realtime C++ Client SDKs do support p2p connections in addition to the relay-server approach that is supported by all Photon products.

    When creating a room, you have the choice to either a) do not let the clients establish direct connections to each other (this is the default) or to b) let each client in that room establish a direct connection to the master client or to c) let each client in the room establish a direct connection with every other client inside the room. In cases b) and c) you can still also send relayed messages through the room. The relay is also used under the hood to exchange the IP addresses of the clients and to do NAT-punch-through and is functions as optional fallback, if no p2p connection could be established between some of the clients because NAT-punch-through has failed.

    This feature is not available in the Photon Realtime Client SDKs for other programming languages, like the C#, Lua or Javascript Client SDKs, nor is it available for any other Photon products , although Photon Bolt Pro has a very similar feature, as @JohnTube has already mentioned.
  • @JohnTube @Kaiserludi thanks for the awesome responses! The Photon docs are very helpful, but sometimes I find myself lacking clarity in some area and it's great to be able to ask directly. Much appreciated!