Jan Henning Thorsen > Mojo-TFTPd > Mojo::TFTPd::Connection

Download:
Mojo-TFTPd-0.03.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Mojo::TFTPd::Connection - A connection class for Mojo::TFTPd

SYNOPSIS ^

See Mojo::TFTPd

ATTRIBUTES ^

type

Type of connection rrq or wrq

blocksize

The negotiated blocksize. Default is 512 Byte.

error

Useful to check inside "finish" in Mojo::TFTPd events to see if anything has gone wrong. Holds a string describing the error.

file

The filename the client requested to read or write.

filehandle

This must be set inside the rrq or wrq event or the connection will be dropped.

filesize

This must be set inside the rrq to report tsize option if client requested

If set inside wrq limits maximum upload Set automatically on WRQ with tsize

Can be used inside finish for uploads to check if reported tsize and received data length match

timeout

How long a connection can stay idle before being dropped.

lastop

Last operation.

mode

Either "ascii", "octet" or empty string if unknown.

peerhost

The IP address of the remove client.

peername

Packet address of the remote client.

retries

Number of times "send_data" or "send_ack" can be retried before the connection is dropped. This value comes from "retries" in Mojo::TFTPd.

socket

The UDP handle to send data to.

rfc

Contains RFC 2347 options the client has provided. These options are stored in an hash ref.

METHODS ^

send_data

This method is called when the server sends DATA to the client.

receive_ack

This method is called when the client sends ACK to the server.

receive_data

This method is called when the client sends DATA to the server.

send_ack

This method is called when the server sends ACK to the client.

send_error

Used to report error to the client.

send_oack

Used to send RFC 2347 OACK to client Supported options are RFC 2348 blksize - report $self->blocksize RFC 2349 timeout - report $self->timeout RFC 2349 tsize - report $self->filesize if set inside the rrq

AUTHOR ^

Jan Henning Thorsen - jhthorsen@cpan.org

syntax highlighting: