Oberon || Library || Module Index || Search Engine || Definition || Module
PROCEDURE AddHandler(session: FTPSessions.Session; me, peer: Internet.InetAddress); PROCEDURE SuppressEarlyConnects(session: FTPSessions.Session); PROCEDURE Open(VAR s: Streams.Stream; session: FTPSessions.Session) : BOOLEAN;
AddHandler is to be called shortly after FTPSessions.Create for session. The IP address me is used for newly opened ports at the server side (command FTPCommands.pasv) and peer is checked against the IP address given by the client side (command FTPCommands.port).
By default, FTPDataStreams initiates immediately a connection to a port specified by the PORT command to speed up FTP sessions. Some FTP clients are not prepared for this and SuppressEarlyConnects requests to suppress this technique. But note that this suppression takes automatically place on the first failure of a try to connect early. Failures are usually survived by retrying a connect when the data connect is needed.
Open opens a previously established data stream connection for a file transfer. FTPDataStreams does not distinguish between uploads and downloads and provides a bidirectional stream instead.
FTPDataStreams supports FTPTimerEvents by resetting the timer in case of successful connections.
Sniffers that are observing the main connection could try to open the ports that were specified by FTPCommands.port or FTPCommands.pasv commands in parallel. Following insufficient defense is provided for the FTPCommands.pasv command:
Similar checks should be applied on the client side in case of FTPCommands.port requests.
Oberon || Library || Module Index || Search Engine || Definition || Module