Whisper

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Whisper

Post 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.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Whisper

Post 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.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Whisper

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Whisper

Post 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.
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Whisper

Post 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
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Whisper

Post 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.
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Whisper

Post 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.
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Whisper

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Whisper

Post 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..
Garb
Prole
Posts: 29
Joined: Fri Aug 05, 2011 8:47 pm

Re: Whisper

Post by Garb »

Come on man, post the server! :awesome:
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests