NAME

Ion::Server - An Ion TCP service

VERSION

version 0.08

METHODS

start

Starts the listening socket. Optionally accepts a port number and host interface on which to listen. If left unspecified, these will be assigned by the operating system.

stop

Stops the listener and shuts down the incoming connection queue.

join

Cedes control until "stop" is called.

port

Returns the listening port of a started service.

host

Returns the host interface of a started service.

accept

Returns the next incoming connection. This method will block until a new connection is received.

encodes

Adds a subroutine to process outgoing messages to clients of this server. Encoder subs are applied in the order in which they are added.

decodes

Adds a subroutine to decode incoming messages from clients of this server. Decoder subs are applied in the order in which they are added.

OVERLOADED OPERATORS

<>

Calls "accept".

>>, >>=

Calls encodes.

<<, <<=

Calls decodes.

AUTHOR

Jeff Ober <sysread@fastmail.fm>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Jeff Ober.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.