Sign in to follow this  
3DModelerMan

How to make cURL reconnect

Recommended Posts

Does anyone know how to do this? I'm using the library in C++ and I'm trying to get it to reconnect if the internet connection is lost. I've been testing by disabling the network adapter in windows, starting my game, trying to connect (and obviously failing) and then enabling the network adapter and trying to connect again. All of this while running the game the whole time. The problem is that cURL returns error code 60 when I try to run perform. Even though an internet connection is available now. I'm usig the "easy" set pf functions.

Share this post


Link to post
Share on other sites
If I remember right, once a connection is dead, you have to create a new one. So, try that. It's been a while since I used libcurl, so the details are fuzzy.
The HTTP protocol (version 1.1) allows a single TCP connection to be re-used for multiple HTTP requests, but once that TCP connection is dead, you cannot re-use it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this