Rename remote_participant to owner
This commit is contained in:
parent
9a13a2de12
commit
33ae03bd83
@ -168,20 +168,20 @@ namespace RoboidControl {
|
|||||||
|
|
||||||
#region Send
|
#region Send
|
||||||
|
|
||||||
public void SendThingInfo(Participant remoteParticipant, Thing thing) {
|
public void SendThingInfo(Participant owner, Thing thing) {
|
||||||
Console.WriteLine("Send thing info");
|
Console.WriteLine("Send thing info");
|
||||||
this.Send(remoteParticipant, new ThingMsg(this.networkId, thing));
|
this.Send(owner, new ThingMsg(this.networkId, thing));
|
||||||
this.Send(remoteParticipant, new NameMsg(this.networkId, thing));
|
this.Send(owner, new NameMsg(this.networkId, thing));
|
||||||
this.Send(remoteParticipant, new ModelUrlMsg(this.networkId, thing));
|
this.Send(owner, new ModelUrlMsg(this.networkId, thing));
|
||||||
this.Send(remoteParticipant, new BinaryMsg(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);
|
int bufferSize = msg.Serialize(ref this.buffer);
|
||||||
if (bufferSize <= 0)
|
if (bufferSize <= 0)
|
||||||
return true;
|
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}");
|
// Console.WriteLine($"msg to {participantEndpoint.Address.ToString()} {participantEndpoint.Port}");
|
||||||
this.udpClient?.Send(this.buffer, bufferSize, participantEndpoint);
|
this.udpClient?.Send(this.buffer, bufferSize, participantEndpoint);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user