public PhotonSocket(PhotonPlatform platform, UdpPlatform udpPlatform) { _platform = platform; _udpPlatform = udpPlatform; if (_udpPlatform != null) { _udpSocket = _udpPlatform.CreateSocket(); } }
public PhotonPlatform(PhotonPlatformConfig config) { _config = config; if (_config.UsePunchThrough) { // create platform _platform = BoltLauncher.CreateUdpPlatform(); } }
// Platform Settings /// <summary> /// Set a custom UDP platform. Use this method only to set custom properties /// to your desired platform. By default, there is no need to change /// the platform, this is handled internally by Bolt. /// </summary> /// <param name="platform">Custom UdpPlatform</param> /// <example> /// This example show how to set a custom PhotonPlatform: /// <code> /// BoltLauncher.SetUdpPlatform(new PhotonPlatform(new PhotonPlatformConfig /// { /// AppId = "your-app-id", /// RegionMaster = "your-region", /// UsePunchThrough = true, // set to false, to disable PunchThrough /// MaxConnections = 32 /// })); /// </code> /// </example> public static void SetUdpPlatform(UdpPlatform platform) { TargetPlatform = platform; }
public static void SetUdpPlatform(UdpPlatform platform) { BoltLauncher.UserAssignedPlatform = platform; }
public static void SetUdpPlatform(UdpPlatform platform) { UserAssignedPlatform = platform; }