How does the Flash library communicate with PubNub?

The client Flash AS3 library re-uses the connection for all requests using a continuous socket. A new HTTP request is issued over the connection where a last-received timetoken method is used to ensure delivery. This entails a little extra bandwidth overhead due to the HTTP headers, but long polling and message bundling keep the overhead pretty minimal.