Closed GoogleCodeExporter closed 9 years ago
Your "DiscoverKnownPeer" is not yielding any results when the peers are on
different sides of the router? This probably means NAT is in the way. You need
to configure your router to do port forwarding, and make sure your server
(receiving peer) host doesn't change ip (or you'll have to update the port
forwarding).
This isn't really an issue of the library; posting on the forums would be more
appropriate.
Original comment by lidg...@gmail.com
on 21 Nov 2010 at 8:32
I got it working finally. What was strange is that it works when i dont bother
using DiscoverKnownPeer. I only exposed my UDP port on the router, did not have
to put the server outside the NAT, and did not have to turn off the router or
change setting to my windows 7 firewall. I did not block the WAN ping on the
router. Basically it works like a dream! But one thing i dont understand is
what is the DiscoveryKnownPeer trying to do? It did not receive on the server
side anything?
My client is running through a Mobile Phone Internet Connection on a laptop, my
server running on a local area subnet behind a router at home.
What does the DiscoveryKnownPeer achieve, when would i have to use it? It did
not work for release 151.
Hope this helps others having same issues.
Original comment by mark.js...@googlemail.com
on 21 Nov 2010 at 8:18
DiscoveryKnownPeer works as intended; see the wiki page
http://code.google.com/p/lidgren-network-gen3/wiki/Discovery - you just have to
remember to enable the DiscoveryRequest message type on the server (and call
Server.SendDiscoveryResponse() and enable DiscoveryResponse messages on the
client.
I've updated the DurableSample so you can see it in action.
Routers keep track of what hosts and ports are trying to communicate, so if
your code suddenly starts working it just might be that you've tried to send
packets both ways and the router remembers it - that's the way NAT traversal
works in practice.
Original comment by lidg...@gmail.com
on 21 Nov 2010 at 8:57
Hello,
I have been facing the following problem for quite some time, I have read this
thread and others, but I still face this problem:
I cannot connect to a remote server (a server that is not in my local subnet).
I know this is doable using DiscoverKnwonPeer method. So I have tried the
DurableSample, because, as mentioned here, it uses this method. I have tried 2
scenarios:
A) Server on my local subnet: (SUCCESSFUL)
I run the client on my PC and run the server on another PC in the same local
subnet. In the client application I give the host name of the PC on which I run
the server. And things work correctly.
B) Server outside my local subnet: (FAIL)
I run the client on my PC and run the server on another PC in the cloud,
outside my local subnet. In the client application I give the host name of the
cloud PC on which I run the server. But the client fails to connect.
What could I possibly do to get it working?
The slightest help is much appreciated.
Original comment by sameh...@gmail.com
on 7 May 2013 at 12:09
Check out firewall issues; try port forwarding.
Original comment by lidg...@gmail.com
on 7 May 2013 at 12:15
Original issue reported on code.google.com by
mark.js...@googlemail.com
on 21 Nov 2010 at 8:10