diff --git a/TestVelGameServer/Assets/VelGameServer/Example/PlayerController.cs b/TestVelGameServer/Assets/VelGameServer/Example/PlayerController.cs index d741a21..3646aa6 100644 --- a/TestVelGameServer/Assets/VelGameServer/Example/PlayerController.cs +++ b/TestVelGameServer/Assets/VelGameServer/Example/PlayerController.cs @@ -127,7 +127,7 @@ public class PlayerController : NetworkObject, Dissonance.IDissonancePlayer byte[] lastAudioIdBytes = BitConverter.GetBytes(lastAudioId++); Buffer.BlockCopy(lastAudioIdBytes, 0, toSend, 0, 4); Buffer.BlockCopy(data.Array, data.Offset, toSend, 4, data.Count); - owner.sendGroupMessage(this,"close", "a", toSend, true); //send voice data unreliably + owner.sendGroupMessage(this,"close", "a", toSend, false); //send voice data unreliably } } diff --git a/TestVelGameServer/Assets/VelGameServer/Example/test.unity b/TestVelGameServer/Assets/VelGameServer/Example/test.unity index 78dafca..7e44ef7 100644 --- a/TestVelGameServer/Assets/VelGameServer/Example/test.unity +++ b/TestVelGameServer/Assets/VelGameServer/Example/test.unity @@ -1820,8 +1820,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 03a4d4e1a7fd74c7ab2eccca4ce168db, type: 3} m_Name: m_EditorClassIdentifier: - host: 127.0.0.1 + host: neko.ugavel.com port: 3290 + udpConnected: 0 userid: -1 room: playerPrefab: {fileID: 6139051692386484099, guid: d4158ab9c4a204cdbba28d3273fc1fb3, type: 3} diff --git a/TestVelGameServer/Assets/VelGameServer/NetworkManager.cs b/TestVelGameServer/Assets/VelGameServer/NetworkManager.cs index 2663d88..56e2c78 100644 --- a/TestVelGameServer/Assets/VelGameServer/NetworkManager.cs +++ b/TestVelGameServer/Assets/VelGameServer/NetworkManager.cs @@ -354,8 +354,11 @@ public class NetworkManager : MonoBehaviour //I don't yet have a UDP connection try { - RemoteEndPoint = new IPEndPoint( - IPAddress.Parse(host), port); + var addresses = Dns.GetHostAddresses(host); + Debug.Assert(addresses.Length > 0); + RemoteEndPoint = new IPEndPoint(addresses[0], port); + + udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);