Comments (6)
Thanks for raising this issue. I'm looking into it.
from launch-dashboard-api.
I'm having difficulties finding the bug. I'm pretty sure I'm not creating two instances as you can see in the code: https://github.com/shahar603/Launch-Dashboard-API/blob/master/src/app.js#L158 .
I'm really not sure what the problem is. Do you have any idea how to try and debug this? @Tearth
from launch-dashboard-api.
I will try to take a look at this and let you know if I find something
from launch-dashboard-api.
Ok, so I've done a small investigation and it looks like I finally know where is the problem. socket.io doesn't use "pure" WebSocket protocol - which implicates that typical WebSocket client in C# or any other language is not compatible with the server and won't communicate properly. I didn't know about this fact earlier (as I said, I don't know npm environment well) but this explain why your example Node.js client (using socket.io-client) works well. Sadly it looks like there is not too many libraries for C# which would support socket.io server, but it's something I will check more later.
To confirm this, I've run some example code using "pure" WebSocket server - and as expected, C# client started working without any troubles.
const WebSocket = require('ws');
const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', function connection(ws) {
ws.on('message', function incoming(message) {
console.log('received: %s', message);
});
ws.send('something');
});
So summarizing, it's not something you can actually repair (maybe except writing explicitly in wiki that pure WebSocket clients may not work). I will try to look at more ways to support socket.io in C#, or consider writing my own library.
from launch-dashboard-api.
On the other side, I found that connecting to the wss://api.launchdashboard.space/socket.io/?EIO=3&transport=websocket
and sending 42/join,["raw","analysed"]
ends with success using standard WebSocket client. I will test it during the upcoming launch.
from launch-dashboard-api.
Nice job! I'll update the documentation to match your finding. I might update the code in the future to comply with "pure" websockets.
from launch-dashboard-api.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from launch-dashboard-api.