Page 2 of 2

Re: Whisper

Posted: Thu Mar 22, 2012 6:17 am
by tsturzl
Ensayia wrote:
tsturzl wrote:
TechnoCat wrote:I think it is safe to say Ensayia's server doesn't work. None of us can connect to it. Maybe someone else host a server and see if we can connect?
It freezes for me, thus I cannot select a server to connect to.
Does it freeze after you press connect or as soon as you start the program without touching anything? I know that it likes to freeze on occasion with connection issues, I've not worked out a solution for that yet.

Hopefully sometime in the near future I can get a place to host the server so everyone can see it in action.
It freezes on start up. No interaction.

I didn't bother to look at the code(as I'm far too lazy..). Are you by chance using blocking sockets? If you are, are they in your update loop. In my opinion I think its best to make an eventful networking system. Either way, Blocking sockets in an update loop, big no no. If you hang your update loop, your entire program is stuck waiting for a packet. What if the packet never comes? DOOM.

Re: Whisper

Posted: Thu Mar 22, 2012 8:51 am
by miko
tsturzl wrote:I didn't bother to look at the code(as I'm far too lazy..). Are you by chance using blocking sockets? If you are, are they in your update loop. In my opinion I think its best to make an eventful networking system. Either way, Blocking sockets in an update loop, big no no. If you hang your update loop, your entire program is stuck waiting for a packet. What if the packet never comes? DOOM.
Exactly. Unless you are using love.threads - that could use blocking operations.

Re: Whisper

Posted: Thu Mar 22, 2012 4:23 pm
by Ensayia
tsturzl wrote:It freezes on start up. No interaction.

I didn't bother to look at the code(as I'm far too lazy..). Are you by chance using blocking sockets? If you are, are they in your update loop. In my opinion I think its best to make an eventful networking system. Either way, Blocking sockets in an update loop, big no no. If you hang your update loop, your entire program is stuck waiting for a packet. What if the packet never comes? DOOM.
Not using blocking sockets. I figured that out early on.

It should not even be making an attempt to connect just by starting the program. You seem to be the only person here having the lockup issue, a lot of people over on IRC tested this exact copy of the program a few months back and nobody else had problems. Not really sure what's causing it, but when I get a better net connection and can host the server I'll probably work on the program a bit more.

Re: Whisper

Posted: Thu Mar 22, 2012 4:24 pm
by bartbes
Do you (tsturzl) use 0.8.0 to run this? And do you (Ensayia) use love.timer.sleep? If so, then that's the cause.

Re: Whisper

Posted: Thu Mar 22, 2012 9:43 pm
by tsturzl
bartbes wrote:Do you (tsturzl) use 0.8.0 to run this? And do you (Ensayia) use love.timer.sleep? If so, then that's the cause.
0.7.2

Re: Whisper

Posted: Fri Mar 23, 2012 11:51 pm
by Ensayia
I don't use anything blocking or halting, not even sleep. I'm not really sure what's up because out of 10+ people that have tested this exact .love file tsturzl is the only one having it freeze up on start

I'm not really sure what to make of it.

Re: Whisper

Posted: Sat Mar 24, 2012 3:15 am
by tsturzl
Ensayia wrote:I don't use anything blocking or halting, not even sleep. I'm not really sure what's up because out of 10+ people that have tested this exact .love file tsturzl is the only one having it freeze up on start

I'm not really sure what to make of it.
Dumbness. I never tried clicking configure, I just thought since there was no response from clicking Connect that it was frozen. It does freeze when I click connect.

Perhaps set a shorter timeout(or set a timeout) for connecting.

Re: Whisper

Posted: Sun Mar 25, 2012 12:54 am
by Ensayia
I have the server program and am contemplating posting it. It was my first experience with LuaSocket so it's very... basic, but it gets the job done. There's not much to see with the chat program without connecting it. I was withholding the server because I wasn't sure how to set up security well, but I will likely end up rewriting huge portions of the client and server anyway.

As it stands right now the whole thing is rather cobbled together and very insecure. Back in the first version it was easy to connect to the server via telnet and make all sorts of things screwy and even crash the server. I made a few changes to prevent it but there are still ways to remotely crash the whole thing if you get creative.

Re: Whisper

Posted: Sun Mar 25, 2012 11:20 am
by bartbes
Ensayia wrote:Back in the first version it was easy to connect to the server via telnet and make all sorts of things screwy and even crash the server.
Oh, do I remember..

Re: Whisper

Posted: Wed May 02, 2012 1:17 pm
by Garb
Come on man, post the server! :awesome: