Sign in to follow this  
scubed

Lidgren Network

Recommended Posts

scubed    100
I am using the Lidgren UDP networking Library in C#. Everything is fine when client and server are on the same box. However once I am trying to connect from a separate machine I don't seem to have any activity per wireshark on the designated port. Is there something beyond client.Start(); and client.connect(hostname,port) I need to be aware of?

Share this post


Link to post
Share on other sites
hplus0603    11348
First, make sure that the address of the other machine is configured properly on the client.

Second, make sure that the other host really is reachable -- that there is no NAT or firewall in the way.

Share this post


Link to post
Share on other sites
scubed    100
Ok the server is on a split tunnel VPN. The client is on the local side of the network.

The firewall between them is not on. I can ping the server from the client. But I am not getting a response via lidgren.

If I do have to get into natting is there a good resource to understand how to set it up or can lidgren library handle it? Should i be considering a different library?

Share this post


Link to post
Share on other sites
fenghus    187
Make sure you're using the correct network interface; there's a Start() override where you can specify which address to bind to.

Share this post


Link to post
Share on other sites
EJH    315
Not sure if you are doing this or not:

- on LAN or LOCALHOST you should use NetClient.DiscoverLocalServers(ip);
- everything else NetClient.DiscoverKnownServer(ip, port);

Do either of those, then

- you will recieve a NetMessageType.ServerDiscovered back from the server
- call NetClient.Connect() with the NetBuffer.ReadIPEndPoint() read from the ServerDiscovered message

Also Lidgren himself posts often and is very helpful on the Google Group. Definitely worth registering for:

http://groups.google.com/group/lidgren-network

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this