The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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

SYNOPSIS

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.

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 0.13, built on July 21, 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