NAME
IOMux::Service::TCP - TCP (socket) based service
INHERITANCE
IOMux::Service::TCP
is a IOMux::Handler::Service
is a IOMux::Handler
IOMux::Service::TCP is extended by
IOMux::HTTP::Gateway
IOMux::HTTP::Server
SYNOPSIS
my $service = IOMux::Service::TCP->new
( # capitalized are passed to the socket constructor
Host => 'localhost:8080'
, Listen => 3
# object to initialize when new connection arrives
, conn_type => $conn_handler_class # extends IOMux::Net::TCP
, conn_opts => \@conn_handler_init_params
);
DESCRIPTION
Accept TCP connections. When a connection arrives, it will get handled by a new object which gets added to the multiplexer as well.
Extends "DESCRIPTION" in IOMux::Handler::Service.
METHODS
Extends "METHODS" in IOMux::Handler::Service.
Constructors
Extends "Constructors" in IOMux::Handler::Service.
- IOMux::Service::TCP->new(%options)
-
-Option --Defined in --Default conn_opts [] conn_type <required> fh IOMux::Handler <required> name IOMux::Handler 'listen tcp $host:$port'
- conn_opts => ARRAY
-
Pass some extra options when objects of
conn_type
are created, passed as list of pairs. - conn_type => CLASS|CODE
-
The CLASS (package name) of client to be created for each new contact. This CLASS must extend IOMux::Net::TCP. You may also provide a CODE reference which will be called with the socket leading to the client.
- fh => FILEHANDLE
- name => STRING
- IOMux::Service::TCP->open($mode, $what, %options)
-
Inherited, see "Constructors" in IOMux::Handler
Accessors
Extends "Accessors" in IOMux::Handler::Service.
- $obj->clientType()
- $obj->fh()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->fileno()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->mux()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->name()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->socket()
- $obj->usesSSL()
-
Inherited, see "Accessors" in IOMux::Handler
User interface
Extends "User interface" in IOMux::Handler::Service.
Multiplexer
Extends "Multiplexer" in IOMux::Handler::Service.
Helpers
Extends "Helpers" in IOMux::Handler::Service.
- $obj->extractSocket(HASH)
- IOMux::Service::TCP->extractSocket(HASH)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->fdset($state, $read, $write, $error)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->show()
-
Inherited, see "Helpers" in IOMux::Handler
SEE ALSO
This module is part of IOMux distribution version 1.00, built on November 11, 2015. Website: http://perl.overmeer.net/ All modules in this suite: "Any::Daemon", "IOMux", and "IOMux::HTTP".
Please post questions or ideas to perl@overmeer.net
LICENSE
Copyrights 2011-2015 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html