[vlc-devel] [PATCH 1/2] httpd: add httpd_ClientSetTimeout
Thomas Guillem
thomas at gllm.fr
Tue Oct 27 17:27:59 CET 2020
---
include/vlc_httpd.h | 2 ++
src/libvlccore.sym | 1 +
src/network/httpd.c | 4 ++++
3 files changed, 7 insertions(+)
diff --git a/include/vlc_httpd.h b/include/vlc_httpd.h
index 0b8f8c26bd9..e106d73f894 100644
--- a/include/vlc_httpd.h
+++ b/include/vlc_httpd.h
@@ -69,6 +69,8 @@ VLC_API httpd_host_t *vlc_https_HostNew( vlc_object_t * ) VLC_USED;
VLC_API httpd_host_t *vlc_rtsp_HostNew( vlc_object_t * ) VLC_USED;
/* delete a host */
VLC_API void httpd_HostDelete( httpd_host_t * );
+/* Can only be called from httpd callbacks */
+VLC_API void httpd_ClientSetTimeout(httpd_client_t *cl, vlc_tick_t timeout);
typedef struct
{
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index c4d5273dbd5..1bdb11c6d98 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -164,6 +164,7 @@ httpd_StreamSetHTTPHeaders
httpd_UrlCatch
httpd_UrlDelete
httpd_UrlNew
+httpd_ClientSetTimeout
image_Ext2Fourcc
image_HandlerCreate
image_HandlerDelete
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 52c8e5bdf3e..ec079847c9d 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -166,6 +166,10 @@ struct httpd_client_t
httpd_message_t answer; /* httpd -> client */
};
+void httpd_ClientSetTimeout(httpd_client_t *cl, vlc_tick_t timeout)
+{
+ cl->i_activity_timeout = timeout;
+}
/*****************************************************************************
* Various functions
--
2.28.0
More information about the vlc-devel
mailing list