Questions tagged [websocket]

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
44 views

updated utility for automatic websocket ping-pong and receiving round-trip time reports

This is a follow-up to this question. Please check it out first for the motivations, known use-cases and explanations. In this new version I've applied several of advices from this answer by @J_H: ...
morgwai's user avatar
  • 401
3 votes
2 answers
116 views

utility for automatic websocket ping-pong and receiving round-trip time reports

Without ping-pong websocket connections are usually dropped by intermediary proxies/routers after some time of inactivity, so you can't go make yourself a coffee because your chat connection will ...
morgwai's user avatar
  • 401
1 vote
0 answers
36 views

Websocket code to be improved

This is the plain websocket code that connects with mobile app. Once we send a REST request from another service say B to our service A we send a websocket payload over the response. This runs in ...
darthwader's user avatar
3 votes
1 answer
109 views

Encrypted websocket chat using AES (EAX) and RSA for signing

For learning purposes and because it really interests me I am trying to get a better understanding of cryptography by trying to make my own basic secure chat-application. I posted a first version of ...
O'Niel's user avatar
  • 197
3 votes
1 answer
176 views

Encryption implementation for websocket chat (RSA + AES)

For learning purposes I am trying to make a encrypted chat in Python using Websockets. I am using AES and RSA to make it safe. The idea of the chat is that it's a group-chat. Users can join a chat by ...
O'Niel's user avatar
  • 197
1 vote
0 answers
63 views

Nodejs Websocket pulling new data from InfluxDB

I have a nodejs server with websocket which is pulling the new data from InfluxDB and send it to client. The piece of code is this: ...
KunLun's user avatar
  • 111
3 votes
1 answer
163 views

Using async websockets in Rust with tokio, rmp-serde and varint encoding

This is my first attempt at a real life app in Rust. I would mostly like to know if I am writing idiomatic Rust code, coming from Java and Python. I'll appreciate any pointers to improvements, though. ...
8192K's user avatar
  • 131
1 vote
0 answers
111 views

Simple Table With Collaborative Editing

The following is my React code to create a simple app containing a table which can be edited by multiple people at the same time. Each client connects to a WebSocket via a custom hook. The WebSocket ...
muell's user avatar
  • 11
1 vote
0 answers
59 views

Refactoring websocket wrapper for testability and readability

I've implemented a websocket wrapper around this library for a 3rd party API integration. The client manages logins, logouts, sends requests, and awaits corresponding responses. Responses can be ...
nop's user avatar
  • 739
2 votes
1 answer
481 views

How to structure in handling websocket and inserting data to databse in Python

I connected to the websocket, and the data response in the callback function handle_message. I wish to insert all the data to influxdb using ...
tung's user avatar
  • 97
0 votes
1 answer
85 views

Simple websocket chat app, security and efficiency concerns

I'm coding a simple websocket chat app. I was wondering if my code is secure and efficient. I also have a question about the way how I'm sending objects and then checking the type, is there anything ...
MousTea's user avatar
  • 31
1 vote
1 answer
3k views

General web socket client with auto reconnect capabilities

This is a web socket client wrapper with auto reconnect capabilities. First of all, I know I should avoid working with strings to reduce allocation, that's on test purpose. So, ignore the fact that it ...
nop's user avatar
  • 739
3 votes
0 answers
180 views

Simple websocket chat app

I'm coding a simple websocket chat app. I was wondering if my code is secure and efficient. I also have a question about the way how I'm sending objects and then checking the type, is there anything ...
MousTea's user avatar
  • 31
2 votes
0 answers
2k views

High-performance ClientWebSocket wrapper

I'm working on a web socket client wrapper around ClientWebSocket and this is kinda my first public library project, which is why I'm asking this question here. I ...
nop's user avatar
  • 739
1 vote
0 answers
1k views

My implementation of the Signal protocol for end-to-end encryption in NodeJS and Angular [closed]

I have developed a web app which lets you transfer files from A device to B device, similar to airdrop's concept, working through the server and not peer-to-peer. I didn't go with a P2P solution ...
ben berizovsky's user avatar
2 votes
0 answers
2k views

Implement Websocket using boost::asio::beast with serialized writes

Here's a proposal implementation of websocket using boost::asio::beast that is thread-safe to parallel writes. In this example below, the ...
Zohar81's user avatar
  • 153
3 votes
1 answer
539 views

