C HTTP流服务器以流式传输音频分贝级别

时间:2021-10-01 18:59:56

Hi I have written a decibel level meter in C which reads Linux alsa constantly and output decibel levels numbers in STDOUT.

嗨我在C中写了一个分贝电平表,它不断读取Linux alsa并在STDOUT中输出分贝电平数。

Now I would like to view via HTTP and streaming live data to clients, with proper js+html decoration, it behaves as a noise meter, with graph and needles.

现在我想通过HTTP查看并将实时数据流式传输到客户端,通过正确的js + html修饰,它表现为噪声计,带有图形和针。

Therefore I would like to know if some one can point me direction integrate them into a HTTP streaming server able to server multiple clients in real time.

因此,我想知道是否有人可以指示我将它们集成到能够实时为多个客户端服务的HTTP流服务器中。

1 个解决方案

#1


1  

You can use several C libraries. Some C libraries provide HTTP server abilities, e.g. libonion or libmicrohttpd. Other libraries provide HTTP client abilities, e.g. libcurl

您可以使用多个C库。一些C库提供HTTP服务器能力,例如, libonion或libmicrohttpd。其他库提供HTTP客户端功能,例如的libcurl

All are using some event loop, e.g. libev, libevent or at least some multiplexing syscall like poll(2)

所有人都在使用一些事件循环,例如libev,libevent或至少一些多路复用系统调用如poll(2)

You could also make your application a FASTCGI app.

您还可以将您的应用程序设为FASTCGI应用程序。

Reading Advanced Linux Programming should help.

阅读高级Linux编程应该有所帮助。

#1


1  

You can use several C libraries. Some C libraries provide HTTP server abilities, e.g. libonion or libmicrohttpd. Other libraries provide HTTP client abilities, e.g. libcurl

您可以使用多个C库。一些C库提供HTTP服务器能力,例如, libonion或libmicrohttpd。其他库提供HTTP客户端功能,例如的libcurl

All are using some event loop, e.g. libev, libevent or at least some multiplexing syscall like poll(2)

所有人都在使用一些事件循环,例如libev,libevent或至少一些多路复用系统调用如poll(2)

You could also make your application a FASTCGI app.

您还可以将您的应用程序设为FASTCGI应用程序。

Reading Advanced Linux Programming should help.

阅读高级Linux编程应该有所帮助。