This time we will talk about transport protocols over the web, in particular, about BOSH and WebSocket.
Besides TCP (XMPP/SIP) and UDP (SIP only) transports, two other transports, BOSH and WebSocket, are available which are embedded inside existing TCP/HTTP stacks.
Bidirectional-streams Over Synchronous HTTP (BOSH) allows real-time communication between a browser and a web server. The browser connects to the server and will keep the connection open as long as it has no data to send. When data is available, the server sends it over the open HTTP connection and closes the connection itself. This reduces the number of requests, as the browser is not continuously polling the server. The server retains a cache of events that the client missed between reconnections.