0

I'm trying to connect an websocket server with CPPRest SDK. But as per their documentation there is no timeout in websocket_client_config compared to http_client_config.

So how do I correctly specify the timeout so that the connect pplx::task will exit after the mentioned timeout?

1 Answer 1

1

You can't. Actually CPPRest SDK seems to be abandoned. The websocket part was changed last time 3 years ago. Don't use in new projects. Consider using Boost.Beast or WebSocket++ by Zaphoyd.

Sign up to request clarification or add additional context in comments.

2 Comments

But can I cancel it after some timeout since the websocket connect is a pplx::task?
Only tasks which were created with cancellation token can be cancelled. That is no your case as you can see in sources here: github.com/microsoft/cpprestsdk/blob/… So the answer is no. P.S.: Actually as I can see Microsoft just took Zaphoyd websocket++ implementation and made just are pretty bad wrapper around it. LOL.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.