- SEE ALSO
Mojo::Transaction - Transaction Base Class
use base 'Mojo::Transaction';
Mojo::Transaction is an abstract base class for transactions.
my $connection = $tx->connection; $tx = $tx->connection($connection);
Connection identifier or socket.
my $keep_alive = $tx->keep_alive; $tx = $tx->keep_alive(1);
Connection can be kept alive.
my $kept_alive = $tx->kept_alive; $tx = $tx->kept_alive(1);
Connection has been kept alive.
my $local_address = $tx->local_address; $tx = $tx->local_address($address);
Local interface address.
my $local_port = $tx->local_port; $tx = $tx->local_port($port);
Local interface port.
my $remote_address = $tx->remote_address; $tx = $tx->remote_address($address);
Remote interface address.
my $remote_port = $tx->remote_port; $tx = $tx->remote_port($port);
Remote interface port.
$tx = $tx->client_read($chunk);
Read and process client data.
my $chunk = $tx->client_write;
Write client data.
my $paused = $tx->is_paused;
Check if transaction is paused.
my $is_websocket = $tx->is_websocket;
Check if transaction is a WebSocket.
my $writing = $tx->is_writing;
Check if transaction is writing.
$tx = $tx->pause;
Pause transaction, it can still read but writing is disabled while paused.
my $req = $tx->req;
my $res = $tx->res;
$tx = $tx->resume;
$tx = $tx->server_read($chunk);
Read and process server data.
my $chunk = $tx->server_write;
Write server data.