Skip to content

A W3C-compliant webSocket object based on the weex webSocket module

License

Notifications You must be signed in to change notification settings

LincWong/weex.adapter.websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weex.adapter.websocket

A W3C-compliant webSocket object based on the weex webSocket module

Installation

yarn add weex.adapter.websocket

or

npm install weex.adapter.websocket

How to use

var Websocket = require('weex.adapter.websocket')
var ws = new WebSocket('wss://<doman>:<port>')
ws.onopen = function(){}
ws.addEventListener('open',function(){})
ws.onmessage = function(e){}
ws.onclose = function(){}
ws.send('hello word')

When is it used?

  • Develop websocket application in weex with W3C standard syntax
  • Make existing libraries compatible with weex by replacing them. Such as socket.io-client

Some products

Reference materials

About

A W3C-compliant webSocket object based on the weex webSocket module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published