Closed GoogleCodeExporter closed 8 years ago
Did you specify a ping time interval? Web sockets are supposed to close after a
period of inactivity. If you wish to keep them open, you need to do one of the
following (1) send a ping (2) set the time interval for automatic pings.
Original comment by joshuadmorris@gmail.com
on 20 Jul 2012 at 6:15
[deleted comment]
[deleted comment]
I did have a ping.(config.keepAlive = 10)
I debugged a bit.
I open a socket.
I send a packet and receive a full packet.
inside - (void)completeCurrentRead
theCurrentRead nil-ed out.
maybeDequeueRead is called(not sure why this is getting called)
theReadQueue count > 0
starts a new theReadTimer. and bang!
theReadQueue has only one place to remove object and it's inside
maybeDequeueRead.
and maybeDequeueRead starts off theReadTimer whenever theCurrentRead == nil &
theReadStream != NULL
(which reads to me, whenever we read a packet completely, we are starting the
timer.. which is awkward )
Original comment by p.compas...@gmail.com
on 23 Jul 2012 at 2:14
Are you receiving the pongs from the server? There should be a delegate method
to grab the pongs.
Original comment by joshuadmorris@gmail.com
on 23 Jul 2012 at 2:53
Didn't know I should implement a delegate mot hod for pong.
I looked at the doc and source code and can't find the method signature.
What's the name of the method?
Original comment by p.compas...@gmail.com
on 24 Jul 2012 at 2:15
WebSocket.h
@optional
/**
* Called when pong is sent... For keep-alive optimization.
**/
- (void) didSendPong:(NSData*) aMessage;
It is optional, but it will tell us if the server is returning the pong.
Original comment by joshuadmorris@gmail.com
on 24 Jul 2012 at 3:49
I thought that was called when I send pong..
In any way, I had that method in place, and still having the same error.
Original comment by p.compas...@gmail.com
on 24 Jul 2012 at 5:19
I'm an idiot. You are correct. I will add an optional method to determine when
you receive a pong from the server. I just want to determine if the server is
sending pongs. It could change the problem statement quite dramatically.
Original comment by joshuadmorris@gmail.com
on 24 Jul 2012 at 2:32
I found the problem and have begun work on a fix. Great find!
Original comment by joshuadmorris@gmail.com
on 11 Aug 2012 at 5:05
Hello,
I had to keep it as it was and work on something else.
So what was the problem?
Original comment by p.compas...@gmail.com
on 16 Aug 2012 at 5:17
This should be fixed in the 1.0.0 release.
Original comment by joshuadmorris@gmail.com
on 11 Dec 2012 at 5:18
Original issue reported on code.google.com by
p.compas...@gmail.com
on 20 Jul 2012 at 5:23