forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPeerAddressEventArgs.cs
More file actions
69 lines (61 loc) · 1.8 KB
/
PeerAddressEventArgs.cs
File metadata and controls
69 lines (61 loc) · 1.8 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Waher.Networking.XMPP.P2P
{
/// <summary>
/// Delegate for peer address events.
/// </summary>
/// <param name="Sender">Sender of event.</param>
/// <param name="e">Event arguments.</param>
public delegate void PeerAddressEventHandler(object Sender, PeerAddressEventArgs e);
/// <summary>
/// Peer address event arguments.
/// </summary>
public class PeerAddressEventArgs : EventArgs
{
private readonly string fullJID;
private readonly string externalIp;
private readonly string localIp;
private readonly int externalPort;
private readonly int localPort;
/// <summary>
/// Peer address event arguments.
/// </summary>
/// <param name="FullJid">Full JID of endpoint</param>
/// <param name="ExternalIp">External IP Address</param>
/// <param name="ExternalPort">c</param>
/// <param name="LocalIp">Local IP Address</param>
/// <param name="LocalPort">Local IP Address</param>
public PeerAddressEventArgs(string FullJid, string ExternalIp, int ExternalPort, string LocalIp, int LocalPort)
{
this.fullJID = FullJid;
this.externalIp = ExternalIp;
this.externalPort = ExternalPort;
this.localIp = LocalIp;
this.localPort = LocalPort;
}
/// <summary>
/// Full JID of endpoint
/// </summary>
public string FullJID => this.fullJID;
/// <summary>
/// External IP Address.
/// </summary>
public string ExternalIp => this.externalIp;
/// <summary>
/// External Port number.
/// </summary>
public int ExternalPort => this.externalPort;
/// <summary>
/// Local IP Address.
/// </summary>
public string LocalIp => this.localIp;
/// <summary>
/// Local Port number.
/// </summary>
public int LocalPort => this.localPort;
}
}