c# - UPnP and Port Forwarding with Lidgren fails -
i'm new networking , lidgren has made easier me begin adding multiplayer capability xna pc game. i've been testing across network setting laptop right next me , has been working great. problem sent copy of game friend in netherlands , cannot connect me. have set 1 person host , other people clients connect host.
the host sets server follows:
config = new netpeerconfiguration("game"); config.port = 14242; config.enableupnp = true; config.maximumconnections = 3; config.enablemessagetype(netincomingmessagetype.connectionapproval); server = new netserver(config); server.start(); server.upnp.forwardport(14242, "forlorn forest");
here's exception forwardport throws fails , gives "bad request":
and 2 web exceptions thrown:
it says connection being closed remote host , unable read data transport connection in exception details:
any thoughts might going on here? upnp enabled on router. i've taken @ network traffic wireshark , can see display malformed packets though didn't mess of lidgren code i'm not sure why would.
the upnp protocol specification has unfortunately not been implemented on huge number of home routers out there. effect of upnp frameworks (even intel spec framework) fail communicate upnp local routers.
you should find not of friends routers open ports request. best can make sure code has no failure scenarios , uncaught exceptions relating upnp framework you're using , have documented how users fail upnp can manually setup port forwards game.
Comments
Post a Comment