CIRCDCCFileTransfer.accept Member

Call to make this end accept DCC File from target user.

Syntax

object.accept(localFile);

Arguments

ArgumentSummary
localFile

Returns

Remarks

See Also

Source Code

function dfile_accept(localFile)
{
const nsIBinaryOutputStream = Components.interfaces.nsIBinaryOutputStream;
this.state.sendAccept();
this.localFile = new LocalFile(localFile, ">");
this.localPath = localFile.path;
this.filestream = Components.classes["@mozilla.org/binaryoutputstream;1"];
this.filestream = this.filestream.createInstance(nsIBinaryOutputStream);
this.filestream.setOutputStream(this.localFile.outputStream);
this.connection = new CBSConnection(true);
this.position = 0;
if (this.connection.connect(this.remoteIP, this.port))
{
this.state.socketConnected();
if (jsenv.HAS_NSPR_EVENTQ)
this.connection.startAsyncRead(this);
else
this.eventPump.addEvent(new CEvent("dcc-file", "poll",
this, "onPoll"));
}
else
{
this.state.failed();
this.dispose();
}
return (this.state == DCC_STATE_ACCEPTED);
}