LUBE (Networking Library)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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...
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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.
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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)
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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.
Last edited by bartbes on Tue Apr 07, 2009 4:02 pm, edited 1 time in total.
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post by Sparx »

Where is it?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post by bartbes »

Upload went wrong, here it is.

EDIT: For anyone else, instructions (if you can call it that) in previous post.
Attachments
Lag-o-meter_3000_server.love
Server
(3.81 KiB) Downloaded 172 times
Lag-o-meter_3000_client.love
Client
(4.18 KiB) Downloaded 163 times
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.04 + LUBE-X v0.02

Post 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?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests