Mojo::TFTPd::Connection - A connection class for Mojo::TFTPd
Type of connection rrq or wrq
The negotiated blocksize. Default is 512 Byte.
Useful to check inside "finish" in Mojo::TFTPd events to see if anything has gone wrong. Holds a string describing the error.
The filename the client requested to read or write.
This must be set inside the rrq to report "tsize" option if client requested.
If set inside wrq limits maximum upload size. Set automatically on WRQ with "tsize" option.
Can be used inside finish for uploads to check if reported "tsize" and received data length match.
Either "netascii", "octet" or empty string if unknown.
The IP address of the remote client.
Packet address of the remote client.
Number of times last operation ("send_data", "send_ack" or "send_oack") to be retransmitted on timeout before the connection is dropped. This value comes from "retransmit" in Mojo::TFTPd or set inside rrq or wrq events.
Retransmits are disabled if set to 0.
The UDP handle to send data to.
Contains RFC 2347 options the client has provided. These options are stored in an hash ref.
This method is called when the server sends DATA to the client.
This method is called when the client sends ACK to the server.
This method is called when the client sends DATA to the server.
This method is called when the server sends ACK to the client.
This method is called when the client sends ERROR to the server.
Used to report error to the client.
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
Used to retransmit last packet to the client.
Jan Henning Thorsen -