Interface DataChannelCallback


public interface DataChannelCallback
Callback that users can implement to intercept the reply from PASV and substitute a different IP address or port number to connect to. Similarly the PORT command being sent to the server can also be intercepted and modified.
Version:
$Revision$
Author:
Bruce Blackshaw
  • Method Summary

    Modifier and Type
    Method
    Description
    If this callback is implemented, it should return the endpoint that the user wishes to connect to.
    If this callback is implemented, it should return the endpoint that the server should connect to in active (PORT) mode.
  • Method Details

    • onPASVResponse

      IPEndpoint onPASVResponse(IPEndpoint endpoint)
      If this callback is implemented, it should return the endpoint that the user wishes to connect to. The supplied endpoint is what the server is returning.
      Parameters:
      endpoint - the endpoint specified by the server's response to the PASV command
      Returns:
      the actual endpoint that should be used
    • onPORTCommand

      IPEndpoint onPORTCommand(IPEndpoint endpoint)
      If this callback is implemented, it should return the endpoint that the server should connect to in active (PORT) mode. The supplied endpoint is what the client is going to use..
      Parameters:
      endpoint - the endpoint the client will begin listening on
      Returns:
      the actual endpoint that should be used