简体   繁体   English

pion网络库:测试示例Web服务

[英]pion network library: testing sample webservices

I am using the Pion Network Library to try to build some lighteight C++ HTTP web services. 我正在使用Pion网络库来尝试构建一些轻量级的C ++ HTTP Web服务。

I have succesfully built the sources, and I now want to test the sample web services that come bundled with the library. 我已经成功地构建了源代码,现在我想测试与该库捆绑在一起的示例Web服务。

I am running the PionWebServer executable, passing it the correct arguments to run the EchoService by running: 我正在运行PionWebServer可执行文件,并通过运行以下命令向其传递正确的参数以运行EchoService:

./PionWebServer WEBSERVICE EchoService

I then navigate to: 然后,我导航到:

http://localhost:8080 http://本地主机:8080

and I get an 404 resource not found error. 我得到404资源未找到错误。 Has anyone managed to get any of the web service examples working with Pion Network?. 是否有人设法与Pion Network一起使用任何Web服务示例? What am I doing wrong? 我究竟做错了什么?

Try 尝试

./PionWebServer /echo EchoService ./PionWebServer / echo EchoService

Then access to http://localhost:8080/echo/foo/bar?query=baz should work. 然后可以访问http:// localhost:8080 / echo / foo / bar?query = baz

I' am using pion 4.0.5. 我正在使用pion 4.0.5。

Use 采用

./PionWebServer -d {defaultPionInstallDir}/pion/share/pion/plugins echo EchoService

-d: dir where your compiled service is located (NEEDED) -d:已编译服务所在的目录(需要)

First time I did this I had only statically compiled libs (.a). 第一次执行此操作时,我只有静态编译的库(.a)。 But PionWebServer was looking for dynamic libs. 但是PionWebServer一直在寻找动态库。 So I recompiled the pion-project with dynamic libs. 所以我用动态库重新编译了pion项目。

EchoService will be available at EchoService将在以下位置提供

\\\host-ip:8080/echo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM