Skip to main content
8 votes

A remote trading bot that runs on the CLI - first C++ project

The API class: There are two things I would change here. 1: Use the command pattern. 2: Don't pass strings around as actions. The Command pattern This is basically where you set up a container with a ...
Loki Astari's user avatar
  • 96.6k
7 votes

A remote trading bot that runs on the CLI - first C++ project

Looking at the "Password" class. You are using the singleton pattern. But not well. This: ...
Loki Astari's user avatar
  • 96.6k
6 votes
Accepted

Cardshifter chat lobby using vanilla JS

Quick skimming let addChatMessage; Why is this outside your lobbyController? ...
Vogel612's user avatar
  • 25.3k
6 votes
Accepted

Cardshifter login page using vanilla JavaScript

Very neat project! I really like that you are avoiding using a library, it's a great way to get better at JS. I see the if (DEBUG) { logDebugMessage() } pattern ...
Gerrit0's user avatar
  • 3,481
6 votes
Accepted

Node websockets

In node, throwing an error without catching it will kill the process. This seems to be the primary error handling mode (and based on this it seems you then rely on pm2 to restart the process). This ...
George's user avatar
  • 311
5 votes

A remote trading bot that runs on the CLI - first C++ project

Looking the namespace Utils. Code Review ...
Loki Astari's user avatar
  • 96.6k
4 votes

API Generator for Python

working on my titulation project Mi lengua materna es el ingles, but I'm afraid I don't know what the verb "to titulate" is all about. Nonetheless, I welcome you with open arms to our ...
J_H's user avatar
  • 34.8k
4 votes
Accepted

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

I find it unlikely this program works as expected. You have written approximately: Open a database connection, & assign that to client Get ...
AJNeufeld's user avatar
  • 34k
4 votes

Monitor activity on a network

using namespace std; Standard advice is to avoid depriving yourself of the benefits of the std namespace like this. Prefer to ...
Toby Speight's user avatar
  • 81.7k
3 votes

Handling more websocket connections

This is the same approach you used, just rewritten as a oop approach per pacmaninbw with a class socketConn inheriting from ...
Coupcoup's user avatar
  • 1,056
3 votes
Accepted

Handling more websocket connections

Welcome to code review community. Few initial thoughts, when writing python code; following PEP-8 style guide makes your code more maintainable. Which would amount to (but not limited to): Functions ...
hjpotter92's user avatar
  • 8,791
3 votes
Accepted

Python WebSocket Server + SQLite + Multiprocessing

Imports os is unused, you may want to remove it. ntpath is the specific implementation​ of ...
301_Moved_Permanently's user avatar
3 votes

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

First of all, kudos to using cargo fmt. It makes for an easy read. Use clippy If you're not doing it yet, I suggest you use ...
Richard Neumann's user avatar
3 votes
Accepted

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

The protocol is already much better than the previous version where the server knew about all the keys. However, there are some weird things happening: both a private key and a password is used; this ...
Maarten Bodewes's user avatar
2 votes
Accepted

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

as I may be biased by the specific use-cases I was dealing with, so a broader perspective ... This is a wonderful remark, thank you for sharing. There's always more for each of us to see. magic ...
J_H's user avatar
  • 34.8k
2 votes
Accepted

Encryption implementation for websocket chat (RSA + AES)

Is this a good implementation for encryption in a chat? No. I'd argue that most chat implementations are not dependent on the server to decrypt / reencrypt the information (this is called a proxy in ...
Maarten Bodewes's user avatar
2 votes
Accepted

Golang WebSocket communication between server and app

You've reviewed your own code, and done a good job, actually: ...
rolfl's user avatar
  • 97.5k
2 votes

Electron Application with JavaScript Backdoor and Ruby Command-Line Listener

Bearing in mind that this comes a couple years late and you (the OP) haven't logged in since 9/ 2016, it might not be seen for some time. Also, I don't really have much ruby experience so I will ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes

Websockets client code and making it production-ready

The wrapper sends and receives exactly one message before closing the connection. If you're just doing that, you can simply use HTTP. WebSockets is useful when there is a sequences of reads and/or ...
Edward Brey's user avatar
2 votes

Updating state with React and Websockets

This seems reasonable. The most important part is that you do not mutate the react state in-place. By doing let currentUser = [...users]; you copy the state and ...
Matt's user avatar
  • 311
2 votes
Accepted

General web socket client with auto reconnect capabilities

Here are my observations DeribitClient SubscribeToDeribitPriceIndexAsync The re-creation of the ...
Peter Csala's user avatar
  • 9,789
1 vote

Simple websocket chat app, security and efficiency concerns

There is no direct input into that line, but can't they just open console and go execute that function themselves? Yes, but if I was a malicious actor, I would just take your websocket url and build ...
kockburn's user avatar
  • 1,356
1 vote

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

I'm not familiar with how websocket works, but from your code I think I can infer it. So here a few comments: It seems your subscribers list depends on currently ...
Miguel Alorda's user avatar
1 vote
Accepted

Private desktop and mobile WebSocket connections with Node.js

The code you made is looking pretty good. I'm no expert in the particular tools you're using, but I'll still give my two cents about the parts I understand more. Let's start with your upgrade listener....
Scotty Jamison's user avatar
1 vote

Node.js ws server: global or local functions?

"Before going too far" - is the tip of the iceberg as I see it :) If it's just a simple lab, nothing fancy, tutorial for the sake of testing some functionality and everything should remain small and ...
Adi Cohen's user avatar
1 vote
Accepted

Spring Boot Websocket STOMP Crud

@Autowired is not required on constructor in Spring over 4.3 (class has to be annotated as bean and have only one constructor). Inject ...
Krzysztof Majewski's user avatar
1 vote

Handling several types of messages over a web socket connection

Any part of the code that understand how the data is fetched or how the data is structured is considered Model You could make a WebSocketController that accepts a <...
Lucas van Dongen's user avatar
1 vote
Accepted

WebSocket API that connects to ASP.NET Core Backend

Class You have to implement IDisposable (assuming _webSocket type is derived from WebSocket ...
Adriano Repetti's user avatar
1 vote
Accepted

Java websocket class

A few ideas: First of all, I think splitting your class into several classes is a good idea. As I admittedly do not fully grasp the business logic, this is more or less up to you, but basically have ...
mtj's user avatar
  • 4,862

Only top scored, non community-wiki answers of a minimum length are eligible