Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scripting 在VLCLUA接口脚本中,如何调用httpd服务?_Scripting_Lua_Vlc - Fatal编程技术网

Scripting 在VLCLUA接口脚本中,如何调用httpd服务?

Scripting 在VLCLUA接口脚本中,如何调用httpd服务?,scripting,lua,vlc,Scripting,Lua,Vlc,我终于设法弄明白了如何调用VLC可执行文件,以便它尝试运行一个接口,当调试消息包含在脚本本身中时,它们会显示在输出中 但是,当我使用以下代码时: require "common" function test_f() return 'this is a test' end h = vlc.httpd("localhost", 8090) a = h:handler("/test",nil,nil,test_f,nil) VLC爆炸了。它不会在该端口或我能确定的任何其他端口上启动htt

我终于设法弄明白了如何调用VLC可执行文件,以便它尝试运行一个接口,当调试消息包含在脚本本身中时,它们会显示在输出中

但是,当我使用以下代码时:

require "common"

function test_f()
    return 'this is a test'
end

h = vlc.httpd("localhost", 8090)
a = h:handler("/test",nil,nil,test_f,nil)
VLC爆炸了。它不会在该端口或我能确定的任何其他端口上启动httpd。它声称权限被拒绝,并且在高于1024的端口上执行此操作,并且无法打开套接字。我希望有人能告诉我如何正确使用API的这一部分,如果我能弄明白的话,我将做一个rest服务接口