The WebSocket API

  • Vanessa Wang
  • Frank Salim
  • Peter Moskovits

Abstract

This chapter introduces you to the WebSocket Application Programming Interface (API), which you can use to control the WebSocket Protocol and create WebSocket applications. In this chapter, we examine the building blocks of the WebSocket API, including its events, methods, and attributes. To learn how to use the API, we write a simple client application, connect to an existing, publicly available server (http://websocket.org), which allows us to send and receive messages over WebSocket. By using an existing server, we can focus on learning about the easy-to-use API that enables you to create WebSocket applications. We also explain step-by-step how to use the WebSocket API to power HTML5 media using binary data. Finally, we discuss browser support and connectivity.

Keywords

Chrome Prefix Dispatch Stomp 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Vanessa Wang, Frank Salim, Peter Moskovits 2013

Authors and Affiliations

  • Vanessa Wang
  • Frank Salim
  • Peter Moskovits

There are no affiliations available

Personalised recommendations