Category : websocket

Complete noob here learning c++ through an IoT project using Websocket. So far, somewhat successfully modified this example beast async_client_ssl to handshake with a server. My problem is ioc.run() runs out of work and exits after the initial callback. I was having the same issue as this post two years ago. Boost.best websocket ios.run() exits ..

Read more

I have a routine that tries to detect if a websocket error while reading is an UnexpectedCloseError. This is the code… having a variable: myWebsocket *websocket.Conn my method is: messageType, data, err := myWebsocket.ReadMessage() if err != nil { if websocket.IsUnexpectedCloseError(err) { log.Debugf("WebsocketReadDataMessage: unexpected close error: %v", err) } else { log.Warnf("EXTRANGE!!!!: WebsocketReadDataMessage: error: %v", ..

Read more

I have old code running in Solaris that I am porting to linux. I already changed the header file from <fstream.h> to the standard fstream. the class is: class UNITSocketStream : public fstream { public: UNITSocketStream( UNITSocket & ); UNISocketStream( int sfd ); virtual ~UNITSocketStream(); private: bool owned; UNITSocketStream(const UNITSocketStream &); UNITSocketStream & operator =( ..

Read more

I`m trying to connect to Kraken websocket API.But i got "The WebSocket handshake was declined by the remote peer" error. I`ve wrote a wrapper class for websocket and rest api client of exchanges.It works well with Binance websocket APIs,but Kraken websocket connection was unsuccessful. I have tried diffrent type of tls(ssl::context ctx_webSocket{ ssl::context::tlsv13_client };) verions ..

Read more