node-websocket-vs-socket.io - Comparing WebSocket and Socket.IO on Node.js with Express.js

  •        16

Comparing WebSocket and Socket.IO on Node.js with Express.js - example server-side and client-side code to see the basic usage of both WebSocket and Socket.IO in an Express.js app, with info on how to compare the actual network traffic (which is commonly misunderstood by many online sources). Open http://localhost:3001/ in your browser, open developer tools with Shift+Ctrl+I, open the Network tab and reload the page with Ctrl+R to see the network traffic for the WebSocket version.

https://github.com/rsp/node-websocket-vs-socket.io#readme

Dependencies:

express : ^4.14.0
express-ws : ^2.0.0
socket.io : ^1.4.8

Tags
Implementation
License
Platform

   




Related Projects

primus - :zap: Primus, the creator god of the transformers & an abstraction layer for real-time to prevent module lock-in

  •    Javascript

Primus, the creator god of transformers but now also known as universal wrapper for real-time frameworks. There are a lot of real-time frameworks available for Node.js and they all have different opinions on how real-time should be done. Primus provides a common low level interface to communicate in real-time using various real-time frameworks.If you deploy your application behind a reverse proxy (Nginx, HAProxy, etc.) you might need to add WebSocket specific settings to its configuration files. If you intend to use WebSockets, please ensure that these settings have been added. There are some example configuration files available in the observing/balancerbattle repository.

Vue-Socket.io - socket.io implementation for vuejs

  •    Javascript

Socket mutations always have SOCKET_ prefix. You can use either one or another or both in your store. Namespaced modules are supported.

ClusterWS - :boom: Lightweight, fast and powerful framework for building scalable WebSocket applications in Node

  •    TypeScript

Lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js. ClusterWS uses uWebSockets - one of the most lightweight, efficient & scalable WebSocket library.

ember-websockets - EmberJS WebSockets and Socket.IO addon

  •    Javascript

The send method takes 2 arguments. A message which is passed into the native websockets send method and an optional stringify boolean. This boolean, if set to true, will do a JSON.stringify to the message before passing it to the websocket send method. If you are sending strings it is recommended to pass true. socketFor takes two arguments: a url, a protocol array (optional), and returns a socket instance from its cache or a new websocket connection if one was not found.

vue-websocket - Simple websocket (socket.io) plugin for Vue.js

  •    Javascript

Websocket (socket.io) plugin for VueJS. Support namespaces. You can install it via NPM.


AndroidAsync - Asynchronous socket, http (client+server), websocket, and socket

  •    Java

AndroidAsync is a low level network protocol library. If you are looking for an easy to use, higher level, Android aware, http request library, check out Ion (it is built on top of AndroidAsync). The typical Android app developer would probably be more interested in Ion. But if you're looking for a raw Socket, HTTP client/server, WebSocket, and Socket.IO library for Android, AndroidAsync is it.

socket.io - Realtime application framework (Node.JS server)

  •    Javascript

For this purpose, it relies on Engine.IO, which first establishes a long-polling connection, then tries to upgrade to better transports that are "tested" on the side, like WebSocket. Please see the Goals section for more information. Unless instructed otherwise a disconnected client will try to reconnect forever, until the server is available again. Please see the available reconnection options here.

vue-chat - :calling: a web chat tool

  •    Vue

:calling: a web chat tool. Front-End : vue+vuex+vue-cli+vue-router+axios+scss;Back-end: node(koa2)+mysql+JWT(Json web token); socket.io

Workerman - An asynchronous event driven PHP framework for easily building fast, scalable network applications

  •    PHP

Workerman is an asynchronous event driven PHP framework with high performance for easily building fast, scalable network applications. Supports HTTP, Websocket, SSL and other custom protocols. Supports libevent, HHVM , ReactPHP.

angular-socket-io-seed - A great starting point for writing AngularJS apps backed by a Socket

  •    Javascript

Start an awesome app with AngularJS on the front, Socket.io + Express + Node on the back. This project is an application skeleton for writing AngularJS apps that use web sockets to add real-time functionality. If you're not planning on using web sockets, you should consider the Angular Express Seed instead.The seed contains angular libraries, test libraries and a bunch of scripts all preconfigured for instant web development gratification. Just clone the repo (or download the zip/tarball) and you're ready to develop your application.

zerogw - A fast HTTP/WebSocket to zeromq gateway (UNMAINTAINED, take a look at swindon web server instead)

  •    C

Zerogw is a http to zeromq gateway. Which means it listens HTTP, parses request and sends it using zeromq socket (ZMQ_REQ). Then waits for the reply and responds with data received from zeromq socket. Starting with v0.3 zerogw also supports WebSockets. Websockets are implemented by forwarding incoming messages using ZMQ_PUB socket, and listening commands from ZMQ_SUB socket. Each WebSocket client can be subscribed to unlimited number of topics. Each zeromq message it either control message (e.g. subscription) or message to a specified topic which will be efficiently sent to every WebSocket subscribed to that particular topic.

WebSocket-Node - A WebSocket Implementation for Node.JS (Draft -08 through the final RFC 6455)

  •    Javascript

This is a (mostly) pure JavaScript implementation of the WebSocket protocol versions 8 and 13 for Node. There are some example client and server applications that implement various interoperability testing protocols in the "test/scripts" folder. For a WebSocket client written in ActionScript 3, see my AS3WebScocket project.

vue-chess - Multiplayer online chess game use Vue , Nodejs, Webpack, Em6, Socket

  •    Javascript

Multiplayer online chess game use Vue , Nodejs, Webpack, Em6, Socket.io, Mongodb, Express

SuperWebSocket, a .NET WebSocket Server

  •    ASPNET

A .NET server side implementation of WebSocket protocol.

Simple-WebSocket-Server - A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost

  •    C++

A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Asio (both Boost.Asio and standalone Asio can be used) and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++. See https://github.com/eidheim/Simple-Web-Server for an easy way to make REST resources available from C++ applications. Also, feel free to check out the new C++ IDE supporting C++11/14/17: https://github.com/cppit/jucipp.

serial-port-json-server - A serial port JSON websocket server for Windows, Mac, Linux, Raspberry Pi, or BeagleBone Black that lets you communicate with your serial port from a web application

  •    Go

A serial port JSON websocket & web server that runs from the command line on Windows, Mac, Linux, Raspberry Pi, or Beagle Bone that lets you communicate with your serial port from a web application. This enables web apps to be written that can communicate with your local serial device such as an Arduino, CNC controller, or any device that communicates over the serial port. Since version 1.82 you can now also program your Arduino by uploading a hex file. The app is written in Go. It has an embedded web server and websocket server. The server runs on the standard port of localhost:8989. You can connect to it locally with your browser to interact by visiting http://localhost:8989. The websocket is technically running at ws://localhost/ws. You can of course connect to your websocket from any other computer to bind in remotely. For example, just connect to ws://192.168.1.10/ws if you are on a remote host where 192.168.1.10 is your devices actual IP address.