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::Server
DESCRIPTION
Accept TCP connections. When a connection arrives, it will get handled by a new object which gets added to the multiplexer as well.
METHODS
Constructors
- 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. - 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) See "Constructors" in IOMux::Handler
Accessors
- $obj->clientType
- $obj->fh See "Accessors" in IOMux::Handler
- $obj->fileno See "Accessors" in IOMux::Handler
- $obj->mux See "Accessors" in IOMux::Handler
- $obj->name See "Accessors" in IOMux::Handler
- $obj->socket
- $obj->usesSSL See "Accessors" in IOMux::Handler
User interface
Connection
- $obj->close([CALLBACK]) See "Connection" in IOMux::Handler
- $obj->timeout([TIMEOUT]) See "Connection" in IOMux::Handler
Multiplexer
Connection
- $obj->mux_init(MUX, [HANDLER]) See "Connection" in IOMux::Handler
- $obj->mux_remove See "Connection" in IOMux::Handler
- $obj->mux_timeout See "Connection" in IOMux::Handler
Reading
- $obj->mux_except_flagged(FILENO) See "Reading" in IOMux::Handler
- $obj->mux_read_flagged(FILENO) See "Reading" in IOMux::Handler
Writing
- $obj->mux_write_flagged(FILENO) See "Writing" in IOMux::Handler
Service
- $obj->mux_connection(CLIENT) See "Service" in IOMux::Handler::Service
Helpers
- $obj->extractSocket(HASH)
- IOMux::Service::TCP->extractSocket(HASH) See "Helpers" in IOMux::Handler
- $obj->fdset(STATE, READ, WRITE, ERROR) See "Helpers" in IOMux::Handler
- $obj->show See "Helpers" in IOMux::Handler
SEE ALSO
This module is part of IOMux distribution version 0.12, built on January 27, 2011. 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 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