Oberon || Library || Module Index || Search Engine || Definition || Module
TYPE Response = POINTER TO ResponseRec; TYPE ResponseRec = RECORD (PersistentDisciplines.ObjectRec) code: INTEGER; (* 3 digits, see RFC 959 *) shorttext: ARRAY 80 OF CHAR; (* one line of text or "" *) text: Streams.Stream; (* may be NIL *) END;
TYPE Event = POINTER TO EventRec; TYPE EventRec = RECORD (Events.EventRec) response: Response; END;
PROCEDURE Create(VAR response: Response; code: INTEGER; text: ARRAY OF CHAR); PROCEDURE SendResponse(s: Streams.Stream; response: Response) : BOOLEAN;
A FTP response consists in conformance to RFC 959 of a
Create may be used to create responses. In dependence of the length of text, the message is either stored into shorttext, or, in case of longer messages, represented as persistent text that is accessible as stream.
SendResponse sends response in conformance to RFC 959 to s. Line terminators which are to be represented as simple ASCII.nl (in conformance to StreamDisciplines) will be converted into sequences of ASCII.cr and ASCII.lf. Likewise, SendResponse takes care of the 0FFX telnet code escape characters and doubles them.
Oberon || Library || Module Index || Search Engine || Definition || Module