IRCDCCTransfer
Inherits: RefCounted < Object
Represents an active or pending Direct Client-to-Client file transfer.
Description
Handles the status, metrics, tracking, and port mapping logic required to initiate or receive an outgoing DCC SEND block over the networking protocol layer safely utilizing asynchronous connections.
Tutorials
Properties
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods
accept() |
|
cancel() |
|
get_error_message() const |
|
get_progress() const |
|
get_resume_position() const |
|
reject() |
|
void |
set_resume_position(position: int) |
Enumerations
enum Type: 🔗
Type TYPE_FILE_SEND = 0
Represents an outgoing file transfer (sending a file to a remote user).
Type TYPE_FILE_RECEIVE = 1
Represents an incoming file transfer (receiving a file from a remote user).
Type TYPE_CHAT = 2
Represents a DCC chat session (direct peer-to-peer messaging).
enum Status: 🔗
Status DCC_STATUS_PENDING = 0
The transfer has been created but not yet started.
Status DCC_STATUS_CONNECTING = 1
The transfer is attempting to establish a connection.
Status DCC_STATUS_TRANSFERRING = 2
The transfer is actively sending or receiving data.
Status DCC_STATUS_COMPLETED = 3
The transfer completed successfully.
Status DCC_STATUS_FAILED = 4
The transfer encountered an error and failed.
Status DCC_STATUS_CANCELLED = 5
The transfer was cancelled before completion.
Property Descriptions
Remote IP address used for the DCC connection.
Total size of the file being transferred in bytes.
Name of the file being sent or received.
Local filesystem path where the file will be saved or read from.
Port used for the DCC connection.
Nickname of the remote IRC user involved in the transfer.
Current status of the transfer.
int get_transferred()
Number of bytes transferred so far.
Type of DCC transfer.
Whether to use IPv6 for the connection.
Method Descriptions
Confirms an inbound request connection asynchronously by initializing an available receiver socket and commencing the binary byte stream buffer processing immediately.
Aborts an active byte transmission connection natively, closing underlying stream peers and socket structures to prevent further buffer leaking.
String get_error_message() const 🔗
Returns the error message.
Returns the calculated progression of the byte payload transition over the active stream, expressed as a generalized percentage.
int get_resume_position() const 🔗
Returns the resume position.
Returns reject.
void set_resume_position(position: int) 🔗
Sets the resume position. position - Position.