Hi everyone, I'm having some problems using long poll implementation. I have a 
client event loop which is issuing a long poll packet. I was expecting the 
traditional 'comet' long poll behavior to be:



1. Client -> initiates connection with long poll packet 
2. Server accepts connection, blocks until
    a. Server <- sends response packet -or-
    b. it times out (20 second elapses), disconnects
3. Goto Step 1. (client restablishes connection)

Thus, I've implemented my event loops as follows:


function onPacketReceive(String message) {
     Packet packets[] = parse(message);

    try {
         foreach (packet in Packets) {
                 handlePacket(packet);
         }
     } finally {
          PokerClientConnection.establishLongPoll();
     }
}

Am I making a faulty assumption with my client event loop? The behavior I'm 
getting is poll like behavior:


1. Client -> long poll packet
2. Server <- empty packet [] in 2 seconds

Why is the server sending me back empty packets? Should I restablish a 
connection at this point?

Looking through the code it appears that the poll is queuing packets and 
waiting for the client to send a PacketPokerLongPollReturn. Could someone 
explain how PacketPokerLongPoll/Return are supposed to be used?

Thanks in advanced for your help,
-Andrew
_______________________________________________
Pokersource-users mailing list
Pokersource-users@gna.org
https://mail.gna.org/listinfo/pokersource-users

Reply via email to