1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 06:36:30 +09:00

UPnP port forwarding improved to tolerate up to 1000 ms of router response time; UPnP added to DurableSample

This commit is contained in:
lidgren
2011-06-07 06:13:34 +00:00
parent 604ab334f5
commit 255628e641
2 changed files with 13 additions and 6 deletions

View File

@@ -25,9 +25,13 @@ namespace DurableServer
config.Port = 14242;
config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);
config.EnableMessageType(NetIncomingMessageType.DiscoveryRequest);
config.EnableUPnP = true;
Server = new NetServer(config);
Server.Start();
// attempt upnp port forwarding
Server.UPnP.ForwardPort(14242, "Durable sample test");
m_expectedReliableOrdered = new uint[3];
m_reliableOrderedCorrect = new int[3];
m_reliableOrderedErrors = new int[3];