Adding websocket functionality to send live data from a Python script. Any edge-cases or unexpected consequences to beware of?

The original purpose of this script was saving data to a local file, which is still the primary purpose. Since I may only obtain one copy of a data stream (not this particular Coinbase one; it's just ...
davidtgq's user avatar
  • 131
1 vote
0 answers
134 views

Building a generic WebSocket component in Python

I have the following working code for a generic WebSocket component: ...
P i's user avatar
  • 629
1 vote
1 answer
267 views

Private desktop and mobile WebSocket connections with Node.js

Background info To learn a new branch of my dev career, I've started a new project in my spare time (I've never used WebSockets before and I also want to learn more about common authentication flows). ...
htmn's user avatar
  • 218
2 votes
0 answers
247 views

Handle ASP.NET WebSocket connections using TPL Dataflow

I was recently introduced to the wonders of TPL Dataflow and thought it would be a good exercise to create a wrapper class which wraps around an ASP.NET WebSocket ...
castholm's user avatar
5 votes
2 answers
3k views

Handling more websocket connections

I have the following basic code, which connects to a websocket server and receives some data: ...
JayK23's user avatar
  • 53
3 votes
0 answers
330 views

Javascript / Go plug-and-play server-side WebRTC support for webcam streaming

I normally program in a linux vm and decided to do some machine learning with my webcam when I realized the vm didn't have access to my camera hardware. That kicked-off a mini project to create a plug-...
Coupcoup's user avatar
  • 1,066
-2 votes
1 answer
45 views

Node.js ws server: global or local functions? [closed]

I'm working on a Node.js chat app project using the ws library. I have it up and running but I'm still making improvements and adding stuff like authentication, etc....
Elijah Mock's user avatar
3 votes
0 answers
77 views

Is my async websocket python code correct?

This is the first time I am posting here, so please go easy on me : ). I am also writing for the first time python code which uses async / ...
Newskooler's user avatar
5 votes
1 answer
253 views

Monitor activity on a network

I wrote a small C++ program to monitor activity (messages sent) on a network and display the current status of the machines. The assumptions are as follows: There exist sessions on a network. A ...
lumi's user avatar
  • 121
2 votes
1 answer
2k views

Updating state with React and Websockets

I'm working on a React app with websocket. In this app there is a socket event listener which returns 3 types: add, change, and <...
Gerard Santos's user avatar
3 votes
0 answers
312 views

Middleware which lets developer maintain dynamic context

Problem Statement: Users can chat while the replies of the chatbot are based on past messages. So the chatbot needs to have the context of the previous messages and reply accordingly. Here is ...
Vraj Shah's user avatar
5 votes
1 answer
209 views

Node websockets

I have this code I use it for two things connect to lxd instances and emits any operation events it recieves over socket.io to the client Bridge between client and lxd for terminals Its pretty ...
Dan's user avatar
  • 520
4 votes
0 answers
288 views

Python server that performs sentiment analysis on Twitter data

