Class NatPunchModule
Module for UDP NAT Hole punching operations. Can be accessed from NetManager
Inheritance
System.Object
NatPunchModule
Assembly: LiteNetLib.dll
Syntax
public sealed class NatPunchModule
Fields
MaxTokenLength
Declaration
public const int MaxTokenLength = 256
Field Value
Type |
Description |
System.Int32 |
|
Methods
Init(INatPunchListener)
Declaration
public void Init(INatPunchListener listener)
Parameters
NatIntroduce(IPEndPoint, IPEndPoint, IPEndPoint, IPEndPoint, String)
Declaration
public void NatIntroduce(IPEndPoint hostInternal, IPEndPoint hostExternal, IPEndPoint clientInternal, IPEndPoint clientExternal, string additionalInfo)
Parameters
Type |
Name |
Description |
System.Net.IPEndPoint |
hostInternal |
|
System.Net.IPEndPoint |
hostExternal |
|
System.Net.IPEndPoint |
clientInternal |
|
System.Net.IPEndPoint |
clientExternal |
|
System.String |
additionalInfo |
|
PollEvents()
Declaration
SendNatIntroduceRequest(IPEndPoint, String)
Declaration
public void SendNatIntroduceRequest(IPEndPoint masterServerEndPoint, string additionalInfo)
Parameters
Type |
Name |
Description |
System.Net.IPEndPoint |
masterServerEndPoint |
|
System.String |
additionalInfo |
|
SendNatIntroduceRequest(String, Int32, String)
Declaration
public void SendNatIntroduceRequest(string host, int port, string additionalInfo)
Parameters
Type |
Name |
Description |
System.String |
host |
|
System.Int32 |
port |
|
System.String |
additionalInfo |
|