From 33ae03bd830693420868b9952882e0cb028a5c50 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 12 Mar 2025 15:50:24 +0100 Subject: [PATCH] Rename remote_participant to owner --- src/LocalParticipant.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/LocalParticipant.cs b/src/LocalParticipant.cs index a057bdc..131b6b2 100644 --- a/src/LocalParticipant.cs +++ b/src/LocalParticipant.cs @@ -168,20 +168,20 @@ namespace RoboidControl { #region Send - public void SendThingInfo(Participant remoteParticipant, Thing thing) { + public void SendThingInfo(Participant owner, Thing thing) { Console.WriteLine("Send thing info"); - this.Send(remoteParticipant, new ThingMsg(this.networkId, thing)); - this.Send(remoteParticipant, new NameMsg(this.networkId, thing)); - this.Send(remoteParticipant, new ModelUrlMsg(this.networkId, thing)); - this.Send(remoteParticipant, new BinaryMsg(this.networkId, thing)); + this.Send(owner, new ThingMsg(this.networkId, thing)); + this.Send(owner, new NameMsg(this.networkId, thing)); + this.Send(owner, new ModelUrlMsg(this.networkId, thing)); + this.Send(owner, new BinaryMsg(this.networkId, thing)); } - public bool Send(Participant remoteParticipant, IMessage msg) { + public bool Send(Participant owner, IMessage msg) { int bufferSize = msg.Serialize(ref this.buffer); if (bufferSize <= 0) return true; - IPEndPoint participantEndpoint = new IPEndPoint(IPAddress.Parse(remoteParticipant.ipAddress), remoteParticipant.port); + IPEndPoint participantEndpoint = new IPEndPoint(IPAddress.Parse(owner.ipAddress), owner.port); // Console.WriteLine($"msg to {participantEndpoint.Address.ToString()} {participantEndpoint.Port}"); this.udpClient?.Send(this.buffer, bufferSize, participantEndpoint); return true;