Page 5 of 34

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 4:50 am
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

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 11:07 am
by Kuromeku
Urgh?! Anyone else getting errors?

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 11:13 am
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)

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 11:48 am
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?

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 12:04 pm
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?

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 12:21 pm
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?)

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 12:25 pm
by Kuromeku
Nevermind, works now...

(sneaky fix? ;))

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 6:21 pm
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)

Re: LUBE (Networking Library)

Posted: Wed Nov 26, 2008 7:44 pm
by Kuromeku
bartbes wrote:no nothing bad, probably just the flu
http://www.independent.co.uk/life-style ... 72809.html

Re: LUBE (Networking Library)

Posted: Thu Nov 27, 2008 4:20 pm
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.