wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

primitive PING from client support #201

Closed mkonecny closed 9 years ago

mkonecny commented 9 years ago

According to the RFC spec, we should respond with a PONG frame upon receiving a PING:

Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response, unless it already received a Close frame. It SHOULD respond with Pong frame as soon as is practical. Pong frames are discussed in Section 5.5.3.

The following is not satisfied in this pull request:

A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to.

Reason for this is that I am not too familiar with the memory management lifecycle of nginx/this module, and it appears I would need to allocate and then free a uchar[] for each individual pong. Any pointers on that would be helpful, and I can resubmit the pull request.