LUBE (Networking Library)
Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02
You need to test the clients thing (tcp + udp objects)? Did you add anything else you need to test? I can do it at night probably. Now I have to sleep a bit because of the last night's coding sprint
Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02
Hmm, the server still seems to hang up with tcp. I think it's about :acceptAll() function. Using that every two seconds in update function. Client seemed to conversate with the server smoothly, but server just didn't show any signs of doing anything. But after I disconnected client, the server showed lines it should show when client is connecting...
Should I use :acceptAll() in connection callback function? Didn't seem to work...
Should I use :acceptAll() in connection callback function? Didn't seem to work...
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02
No, acceptAll should be called directly before update, for best results.
Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02
If i just put acceptAll and then update (no timers or anything) server hangs up, and doesn't even show that someone's trying to connect BEFORE I close the client. Then it says "connection from 127.0.0.1"
Fuck this is hard, but fun
Fuck this is hard, but fun
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02
Well, I decided to put my update up, which should finally have resolved the 1 client per IP problem, but it is untested, so people are bound to find bugs, anyone wants a shot?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library)
Well, Skasi found one, I missed 2 characters (!), well, it works now, same version number, in the OP.
Re: LUBE (Networking Library)
When using a udp connection everything works fine. When using TCP the server crashes on trying to use acceptAll()
Lube.461 attempt to index field "socket" a nil value
this is the line
local client = self.socket:accept()
Code: Select all
lube.server:Init(tonumber(port), "tcp")
lube.server:setCallback(recv, conn, disconn)
lube.server:setHandshake("Allô")
lube.server:setPing(true,10, "PING")
lube.server.tcp:acceptAll()
this is the line
local client = self.socket:accept()
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library)
It handles protocol abstraction for you, so your call should be:
Code: Select all
lube.server:acceptAll()
Re: LUBE (Networking Library)
Thanks for the quit response. I'm glad I decided to just ask and go to bed than struggle with a problem far simpler than my sleep deprived brain imagined.
Thanks so much for making this library.
Thanks so much for making this library.
Re: LUBE (Networking Library)
Got home and was able to try it. Once I moved the lua.server:AcceptAll() to right before lube.server:update(dt) it worked great.
Do you have any idea how to return the localhost's IP on their own network and the external IP of their router/modem?
Do you have any idea how to return the localhost's IP on their own network and the external IP of their router/modem?
Who is online
Users browsing this forum: No registered users and 3 guests