CIRCDCCFileTransfer Prototype
Syntax
var object = new CIRCDCCFileTransfer(parent, user, port, file, size);
Arguments
Argument | Summary |
---|---|
parent | |
user | |
port | |
file | |
size |
Remarks
Members
Member | Summary |
---|---|
_getParams | |
abort | Aborts the connection. |
accept | Call to make this end accept DCC File from target user. |
decline | Call to make this end decline DCC File from target user. |
disconnect | Call to close the connection. |
dispatch | |
display | |
displayHere | |
dispose | |
feedback | |
getFontCSS | |
getLCFunction | |
getURL | |
isActive | |
onAbort | |
onConnect | |
onDataAvailable | |
onDisconnect | |
onFail | |
onFindEnd | |
onGotRequest | CIRCUser points the event here. |
onInit | |
onPoll | |
onProgress | |
onSocketAccepted | CBSConnection points the event here. |
onStreamClose | |
onStreamDataAvailable | |
performTabMatch | |
request | Call to make this end offer DCC File to targeted user. |
sendData |
See Also
Source Code
function CIRCDCCFileTransfer(parent, user, port, file, size)
{
// user == CIRCDCCUser object.
// port == port as specified in CTCP DCC message.
// file == name of file being sent/got.
// size == size of said file.
this.READ_TIMEOUT = 50;
// Link up all our data.
this.parent = parent;
this.id = parent.getNextID();
this.eventPump = parent.parent.eventPump;
this.user = user;
this.localIP = this.parent.localIP;
this.remoteIP = user.remoteIP;
this.port = port;
this.filename = file;
this.size = size;
this.unicodeName = user.unicodeName;
this.viewName = "File: " + this.filename;
// Set up the initial state.
this.state = DCC_STATE_INIT;
this.dir = DCC_DIR_UNKNOWN;
this.requested = null;
this.connection = null;
this.state = new CIRCDCCState(parent, this, "dcc-file");
this.parent.files.push(this);
// Give ourselves a "me" object for the purposes of displaying stuff.
this.me = this.parent.addUser(this.user.netUser.parent.me, "0.0.0.0");
if ("onInit" in this)
this.onInit();
return this;
}