LUBE (Networking Library)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin »

bartbes wrote:Yes.. :P
Then who does the beta-testing?
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

Sparx once said he didn't mind doing it.. but I didn't think of it when I wanted to release the new version. :ehem:
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

No new version this time, I just wanted to say I added luadoc to my copy, so hopefully you will all have more up to date docs next version. I'm currently searching for a wiki 'doclet', but I can't seem to find any doclets at all.
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

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

Post by Matkins »

I've been using 0.5 a lot sinse you released it. I don't have any problems with it, nice work.

There's just something that I don't fully understand, and I wondered if you did...
When i establish a connection between client and server and send data one way, from server to client, then client disconnects after a second. This doesn't happen if I also have the client sending data back to the server. Is this normal? What should I do to prevent the Client disconnecting when there's no data for the Client to return.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

I don't know, might be ping if enabled, otherwise, are you using handshakes?
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

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

Post by Matkins »

I've got:

Code: Select all

lube.server:setPing(true, 3, "ping")
lube.server:setHandshake("Hi")
and

Code: Select all

lube.client:setPing(true, 3, "ping")
lube.client:setHandshake("Hi")
in their respective load functions. Is that all there is to it? Or do i have to send "Hi" using lube.send myself?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

In this case, could it be possible that it is 3 seconds after which the client is disconnected?
And, are you using lube.server:checkPing(dt) and lube.client:doPing(dt)? (yes, I should merge them with update once, among some other things: next version)
If this still leaves you with the problem, what happens when you disable ping?

And no, you don't have to send Hi yourself.
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

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

Post by Matkins »

Disabling ping solves the problem. I don't really know but maybe pinging plus lots of data simultaneously is just too much? Anyway, it works now, thanks for your help.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

Or maybe they just were desynchronized, in a way that the server expected a ping 1 sec after connecting, while the client was only sending one after 3 secs, I had some problems with Netris as well, eventually the server was set to 15 seconds and the client to 5.
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

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

Post by Matkins »

If i've got ping disabled then the disconect callback wont happen will it? So i've got to use ping because i need the disconect callback.
But when using ping I have noticed something that seems strange to me;
if using ping and the server is sending lots of data and the client is not sending any data, then the disconect callback gets called but the client is not actually disconnected because it can still send data. i've seen the server receive data from a supposedly disconnected client. Is that odd? Or is that expected beings as its an unwanted diconect callback to begin with?
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests