浏览代码

Just some comments/renames from developer feedback.

/main/staging/rate_limit_data
nathaniel.buck@unity3d.com 3 年前
当前提交
83ae4c80
共有 2 个文件被更改,包括 10 次插入5 次删除
  1. 1
      Assets/Scripts/Game/LocalLobby.cs
  2. 14
      Assets/Scripts/Relay/RelayUtpSetup.cs

1
Assets/Scripts/Game/LocalLobby.cs


ServerAddress m_relayServer;
/// <summary>Used only for visual output of the Relay connection info. The obfuscated Relay server IP is obtained during allocation in the RelayUtpSetup.</summary>
public ServerAddress RelayServer
{
get => m_relayServer;

14
Assets/Scripts/Relay/RelayUtpSetup.cs


}
protected abstract void JoinRelay();
/// <summary>
/// Shared behavior for binding to the Relay allocation, which is required for use.
/// Note that a host will send bytes from the Allocation it creates, whereas a client will send bytes from the JoinAllocation it receives using a relay code.
/// </summary>
protected void BindToAllocation(string ip, int port, byte[] allocationIdBytes, byte[] connectionDataBytes, byte[] hostConnectionDataBytes, byte[] hmacKeyBytes, int connectionCapacity)
{
NetworkEndPoint serverEndpoint = NetworkEndPoint.Parse(ip, (ushort)port);

}
}
private void OnJoin(JoinAllocation allocation)
private void OnJoin(JoinAllocation joinAllocation)
if (allocation == null)
if (joinAllocation == null)
m_allocation = allocation;
BindToAllocation(allocation.RelayServer.IpV4, allocation.RelayServer.Port, allocation.AllocationIdBytes, allocation.ConnectionData, allocation.HostConnectionData, allocation.Key, 1);
m_localLobby.RelayServer = new ServerAddress(allocation.RelayServer.IpV4, allocation.RelayServer.Port);
m_allocation = joinAllocation;
BindToAllocation(joinAllocation.RelayServer.IpV4, joinAllocation.RelayServer.Port, joinAllocation.AllocationIdBytes, joinAllocation.ConnectionData, joinAllocation.HostConnectionData, joinAllocation.Key, 1);
m_localLobby.RelayServer = new ServerAddress(joinAllocation.RelayServer.IpV4, joinAllocation.RelayServer.Port);
}
protected override void OnBindingComplete()

正在加载...
取消
保存