Topic Path: Symbol Reference > Classes > TIdIOHandler Class > TIdIOHandler Methods > WriteRFCStrings Method
TIdIOHandler.WriteRFCStrings Method

Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

procedure WriteRFCStrings(
    AStrings: TIdStrings; 
    AWriteTerminator: Boolean = True
String list containing RFC-compatible strings.
Indicates if a terminating period ('.') is written after values in AStrings. Default value is True. 

WriteRFCStrings is a method used to write a list of RFC-compatible strings to the peer for the IOHandler class instance. 

AStrings is a TIdStrings data type containing strings in RFC-compatible format, as described in the Internet Standards document: 

RFC 2822 - Internet Message Format  

AStrings generally contains characters with values in the range 1 through 127 and interpreted as US-ASCII characters [ASCII]. Specific clients that use the WriteRFCStrings method may implement support for the MIME document series [RFC2045, RFC2046, RFC2047, RFC2048, RFC2049], that extend this standard to allow for values outside of that range. 

The values in AStrings are divided into lines of characters. A line is a series of characters that is delimited with the two characters carriage-return and line-feed (CRLF). AStrings may contain RFC-style header fields followed, optionally, by a message body. The header is a sequence of lines of characters with special syntax as defined in RFC

  1. The message body is simply a sequence of characters as defined in
RFC 2822 that follows the header and is separated from the header by an empty line (i.e., a line with nothing preceding the CRLF). 

AWriteTerminator indicates if a terminating period ('.') is written following the content of the values in AStrings. The default value is True. 

WriteRFCStrings ensures that an individual line in AStrings that begins with a period ('.') character is converted to the '..' notation expected in RFC 2822, and calls the WriteLn method to the line to the peer connection for the IOHandler. When AWriteTerminator contains True, the terminating period '.' is written that signifies the end of data for the message. 

WriteRFCStrings is at various spots in the Indy library where multi-line RFC-compatible message are required, including TIdCommandHandler, TIdTCPConnection, and TIdNNTP.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.