LUBE (Networking Library)

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
Mr. Strange
Party member
Posts: 101
Joined: Mon Aug 11, 2008 5:19 am

Re: LUBE (Networking Library)

Post by Mr. Strange »

mön , your example was exactly what I needed. Thank you very much. Simple, bare-bones, and gives me something to build on.

[edit]... and now I've got the functionality I needed working flawlessly. Awesome!

--Mr. Strange
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: LUBE (Networking Library)

Post by Kuromeku »

Urgh?! Anyone else getting errors?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library)

Post by bartbes »

At line 106 the server:update function calls self:receive(), so unless you tried to do something with the table (like creating derivatives) and that went wrong the only thing can think of is using server.update instead of server:update (the last one being the correct one), but I thought it would give an error? On second thought, are you using your own protocol?

EDIT: I mean, do you use udp (the standard value to init)
Ripe
Prole
Posts: 11
Joined: Wed Nov 19, 2008 3:28 pm
Location: Australia

Re: LUBE (Networking Library)

Post by Ripe »

Using mön example, is it normal for it show "Client has disconnected" when another client connects? Doesn't seem right :/

Also what's this handshake business? It just a string to compare to server or something?
User avatar
mön
Prole
Posts: 13
Joined: Thu Sep 18, 2008 8:53 am
Location: Zurich
Contact:

Re: LUBE (Networking Library)

Post by mön »

Ripe wrote:is it normal for it show "Client has disconnected" when another client connects?
probably you're trying to connect several times from the same ip. the Clients table in the Server.lua uses the ip as key and disconnects if an ip which is connected sends a handshake. it should work if youre clients run on different machines.

hmmmm... whats a handshake? i think its something that shows the server that a client wants to connect. or disconnect?
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: LUBE (Networking Library)

Post by Kuromeku »

bartbes wrote:At line 106 the server:update function calls self:receive(), so unless you tried to do something with the table (like creating derivatives) and that went wrong the only thing can think of is using server.update instead of server:update (the last one being the correct one), but I thought it would give an error? On second thought, are you using your own protocol?

EDIT: I mean, do you use udp (the standard value to init)
No, do you have the version before this? I think that it's just the latest version is fucked.

(or, it could be that LOVE doesn't even come with the socket module and I need it, in that case where can I get it?)
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: LUBE (Networking Library)

Post by Kuromeku »

Nevermind, works now...

(sneaky fix? ;))
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library)

Post by bartbes »

Kudomiku wrote:(sneaky fix? ;))
No... it's an inbuilt virus....
Seriously though, I haven't changed it.
About those handshakes, it is indeed meant for authentication, and as I noted in the docs (which I still need to upload :oops:) the connections are limited to 1 client per IP.
I know it is limited, and I might easily at "open" and "close" handshakes, the problem is that the server identifies clients by ip at the moment, as this is much faster compared to manually running through all the clients in the table (even though it may be just 3). So, when I'll get a new idea to handle this, or one of you submits a good idea, I'll implement that. For now it is not hard to change this in the sources yourself (or overwrite them in your program), just figure out an effective way to store clients in the Clients table.

@mön: So, you're going to support now? ;) Probably a good thing as I can only check here about 1 time/day at the moment.

@anyone wondering what I'm doing now: Lying in bed recovering :o ... (no nothing bad, probably just the flu)
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: LUBE (Networking Library)

Post by Kuromeku »

bartbes wrote:no nothing bad, probably just the flu
http://www.independent.co.uk/life-style ... 72809.html
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library)

Post by bartbes »

I was thinking about those clients... and the best options I can think of are:
  1. Keep it as it is now
  2. Use some kind of UUID (not a fancy one, it might be an SID or something similar)
  3. Just ignore the inefficiency and don't create a game supporting 60 players over the internet (S*NY/SON*, I wonder what I meant :P)
PS Finally figured out the
  • -tag:

    Code: Select all

    [list= 1] (without the space) --> numbered
    [list= A] (again, no space) --> lettered (don't know how to describe it, not my native language)
    EDIT: Clarification:
    UUID=Unique User ID
    SID=Session ID
    ID= :roll: not worth my time typing (I know this takes longer)

    EDIT2: I'll start using version numbers from my next release on.. but be ready for 0.000001 :P (will most likely be 0.01a or something)

    EDIT NUMBER SOMETHING: I keep finding typo's, and grammar mistakes (or erorrs??) I'll just stop trying to make this post perfect.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 3 guests