|
NAMENet::Server::Coro - A co-operative multithreaded server using CoroSYNOPSISuse Coro; use base qw/Net::Server::Coro/; __PACKAGE__->new->run; sub process_request { ... cede; ... } DESCRIPTIONNet::Server::Coro implements multithreaded server for the Net::Server architecture, using Coro and Coro::Socket to make all reads and writes non-blocking. Additionally, it supports non-blocking SSL negotiation.METHODSMost methods are inherited from Net::Server -- see it for further usage details.newCreate new Net::Server::Coro object. It accepts these parameters (in addition to Net::Server parameters):
proto_object HOST, PORT, PROTOWraps socket creation, turning all socket types into Net::Server::Proto::Coro objects.loopThe main loop uses starts a number of Coro coroutines:
server_cert [PATH]Gets or sets the path of the SSL certificate used by the server.server_key [PATH]Gets or sets the path of the SSL key file used by the server.DEPENDENCIESCoro, AnyEvent, Net::ServerBUGS AND LIMITATIONSThe client filehandle, socket, and peer information all use Coro::Specific in order to constrain their information to their coroutine. Attempting to access them from a different coroutine will yield possibly unexpected results.Generally, all those of Coro. Please report any bugs or feature requests specific to Net::Server::Coro to "bug-net-server-coro@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. AUTHORSAlex Vandiver "<alexmv@bestpractical.com>"; code originally from Audrey Tang "<cpan@audreyt.org>"COPYRIGHTCopyright 2006 by Audrey Tang <cpan@audreyt.org>Copyright 2007-2008 by Best Practical Solutions This software is released under the MIT license cited below. The "MIT" LicensePermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Visit the GSP FreeBSD Man Page Interface. |