-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I've started the second largest modification of the 2.0.0 (jpoker / poker-network) version, the implementation of long poll. It will be a set of patch that unfortunately can't be split in smaller units. Until they are all applied the 2.0.0 trunk in jpoker and poker-network will be broken. I would be very grateful if someone could review the following patch and the associated comment. http://upstream.jspoker.pokersource.info/rev/75b8def96587 General description of the LongPoll implementation: When the connection is created, a LongPoll packet is launched before anything else and the LongPoll logic described below is initiated. The first LongPoll packet is emitted to initiate the logic and the pendingLongPoll flag is set. When a packet is sent, if the pendingLongPoll flag is set, a LongPollReturn packet is sent. Contrary to all other packets, it is not sent using ajaxQueue. If it was it would be blocked because the LongPoll packet has not returned yet. The server is expected to make sure the LongPoll packet returns. When the LongPoll packet returns, the ajaxQueue will pop the next packet and send it to server. If a packet has not been sent for more than longPollFrequency, a LongPoll packet is sent. It is expected that the server will take a long time, possibly minutes before returning. The pendingLongPoll flag is set. Details of the LongPoll implementation: The scheduleLongPoll function will always setTimeout for longPoll in the [minLongPollFrequency,longPollFrequency] range. The delta argument is always in the [0,longPollFrequency] range. The original sendPacket is renamed sendPacketAjax and the "mode" is given in argument instead of being set from the settings. The success callback of ajax calls the receivePacket function instead of calling directly queueIncoming with the data received. The sendPacket/receivePacket are in charge of implementing the LongPoll logic described above. Various bug fixes and modifications: For testing purposes, when the longPollFrequency is -1 (and the tests set it to -1) the LongPoll logic is deactivated. Remove the "port" variable from jquery.ajaxQueue.js and the "abort" mode because it's not used in the jpoker context. In addition jpoker was bugous because it missed the "undefined" suffix when emptying the ajax queue. Remove the "mode" variable from jpoker.connection.defaults because it has never been used by callers. The PacketPoll packets implementation for tables and tourney is removed. The Ping packet is no longer used and the associated logic is obsoleted in favor of LongPoll. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqZ2u4ACgkQ8dLMyEl6F21QagCeNL7+cvi4nCuxLxGKd1HHgBeT pBUAoLynFguN7FQHNRHmcu7aQRY+XkM3 =vhTo -----END PGP SIGNATURE-----
<<attachment: loic.vcf>>
_______________________________________________ Pokersource-users mailing list Pokersource-users@gna.org https://mail.gna.org/listinfo/pokersource-users