Back to product page

RawReceived method


Puts raw data to incoming queue as it was received from the server.

Type

None

Syntax

  • Basic
object.RawReceived Data
The RawReceived(object,Data) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
DataRequired. A String value. Any FTP response to be "injected" to wodFtpDLX engine.

Remarks

RawReceived method can be used only with FTP style protocol - FTP and FTPS. It is used to 'inject' specific response, just as it arrived from the server. You can use it together with RawSend method, or you can use it to provide fake response from the server.

For example, if you don't like some of the commands wodFtpDLX sends, you can intercept that command in PreTranslateCommand event, and then inject error response back to wodFtpDLX engine. This way wodFtpDLX will behave just as command received error, even no command was actually sent to the server. wodFtpDLX will then continue to process file transfers based on injected data. For example, you can do this - change "SIZE" command so nothing is sent, and provide 550 response instead:
 
Private Sub Ftp1_PreTranslateCommand(Command As String)
   If Left$(Command, 4) = "SIZE" Then
       Command = ""
       Ftp1.RawReceived "550 Invalid command" & vbCrLf
   End If
End Sub
 


Platforms

Windows