I have a fully working Python server that utilizes Tornado, asyncio, websockets and tweepy(Twitter's Streaming api). The main point of this server is to receive a query from the user, call upon tweepy ...
Luis Averhoff's user avatar
1 vote
0 answers
598 views

Angular Websocket service with wait for response sending

I am writing an Angular Websocket service that can send messages to a server and then can subscribe to the response. I am grateful for every suggestion to improve this. ...
Franki1986's user avatar
11 votes
0 answers
3k views

Sending notifications with Django channels

I have project on Django wich use Django Channels. I use Django Channel for sending notifications to users who are subscribed to articles changes (adding/editing/deleting comments on article). So I'...
KIN1991's user avatar
  • 211
4 votes
1 answer
1k views

Spring Boot Websocket STOMP Crud

I have a personal project that runs the backend under spring boot that implements websocket for real-time functionality and I apply it to a crud operations. Although the code is working and work as ...
Ricardo Raz's user avatar
4 votes
0 answers
285 views

An in-memory copy of the GDAX order book for an arbitrary cryptocurrency, updated in real time

GDAX is the cryptocurrency exchange owned and operated by Coinbase. This code is intended to be the basis for an order-book-strategy trading bot. I'd love feedback on my use of data structures, my ...
feuGene's user avatar
  • 363
2 votes
0 answers
93 views

Websocket 'onmessage' logger to MongoDB

I'm learning websockets and wanted to make a websocket onmessage logger which writes the received data in a mongodb. I'm starting my script with ...
Samy's user avatar
  • 121
12 votes
1 answer
176 views

Cardshifter chat lobby using vanilla JS

This is part 2 of my re-writing of a Angular client to vanilla JS. Part 1 is here: Cardshifter login page using vanilla JavaScript This animated GIF illustrates the basic functionality of the lobby. ...
Phrancis's user avatar
  • 20.4k
1 vote
0 answers
1k views

WebSocket example with akka-http

Akka-http supports WS connections like that: ...
Nikita's user avatar
  • 111
10 votes
1 answer
615 views

Cardshifter login page using vanilla JavaScript

I'm working on rewriting the Cardshifter HTML Client with vanilla JavaScript, the original HTML Client is written with Angular but I really wanted to stay away from anything npm and just go back to ...
Phrancis's user avatar
  • 20.4k
2 votes
0 answers
158 views

Update WebApp Time with GoRoutine + Websocket

I have created a Golang WebApp that shows the time. I am new to the Golang programming language so thought this little app would allow me to use golang as a webserver, learn about goroutines and ...
SJC's user avatar
  • 241
2 votes
1 answer
352 views

Handling several types of messages over a web socket connection

I have a UIViewController with a Socket Connection established once viewDidLoad. This web socket is a multi-directional ...
Ennabah's user avatar
  • 121
4 votes
2 answers
5k views

Python WebSocket Server + SQLite + Multiprocessing

I have been wanting to learn more about developing web applications using WebSockets so, with the help of various online tutorials, I built a little Python WebSocket server using Tornado and SQLite. ...
fire_water's user avatar
3 votes
0 answers
2k views

Using websocket to show progress for slow action with ASP.NET Core MVC

I have a process that takes a substantial amount of time (several minutes) and would like to trigger it from a web browser and give feedback to the user that it is working. I created some code that ...
webwake's user avatar
  • 211
3 votes
0 answers
1k views

Send Opencv::Mat image from Qt application to HTML client, using websocket

I wrote an application in C++ using Qt 5.7, basically is a websocket server, using qwebsocket for this, capable to send an image elaborated with OpenCV to an HTML client. In order to do this I encode ...
rok's user avatar
  • 141
3 votes
1 answer
1k views

WebSocket API that connects to ASP.NET Core Backend

I'm writing this API that connects to my ASP.NET Core Cloud App and listens for potential Database changes from my CMS. The code runs and works fine but I'm not sure if my code is considered "good" ...
iNCEPTiON_'s user avatar
1 vote
1 answer
89 views

Java websocket class

I'm developing an architecture with multiple users communicating with each other via server (Glassfish). Inspiration for this was: http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/...
miki's user avatar
  • 101
2 votes
1 answer
435 views

Golang WebSocket communication between server and app

I've written a simple application that captures frames from my webcam and streams the frames via a websocket. The stream implementation I've come up with feels weird. Networking is not my strong suit....
user3017869's user avatar
2 votes
0 answers
1k views

Online Snake v0.1 with Python-flask and socketio

What I am essentially doing is writing a snake game that everybody could play on the internet, broadcast their game if they like and so on. Now it looks like this, just websocket-based snake, no user ...
Montreal's user avatar
  • 245
7 votes
1 answer
352 views

Robust websocket server for use by a game running on node

This code is a server for websocket connections, it handles the low level stuff and delegates incoming messages to handler objects. I wanted performance to win in any trade off against maintenance ...
speciesUnknown's user avatar
7 votes
1 answer
770 views

Electron Application with JavaScript Backdoor and Ruby Command-Line Listener

I have created an Electron Application with a JavaScript/NodeJS Backdoor and a Ruby command-line listener. I created this program for remote administration of my home computer securely using a new ...
IMcPwn's user avatar
  • 233
1 vote
0 answers
105 views

Npm-module: socket-event

I've written a small npm module. It is my first module. I'm asking you to review several things: The code. I am rather starter, so any wise critic will be super. Any suggestions or ideas on the ...
Lazyexpert's user avatar
2 votes
1 answer
659 views

Pass canvas content from client to admin using web socket

The application's aim is to transfer drawings from the client canvas to the admin canvas using web sockets, as smoothly as possible. At every mousemove event, the client canvas is compressed to .png ...
Below the Radar's user avatar