forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddressInfo.cs
More file actions
76 lines (69 loc) · 1.7 KB
/
AddressInfo.cs
File metadata and controls
76 lines (69 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Waher.Networking.XMPP.P2P
{
/// <summary>
/// Contains information about peer addresses.
/// </summary>
public class AddressInfo
{
private readonly string xmppAddress;
private readonly string externalIp;
private readonly string localIp;
private readonly int externalPort;
private readonly int localPort;
/// <summary>
/// Contains information about peer addresses.
/// </summary>
/// <param name="XmppAddress">XMPP Address (bare JID).</param>
/// <param name="ExternalIp">External IP address.</param>
/// <param name="ExternalPort">External Port number.</param>
/// <param name="LocalIp">Local IP address.</param>
/// <param name="LocalPort">Local Port number.</param>
public AddressInfo(string XmppAddress, string ExternalIp, int ExternalPort, string LocalIp, int LocalPort)
{
this.xmppAddress = XmppAddress;
this.externalIp = ExternalIp;
this.externalPort = ExternalPort;
this.localIp = LocalIp;
this.localPort = LocalPort;
}
/// <summary>
/// XMPP Address (Bare JID).
/// </summary>
public string XmppAddress
{
get { return this.xmppAddress; }
}
/// <summary>
/// External IP Address.
/// </summary>
public string ExternalIp
{
get { return this.externalIp; }
}
/// <summary>
/// External Port Number.
/// </summary>
public int ExternalPort
{
get { return this.externalPort; }
}
/// <summary>
/// Local IP Address.
/// </summary>
public string LocalIp
{
get { return this.localIp; }
}
/// <summary>
/// Local Port Number.
/// </summary>
public int LocalPort
{
get { return this.localPort; }
}
}
}