parent
4fc1826889
commit
89851e3f33
|
@ -98,7 +98,7 @@ int main(int argc, char **argv)
|
|||
goto done;
|
||||
#endif
|
||||
|
||||
uh_add_action(srv, "/hello", hello_action);
|
||||
srv->add_action(srv, "/hello", hello_action);
|
||||
|
||||
uloop_run();
|
||||
done:
|
||||
|
|
|
@ -99,7 +99,7 @@ int main(int argc, char **argv)
|
|||
goto done;
|
||||
#endif
|
||||
|
||||
uh_add_action(srv, "/hello", hello_action);
|
||||
srv->add_action(srv, "/hello", hello_action);
|
||||
|
||||
uloop_run();
|
||||
done:
|
||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char **argv)
|
|||
goto done;
|
||||
#endif
|
||||
|
||||
uh_add_action(srv, "/hello", hello_action);
|
||||
srv->add_action(srv, "/hello", hello_action);
|
||||
|
||||
uloop_run();
|
||||
done:
|
||||
|
|
|
@ -87,6 +87,7 @@ struct uh_server *uh_server_new(const char *host, const char *port)
|
|||
srv->free = uh_server_free;
|
||||
srv->set_docroot = uh_set_docroot;
|
||||
srv->set_index_file = uh_set_index_file;
|
||||
srv->add_action = uh_add_action;
|
||||
|
||||
#if (UHTTPD_SSL_SUPPORT)
|
||||
srv->ssl_init = uh_ssl_init;
|
||||
|
|
|
@ -34,6 +34,7 @@ struct uh_server {
|
|||
void (*set_docroot)(struct uh_server *srv, const char *docroot);
|
||||
void (*set_index_file)(struct uh_server *srv, const char *index_file);
|
||||
void (*error404_cb)(struct uh_client *cl);
|
||||
int (*add_action)(struct uh_server *srv, const char *path, action_cb_t cb);
|
||||
|
||||
#if (UHTTPD_SSL_SUPPORT)
|
||||
int (*ssl_init)(struct uh_server *srv, const char *key, const char *crt);
|
||||
|
|
Loading…
Reference in New Issue