Page 12 of 34
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Mon Apr 06, 2009 5:10 pm
by Sparx
Ok i got i little further....
Ther is NO packet loss.... which means to me: It just behaves like TCP!
Could you get a quick view on my code whether im using UDP right?
Otherwise make UDP UDP and not TCP...
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Mon Apr 06, 2009 6:48 pm
by Sparx
Is there a possibility of telling LUBE to flush all packets that arrived more than 10ms ago? Or is there in generall a method to flush the port?
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Mon Apr 06, 2009 6:51 pm
by bartbes
I don't know any method of doing that, let me create the Lag-o-meter 3000 tomorrow and see if it happens to me as well, or if it's your connection.
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Mon Apr 06, 2009 10:21 pm
by Sparx
If you call "lube.client:update" a littel more often than data expected it's no problem.
Another thing: Is it possible to detect that a Server at IP X is not existent.. because the connection takes quite long....can't we just do a ping before connecting?
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Tue Apr 07, 2009 12:35 pm
by bartbes
That's really an UDP problem, the best way to do it is let the server send a message from the connect callback, so the client knows when the connection is established.
About why it's an UDP problem: UDP is unconnected (most of the time), so you can't just check if it's connected.. (if you really need this you can switch to TCP, which is already in LUBE)
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Tue Apr 07, 2009 1:07 pm
by Sparx
Yes i already did that! But i don't like having the programm waiting for about 5 seconds before realizing that there is absolutely nothing ariving..
couoldn't we do just a normal ping before connecting?
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Tue Apr 07, 2009 1:33 pm
by bartbes
What do you mean?
Anway, here's lag-o-meter 3000, you do have to modify it so it uses the IP address of the server (instead of 127.0.0.1, loopback). Tell me if you have strange results.
EDIT:I should say, normal is if it stays under the 1 sec limit.
EDIT2: Apparently upload went wrong, next post.
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Tue Apr 07, 2009 3:27 pm
by Sparx
Where is it?
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Tue Apr 07, 2009 4:03 pm
by bartbes
Upload went wrong, here it is.
EDIT: For anyone else, instructions (if you can call it that) in previous post.
Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02
Posted: Wed Apr 08, 2009 11:40 am
by Sparx
This one works perfect but it doesn't analyze the problem I mentioned.
If Alice sends more packages via lube:send more often than Bob performs a lube:update then the packages start queing up.....
By the way: Is there a possibility for Lube sending UDP-LAN broadcasts to be able to see lan games without lobby server?