How do i make a multi-threaded server in perl?
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.
精彩评论