++ed by:
TSIBLEY

1 PAUSE user

Вячеслав Тихановский
and 2 contributors

NAME

Plack::App::EventSource::Connection - Connection object

SYNOPSIS

Used internally by Plack::App::EventSource.

DESCRIPTION

This is a connection object that you get in handler_cb callback.

METHODS

new

Creates new object.

close

Closes connection.

push

Pushes data to the client. Accepts an array of messages, which themselves can be strings or hash references.

    $conn->push('message');
    $conn->push('multi', 'line', 'message');
    $conn->push({id => 1, data => 'message with id'});

possible hash fields are event, id, data, and retry.

AUTHOR

Viacheslav Tykhanovskyi, <viacheslav.t@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2015-, Viacheslav Tykhanovskyi

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.