开发者

How do i make a multi-threaded server in perl?

开发者 https://www.devze.com 2022-12-30 00:31 出处:网络
I have looked online at making a multi-threaded server in perl, but i cannot find any good ones that clearly explain how to cr开发者_Python百科eate one. I have created a server and client in perl but

I have looked online at making a multi-threaded server in perl, but i cannot find any good ones that clearly explain how to cr开发者_Python百科eate one. I have created a server and client in perl but i do not seem to be able to make it multi-threaded. Can someone help me?


Assuming you are using the Net::Server CPAN module (rather than rolling your own), you could make use of Net::Server::Coro to build a multi-threded server. Note that Net::Server can handle (pre)forking (i.e. multi-processes) servers and these may be easer to use.


I think POE might be what you're looking for. See the POE Cookbook for examples.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号