1 #ifndef __UCLIENT_INTERNAL_H
2 #define __UCLIENT_INTERNAL_H
6 struct uclient_backend {
7 const char * const * prefix;
9 struct uclient *(*alloc)(void);
10 void (*free)(struct uclient *cl);
12 int (*connect)(struct uclient *cl);
13 int (*request)(struct uclient *cl);
15 int (*read)(struct uclient *cl, char *buf, unsigned int len);
16 int (*write)(struct uclient *cl, char *buf, unsigned int len);
20 const struct uclient_backend *backend;
30 extern const struct uclient_backend uclient_backend_http;
31 void uclient_backend_set_eof(struct uclient *cl);
32 void uclient_backend_reset_state(struct uclient *cl);