WebSocket is an API and a protocol for bi-directional, full-duplex communication that is closely associated with HTML5 and implemented in recent versions of most web browsers.
1
vote
0answers
15 views
Pulling data quickly from mongodb with node.js
I am currently struggling with a request I am making to my server that is taking more than 4 seconds!
I am using socket.io, express and mongoDB in the back end.
I cut out a lot of the cruft to ...
1
vote
0answers
51 views
Sending file through socket
I'm trying to get some confidence with rxjs and frp.
The code below handle file sharing throw socket.io.
...
4
votes
0answers
59 views
Socket.io wrapper for an app with ReactJS components
I am upgrading a traditional jQuery based app by converting a few parts of it into ReactJs components and use socket.io for the data transfer medium.
There are a few React components spread across ...
3
votes
1answer
276 views
Websocket-based server for Raspberry Pi
I am trying to build a websocket server to run on the Raspberry Pi. The websocket server has to push periodic realtime update to a browser. Here is a sample code that I am planning to use. The example ...
5
votes
1answer
418 views
Creating chat commands properly with Socket.IO
I am developing a chat program (mountreus-chat and GitHub) in Node.js using Socket.io however my code looks awful. I'm starting to use commands and now it's even worse.
Here's a code snippet (you can ...
9
votes
1answer
207 views
WebSocket-based API library in Racket
I've developed a library in (typed) Racket that wraps a WebSocket-based API. The API itself is very simple—it operates via a series of three-letter commands optionally followed by a JSON-encoded ...
0
votes
1answer
55 views
Parsing user name and password from binary in Erlang + Cowboy
I am working on a web app that uses a WebSocket to log in users. I would like to minimize bandwidth usage by using binary messages. I came up with the following, and would like to know whether there ...
4
votes
1answer
185 views
Web socket server which needs to query some API and to pass chunk per chunk of data to its socket clients every M seconds
Let's say that I want to query some API which will respond with array of random numbers:
[4, ..., 17, ..., 25]
To keep things simple enough, let's say that array has always 10 elements. For ...
3
votes
0answers
406 views
Real-time bitcoin data feed and storage using websocket framework
I'm trying to create data feed script for real time bitcoin data for OkCoin exchange using their websocket API (documentation) and a database manager for storing.
There are two channels I am ...
3
votes
1answer
96 views
Optimizing a Node.io server code for self-balancing robot
I am building a 3D printed self-balancing robot, and use the attached server script to control it. I coded using node.io, express and socket.io.
The system is working, but I would appreciate some ...
3
votes
1answer
52 views
Plugin for communication protocols in browser(s)
I would like to get some feedback from the community regarding a plugin I recently moved from requiring jQuery to a stand alone JS implementation.
It is meant to handle browser communication ...
11
votes
2answers
328 views
Stack Exchange websockets wrapper
I've been writing a small library that allows for easy querying of the Stack Exchange websockets.
I'm going to add an enum to replace the manual ...
13
votes
2answers
11k views
Websockets client code and making it production-ready
The following code is helpful to anyone who uses websockets in general... and is probably good template for anyone getting started in this area. I'd like to flesh this out into something that is more ...