Posts

Showing posts with the label websocket

Socket.io and Express not sending data

Socket.io and Express not sending data I'm trying to use socket.io to connect to this websocket api: https://www.cryptocompare.com/api/#-api-web-socket- (wss://streamer.cryptocompare.com) I guess im not really understanding socket.io very much. I created a blank html document: <!doctype html> <html lang="en"> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.1/socket.io.slim.js"></script> </head> <body> <div id="data-show"> </div> <button id="connect-sock">Connect</button> <button id="disconnect-sock">DISConnect</button> </body> <script src="index.js"></script> </html> index.js: var socket = io('wss://streamer.cryptocompare.com') console.log('connected') var btn = document.g...

Qt application running with `-platform offscreen` argument cannot establish websocket connection

Qt application running with `-platform offscreen` argument cannot establish websocket connection I have a GUI application which contains a websocket server QWebSocketServer . I also have a python script which sends messages and the application processes them. Everything works well. During testing I wanted to run the application in headless mode using -platform offscreen command line argument added to the app executable name (I changed nothing else). But the problem is that when the application runs off-screen, the client script cannot establish connection with the web socket server. I tested this on localhost only. I do not understand how this two things, visibility of GUI and websockets, can interfere. Any ideas what could go wrong? QWebSocketServer -platform offscreen Note: I am using Qt 5.11.1 64-bit with VS 2017 on Windows 10 Pro. I further exploring the issue. I tried the same with another application and it seems to work well even for -platform offscr...