Squashed 'Runtime/HumanoidControl/Scripts/Networking/Roboid/ControlCore/' changes from 6e5b923..cdd1a7a

cdd1a7a Fix name message

git-subtree-dir: Runtime/HumanoidControl/Scripts/Networking/Roboid/ControlCore
git-subtree-split: cdd1a7a53f557610553ef3a5325cdc4232350e58
This commit is contained in:
Pascal Serrarens 2024-12-09 17:22:53 +01:00
parent f1c212ebfa
commit 0b076bd3c4

View File

@ -268,7 +268,8 @@ namespace Passer.Control {
return buffer; return buffer;
} }
public override void Deserialize(byte[] buffer) { public override void Deserialize(byte[] buffer) {
uint ix = 0; byte ix = 0;
this.networkId = buffer[ix++];
this.thingId = buffer[ix++]; this.thingId = buffer[ix++];
int strlen = buffer[ix++]; int strlen = buffer[ix++];
this.name = System.Text.Encoding.UTF8.GetString(buffer, (int)ix, strlen); this.name = System.Text.Encoding.UTF8.GetString(buffer, (int)ix, strlen);
@ -405,6 +406,7 @@ namespace Passer.Control {
return SendMsg(client, msg); return SendMsg(client, msg);
} }
public static async Task<bool> Receive(Stream dataStream, Client client, byte packetSize) { public static async Task<bool> Receive(Stream dataStream, Client client, byte packetSize) {
UnityEngine.Debug.Log("Receive pose");
if (packetSize != length) if (packetSize != length)
return false; return false;