The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MooX::Async::Console::TCPClient - TCP client interaction for MooX::Async::Console

SYNOPSIS

See MooX::Async::Console

DESCRIPTION

A IO::Async::Stream subclass which waits for a complete line of text and invokes "on_line".

BUGS

Certainly.

ATTRIBUTES

id

A string composed from "address" and "port" which identifies this client.

address

The IP address this client connected from.

port

The TCP port this client connected from.

METHODS

flush

Flush the client's write buffer.

say

Write the arguments to the stream with \n appended.

EVENTS

on_close

Invoked when the client has closed the connection.

on_line

Invoked when the client has a complete line of text which is not just whitespace.

on_error

Implemented by this module to close the connection and invoke on_close when there's an error.

on_read

Implemented by this module to detect a complete line in the read buffer and invoke on_line.

on_read_eof

Implemented by this module to invoke on_close when the client disconnects.

SEE ALSO

MooX::Async::Console

MooX::Async::Console::TCP

AUTHOR

Matthew King <chohag@jtan.com>