Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我创建了一个本地 NanoHttpd 服务器,为其提供要服务的视频文件的路径。然后,启动另一个应用程序从流中播放。现在,因为我不希望该服务器永远运行。
我是 nanohttpd 的新手,http。欢迎任何获得最终结果的建议。
在 NanoHttpd 中为您自己的 TimeOut 设置 SOCKET_READ_TIMEOUT。默认为 5000。
也许我来晚了,但您也可以在启动 NanoHTTPD 服务器时设置 SOCKET_READ_TIMEOUT:
NanoHTTPD server = new NanoHTTPD(yourPort); server.start(readTimeout);