Skip to content

Commit 3289871

Browse files
committed
feat: write ip and port in bundles
1 parent 394a646 commit 3289871

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

Assets/extOSC/Scripts/OSCBundle.cs

+29-2
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,43 @@ public class OSCBundle : IOSCPacket
2020

2121
public string Address => "#bundle";
2222

23-
public IPAddress Ip { get; set; }
23+
public IPAddress Ip
24+
{
25+
get => _ip;
26+
set
27+
{
28+
_ip = value;
29+
30+
for (var i = 0; i < Packets.Count; i++)
31+
Packets[i].Ip = value;
32+
}
33+
}
34+
35+
public int Port
36+
{
37+
get => _port;
38+
set
39+
{
40+
_port = value;
2441

25-
public int Port { get; set; }
42+
for (var i = 0; i < Packets.Count; i++)
43+
Packets[i].Port = value;
44+
}
45+
}
2646

2747
public List<IOSCPacket> Packets { get; } = new List<IOSCPacket>();
2848

2949
public long TimeStamp { get; set; }
3050

3151
#endregion
3252

53+
#region Private Vars
54+
55+
private IPAddress _ip;
56+
private int _port;
57+
58+
#endregion
59+
3360
#region Public Methods
3461

3562
public OSCBundle()

0 commit comments

Comments
 (0)