HolyLib Wiki

CNetChan:SetShouldAcceptFileCallback

  CNetChan:SetShouldAcceptFileCallback( function callback )

Description

Sets the callback function that decides whether an incoming file transfer request should be accepted.
If no callback is set, or the callback errors, the file is denied.
Can be returned using CNetChan:GetShouldAcceptFileCallback

Arguments

1function callback

The new callback function

Function argument(s):
1CNetChan channel -

The channel

2string fileName -

The requested file's name

3number transferID -

The transfer ID of the request

Function return argument(s):
1boolean accept -

Return true to accept the file, false to deny it