http: detect connect failure
[project/uclient.git] / uclient-backend.h
index fb1a788e205e3405f8e49c466fc4a042f1a01772..84d7b87243e050dcc32343ea9001bfd8df474c95 100644 (file)
@@ -25,24 +25,15 @@ struct uclient_backend {
 
        struct uclient *(*alloc)(void);
        void (*free)(struct uclient *cl);
+       void (*update_proxy_url)(struct uclient *cl);
        void (*update_url)(struct uclient *cl);
 
        int (*connect)(struct uclient *cl);
        int (*request)(struct uclient *cl);
+       void (*disconnect)(struct uclient *cl);
 
        int (*read)(struct uclient *cl, char *buf, unsigned int len);
-       int (*write)(struct uclient *cl, char *buf, unsigned int len);
-};
-
-struct uclient_url {
-       const struct uclient_backend *backend;
-       int prefix;
-
-       const char *host;
-       const char *port;
-       const char *location;
-
-       const char *auth;
+       int (*write)(struct uclient *cl, const char *buf, unsigned int len);
 };
 
 void uclient_backend_set_error(struct uclient *cl, int code);