Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hph/web-socket
A Polymer element to ease the use and configuration of WebSockets
https://github.com/hph/web-socket
Last synced: 15 days ago
JSON representation
A Polymer element to ease the use and configuration of WebSockets
- Host: GitHub
- URL: https://github.com/hph/web-socket
- Owner: hph
- License: mit
- Created: 2015-12-08T20:57:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T15:52:29.000Z (over 7 years ago)
- Last Synced: 2024-10-04T16:09:43.065Z (about 1 month ago)
- Language: HTML
- Homepage:
- Size: 2.1 MB
- Stars: 13
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# web-socket [![Build Status](https://travis-ci.org/hph/web-socket.svg?branch=master)](https://travis-ci.org/hph/web-socket)
A [Polymer](https://www.polymer-project.org/1.0/) element to ease the use and
configuration of
[WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket).```html
```
The above example shows how to establish a WebSocket connection with
`` in a [Polymer](https://www.polymer-project.org) app. This simple
declarative element definition is:- Establishing a connection to `ws://echo.websocket.org`.
- Automatically connecting on page load.
- Parsing and stringifying JSON automatically.
- Automatically reconnecting in the event of an unclean close event (a default
behaviour of this library - no configuration required through properties).
- Setting up event handlers to functions declared externally (`_onOpen`,
`_onClose`, etc - defined by a parent element, such as a page).### Install
You can install `` with Bower
bower install web-socket
You can also view the [documentation](http://hph.github.io/web-socket), try the
[demo](http://hph.github.io/web-socket/demo) and run the
[tests](http://hph.github.io/web-socket/test).