All Projects → heineiuo → Isomorphic Ws

heineiuo / Isomorphic Ws

Licence: mit
Isomorphic implementation of WebSocket (https://www.npmjs.com/package/ws)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Isomorphic Ws

Arduinowebsockets
arduinoWebSockets
Stars: ✭ 1,265 (+488.37%)
Mutual labels:  websocket, websockets, ws
Speechtotext Websockets Javascript
SDK & Sample to do speech recognition using websockets in Javascript
Stars: ✭ 191 (-11.16%)
Mutual labels:  websocket, websockets, browser
Clusterws Client Js
🔥 JavaScript Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js.
Stars: ✭ 120 (-44.19%)
Mutual labels:  websocket, ws
Tap Tap Adventure
Tap Tap Adventure is a massively online 2D MMORPG set in the medieval times with twists.
Stars: ✭ 123 (-42.79%)
Mutual labels:  websocket, websockets
Simple Websocket
Simple, EventEmitter API for WebSockets
Stars: ✭ 159 (-26.05%)
Mutual labels:  websocket, browser
Linkphp
基于swoole一款高性能多进程常驻内存型全栈框架,内置WebSocket服务器、服务治理PhpRpc功能,不依赖传统的 PHP-FPM,可以用于构建高性能的Web系统、API、中间件、基础服务等等。
Stars: ✭ 101 (-53.02%)
Mutual labels:  websocket, websockets
Webfluxtemplate
Spring Webflux template application with working Spring Security, Web-sockets, Rest, Web MVC, and Authentication with JWT.
Stars: ✭ 107 (-50.23%)
Mutual labels:  websocket, websockets
Websocket
WSServer is a fast, configurable, and extendable WebSocket Server for UNIX systems written in C (C11).
Stars: ✭ 144 (-33.02%)
Mutual labels:  websocket, websockets
Wsrpc
node.js/browser protobuf rpc over binary websockets
Stars: ✭ 91 (-57.67%)
Mutual labels:  websockets, browser
Claws
Awesome WebSocket CLient - an interactive command line client for testing websocket servers
Stars: ✭ 187 (-13.02%)
Mutual labels:  websocket, websockets
Ws Tcp Relay
A simple relay between WebSocket clients and TCP servers
Stars: ✭ 186 (-13.49%)
Mutual labels:  websocket, websockets
Javawebsocketclient
RxJava WebSocket library for Java and Android
Stars: ✭ 188 (-12.56%)
Mutual labels:  websocket, websockets
Async Tungstenite
Async binding for Tungstenite, the Lightweight stream-based WebSocket implementation
Stars: ✭ 207 (-3.72%)
Mutual labels:  websocket, websockets
Autorest.typescript
Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.
Stars: ✭ 101 (-53.02%)
Mutual labels:  isomorphic, browser
Php Wss
Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
Stars: ✭ 117 (-45.58%)
Mutual labels:  websocket, websockets
Sandstone
PHP microframework designed to build a RestApi working together with a websocket server. Build a real time RestApi!
Stars: ✭ 98 (-54.42%)
Mutual labels:  websocket, websockets
Bolt Js
A framework to build Slack apps using JavaScript
Stars: ✭ 1,971 (+816.74%)
Mutual labels:  websocket, websockets
Workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.
Stars: ✭ 9,617 (+4373.02%)
Mutual labels:  websocket, ws
Ws Scrcpy
Web client prototype for scrcpy.
Stars: ✭ 164 (-23.72%)
Mutual labels:  websocket, browser
Netflux
JavaScript client and server side transport API based on WebRTC & WebSocket
Stars: ✭ 188 (-12.56%)
Mutual labels:  isomorphic, websockets

isomorphic-ws

Isomorphic implementation of WebSocket.

It uses:

Limitations

Before using this module you should know that ws is not perfectly API compatible with WebSocket, you should always test your code against both Node and browsers.

Some major differences:

  • no Server implementation in browsers
  • no support for the constructor options argument in browsers

Usage

You need to install both this package and ws:

> npm i isomorphic-ws ws

Then just require this package:

const WebSocket = require('isomorphic-ws');

const ws = new WebSocket('wss://echo.websocket.org/');

ws.onopen = function open() {
  console.log('connected');
  ws.send(Date.now());
};

ws.onclose = function close() {
  console.log('disconnected');
};

ws.onmessage = function incoming(data) {
  console.log(`Roundtrip time: ${Date.now() - data.data} ms`);

  setTimeout(function timeout() {
    ws.send(Date.now());
  }, 500);
};

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].