You are on page 1of 4876

Internet Direct (Indy)

An Open Source suite of Internet components.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Table of Contents

Introduction to the Indy Project 1


What is Indy.Sockets? 2
Introduction to Indy 3
Licenses 14
Technical Support 15
Project Links 18
Sponsors and Donors 19
Credits 21

Introduction to Indy.Sockets version 10 27


What's new in Indy.Sockets Version 10? 28
Packages and Assemblies 30
Installing and Removing 35

Migrating to Indy.Sockets Version 10 41


.Net compatibility 42
Packages Changes 47
Changes to the Object Hierarchy 51

Symbol Reference 59
Classes 60
EComponentError Class 60
ECompressionError Class 60
EDecompressionError Class 60
EHL7CommunicationError Class 61
EIdAlreadyConnected Class 62
EIdAlreadyRegisteredAuthenticationMethod Class 63
EIdBlockingNotSupported Class 63
EIdCanNotBindPortInRange Class 64
EIdCanNotBindRang Class 64
EIdCanNotCreateMessagePart Class 65
EIdCannotSetIPVersionWhenConnected Class 65
EIdCannotUseNonSocketIOHandler Class 66
EIdClosedSocket Class 66
EIdCmdTCPClientConnectError Class 67
EIdCmdTCPClientError Class 67
EIdCompressionError Class 68
EIdCompressionException Class 68
EIdCompressorInitFailure Class 68
EIdConnClosedGracefully Class 69
EIdConnectException Class 69
EIdConnectionStateError Class 70
EIdConnectTimeout Class 70
EIdCorruptServicesFile Class 70
EIdCouldNotBindSocket Class 71
EIdDecompressionError Class 71
EIdDecompressorInitFailure Class 72

Internet Direct (Indy) Version 10.1.5 iii


EIdDirectSMTPCannotAssignHost Class 72
EIdDirectSMTPCannotResolveMX Class 72
EIdDisconnectedProbablyIdledOut Class 73
EIdDnsResolverError Class 73
EIdDNSServerSettingException Class 74
EIdDNSServerSyncException Class 74
EIdDoesNotSupportAPOP Class 74
EIdEmailParseError Class 75
EIdEmptySASLList Class 75
EIdEndOfStream Class 76
EIdException Class 76
EIdExtensionAlreadyExists Class 81
EIdFailedToRetreiveTimeZoneInfo Class 82
EIdFiber Class 82
EIdFiberFinished Class 83
EIdFibersNotSupported Class 83
EIdFileNotFound Class 83
EIdFileSystemCannotRemoveDir Class 84
EIdFileSystemException Class 84
EIdFileSystemFileNotFound Class 84
EIdFileSystemNotADir Class 85
EIdFileSystemNotAFile Class 85
EIdFileSystemPermissionDenied Class 85
EIdFSPException Class 86
EIdFSPFileAlreadyExists Class 86
EIdFSPFileNotFound Class 86
EIdFSPPacketTooSmall Class 87
EIdFSPProtException Class 87
EIdFTPAUTHException Class 88
EIdFTPBoundPortMaxGreater Class 88
EIdFTPBoundPortMinLess Class 88
EIdFTPCannotBeNegative Class 89
EIdFTPCanNotSetAUTHCon Class 89
EIdFTPConnAssuranceFailure Class 89
EIdFTPDataPortProtection Class 90
EIdFTPException Class 90
EIdFTPFileAlreadyExists Class 90
EIdFTPImplicitTLSRequiresSSL Class 91
EIdFTPMustUseExtWithIPv6 Class 91
EIdFTPMustUseExtWithNATFastTrack Class 91
EIdFTPNoAUTHWOSSL Class 92
EIdFTPNoCCCWOEncryption Class 92
EIdFTPNoDataPortProtectionAfterCCC Class 93
EIdFTPNoDataPortProtectionWOEncryption Class 93
EIdFTPOnCustomFTPProxyRequired Class 93
EIdFTPPassiveMustBeTrueWithNATFT Class 94
EIdFTPServerException Class 94
EIdFTPServerNoOnListDirectory Class 94
EIdFTPServerSentInvalidPort Class 95
EIdFTPSiteToSiteTransfer Class 95
EIdFTPSToSBothMostSupportSSCN Class 95
EIdFTPSToSIPProtoMustBeSame Class 96

iv Internet Direct (Indy) Version 10.1.5


EIdFTPSToSNATFastTrack Class 96
EIdFTPSToSNoDataProtection Class 96
EIdFTPSToSTransModesMustBeSame Class 97
EIdFTPUnknownOTPMethodException Class 97
EIdFTPUploadFileNameCanNotBeEmpty Class 98
EIdFTPWrongIOHandler Class 98
EIdHostRequired Class 98
EIdHTTPCannotSwitchSessionStateWhenActive Class 99
EIdHTTPErrorParsingCommand Class 99
EIdHTTPHeaderAlreadyWritten Class 100
EIdHTTPProtocolException Class 100
EIdHttpProxyError Class 102
EIdHTTPServerError Class 102
EIdHTTPUnsupportedAuthorisationScheme Class 103
EIdIcmpException Class 103
EIdIdentException Class 104
EIdIdentHiddenUser Class 104
EIdIdentInvalidPort Class 105
EIdIdentNoUser Class 105
EIdIdentQueryTimeOut Class 105
EIdIdentReply Class 106
EIdIdentUnknownError Class 106
EIdIMAP4ImplicitTLSRequiresSSL Class 107
EIdIMAP4ServerException Class 107
EIdInterceptCircularLink Class 107
EIdInterceptPropInvalid Class 108
EIdInterceptPropIsNil Class 108
EIdInvalidAlgorithm Class 108
EIdInvalidFTPListingFormat Class 109
EIdInvalidIPAddress Class 109
EIdInvalidIPv6Address Class 110
EIdInvalidObjectType Class 110
EIdInvalidPortRange Class 111
EIdInvalidServiceName Class 111
EIdInvalidSocket Class 112
EIdIOHandlerPropInvalid Class 112
EIdIoHandlerRequiresLargeStream Class 112
EIdIPv6Unavailable Class 113
EIdIPVersionUnsupported Class 113
EIdLPRErrorException Class 114
EIdMaxCaptureLineExceeded Class 114
EIdMCastException Class 114
EIdMCastNoBindings Class 115
EIdMCastNotValidAddress Class 115
EIdMCastReceiveErrorZeroBytes Class 116
EIdMessageCannotLoad Class 116
EIdMessageException Class 116
EIdMessageYencCorruptionException Class 117
EIdMessageYencException Class 117
EIdMessageYencInvalidCRCException Class 117
EIdMessageYencInvalidSizeException Class 118
EIdMissingColon Class 118

Internet Direct (Indy) Version 10.1.5 v


EIdMustUseOpenProxy Class 119
EIdNNTPConnectionRefused Class 119
EIdNNTPException Class 120
EIdNNTPImplicitTLSRequiresSSL Class 120
EIdNNTPNoOnNewGroupsList Class 120
EIdNNTPNoOnNewNewsList Class 121
EIdNNTPNoOnNewsgroupList Class 121
EIdNNTPNoOnXHDREntry Class 122
EIdNNTPNoOnXOVER Class 122
EIdNNTPServerException Class 122
EIdNNTPStringListNotInitialized Class 123
EIdNoDataToRead Class 123
EIdNoExecuteSpecified Class 124
EIdNotAllBytesSent Class 124
EIdNotASocket Class 125
EIdNotConnected Class 125
EIdNotEnoughDataInBuffer Class 125
EIdNumberInvalid Class 126
EIdObjectTypeNotSupported Class 126
EIdOpenSSLError Class 127
EIdOpenSSLLoadError Class 127
EIdOSSLAcceptError Class 127
EIdOSSLConnectError Class 128
EIdOSSLCouldNotLoadSSLLibrary Class 128
EIdOSSLCreatingContextError Class 128
EIdOSSLDataBindingError Class 129
EIdOSSLGetMethodError Class 129
EIdOSSLLoadingCertError Class 129
EIdOSSLLoadingKeyError Class 130
EIdOSSLLoadingRootCertError Class 130
EIdOSSLModeNotSet Class 131
EIdOSSLSettingCipherError Class 131
EIdOTPSASLException Class 131
EIdOTPSASLUnknownOTPMethodException Class 132
EIdPackageSizeTooBig Class 132
EIdPOP3Exception Class 133
EIdPOP3ImplicitTLSRequiresSSL Class 133
EIdPOP3ReplyException Class 133
EIdPOP3ReplyInvalidEnhancedCode Class 134
EIdPOP3ServerException Class 134
EIdPortRequired Class 135
EIdRangeException Class 135
EIdReadLnMaxLineLengthExceeded Class 135
EIdReadTimeout Class 136
EIdReplyError Class 136
EIdReplyIMAP4Error Class 137
EIdReplyPOP3Error Class 138
EIdReplyRFCError Class 140
EIdResolveError Class 142
EIdResponseError Class 142
EIdReverseResolveError Class 142
EIdSASLException Class 143

vi Internet Direct (Indy) Version 10.1.5


EIdSASLMechNeeded Class 143
EIdSASLMsg Class 143
EIdSASLNotSupported Class 144
EIdSASLNotValidForProtocol Class 144
EIdSchedulerException Class 144
EIdSchedulerMaxThreadsExceeded Class 145
EIdSetSizeExceeded Class 145
EIdSilentException Class 145
EIdSMTPReply Class 146
EIdSMTPReplyError Class 146
EIdSMTPReplyInvalidClass Class 149
EIdSMTPReplyInvalidReplyString Class 149
EIdSMTPServerError Class 150
EIdSMTPServerNoRcptTo Class 150
EIdSNPPConnectionRefused Class 150
EIdSNPPException Class 151
EIdSNPPNoMultiLineMessages Class 151
EIdSNPPProtocolError Class 151
EIdSocketError Class 152
EIdSocketHandleError Class 154
EIdSocksAuthError Class 154
EIdSocksAuthMethodError Class 155
EIdSocksError Class 155
EIdSocksRequestFailed Class 155
EIdSocksRequestIdentFailed Class 156
EIdSocksRequestServerFailed Class 156
EIdSocksServerAddressError Class 157
EIdSocksServerCommandError Class 157
EIdSocksServerConnectionRefusedError Class 157
EIdSocksServerGeneralError Class 158
EIdSocksServerHostUnreachableError Class 158
EIdSocksServerNetUnreachableError Class 158
EIdSocksServerPermissionError Class 159
EIdSocksServerRespondError Class 159
EIdSocksServerTTLExpiredError Class 159
EIdSocksSvrAccessDenied Class 160
EIdSocksSvrException Class 160
EIdSocksSvrInvalidLogin Class 160
EIdSocksSvrNotSupported Class 161
EIdSocksSvrSocks5WrongATYP Class 161
EIdSocksSvrUnexpectedClose Class 162
EIdSocksSvrWrongSocksCmd Class 162
EIdSocksSvrWrongSocksVer Class 162
EIdSocksUDPNotSupportedBySOCKSVersion Class 163
EIdSocksUnknownError Class 163
EIdSSLProtocolReplyError Class 163
EIdStackError Class 164
EIdStackInitializationFailed Class 164
EIdStackSetSizeExceeded Class 165
EIdTCPConnectionError Class 165
EIdTCPNoOnExecute Class 166
EIdTCPServerError Class 166

Internet Direct (Indy) Version 10.1.5 vii


EIdTelnetClientConnectError Class 167
EIdTelnetError Class 167
EIdTelnetServerOnDataAvailableIsNil Class 168
EIdTerminateThreadTimeout Class 168
EIdTextInvalidCount Class 168
EIdTFTPAccessViolation Class 169
EIdTFTPAllocationExceeded Class 169
EIdTFTPException Class 170
EIdTFTPFileAlreadyExists Class 170
EIdTFTPFileNotFound Class 170
EIdTFTPIllegalOperation Class 171
EIdTFTPNoSuchUser Class 171
EIdTFTPOptionNegotiationFailed Class 171
EIdTFTPUnknownTransferID Class 172
EIdThreadClassNotSpecified Class 172
EIdThreadException Class 172
EIdThreadMgrError Class 173
EIdThreadTerminateAndWaitFor Class 173
EIdTLSClientCanNotSetWhileActive Class 174
EIdTLSClientCanNotSetWhileConnected Class 174
EIdTLSClientException Class 174
EIdTLSClientSSLIOHandlerRequred Class 175
EIdTLSClientTLSHandShakeFailed Class 175
EIdTLSClientTLSNegCmdFailed Class 175
EIdTLSClientTLSNotAvailable Class 176
EIdTLSServerException Class 176
EIdTLSServerSSLIOHandlerRequired Class 176
EIdTooMuchDataInBuffer Class 177
EIdTransparentProxyCantBind Class 177
EIdTransparentProxyCircularLink Class 178
EIdTransparentProxyUDPNotSupported Class 178
EIdUDPException Class 178
EIdUDPReceiveErrorZeroBytes Class 179
EIdUDPServerException Class 179
EIdUnknownProtocol Class 180
EIdUnrecognizedReply Class 180
EIdURIException Class 180
EIdUserPassProviderUnassigned Class 181
EIdWrapperException Class 181
EInvalidSyslogMessage Class 182
EmUTF7Decode Class 182
EmUTF7Encode Class 182
EmUTF7Error Class 183
EZlibError Class 183
TAAAARecord Class 184
TAppendFileStream Class 188
TARecord Class 189
TCNRecord Class 190
TCompressionStream Class 191
TCriticalSection Class 193
TCustomZlibStream Class 196
TDecompressionStream Class 196

viii Internet Direct (Indy) Version 10.1.5


TDNSHeader Class 198
TErrorRecord Class 207
TEvent Class 207
TFileCreateStream Class 212
THINFORecord Class 213
TIdAEPLFFTPListItem Class 216
TIdAntiFreezeBase Class 217
TIdARPHdr Class 223
TIdAS400FTPListItem Class 227
TIdAttachment Class 227
TIdAttachmentFile Class 236
TIdAttachmentMemory Class 244
TIdAuthentication Class 253
TIdAuthenticationCollection Class 258
TIdAuthenticationItem Class 260
TIdAuthenticationManager Class 263
TIdBaseComponent Class 266
TIdBaseStream Class 270
TIdBasicAuthentication Class 275
TIdBubbleSortStringList Class 278
TIdBuffer Class 279
TIdCardAddressItem Class 306
TIdCardPhoneNumber Class 311
TIdChameleonNewtFTPListItem Class 313
TIdChargenServer Class 313
TIdChargenUDPServer Class 315
TIdCiscoIOSFTPListItem Class 317
TIdCmdTCPClient Class 317
TIdCmdTCPClientListeningThread Class 323
TIdCmdTCPServer Class 326
TIdCommand Class 335
TIdCommandHandler Class 341
TIdCommandHandlers Class 350
TIdComponent Class 355
TIdCompressionIntercept Class 360
TIdCompressorZLibEx Class 364
TIdConnectionIntercept Class 368
TIdConnectThroughHttpProxy Class 374
TIdContext Class 376
TIdCookieList Class 381
TIdCookieManager Class 382
TIdCookieRFC2109 Class 388
TIdCookieRFC2965 Class 391
TIdCookies Class 394
TIdCreationDateFTPListItem Class 402
TIdCriticalSection Class 404
TIdCustomHTTP Class 404
TIdCustomHTTPServer Class 434
TIdCustomIcmpClient Class 445
TIdCustomMappedTelnet Class 447
TIdCustomSocksServer Class 450
TIdCustomTCPServer Class 453

Internet Direct (Indy) Version 10.1.5 ix


TIdCustomTime Class 470
TIdCustomTimeServer Class 473
TIdCustomTimeUDP Class 474
TIdCustomTimeUDPServer Class 476
TIdCustomTransparentProxy Class 477
TIdCustomUserManager Class 482
TIdDataChannel Class 486
TIdDateTimeStamp Class 489
TIdDayTime Class 517
TIdDayTimeServer Class 520
TIdDayTimeUDP Class 522
TIdDayTimeUDPServer Class 524
TIdDBInfo Class 526
TIdDBList Class 527
TIdDecoder Class 530
TIdDecoder00E Class 533
TIdDecoder4to3 Class 535
TIdDecoderBinHex4 Class 538
TIdDecoderMIME Class 542
TIdDecoderMIMELineByLine Class 542
TIdDecoderQuotedPrintable Class 545
TIdDecoderUUE Class 546
TIdDecoderXXE Class 547
TIdDefinition Class 548
TIdDefinitions Class 550
TIdDICT Class 552
TIdDICTServer Class 567
TIdDigestAuthentication Class 573
TIdDISCARDServer Class 576
TIdDiscardUDPServer Class 578
TIdDistinctTCPIPFTPListItem Class 580
TIdDNS_ProcessThread Class 581
TIdDNS_TCPServer Class 584
TIdDNS_UDPServer Class 586
TIdDNSHdr Class 595
TIdDNSMap Class 598
TIdDNSResolver Class 600
TIdDNSServer Class 608
TIdDNTreeNode Class 612
TIdDomainExpireCheckThread Class 617
TIdDomainNameServerMapping Class 617
TIdDOSAttributes Class 619
TIdDOSBaseFTPListItem Class 627
TIdEcho Class 629
TIdECHOServer Class 633
TIdEchoUDP Class 635
TIdEchoUDPServer Class 639
TIdEMailAddressItem Class 641
TIdEMailAddressList Class 647
TIdEncoder Class 653
TIdEncoder00E Class 655
TIdEncoder3to4 Class 657

x Internet Direct (Indy) Version 10.1.5


TIdEncoderBinHex4 Class 661
TIdEncoderMIME Class 664
TIdEncoderQuotedPrintable Class 665
TIdEncoderUUE Class 667
TIdEncoderXXE Class 668
TIdEntityHeaderInfo Class 668
TIdEtherAddr Class 679
TIdEthernetHdr Class 683
TIdEventSocksServer Class 685
TIdExplicitTLSClient Class 687
TIdExplicitTLSServer Class 691
TIdExtList Class 691
TIdFinger Class 692
TIdFingerServer Class 699
TIdFormDataField Class 705
TIdFormDataFields Class 710
TIdFSP Class 713
TIdFSPDirInfo Class 739
TIdFSPListItem Class 744
TIdFSPListItems Class 745
TIdFSPPacket Class 749
TIdFSPStatInfo Class 756
TIdFTP Class 759
TIdFTPBaseFileSystem Class 839
TIdFTPClientIdentifier Class 845
TIdFTPLineOwnedList Class 847
TIdFTPListBase Class 847
TIdFTPListBaseHeader Class 850
TIdFTPListItem Class 851
TIdFTPListItems Class 857
TIdFTPListOutput Class 860
TIdFTPListOutputItem Class 864
TIdFTPLPAS400 Class 869
TIdFTPLPBaseDOS Class 870
TIdFTPLPChameleonNewt Class 870
TIdFTPLPCiscoIOS Class 872
TIdFTPLPDistinctTCPIP Class 873
TIdFTPLPEPLF Class 875
TIdFTPLPGOS7 Class 876
TIdFTPLPGOS8 Class 878
TIdFTPLPGOS8ListItem Class 879
TIdFTPLPHellSoft Class 879
TIdFTPLPKA9Q Class 881
TIdFTPLPMicrowareOS9 Class 882
TIdFTPLPMList Class 883
TIdFTPLPMPiX Class 885
TIdFTPLPMPiXBase Class 886
TIdFTPLPMPiXWithPOSIX Class 887
TIdFTPLPMusic Class 888
TIdFTPLPMVS Class 889
TIdFTPLPMVSJESInterface1 Class 890
TIdFTPLPMVSJESInterface2 Class 892

Internet Direct (Indy) Version 10.1.5 xi


TIdFTPLPMVSPartitionedDataSet Class 894
TIdFTPLPNCSAforDOS Class 895
TIdFTPLPNCSAforMACOS Class 896
TIdFTPLPNetwarePSUDos Class 898
TIdFTPLPNetwarePSUNFS Class 899
TIdFTPLPNList Class 901
TIdFTPLPNovellNetware Class 902
TIdFTPLPOS2 Class 904
TIdFTPLPPCNFSD Class 905
TIdFTPLPSterComEntBase Class 907
TIdFTPLPSterCommEntUx Class 907
TIdFTPLPSterCommEntUxNS Class 909
TIdFTPLPSterCommEntUxRoot Class 910
TIdFTPLPSterCommExpOS390 Class 912
TIdFTPLPStratusVOS Class 913
TIdFTPLPSuperTCP Class 915
TIdFTPLPTandemGuardian Class 917
TIdFTPLPTOPS20 Class 918
TIdFTPLPTSXPlus Class 919
TIdFTPLPUnisysClearPath Class 921
TIdFTPLPUnitree Class 922
TIdFTPLPUnix Class 923
TIdFTPLPVMBFS Class 925
TIdFTPLPVMCMS Class 926
TIdFTPLPVMS Class 928
TIdFTPLPVSELibrary Class 930
TIdFTPLPVSEPowerQueue Class 931
TIdFTPLPVSERootDir Class 933
TIdFTPLPVSESubLibrary Class 934
TIdFTPLPVSEVSAMCatalog Class 936
TIdFTPLPVSEVTOC Class 937
TIdFTPLPVxWorks Class 939
TIdFTPLPWfFTP Class 940
TIdFTPLPWindowsNT Class 941
TIdFTPLPWinQVNet Class 943
TIdFTPLPXecomMicroRTOS Class 944
TIdFTPLVirtualReader Class 945
TIdFtpProxySettings Class 947
TIdFTPRegParseList Class 949
TIdFTPSecurityOptions Class 953
TIdFTPServer Class 956
TIdFTPServerContext Class 970
TIdFTPServerContextBase Class 976
TIdFTPTZInfo Class 979
TIdGeneric Class 980
TIdGopher Class 982
TIdGopherMenu Class 987
TIdGopherMenuItem Class 989
TIdGopherServer Class 995
TIdHash Class 1000
TIdHash128 Class 1001
TIdHash16 Class 1003

xii Internet Direct (Indy) Version 10.1.5


TIdHash160 Class 1006
TIdHash32 Class 1008
TIdHashCRC16 Class 1011
TIdHashCRC32 Class 1013
TIdHashElf Class 1014
TIdHashMessageDigest Class 1016
TIdHashMessageDigest2 Class 1017
TIdHashMessageDigest4 Class 1019
TIdHashMessageDigest5 Class 1021
TIdHashSHA1 Class 1022
TIdHeaderList Class 1024
TIdHellSoftFTPListItem Class 1031
TIdHL7 Class 1031
TIdHL7ClientThread Class 1040
TIdHTTP Class 1041
TIdHTTPCustomSessionList Class 1052
TIdHTTPDefaultSessionList Class 1059
TIdHTTPProtocol Class 1064
TIdHTTPProxyServer Class 1070
TIdHTTPRequest Class 1072
TIdHTTPRequestInfo Class 1077
TIdHTTPResponse Class 1085
TIdHTTPResponseInfo Class 1089
TIdHTTPServer Class 1102
TIdHTTPSession Class 1105
TIdicmp_dun Class 1111
TIdicmp_hun Class 1114
TIdicmp6_hdr Class 1117
TIdicmp6_un Class 1120
TIdIcmpClient Class 1123
TIdICMPEcho Class 1128
TIdICMPFrag Class 1130
TIdICMPHdr Class 1132
TIdICMPTs Class 1135
TIdIdent Class 1138
TIdIdentServer Class 1143
TIdIGMPHdr Class 1147
TIdIMAP4 Class 1150
TIdIMAP4PeerContext Class 1251
TIdIMAP4Server Class 1253
TIdIMAP4Tag Class 1265
TIdIMAPLineStruct Class 1266
TIdImapMessagePart Class 1266
TIdImapMessageParts Class 1270
TIdInAddr Class 1271
TIdInitializerComponent Class 1273
TIdInterceptSimLog Class 1275
TIdInterceptThrottler Class 1280
TIdInterfacedObject Class 1283
TIdIOHandler Class 1284
TIdIOHandlerSocket Class 1331
TIdIOHandlerStack Class 1342

Internet Direct (Indy) Version 10.1.5 xiii


TIdIOHandlerStream Class 1348
TIdIOHandlerStreamMsg Class 1357
TIdIPAddress Class 1361
TIdIPAddrMon Class 1367
TIdIPAddrMonThread Class 1372
TIdIPHdr Class 1373
TIdIPMCastBase Class 1377
TIdIPMCastClient Class 1379
TIdIPMCastListenerThread Class 1384
TIdIPMCastServer Class 1387
TIdIPOptions Class 1392
TIdIPWatch Class 1395
TIdIPWatchThread Class 1401
TIdIRC Class 1401
TIdIRCReplies Class 1433
TIdIRCServer Class 1435
TIdKA9QFTPListItem Class 1445
TIdListenerThread Class 1445
TIdLocalEvent Class 1449
TIdLogBase Class 1451
TIdLogDebug Class 1457
TIdLogEvent Class 1457
TIdLogFile Class 1460
TIdLogStream Class 1463
TIdLongWord Class 1466
TIdLPR Class 1469
TIdLPRControlFile Class 1475
TIdMailBox Class 1481
TIdMappedFTP Class 1488
TIdMappedFtpContext Class 1490
TIdMappedFtpDataThread Class 1494
TIdMappedPOP3 Class 1496
TIdMappedPOP3Thread Class 1499
TIdMappedPortContext Class 1500
TIdMappedPortTCP Class 1505
TIdMappedPortUDP Class 1512
TIdMappedTelnet Class 1514
TIdMappedTelnetThread Class 1516
TIdMatchItem Class 1518
TIdMatchList Class 1519
TIdMessage Class 1521
TIdMessageClient Class 1555
TIdMessageCollection Class 1561
TIdMessageDecoder Class 1563
TIdMessageDecoderInfo Class 1569
TIdMessageDecoderInfoMIME Class 1571
TIdMessageDecoderInfoUUE Class 1573
TIdMessageDecoderInfoYenc Class 1574
TIdMessageDecoderList Class 1575
TIdMessageDecoderMIME Class 1579
TIdMessageDecoderUUE Class 1584
TIdMessageDecoderYenc Class 1587

xiv Internet Direct (Indy) Version 10.1.5


TIdMessageEncoder Class 1588
TIdMessageEncoderInfo Class 1592
TIdMessageEncoderInfoMIME Class 1594
TIdMessageEncoderInfoQuotedPrintable Class 1596
TIdMessageEncoderInfoUUE Class 1597
TIdMessageEncoderInfoXXE Class 1599
TIdMessageEncoderInfoYenc Class 1600
TIdMessageEncoderList Class 1601
TIdMessageEncoderMIME Class 1604
TIdMessageEncoderQuotedPrintable Class 1606
TIdMessageEncoderUUE Class 1607
TIdMessageEncoderUUEBase Class 1608
TIdMessageEncoderXXE Class 1609
TIdMessageEncoderYenc Class 1610
TIdMessageItem Class 1611
TIdMessagePart Class 1614
TIdMessageParts Class 1623
TIdMicrowareOS9FTPListItem Class 1627
TIdMIMEBoundary Class 1629
TIdMIMEBoundaryStrings Class 1634
TIdMimeTable Class 1636
TIdMinimalFTPListItem Class 1642
TIdMLSTFTPListItem Class 1644
TIdMPiXFTPListItem Class 1655
TIdMultiPartFormDataStream Class 1657
TIdMusicFTPListItem Class 1663
TIdMUTF7 Class 1665
TIdMVSFTPListItem Class 1667
TIdMVSJESFTPListItem Class 1671
TIdMVSJESIntF2FTPListItem Class 1672
TIdMWayTreeNode Class 1675
TIdNativeComponentHelper Class Helper 1678
TIdNCSAforDOSFTPListItem Class 1678
TIdNCSAforMACOSFTPListItem Class 1678
TIdNetscapeCookie Class 1679
TIdNetworkCalculator Class 1685
TIdNNTP Class 1692
TIdNNTPContext Class 1739
TIdNNTPServer Class 1742
TIdNotify Class 1749
TIdNotifyMethod Class 1752
TIdNovellBaseFTPListItem Class 1753
TIdNovellNetwareFTPListItem Class 1755
TIdNovellPSU_DOSFTPListItem Class 1755
TIdNovellPSU_NFSFTPListItem Class 1755
TIdNTLMAuthentication Class 1756
TIdObjectList Class 1757
TIdOS2FTPListItem Class 1762
TIdOTPCalculator Class 1762
TIdOwnerFTPListItem Class 1765
TIdPacketInfo Class 1766
TIdPCNFSDFTPListItem Class 1770

Internet Direct (Indy) Version 10.1.5 xv


TIdPOP3 Class 1772
TIdPOP3Server Class 1786
TIdPOP3ServerContext Class 1792
TIdProxyConnectionInfo Class 1795
TIdQOTD Class 1800
TIdQOTDServer Class 1802
TIdQOTDUDP Class 1805
TIdQotdUDPServer Class 1807
TIdRawBase Class 1809
TIdRawClient Class 1814
TIdRecFTPListItem Class 1817
TIdRemoteCMDClient Class 1817
TIdRemoteCMDServer Class 1822
TIdReplies Class 1825
TIdRepliesFTP Class 1829
TIdRepliesIMAP4 Class 1830
TIdRepliesPOP3 Class 1831
TIdRepliesRFC Class 1832
TIdRepliesSMTP Class 1834
TIdReply Class 1836
TIdReplyFTP Class 1842
TIdReplyIMAP4 Class 1844
TIdReplyPOP3 Class 1849
TIdReplyRFC Class 1851
TIdReplySMTP Class 1854
TIdRequestHeaderInfo Class 1857
TIdResponseHeaderInfo Class 1865
TIdRexec Class 1870
TIdRexecServer Class 1874
TIdRIPHdr Class 1876
TIdRR_A Class 1880
TIdRR_AAAA Class 1882
TIdRR_CName Class 1884
TIdRR_Error Class 1887
TIdRR_HINFO Class 1888
TIdRR_MB Class 1890
TIdRR_MG Class 1893
TIdRR_MINFO Class 1895
TIdRR_MR Class 1897
TIdRR_MX Class 1900
TIdRR_NS Class 1902
TIdRR_PTR Class 1904
TIdRR_SOA Class 1907
TIdRR_TXT Class 1910
TIdRR_WKS Class 1912
TIdRSH Class 1914
TIdRSHServer Class 1918
TIdSASL Class 1921
TIdSASLAnonymous Class 1926
TIdSASLCRAMMD5 Class 1929
TIdSASLEntries Class 1932
TIdSASLExternal Class 1936

xvi Internet Direct (Indy) Version 10.1.5


TIdSASLListEntry Class 1940
TIdSASLLogin Class 1941
TIdSASLOTP Class 1944
TIdSASLPlain Class 1947
TIdSASLSKey Class 1952
TIdSASLUserPass Class 1954
TIdScheduler Class 1955
TIdSchedulerOfThread Class 1961
TIdSchedulerOfThreadDefault Class 1967
TIdSchedulerOfThreadPool Class 1970
TIdServerCompressionIntercept Class 1976
TIdServerCookie Class 1979
TIdServerCookies Class 1981
TIdServerIntercept Class 1983
TIdServerInterceptLogBase Class 1986
TIdServerInterceptLogEvent Class 1988
TIdServerInterceptLogFile Class 1990
TIdServerInterceptLogFileConnection Class 1992
TIdServerIOHandler Class 1993
TIdServerIOHandlerSocket Class 1996
TIdServerIOHandlerSSLBase Class 1998
TIdServerIOHandlerSSLOpenSSL Class 2001
TIdServerIOHandlerStack Class 2005
TIdSimpleServer Class 2007
TIdSimpleUserManager Class 2014
TIdSMTP Class 2017
TIdSMTPBase Class 2028
TIdSMTPEnhancedCode Class 2033
TIdSMTPRelay Class 2036
TIdSMTPRelayStatusItem Class 2042
TIdSMTPRelayStatusList Class 2046
TIdSMTPServer Class 2047
TIdSMTPServerContext Class 2051
TIdSNMP Class 2056
TIdSNPP Class 2062
TIdSNTP Class 2067
TIdSocketHandle Class 2071
TIdSocketHandles Class 2090
TIdSocketList Class 2094
TIdSocketListDotNet Class 2101
TIdSocketListWindows Class 2112
TIdSocksInfo Class 2118
TIdSocksServer Class 2124
TIdSocksServerContext Class 2125
TIdSSLCipher Class 2127
TIdSSLContext Class 2129
TIdSSLIOHandlerSocketBase Class 2134
TIdSSLIOHandlerSocketOpenSSL Class 2137
TIdSSLOptions Class 2144
TIdSSLRegEntry Class 2146
TIdSSLRegistry Class 2148
TIdSSLSocket Class 2150

Internet Direct (Indy) Version 10.1.5 xvii


TIdSSLSupportOptions Class 2154
TIdStack Class 2156
TIdStackBSDBase Class 2183
TIdStackDotNet Class 2201
TIdStackWindows Class 2233
TIdSterCommEntUxFTPListItem Class 2251
TIdSterCommEntUxNSFTPListItem Class 2252
TIdSterCommEntUxRootFTPListItem Class 2253
TIdSterCommExpOS390FTPListItem Class 2253
TIdStrategy Class 2255
TIdStrategyList Class 2255
TIdStratusVOSFTPListItem Class 2257
TIdStreamHelperVCL Class 2261
TIdStruct Class 2261
TIdSuperTCPFTPListItem Class 2263
TIdSync Class 2264
TIdSysBase Class 2267
TIdSysLog Class 2268
TIdSysLogMessage Class 2271
TIdSysLogMsgPart Class 2277
TIdSyslogServer Class 2280
TIdSysNativeVCL Class 2282
TIdSystat Class 2290
TIdSystatServer Class 2293
TIdSystatUDP Class 2296
TIdSystatUDPServer Class 2299
TIdSysVCL Class 2302
TIdSysWin32 Class 2325
TIdTandemGuardianFTPListItem Class 2328
TIdTask Class 2329
TIdTCPClient Class 2333
TIdTCPClientCustom Class 2340
TIdTCPConnection Class 2349
TIdTCPHdr Class 2369
TIdTCPOptions Class 2373
TIdTCPServer Class 2375
TIdTCPStream Class 2381
TIdTelnet Class 2387
TIdTelnetPeerContext Class 2394
TIdTelnetReadThread Class 2397
TIdTelnetServer Class 2399
TIdText Class 2404
TIdTextModeResourceRecord Class 2408
TIdTextModeRRs Class 2413
TIdThread Class 2415
TIdThreadComponent Class 2426
TIdThreadEx Class 2434
TIdThreadSafe Class 2435
TIdThreadSafeBoolean Class 2437
TIdThreadSafeCardinal Class 2439
TIdThreadSafeDateTime Class 2443
TIdThreadSafeDouble Class 2446

xviii Internet Direct (Indy) Version 10.1.5


TIdThreadSafeInt64 Class 2449
TIdThreadSafeInteger Class 2453
TIdThreadSafeList Class 2457
TIdThreadSafeString Class 2462
TIdThreadSafeStringList Class 2465
TIdThreadWithTask Class 2472
TIdTime Class 2475
TIdTimeServer Class 2478
TIdTimeUDP Class 2481
TIdTimeUDPServer Class 2483
TIdTOPS20FTPListItem Class 2486
TIdTraceRoute Class 2486
TIdTrivialFTP Class 2488
TIdTrivialFTPServer Class 2494
TIdTSXPlusFTPListItem Class 2497
TIdUDPBase Class 2499
TIdUDPClient Class 2509
TIdUDPHdr Class 2523
TIdUDPListenerThread Class 2525
TIdUDPServer Class 2530
TIdUnion Class 2535
TIdUnisysClearPathFTPListItem Class 2537
TIdUnitreeFTPListItem Class 2538
TIdUnixBaseFTPListItem Class 2540
TIdUnixFTPListItem Class 2541
TIdUnixPermFTPListItem Class 2543
TIdUnixTime Class 2544
TIdUnixTimeServer Class 2547
TIdUnixTimeUDP Class 2549
TIdUnixTimeUDPServer Class 2551
TIdURI Class 2552
TIdUserAccount Class 2562
TIdUserAccounts Class 2565
TIdUserManager Class 2567
TIdUserPassProvider Class 2569
TIdVCard Class 2571
TIdVCardAddresses Class 2578
TIdVCardBusinessInfo Class 2580
TIdVCardEMailAddresses Class 2583
TIdVCardEMailItem Class 2585
TIdVCardEmbeddedObject Class 2588
TIdVCardGeog Class 2590
TIdVCardMailingLabelItem Class 2592
TIdVCardMailingLabels Class 2595
TIdVCardName Class 2597
TIdVCardTelephones Class 2600
TIdVMBFSFTPListItem Class 2602
TIdVMCMSFTPListItem Class 2602
TIdVMSFTPListItem Class 2604
TIdVMVirtualReaderFTPListItem Class 2607
TIdVSELibraryFTPListItem Class 2609
TIdVSEPowerQueueFTPListItem Class 2610

Internet Direct (Indy) Version 10.1.5 xix


TIdVSERootDirFTPListItem Class 2611
TIdVSESubLibraryFTPListItem Class 2612
TIdVSEVSAMCatalogFTPListItem Class 2613
TIdVSEVTOCFTPListItem Class 2613
TIdVxWorksFTPListItem Class 2615
TIdWfFTPFTPListItem Class 2615
TIdWhois Class 2615
TIdWhoIsServer Class 2620
TIdWin32ea Class 2622
TIdWindowsNTFTPListItem Class 2625
TIdWinQVNetFTPListItem Class 2625
TIdX509 Class 2625
TIdX509Name Class 2628
TIdXecomMicroRTOSTPListItem Class 2630
TIdYarn Class 2632
TIdYarnOfThread Class 2632
TIdZLibCompressorBase Class 2634
TIpProperty Class 2639
TMINFORecord Class 2647
TMXRecord Class 2649
TNAMERecord Class 2652
TNAPTRRecord Class 2654
TNSRecord Class 2657
TNTPGram Class 2658
TPTRRecord Class 2668
TQueryResult Class 2669
TRDATARecord Class 2673
TReadFileExclusiveStream Class 2676
TReadFileNonExclusiveStream Class 2677
TReplyStatus Class 2679
TResultRecord Class 2682
TSNMPInfo Class 2687
TSOARecord Class 2694
TSRVRecord Class 2698
TTelnetData Class 2701
TTextRecord Class 2702
TWKSRecord Class 2705
Functions 2711
ABNFToText Function 2711
AddMissingYear Function 2711
adler32 Function 2712
adler32_combine Function 2712
AppendByte Function 2713
AppendBytes Function 2713
AppendString Function 2714
AS400Date Function 2715
ASNDecLen Function 2715
ASNDecOIDItem Function 2716
ASNEncInt Function 2716
ASNEncLen Function 2717
ASNEncOIDItem Function 2717
ASNEncUInt Function 2717

xx Internet Direct (Indy) Version 10.1.5


ASNItem Function 2718
ASNObject Function 2718
BinStrToInt Function 2719
BinToHexStr Function 2719
BreakApart Function 2719
BuildType1Message Function 2720
BuildType3Message Function 2721
BytesToCardinal Function 2721
BytesToChar Function 2722
BytesToInt64 Function 2723
BytesToInteger Function 2724
BytesToIPv6 Function 2725
BytesToShort Function 2727
BytesToString Function 2728
BytesToWord Function 2729
ByteToHex Function 2730
ByteToOctal Function 2731
CardinalToFourChar Function 2731
CCheck Function 2732
CharIsInEOF Function 2732
CharIsInSet Function 2733
CharRange Function 2734
CharsInStr Function 2734
CharToHex Function 2734
CheckListing Function 2735
CheckListParse Function 2735
CheckListParseCapa Function 2736
ChmodNoToModeBits Function 2736
ChmodNoToPerms Function 2737
ChmodNoToPerms Function 2738
CommaAdd Function 2738
CommaSeparatedToStringList Function 2739
CompareDateTime Function 2739
CompareItems Function 2740
compress Function 2741
compress2 Function 2741
compressBound Function 2742
CompressBuf Function 2742
CompressStream Function 2742
ConvertToCanonical6IP Function 2743
ConvertToValidv6IP Function 2743
CopyBytesToHostCardinal Function 2744
CopyBytesToHostWord Function 2744
CopyFileTo Function 2745
CopyTIdByteArray Function 2746
CopyTIdBytes Function 2746
CopyTIdCardinal Function 2747
CopyTIdInt64 Function 2748
CopyTIdIPV6Address Function 2749
CopyTIdLongWord Function 2750
CopyTIdNetworkCardinal Function 2751
CopyTIdNetworkWord Function 2752

Internet Direct (Indy) Version 10.1.5 xxi


CopyTIdString Function 2752
CopyTIdWord Function 2753
crc32 Function 2754
CurrentProcessId Function 2755
CurrentThreadId Function 2755
DateDDStrMonthYY Function 2756
DateMMDDYY Function 2757
DateStrMonthDDYY Function 2757
DateTimeToUnix Function 2758
DateYYMMDD Function 2758
DateYYStrMonthDD Function 2758
DCheck Function 2759
DebugOutput Function 2759
Decode2022JP Function 2760
DecodeAddress Function 2760
DecodeAddresses Function 2761
DecodeHeader Function 2761
DecodeString Function 2762
DecompressBuf Function 2763
DecompressStream Function 2763
DecompressStream Function 2764
DecompressToUserBuf Function 2764
deflate Function 2765
deflateBound Function 2765
deflateCopy Function 2765
deflateEnd Function 2766
deflateInit_ Function 2766
deflateInit2_ Function 2767
deflateParams Function 2767
deflatePrime Function 2768
deflateReset Function 2768
deflateSetDictionary Function 2769
deflateSetHeader Function 2769
deflateTune Function 2770
DirectoryExists Function 2770
DispositionCodeToTIdVSEPQDisposition Function 2771
DomainName Function 2771
DomainNameToDNSStr Function 2772
DOSPathToUnixPath Function 2772
Encode2022JP Function 2772
EncodeAddress Function 2773
EncodeAddressItem Function 2774
EncodeHeader Function 2774
EncodeString Function 2775
EnsureMsgIDBrackets Function 2776
EnumFTPListParsers Function 2777
EPLFDateToGMTDateTime Function 2777
EPLFDateToLocalDateTime Function 2777
ExcludeQVNET Function 2778
ExtractHeaderSubItem Function 2778
ExtractNovellPerms Function 2779
ExtractNumber Function 2779

xxii Internet Direct (Indy) Version 10.1.5


ExtractQVNETFileName Function 2780
ExtractRecFormat Function 2780
FacilityToString Function 2780
Fetch Function 2781
FetchBytes Function 2782
FetchCaseInsensitive Function 2782
FetchLength Function 2783
FileNameMSDOSToUnix Function 2784
FileNameMUSICSPToUnix Function 2784
FileNameMVSToUnix Function 2784
FileNameUnixToMPEiXHFS Function 2785
FileNameUnixToMPEiXTraditional Function 2785
FileNameUnixToMSDOS Function 2786
FileNameUnixToMUSICSP Function 2786
FileNameUnixToMVS Function 2786
FileNameUnixToOS9 Function 2787
FileNameUnixToVMCMS Function 2787
FileNameUnixToVMS Function 2788
FileNameUnixToWin32 Function 2788
FileNameVMCMSToUnix Function 2788
FileNameVMSToUnix Function 2789
FileNameWin32ToUnix Function 2789
FileSizeByName Function 2790
FillBytes Function 2790
FindAuthClass Function 2791
FindCharset Function 2791
FindDelimInNumbers Function 2792
FindFirstNotOf Function 2792
FindFirstOf Function 2793
FindPreferredCharset Function 2794
FTPDateTimeToMDTMD Function 2807
FTPGMTDateTimeToMLS Function 2807
FTPLocalDateTimeToMLS Function 2808
FTPMDTMToGMTDateTime Function 2808
FTPMLSToGMTDateTime Function 2809
FTPMLSToLocalDateTime Function 2809
get_crc_table Function 2809
GetClockValue Function 2810
GetErrorStr Function 2810
GetGMTDateByName Function 2810
GetMIMEDefaultFileExt Function 2811
GetMIMETypeFromFile Function 2812
GetRCodeStr Function 2812
GetThreadHandle Function 2812
GetTickDiff Function 2813
GetUniqueFileName Function 2814
GMTDateTimeToEPLFDate Function 2815
GmtOffsetStrToDateTime Function 2815
GMTToLocalDateTime Function 2816
IdDelete Function 2816
IdGetDefaultCharSet Function 2817
IdInsert Function 2817

Internet Direct (Indy) Version 10.1.5 xxiii


IdRawBuildArp Function 2819
IdRawBuildDns Function 2819
IdRawBuildEthernet Function 2820
IdRawBuildIcmpEcho Function 2820
IdRawBuildIcmpMask Function 2821
IdRawBuildIcmpRedirect Function 2821
IdRawBuildIcmpTimeExceed Function 2822
IdRawBuildIcmpTimestamp Function 2823
IdRawBuildIcmpUnreach Function 2823
IdRawBuildIgmp Function 2824
IdRawBuildIp Function 2824
IdRawBuildRip Function 2825
IdRawBuildTcp Function 2826
IdRawBuildUdp Function 2826
IdStackFactory Function 2827
IdToMib Function 2827
iif Function 2827
iif Function 2828
iif Function 2829
IndyCompareStr Function 2829
IndyComputerName Function 2830
IndyGetFileExt Function 2830
IndyGetFileName Function 2831
IndyGetFilePath Function 2831
IndyIsRelativePath Function 2832
IndyLowerCase Function 2832
IndyStrToBool Function 2833
IndyUpperCase Function 2833
inflate Function 2834
inflateBack Function 2834
inflateBackEnd Function 2835
inflateBackInit_ Function 2835
inflateCopy Function 2836
inflateEnd Function 2836
inflateGetHeader Function 2837
inflateInit_ Function 2837
inflateInit2_ Function 2838
inflatePrime Function 2838
inflateReset Function 2839
inflateSetDictionary Function 2839
inflateSync Function 2839
inflateSyncPoint Function 2840
InfoCallback Function 2840
InMainThread Function 2841
IntMibToStr Function 2841
IntToBin Function 2842
IPAddrToDNSStr Function 2842
IPv4ToDWord Function 2842
IPv4ToDWord Function 2843
IPv4ToHex Function 2844
IPv4ToOctal Function 2844
IPv6AAAAToDNSStr Function 2845

xxiv Internet Direct (Indy) Version 10.1.5


IPv6AddressToStr Function 2845
IPv6ToIdIPv6Address Function 2846
IsASCII Function 2846
IsASCII Function 2847
IsASCIILDH Function 2847
IsASCIILDH Function 2848
IsBig5 Function 2849
IsBinary Function 2849
IsCurrentThread Function 2850
IsDDMonthYY Function 2850
IsDomain Function 2851
IsFQDN Function 2851
IsHex Function 2852
IsHexidecimal Function 2853
IsHexidecimal Function 2854
IsHHMMSS Function 2855
IsHostname Function 2855
IsIn6MonthWindow Function 2856
IsLeadChar Function 2856
IsLineStr Function 2857
IsMDTMDate Function 2857
IsMMDDYY Function 2858
IsNavPath Function 2858
IsNovelPSPattern Function 2859
IsNumeric Function 2859
IsNumeric Function 2860
IsOctal Function 2861
IsOctal Function 2861
IsSubDirContentsBanner Function 2862
IsTopDomain Function 2863
IsTotalLine Function 2863
IsUnixExec Function 2864
IsUnixHiddenFile Function 2864
IsUnixLsErr Function 2864
IsValidIP Function 2865
IsValidIPv6 Function 2865
IsValidNovellPermissionStr Function 2866
IsValidSterCommData Function 2866
IsValidSterCommFlags Function 2867
IsValidSterCommProt Function 2867
IsValidTimeStamp Function 2867
IsValidUnixPerms Function 2868
IsVMBFS Function 2868
IsWhiteString Function 2869
IsYYYYMMDD Function 2869
LocalDateTimeToEPLFDate Function 2870
logFacilityToNo Function 2870
LogicalAnd Function 2871
logSeverityToNo Function 2871
MakeAckPkt Function 2872
MakeCanonicalIPv4Address Function 2872
MakeCanonicalIPv6Address Function 2873

Internet Direct (Indy) Version 10.1.5 xxv


MakeDWordIntoIPv4Address Function 2874
MakeTempFilename Function 2874
Max Function 2875
Max Function 2875
MDTMOffset Function 2876
MibToId Function 2877
Min Function 2877
MinutesFromGMT Function 2878
ModeBitsToChmodNo Function 2878
ModeBitsToPermString Function 2878
MoveChars Function 2879
MVSDate Function 2879
NormalStrToDNSStr Function 2880
NoToFacility Function 2880
NoToSeverity Function 2880
OrdFourByteToCardinal Function 2881
PadSpaces Function 2882
ParseDateTimeStamp Function 2882
ParseListing Function 2883
ParseQuotedArgs Function 2883
PasswordCallback Function 2883
PatternsInStr Function 2884
PermsToChmodNo Function 2884
PermStringToModeBits Function 2885
PosBytes Function 2885
PosIdx Function 2886
PosInSmallIntArray Function 2886
PosInStrArray Function 2887
ProcessPath Function 2887
ReadCharFromStream Function 2889
ReadLnFromStream Function 2890
ReadStringFromStream Function 2892
ReadTIdBytesFromStream Function 2892
RegisterAuthenticationMethod Function 2893
RegisterFTPListParser Function 2893
RegisterSSL Function 2894
RemoveDuplicatePathSyms Function 2895
RemoveHeaderEntry Function 2895
ReplaceSpecString Function 2896
ReturnMIMEType Function 2896
RightStr Function 2897
ROL Function 2897
ROR Function 2898
RPos Function 2898
SameArray Function 2899
SendError Function 2899
SendError Function 2900
SendError Function 2900
SendError Function 2901
ServicesFilePath Function 2901
SetLocalTime Function 2902
SetStackClass Function 2902

xxvi Internet Direct (Indy) Version 10.1.5


SetThreadName Function 2903
SetThreadPriority Function 2903
SeverityToString Function 2904
Sleep Function 2904
SplitColumns Function 2905
SplitColumnsNoTrim Function 2906
SplitString Function 2907
StartsWith Function 2907
StartsWithACE Function 2908
StrHtmlDecode Function 2908
StrHtmlEncode Function 2909
StrInternetToDateTime Function 2909
StripInitPathDelin Function 2910
StripNo Function 2911
StripPath Function 2911
StripSpaces Function 2911
StrPart Function 2912
StrToCard Function 2912
StrToDay Function 2913
StrToMonth Function 2913
StrToWord Function 2914
StrXHtmlDecode Function 2914
StrXHtmlEncode Function 2915
TextIsSame Function 2916
TextStartsWith Function 2916
Ticks Function 2917
TIdVSEPQDispositionDispositionCode Function 2918
TimeHHMMSS Function 2918
TimeZoneBias Function 2919
ToBytes Function 2919
ToBytes Function 2919
ToBytes Function 2920
ToBytes Function 2921
ToBytes Function 2921
ToBytes Function 2922
ToBytes Function 2922
ToBytes Function 2923
ToBytes Function 2924
ToBytesF Function 2924
ToBytesF Function 2925
ToBytesF Function 2925
ToBytesF Function 2925
ToBytesF Function 2925
ToBytesF Function 2925
ToBytesF Function 2926
ToBytesF Function 2926
ToDo Function 2926
ToHex Function 2926
ToHex Function 2927
TrimAllOf Function 2927
TwoByteToWord Function 2928
TwoCharToWord Function 2929

Internet Direct (Indy) Version 10.1.5 xxvii


uncompress Function 2929
UnfoldLines Function 2930
UnixDateTimeToDelphiDateTime Function 2930
UnixPathToDOSPath Function 2930
UnquotedStr Function 2931
UnregisterAuthenticationMethod Function 2931
UnregisterFTPListParser Function 2932
UpCaseFirst Function 2932
VerifyCallback Function 2932
Win32Type Function 2933
WordToStr Function 2933
WordToTwoBytes Function 2934
WrapText Function 2934
WriteMemoryStreamToStream Function 2935
WriteStringToStream Function 2936
WriteTIdBytesToStream Function 2936
Y2Year Function 2937
zError Function 2938
zlibAllocMem Function 2938
zlibCompileFlags Function 2938
zlibFreeMem Function 2939
Structs, Records, Enums 2940
Taddrinfo Record 2940
TAuthCmd Enumeration 2940
TAuthenticationType Enumeration 2940
TByteArray Record 2940
TCheckResp Record 2941
TCompressionLevel Enumeration 2941
TConnectionResult Enumeration 2941
TDays Enumeration 2942
TDNSQueryRecordTypes Enumeration 2942
TDNSServerTypes Enumeration 2943
TEVP_MD Record 2943
TgzHeaderRec Record 2944
THL7CommunicationMode Enumeration 2944
THTTPCommandType Enumeration 2944
TIdAuthenticationSchemes Enumeration 2945
TIdAuthWhatsNext Enumeration 2945
TIdCharSet Enumeration 2946
TIdCookieAccess Enumeration 2946
TIdCookieVersion Enumeration 2947
TIdCustomUserManagerOption Enumeration 2947
TIdDataReply Enumeration 2947
TIdDICTAuthenticationType Enumeration 2948
TIdDirItemType Enumeration 2948
TIdDirOutputFormat Enumeration 2949
TIdEncoding Enumeration 2949
TIdFTPDataPortSecurity Enumeration 2950
TIdFTPDataStructure Enumeration 2950
TIdFTPDirFormat Enumeration 2950
TIdFTPFactOutput Enumeration 2950
TIdFTPOperation Enumeration 2951

xxviii Internet Direct (Indy) Version 10.1.5


TIdFTPPathProcessing Enumeration 2951
TIdFtpProxyType Enumeration 2951
TIdFTPTelnetState Enumeration 2951
TIdFTPTransferMode Enumeration 2952
TIdFTPTransferType Enumeration 2953
TIdFTPUserType Enumeration 2953
TIdHL7Status Enumeration 2954
TIdHTTPConnectionType Enumeration 2954
TIdHTTPOption Enumeration 2954
TIdHTTPProtocolVersion Enumeration 2955
TIdHTTPWhatsNext Enumeration 2956
TIdIdentErrorType Enumeration 2956
TIdIMAP4AuthenticationType Enumeration 2957
TIdIMAP4Commands Enumeration 2957
TIdIMAP4ConnectionState Enumeration 2957
TIdIMAP4FolderTreatment Enumeration 2957
TIdIMAP4SearchKey Enumeration 2958
TIdIMAP4SearchRec Record 2958
TIdIMAP4StatusDataItem Enumeration 2958
TIdIMAP4StoreDataItem Enumeration 2958
TIdIn4Addr Record 2959
TIdIn6Addr Record 2959
TIdInt64Parts Record 2960
TIdIOHandlerStreamType Enumeration 2960
TIdIPAddressRec Record 2960
TIdIPAddressType Enumeration 2961
TIdIPMreq Record 2962
TIdIPv6Mreq Record 2962
TIdIPVersion Enumeration 2962
TIdIRCStat Enumeration 2963
TIdIRCUserMode Enumeration 2963
TIdJESJobStatus Enumeration 2963
TIdLPRFileFormat Enumeration 2963
TIdLPRStatus Enumeration 2964
TIdMailBoxAttributes Enumeration 2965
TIdMailBoxState Enumeration 2965
TIdMailFromReply Enumeration 2966
TIdMappedFtpOutboundDcMode Enumeration 2966
TIdMaxLineAction Enumeration 2966
TIdMessageCoderPartType Enumeration 2967
TIdMessageEncoding Enumeration 2968
TIdMessageFlags Enumeration 2968
TIdMessagePartType Enumeration 2969
TIdMessagePriority Enumeration 2970
TIdMLSDAttr Enumeration 2970
TIdModeSetResult Enumeration 2970
TIdModeType Enumeration 2971
TIdNNTPPermission Enumeration 2971
TIdOSType Enumeration 2971
TIdPOP3AuthenticationType Enumeration 2972
TIdRCPToReply Enumeration 2973
TIdReplyRFCFormat Enumeration 2973

Internet Direct (Indy) Version 10.1.5 xxix


TIdRetrieveOnSelect Enumeration 2973
TIdReuseSocket Enumeration 2973
TIdSASLResult Enumeration 2974
TIdSMTPAuthenticationType Enumeration 2974
TIdSMTPRelayStatusAction Enumeration 2975
TIdSMTPState Enumeration 2976
TIdSSLAction Enumeration 2976
TIdSSLCtxMode Enumeration 2976
TIdSSLMode Enumeration 2976
TIdSSLSupport Enumeration 2977
TIdSSLVerifyMode Enumeration 2977
TIdSSLVersion Enumeration 2977
TIdStatus Enumeration 2978
TIdSyslogFacility Enumeration 2978
TIdSyslogSeverity Enumeration 2979
TIdTelnetCommand Enumeration 2980
TIdTelnetState Enumeration 2980
TIdTFTPMode Enumeration 2981
TIdThreadStopMode Enumeration 2981
TIdURIOptionalFields Enumeration 2982
TIdUseTLS Enumeration 2982
TIdVCardEMailType Enumeration 2983
TIdVSEPQDisposition Enumeration 2983
TIdWin32Type Enumeration 2983
TIpStruct Record 2984
Tipv6_mreq Record 2984
TLinger Record 2985
TMonths Enumeration 2985
TNetworkClass Enumeration 2985
TPeerInfo Record 2986
TQueryRecordTypes Enumeration 2986
TReplyStatusTypes Enumeration 2987
TResultSection Enumeration 2988
TSendResponse Enumeration 2988
TSocksAuthentication Enumeration 2988
TSocksVersion Enumeration 2988
TTransfer Enumeration 2989
TULong Record 2989
TWaitResult Enumeration 2989
TWorkInfo Record 2990
TWorkMode Enumeration 2990
type_1_message_header Record 2991
type_2_message_header Record 2991
TZStreamRec Record 2991
TIdSunB Record 2992
TIdSunW Record 2992
Types 2994
Pdes_key_schedule Type 2994
PgzHeaderRec Type 2994
PIdIn4Addr Type 2994
PIdIn6Addr Type 2994
PIdInAddr Type 2995

xxx Internet Direct (Indy) Version 10.1.5


PLongInt Type 2995
Short Type 2995
T128BitRecord Type 2996
T16x4LongWordRecord Type 2996
T384BitRecord Type 2996
T4x4LongWordRecord Type 2997
T4x4x4LongWordRecord Type 2997
T512BitRecord Type 2998
T5x4LongWordRecord Type 2998
TAccessFileEvent Type 2998
TAlloc Type 2999
TAnsiCharSet Type 2999
TAuthenticationEvent Type 2999
TAuthenticationTypes Type 3000
TCallbackEvent Type 3001
TClassIdException Type 3001
TCPClient Type 3001
TFree Type 3001
Tfreeaddrinfo Type 3002
Tgetaddrinfo Type 3002
TGetEvent Type 3002
Tgetnameinfo Type 3003
THandle Type 3003
TIdAfterCommandHandlerEvent Type 3003
TIdAlertEvent Type 3004
TIdAttachmentClass Type 3004
TIdAuthenticationClass Type 3005
TIdAuthSchemeSet Type 3005
TIdBaseObject Type 3005
TIdBeforeCommandHandlerEvent Type 3006
TIdBufferBytesRemoved Type 3006
TIdBytes Type 3007
TIdCardAddressAttributes Type 3007
TIdClientSSLClass Type 3008
TIdCmdTCPClientAfterCommandHandlerEvent Type 3008
TIdCmdTCPClientBeforeCommandHandlerEvent Type 3009
TIdCmdTCPServerAfterCommandHandlerEvent Type 3010
TIdCmdTCPServerBeforeCommandHandlerEvent Type 3010
TIdCollection Type 3011
TIdCollectionItem Type 3011
TIdCommandEvent Type 3011
TIdCommandHandlerClass Type 3012
TIdCommandHandlersExceptionEvent Type 3012
TIdComponentClass Type 3012
TIdComponentName Type 3013
TIdCompressionLevel Type 3013
TIdContextAfterRun Type 3014
TIdContextBeforeRun Type 3014
TIdContextClass Type 3015
TIdContextRun Type 3015
TIdCreateAttachmentEvent Type 3016
TIdCreateFTPList Type 3016

Internet Direct (Indy) Version 10.1.5 xxxi


TIdCustomTransparentProxyClass Type 3016
TIdCustomUserManagerOptions Type 3017
TIdDateTimeBase Type 3017
TIdDecoderClass Type 3017
TIdDecodeTable Type 3018
TIdDICTAuthEvent Type 3018
TIdDICTDefineEvent Type 3019
TIdDICTGetEvent Type 3019
TIdDICTMatchEvent Type 3019
TIdDICTOtherEvent Type 3020
TIdDICTShowEvent Type 3021
TIdDNSAfterCacheSaved Type 3021
TIdDNSAfterQueryEvent Type 3022
TIdDNSBeforeQueryEvent Type 3022
TIdEncoder3to4Class Type 3022
TIdEncoderClass Type 3022
TIdEvenTIdNewsgroupList Type 3023
TIdEventNewNewsList Type 3024
TIdEventStreaming Type 3024
TIdEventXHDREntry Type 3025
TIdEventXOVER Type 3025
TIdExceptionThreadComponentEvent Type 3025
TIdExceptionThreadComponentEventEx Type 3025
TIdExceptionThreadEvent Type 3026
TIdFileStream Type 3026
TIdFingerGetEvent Type 3026
TIdFSPLogEvent Type 3027
TIdFtpAfterGet Type 3027
TIdFTPBannerEvent Type 3028
TIdFTPFactOutputs Type 3028
TIdFTPListOnGetCustomListFormat Type 3028
TIdFTPListParseClass Type 3028
TIdGopherMenuEvent Type 3029
TIdHL7ConnCountEvent Type 3029
TIdHTTPCommandEvent Type 3029
TIdHTTPInvalidSessionEvent Type 3029
TIdHTTPMethod Type 3030
TIdHTTPOnHeadersAvailable Type 3031
TIdHTTPOnRedirectEvent Type 3031
TIdHTTPOptions Type 3031
TIdIdentQueryEvent Type 3032
TIdIMAP4CommandBeforeEvent Type 3032
TIdIMAP4CommandBeforeSendEvent Type 3033
TIdIMAP4DefMech1 Type 3033
TIdIMAP4DefMech10 Type 3033
TIdIMAP4DefMech11 Type 3033
TIdIMAP4DefMech12 Type 3034
TIdIMAP4DefMech13 Type 3034
TIdIMAP4DefMech14 Type 3034
TIdIMAP4DefMech2 Type 3034
TIdIMAP4DefMech3 Type 3035
TIdIMAP4DefMech4 Type 3035

xxxii Internet Direct (Indy) Version 10.1.5


TIdIMAP4DefMech5 Type 3035
TIdIMAP4DefMech6 Type 3035
TIdIMAP4DefMech7 Type 3036
TIdIMAP4DefMech8 Type 3036
TIdIMAP4DefMech9 Type 3036
TIdIMAP4SearchKeyArray Type 3036
TIdIMAP4SearchRecArray Type 3037
TIdInitializeIsoEvent Type 3037
TIdInterceptNotifyEvent Type 3037
TIdInterceptStreamEvent Type 3038
TIdIOHandlerClass Type 3038
TIdIOHandlerSocketClass Type 3039
TIdIPAddrMonEvent Type 3039
TIdIPv6Address Type 3040
TIdIPv6AddressRec Type 3040
TIdIRCAdminInfoRecvEvent Type 3041
TIdIRCAwayEvent Type 3041
TIdIRCChanBANListEvent Type 3041
TIdIRCChanEXCListEvent Type 3041
TIdIRCChanINVListEvent Type 3042
TIdIRCChanModeEvent Type 3042
TIdIRCCTCPQueryEvent Type 3042
TIdIRCCTCPReplyEvent Type 3042
TIdIRCDCCAcceptEvent Type 3043
TIdIRCDCCChatEvent Type 3043
TIdIRCDCCResumeEvent Type 3043
TIdIRCDCCSendEvent Type 3043
TIdIRCFiveParmEvent Type 3044
TIdIRCGetEvent Type 3044
TIdIRCInviteEvent Type 3044
TIdIRCInvitingEvent Type 3044
TIdIRCIsOnIRCEvent Type 3045
TIdIRCJoinEvent Type 3045
TIdIRCKickEvent Type 3045
TIdIRCKillErrorEvent Type 3045
TIdIRCKillEvent Type 3046
TIdIRCKnownServerNamesEvent Type 3046
TIdIRCMOTDEvent Type 3046
TIdIRCNickErrorEvent Type 3046
TIdIRCNickListEvent Type 3047
TIdIRCNicknameChangedEvent Type 3047
TIdIRCNoticeEvent Type 3047
TIdIRCOneParmEvent Type 3047
TIdIRCOpEvent Type 3048
TIdIRCOtherEvent Type 3048
TIdIRCPartEvent Type 3048
TIdIRCPingPongEvent Type 3048
TIdIRCPrivMessageEvent Type 3049
TIdIRCQuitEvent Type 3049
TIdIRCRawEvent Type 3049
TIdIRCRehashEvent Type 3049
TIdIRCServerErrorEvent Type 3050

Internet Direct (Indy) Version 10.1.5 xxxiii


TIdIRCServerEvent Type 3050
TIdIRCServerListEvent Type 3050
TIdIRCServerStatsEvent Type 3050
TIdIRCServerTraceEvent Type 3051
TIdIRCServerUsersEvent Type 3051
TIdIRCServerWelcomeEvent Type 3051
TIdIRCServiceEvent Type 3051
TIdIRCSummonEvent Type 3052
TIdIRCSvrTimeEvent Type 3052
TIdIRCSvrVersionEvent Type 3052
TIdIRCThreeParmEvent Type 3052
TIdIRCTopicEvent Type 3053
TIdIRCTwoParmEvent Type 3053
TIdIRCUserEvent Type 3053
TIdIRCUserInfoRecvEvent Type 3053
TIdIRCUserModeEvent Type 3054
TIdIRCUserModes Type 3054
TIdIRCWallopsEvent Type 3054
TIdIRCWhoEvent Type 3054
TIdIRCWhoIsEvent Type 3055
TIdIRCWhoWasEvent Type 3055
TIdLinger Type 3055
TIdList Type 3055
TIdListenExceptionEvent Type 3056
TIdLPRStatusEvent Type 3056
TIdMailBoxAttributesSet Type 3057
TIdMappedPortOutboundConnectEvent Type 3057
TIdMappedTelnetCheckHostPort Type 3057
TIdMemoryStream Type 3058
TIdMessageEncoderClass Type 3058
TIdMessageEvent Type 3058
TIdMessageFlagsSet Type 3059
TIdMessageItems Type 3059
TIdMessagePartClass Type 3060
TIdMLSDAttrs Type 3060
TIdMultiReadExclusiveWriteSynchronizer Type 3060
TIdMWayTreeNodeClass Type 3060
TIdNativeComponent Type 3061
TIdNativeComponentState Type 3061
TIdNativeThread Type 3061
TIdNeedAccountEvent Type 3061
TIdNetTime Type 3062
TIdNewsTransporTIdEvent Type 3062
TIdNNTPOnArticleByID Type 3062
TIdNNTPOnArticleByNo Type 3063
TIdNNTPOnAuth Type 3063
TIdNNTPOnCheckListGroup Type 3063
TIdNNTPOnCheckMsgNo Type 3063
TIdNNTPOnIHaveCheck Type 3064
TIdNNTPOnMovePointer Type 3064
TIdNNTPOnNewGroupsList Type 3064
TIdNNTPOnNewNews Type 3064

xxxiv Internet Direct (Indy) Version 10.1.5


TIdNNTPOnPost Type 3065
TIdNNTPOnSelectGroup Type 3065
TIdNNTPOnXHdr Type 3065
TIdNNTPOnXOver Type 3065
TIdNotifyEvent Type 3066
TIdNotifyThreadComponentEvent Type 3066
TIdNotifyThreadEvent Type 3066
TIdOnAuthenticate Type 3067
TIdOnAuthorization Type 3067
TIdOnBanner Type 3067
TIdOnBeforeBind Type 3068
TIdOnBeforeConnect Type 3068
TIdOnClientID Type 3068
TIdOnCommandBind Type 3068
TIdOnCommandConnect Type 3069
TIdOnDataChannelCreate Type 3069
TIdOnDataChannelDestroy Type 3069
TIdOnFTPStatEvent Type 3069
TIdOnGetCustomListFormat Type 3070
TIdOnGetStreams Type 3070
TIdOnLogString Type 3070
TIdOnMLST Type 3071
TIdOnParseCustomListFormat Type 3071
TIdOnPASV Type 3071
TIdOnSelectAuthorization Type 3071
TIdOnTLSNegotiationFailure Type 3072
TIdOperation Type 3072
TIdOwnedCollection Type 3072
TIdPersistent Type 3073
TIdPhoneAttributes Type 3073
TIdPID Type 3074
TIdPOP3ServerAPOPCommandEvent Type 3074
TIdPOP3ServerLogin Type 3074
TIdPOP3ServerMessageNumberEvent Type 3075
TIdPOP3ServerNoParamEvent Type 3075
TIdPOP3ServerStatEvent Type 3075
TIdPOP3ServerTOPCommandEvent Type 3075
TIdPort Type 3076
TIdQOTDGetEvent Type 3076
TIdQotdUDPGetEvent Type 3076
TIdReadLnFunction Type 3077
TIdRepliesClass Type 3077
TIdReplyClass Type 3077
TIdRexecCommandEvent Type 3078
TIdRSHCommandEvent Type 3078
TIdSASLServiceName Type 3079
TIdSeekOrigin Type 3079
TIdServeFile Type 3079
TIdServerSSLClass Type 3080
TIdServerThreadEvent Type 3080
TIdServerThreadExceptionEvent Type 3081
TIdSMTPFailedRecipient Type 3081

Internet Direct (Indy) Version 10.1.5 xxxv


TIdSMTPRelayStatus Type 3082
TIdSocketListClass Type 3082
TIdSocketOption Type 3083
TIdSocketOptionLevel Type 3084
TIdSocketProtocol Type 3084
TIdSocketType Type 3085
TIdSortCompare Type 3085
TIdSSLVerifyModeSet Type 3086
TIdStackClass Type 3086
TIdStackSocketHandle Type 3086
TIdStatusEvent Type 3087
TIdStream Type 3087
TIdStreamHelper Type 3088
TIdStringList Type 3088
TIdStringListSortCompare Type 3089
TIdStringMessageEvent Type 3089
TIdStrings Type 3089
TIdStringStream Type 3090
TIdSynchronizeThreadEvent Type 3090
TIdSyslogPRI Type 3090
TIdSystatEvent Type 3091
TIdTelnetCommandEvent Type 3091
TIdTelnetDataAvailEvent Type 3092
TIdTelnetNegotiateEvent Type 3092
TIdThreadClass Type 3093
TIdThreadList Type 3093
TIdThreadMethod Type 3093
TIdThreadOptions Type 3094
TIdThreadPriority Type 3094
TIdThreadWithTaskClass Type 3095
TIdUDPExceptionEvent Type 3095
TIdUDPSystatEvent Type 3096
TIdURIOptionalFieldsSet Type 3096
TIdUserAccess Type 3097
TIdUserHandle Type 3097
TIdUserManagerAuthenticationEvent Type 3097
TIdUserManagerLogoffEvent Type 3098
TIdZLibCompressorBaseClass Type 3098
TIMAP4CommandEvent Type 3098
TInFunc Type 3098
TIOHandlerNotify Type 3099
TIPMCastReadEvent Type 3099
TLogItemDataEvent Type 3099
TLogItemStatusEvent Type 3100
TLongIntArray Type 3101
TMessageArriveEvent Type 3101
TMessageReceiveEvent Type 3101
TOnAfterClientLogin Type 3101
TOnAfterUserLoginEvent Type 3102
TOnCacheChecksum Type 3102
TOnCheckFileEvent Type 3102
TOnCheckSumFile Type 3102

xxxvi Internet Direct (Indy) Version 10.1.5


TOnCombineFiles Type 3103
TOnCreateEvent Type 3103
TOnCreatePostStream Type 3103
TOnCreateSession Type 3104
TOnCustomListDirectoryEvent Type 3104
TOnCustomPathProcess Type 3105
TOnDataPortBind Type 3105
TOnDestroyEvent Type 3105
TOnDirectoryEvent Type 3106
TOnFileEvent Type 3106
TOnFTPUserLoginEvent Type 3106
TOnGetFileDateEvent Type 3106
TOnGetFileSizeEvent Type 3107
TOnGetMessagePartStream Type 3107
TOnHTTPDocument Type 3107
TOnListDirectoryEvent Type 3108
TOnMailFromEvent Type 3108
TOnManagerEvent Type 3108
TOnMsgReceive Type 3109
TOnNewCookieEvent Type 3109
TOnRcptToEvent Type 3110
TOnReceived Type 3110
TOnRenameFileEvent Type 3110
TOnReplyEvent Type 3110
TOnRetrieveFileEvent Type 3111
TOnSessionEndEvent Type 3111
TOnSessionStartEvent Type 3112
TOnSetATTRIB Type 3112
TOnSetFileDateEvent Type 3112
TOnSiteCHGRP Type 3113
TOnSiteCHMOD Type 3113
TOnSiteCHOWN Type 3113
TOnSiteUMASK Type 3113
TOnSiteUTIME Type 3114
TOnSMTPEvent Type 3114
TOnSMTPUserLoginEvent Type 3114
TOnStoreFileEvent Type 3114
TOnSyslogEvent Type 3115
TOnVerifyChecksum Type 3115
TOutFunc Type 3115
TPasswordEvent Type 3116
TPlusRequestEvent Type 3116
TPosProc Type 3116
TQueryType Type 3117
TReceiveErrorEvent Type 3117
TRequestEvent Type 3117
TResultRecordClass Type 3118
TResultSections Type 3118
TStringEvent Type 3118
TSysCharSet Type 3119
TTransferCompleteEvent Type 3119
TUDPReadEvent Type 3119

Internet Direct (Indy) Version 10.1.5 xxxvii


TVerifyPeerEvent Type 3120
TWorkBeginEvent Type 3120
TWorkEndEvent Type 3121
TWorkEvent Type 3121
WordStr Type 3122
Variables 3123
GAntiFreeze Variable 3123
GBase64DecodeTable Variable 3123
GBinHex4DecodeTable Variable 3124
GBSDStack Variable 3124
GDotNetComputerName Variable 3124
GlobalSASLList Variable 3125
GServeFileProc Variable 3125
GSocketListClass Variable 3125
GSSLRegistry Variable 3126
GStack Variable 3126
GThreadCount Variable 3126
GUUEDecodeTable Variable 3127
GWindowsStack Variable 3127
GXXEDecodeTable Variable 3128
IdMIMEBoundaryStrings Variable 3128
IdUserAccessDenied Variable 3128
IdUserHandleBroadcast Variable 3129
IdUserHandleNone Variable 3129
IndyFalseBoolStrs Variable 3129
IndyPos Variable 3129
IndyTrueBoolStrs Variable 3130
MIMEMediaType Variable 3130
Constants 3132
AAlwaysValidOpts Constant 3132
ASN1_COUNTER Constant 3132
ASN1_GAUGE Constant 3132
ASN1_INT Constant 3132
ASN1_IPADDR Constant 3133
ASN1_NULL Constant 3133
ASN1_OBJID Constant 3133
ASN1_OCTSTR Constant 3133
ASN1_OPAQUE Constant 3134
ASN1_SEQ Constant 3134
ASN1_TIMETICKS Constant 3134
AVAIL_DEF Constant 3134
B_CR Constant 3135
B_EQUALS Constant 3135
B_LF Constant 3135
B_NUL Constant 3135
B_PERIOD Constant 3135
B_TAB Constant 3135
b64Chars Constant 3136
b64Index Constant 3136
b64Table Constant 3136
BACKSPACE Constant 3137
BufferSize Constant 3137

xxxviii Internet Direct (Indy) Version 10.1.5


BUFLEN Constant 3137
cA Constant 3137
cAAAA Constant 3138
CAPAPIPELINE Constant 3138
cAt Constant 3138
cAXFR Constant 3139
CC_BYE Constant 3139
CC_CH_PASSW Constant 3140
CC_DEL_DIR Constant 3142
CC_DEL_FILE Constant 3143
CC_ERR Constant 3145
CC_GET_DIR Constant 3146
CC_GET_FILE Constant 3148
CC_GET_PRO Constant 3149
CC_GRAB_DONE Constant 3151
CC_GRAB_FILE Constant 3152
CC_INFO Constant 3153
CC_INSTALL Constant 3155
CC_LIMIT Constant 3156
CC_MAKE_DIR Constant 3158
CC_RENAME Constant 3159
CC_SET_PRO Constant 3161
CC_STAT Constant 3162
CC_TEST Constant 3164
CC_UP_LOAD Constant 3165
CC_VERSION Constant 3167
cCName Constant 3168
CDATE_PART_SEP Constant 3168
CHAR0 Constant 3169
CHAR32 Constant 3169
cHINFO Constant 3169
cInclude Constant 3170
cIXFR Constant 3170
Class_CHAOS Constant 3170
CLASS_DEF Constant 3170
Class_IN Constant 3171
cLOC Constant 3171
cMB Constant 3171
cMD Constant 3171
cMF Constant 3172
cMG Constant 3172
cMINFO Constant 3172
cMR Constant 3172
cMX Constant 3173
cNS Constant 3173
cNSAP Constant 3173
cNSAP_PTR Constant 3173
cNULL Constant 3174
cOrigin Constant 3174
cPTR Constant 3174
CR Constant 3174
cRCodeFormatErr Constant 3175

Internet Direct (Indy) Version 10.1.5 xxxix


cRCodeNameErr Constant 3175
cRCodeNoError Constant 3175
cRCodeNotImplemented Constant 3175
cRCodeQueryCacheFindError Constant 3176
cRCodeQueryCacheOK Constant 3176
cRCodeQueryNotFound Constant 3176
cRCodeQueryNotImplement Constant 3176
cRCodeQueryOK Constant 3177
cRCodeQueryReturned Constant 3177
cRCodeRefused Constant 3177
cRCodeServerErr Constant 3177
cRCodeStrs Constant 3178
crlf Constant 3178
csDesigning Constant 3178
csLoading Constant 3178
cSOA Constant 3179
cSTAR Constant 3179
cTXT Constant 3179
CUR_DIR Constant 3179
cWKS Constant 3180
DATA_ACCEPT Constant 3180
DATA_CMD Constant 3180
DATA_PERIOD_ACCEPT Constant 3181
DEF_ATYPE Constant 3181
DEF_BANNERPAGE Constant 3181
DEF_DIR_GRP_PERM Constant 3182
DEF_DIR_OTHER_PERM Constant 3182
DEF_DIR_OWN_PERM Constant 3182
DEF_DIRFORMAT Constant 3182
DEF_FILE_GRP_PERM Constant 3183
DEF_FILE_OTHER_PERM Constant 3183
DEF_FILE_OWN_PERM Constant 3183
DEF_FILEFormat Constant 3183
DEF_FTP_BLOCK_ALL_PORTS Constant 3183
DEF_FTP_DISABLE_STAT Constant 3184
DEF_FTP_DISABLE_SYST Constant 3184
DEF_FTP_HIDE_INVALID_USER Constant 3184
DEF_FTP_IMPLICIT_FTP Constant 3184
DEF_FTP_INVALIDPASS_DELAY Constant 3185
DEF_FTP_NO_RESERVED_PORTS Constant 3185
DEF_FTP_PASSWORDATTEMPTS Constant 3185
DEF_FTP_PASV_SAME_IP Constant 3185
DEF_FTP_PERMIT_CCC Constant 3186
DEF_FTP_PORT_SAME_IP Constant 3186
DEF_FTP_REPORT_EX_MSG Constant 3186
DEF_Id_FTP_AUTH_CMD Constant 3186
DEF_Id_FTP_READTIMEOUT Constant 3187
DEF_Id_FTP_UseCCC Constant 3187
DEF_Id_FTP_UseExtendedDataPort Constant 3187
DEF_Id_TIdFTP_Implicit Constant 3187
DEF_Id_TIdFTP_UseExtendedData Constant 3188
DEF_Id_TIdFTP_UseMIS Constant 3188

xl Internet Direct (Indy) Version 10.1.5


DEF_IMAP4_AUTH Constant 3188
DEF_IMAP4_IMPLICIT_TLS Constant 3188
DEF_IMP_LOOPBACK Constant 3189
DEF_IMP_THREADEDEVENT Constant 3189
DEF_IMP_TTL Constant 3189
DEF_INDENTCOUNT Constant 3190
DEF_MAILWHENPRINTED Constant 3190
DEF_MAXSIZE Constant 3190
DEF_MAXSPACE Constant 3191
DEF_MEM_LEVEL Constant 3191
DEF_NNTP_IMPLICIT_TLS Constant 3191
DEF_OneConnectionPerDomain Constant 3192
DEF_OUTPUTWIDTH Constant 3192
DEF_OWNER Constant 3192
DEF_PACKET_SIZE Constant 3192
DEF_PASV_BOUND_MAX Constant 3193
DEF_PASV_BOUND_MIN Constant 3193
DEF_PATHPROCESSING Constant 3193
DEF_POP3_IMPLICIT_TLS Constant 3194
DEF_POP3USE_IMPLICIT_TLS Constant 3194
DEF_REPLY_CODE Constant 3194
DEF_ReplyFormat Constant 3194
DEF_SENT Constant 3195
DEF_SMTP_AUTH Constant 3195
DEF_SMTP_PIPELINE Constant 3195
DEF_SMTP_Use_ImplicitTLS Constant 3196
DEF_SSL_SUPPORT Constant 3196
DEF_TRY_IMPLICITTLS Constant 3196
DEF_TRYMIME Constant 3197
DEF_USETLS Constant 3197
DEF_ZLIB_COMP_LEVEL Constant 3197
DEF_ZLIB_MEM_LEVEL Constant 3198
DEF_ZLIB_METHOD Constant 3198
DEF_ZLIB_STRATAGY Constant 3198
DEF_ZLIB_WINDOW_BITS Constant 3198
DEFAULT_ADDRESS Constant 3199
DEFAULT_COMM_MODE Constant 3199
DEFAULT_CONN_LIMIT Constant 3199
DEFAULT_IS_LISTENER Constant 3199
DEFAULT_PORT Constant 3200
DEFAULT_RECEIVE_TIMEOUT Constant 3200
DEFAULT_RECONNECT_DELAY Constant 3200
DEFAULT_TIMEOUT Constant 3200
DefIdSysUDPTimeout Constant 3201
DICT_AUTHDEF Constant 3201
EBadValue Constant 3201
EGenErr Constant 3201
ENoError Constant 3202
ENoSuchName Constant 3202
EOL Constant 3202
EPLF_BASE_DATE Constant 3203
EReadOnly Constant 3203

Internet Direct (Indy) Version 10.1.5 xli


ERR Constant 3203
ErrAccessViolation Constant 3203
ErrAllocationExceeded Constant 3204
ErrFileAlreadyExists Constant 3204
ErrFileNotFound Constant 3204
ErrIllegalOperation Constant 3204
ErrNoSuchUser Constant 3205
ErrOptionNegotiationFailed Constant 3205
ErrUndefined Constant 3205
ErrUnknownTransferID Constant 3205
ETooBig Constant 3206
ExplicitTLSVals Constant 3206
fmCreate Constant 3206
fmOpenRead Constant 3206
fmOpenReadWrite Constant 3207
fmOpenWrite Constant 3207
fmShareDenyNone Constant 3207
fmShareDenyWrite Constant 3208
fmShareExclusive Constant 3208
GBase64CodeTable Constant 3208
GBinHex4CodeTable Constant 3209
GBinHex4IdentificationString Constant 3210
GContentType Constant 3210
GFContentLength Constant 3210
GFMaxAge Constant 3211
GFRequestedBlockSize Constant 3211
GFTTL Constant 3211
GLoginAttempts Constant 3212
GOSType Constant 3212
GPathDelim Constant 3212
GReceiveTimeout Constant 3213
GRecvBufferSizeDefault Constant 3213
GResponseNo Constant 3214
GSendBufferSizeDefault Constant 3214
GServerSoftware Constant 3214
GSessionIDCookie Constant 3215
GTransferMode Constant 3215
GUUECodeTable Constant 3216
GXXECodeTable Constant 3216
GZIP_WINBITS Constant 3218
hdrsize Constant 3218
HEXPREFIX Constant 3218
HSIZE Constant 3219
HTTPRequestStrings Constant 3220
iAA_Authoritative Constant 3220
iAA_NotAuthoritative Constant 3220
ICMP_MIN Constant 3220
ICMP6_DST_UNREACH Constant 3221
ICMP6_DST_UNREACH_ADDR Constant 3221
ICMP6_DST_UNREACH_ADMIN Constant 3221
ICMP6_DST_UNREACH_NOPORT Constant 3221
ICMP6_DST_UNREACH_NOROUTE Constant 3222

xlii Internet Direct (Indy) Version 10.1.5


ICMP6_DST_UNREACH_NOTNEIGHBOR Constant 3222
ICMP6_DST_UNREACH_REJCT_DST Constant 3222
ICMP6_DST_UNREACH_SOURCE_FILTERING Constant 3222
ICMP6_ECHO_REPLY Constant 3223
ICMP6_ECHO_REQUEST Constant 3223
ICMP6_INFOMSG_MASK Constant 3223
ICMP6_MEMBERSHIP_QUERY Constant 3223
ICMP6_MEMBERSHIP_REDUCTION Constant 3224
ICMP6_MEMBERSHIP_REPORT Constant 3224
ICMP6_PACKET_TOO_BIG Constant 3224
ICMP6_PARAM_PROB Constant 3224
ICMP6_PARAMPROB_HEADER Constant 3225
ICMP6_PARAMPROB_NEXTHEADER Constant 3225
ICMP6_PARAMPROB_OPTION Constant 3225
ICMP6_TIME_EXCEED_REASSEMBLY Constant 3225
ICMP6_TIME_EXCEED_TRANSIT Constant 3226
ICMP6_TIME_EXCEEDED Constant 3226
Id__S_IEXEC Constant 3226
Id__S_IREAD Constant 3226
Id__S_ISGID Constant 3227
Id__S_ISUID Constant 3227
Id__S_ISVTX Constant 3227
Id__S_IWRITE Constant 3227
ID_ACCEPT_WAIT Constant 3228
Id_AIPN_0_HOP Constant 3228
Id_AIPN_3PC Constant 3228
Id_AIPN_A_N Constant 3229
Id_AIPN_Any_Distributed_File_System Constant 3229
Id_AIPN_Any_Host_Internal Constant 3229
Id_AIPN_Any_LAN Constant 3230
Id_AIPN_Any_Private_Encryption Constant 3230
Id_AIPN_ARGUS Constant 3230
Id_AIPN_ARIS Constant 3231
Id_AIPN_AX_25 Constant 3231
Id_AIPN_BBN_RCC_MON Constant 3231
Id_AIPN_BNA Constant 3232
Id_AIPN_BR_SAT_MON Constant 3232
Id_AIPN_CFTP Constant 3232
Id_AIPN_CHAOS Constant 3233
Id_AIPN_Compaq_Peer Constant 3233
Id_AIPN_CPHB Constant 3233
Id_AIPN_CPNX Constant 3234
Id_AIPN_CRTP Constant 3234
Id_AIPN_CRUDP Constant 3234
Id_AIPN_DCN_MEAS Constant 3235
Id_AIPN_DDP Constant 3235
Id_AIPN_DDX Constant 3235
Id_AIPN_DGP Constant 3236
Id_AIPN_EGP Constant 3236
Id_AIPN_EMCON Constant 3236
Id_AIPN_ENCAP Constant 3237
Id_AIPN_ETHERIP Constant 3237

Internet Direct (Indy) Version 10.1.5 xliii


Id_AIPN_EXPAK Constant 3237
Id_AIPN_FC Constant 3238
Id_AIPN_FIRE Constant 3238
Id_AIPN_GGP Constant 3238
Id_AIPN_GMTP Constant 3239
Id_AIPN_GRE Constant 3239
Id_AIPN_HMP Constant 3239
Id_AIPN_I_NLSP Constant 3240
Id_AIPN_IATP Constant 3240
Id_AIPN_ICMP Constant 3240
Id_AIPN_IDPR Constant 3241
Id_AIPN_IDPR_CMTP Constant 3241
Id_AIPN_IDRP Constant 3241
Id_AIPN_IFMP Constant 3242
Id_AIPN_IGMP Constant 3242
Id_AIPN_IGP Constant 3242
Id_AIPN_IGRP Constant 3243
Id_AIPN_IL Constant 3243
Id_AIPN_IP Constant 3243
Id_AIPN_IPComp Constant 3244
Id_AIPN_IPCV Constant 3244
Id_AIPN_IPIP Constant 3244
Id_AIPN_IPLT Constant 3245
Id_AIPN_IPPC Constant 3245
Id_AIPN_IPV6_ICMP Constant 3245
Id_AIPN_IPV6_NO_NEXT Constant 3246
Id_AIPN_IPV6_OPTS Constant 3246
Id_AIPN_IPX_In_IP Constant 3246
Id_AIPN_IRTP Constant 3247
Id_AIPN_ISIS Constant 3247
Id_AIPN_ISO_IP Constant 3247
Id_AIPN_ISO_TP4 Constant 3248
Id_AIPN_KRYPTOLAN Constant 3248
Id_AIPN_Kryptonet Constant 3248
Id_AIPN_L2TP Constant 3249
Id_AIPN_LARP Constant 3249
Id_AIPN_LEAF_1 Constant 3249
Id_AIPN_LEAF_2 Constant 3250
Id_AIPN_MERIT_IMP Constant 3250
Id_AIPN_MHRP Constant 3250
Id_AIPN_MICP Constant 3251
Id_AIPN_MOBILE Constant 3251
Id_AIPN_MTP Constant 3251
Id_AIPN_MUX Constant 3252
Id_AIPN_NETBLT Constant 3252
Id_AIPN_NFE_NSP Constant 3252
Id_AIPN_NHRP Constant 3253
Id_AIPN_NSFNET_IGP Constant 3253
Id_AIPN_NVP_II Constant 3253
Id_AIPN_OSPFIGP Constant 3254
Id_AIPN_PGM Constant 3254
Id_AIPN_PIM Constant 3254

xliv Internet Direct (Indy) Version 10.1.5


Id_AIPN_PIPE Constant 3255
Id_AIPN_PNNI Constant 3255
Id_AIPN_PRM Constant 3255
Id_AIPN_PTP Constant 3256
Id_AIPN_PUP Constant 3256
Id_AIPN_PVP Constant 3256
Id_AIPN_QNX Constant 3257
Id_AIPN_RDP Constant 3257
Id_AIPN_Reserved Constant 3257
Id_AIPN_Reserved2 Constant 3258
Id_AIPN_RSVP Constant 3258
Id_AIPN_RSVP_E2E_IGNORE Constant 3258
Id_AIPN_RVD Constant 3259
Id_AIPN_SAT_EXPACK Constant 3259
Id_AIPN_SAT_MON Constant 3259
Id_AIPN_SCC_SP Constant 3260
Id_AIPN_SCPS Constant 3260
Id_AIPN_SCTP Constant 3260
Id_AIPN_SDRP Constant 3261
Id_AIPN_SECURE_VMTP Constant 3261
Id_AIPN_SEP Constant 3261
Id_AIPN_SIP Constant 3262
Id_AIPN_SIP_FRAG Constant 3262
Id_AIPN_SIP_SR Constant 3262
Id_AIPN_SIPP_AH Constant 3263
Id_AIPN_SIPP_ESB Constant 3263
Id_AIPN_SKIP Constant 3263
Id_AIPN_SM Constant 3264
Id_AIPN_SMP Constant 3264
Id_AIPN_SNP Constant 3264
Id_AIPN_Sprite_RPC Constant 3265
Id_AIPN_SPS Constant 3265
Id_AIPN_SRP Constant 3265
Id_AIPN_SSCOPMCE Constant 3266
Id_AIPN_ST Constant 3266
Id_AIPN_STP Constant 3266
Id_AIPN_SUN_ND Constant 3267
Id_AIPN_SWIPE Constant 3267
Id_AIPN_TCF Constant 3267
Id_AIPN_TCP Constant 3268
Id_AIPN_TLSP Constant 3268
Id_AIPN_TP_PLUS_PLUS Constant 3268
Id_AIPN_TRUNK_1 Constant 3269
Id_AIPN_TRUNK_2 Constant 3269
Id_AIPN_TTP Constant 3269
Id_AIPN_UCL Constant 3270
Id_AIPN_UDP Constant 3270
Id_AIPN_UTI Constant 3270
Id_AIPN_VINES Constant 3271
Id_AIPN_VISA Constant 3271
Id_AIPN_VMTP Constant 3271
Id_AIPN_VRRP Constant 3272

Internet Direct (Indy) Version 10.1.5 xlv


Id_AIPN_WB_MON Constant 3272
Id_AIPN_WSM Constant 3272
Id_AIPN_XNET Constant 3273
Id_AIPN_XNS_IDP Constant 3273
Id_AIPN_XTP Constant 3273
Id_AIVN_IP Constant 3274
Id_AIVN_PIP Constant 3274
Id_AIVN_Reserved2 Constant 3274
Id_AIVN_Rserved Constant 3275
Id_AIVN_SIP Constant 3275
Id_AIVN_ST Constant 3275
Id_AIVN_TP_IX Constant 3276
Id_AIVN_Tuba Constant 3276
Id_ARP_HSIZE Constant 3276
Id_ARPHRD_ETHER Constant 3276
Id_ARPOP_INVREPLY Constant 3277
Id_ARPOP_INVREQUEST Constant 3277
Id_ARPOP_REPLY Constant 3277
Id_ARPOP_REQUEST Constant 3277
Id_ARPOP_REVREPLY Constant 3278
Id_ARPOP_REVREQUEST Constant 3278
Id_CS_ISO_8859_1 Constant 3278
Id_CS_ISO_8859_2 Constant 3278
Id_CS_ISO_8859_3 Constant 3279
Id_CS_ISO_8859_4 Constant 3279
Id_CS_ISO_8859_5 Constant 3280
Id_CS_ISO_8859_6 Constant 3280
Id_CS_ISO_8859_7 Constant 3280
Id_CS_ISO_8859_8 Constant 3281
Id_CS_ISO_8859_9 Constant 3281
Id_CS_US_ASCII Constant 3281
Id_DEF_AllowAnon Constant 3282
Id_DEF_PassStrictCheck Constant 3282
ID_DEFAULT_IP_VERSION Constant 3282
ID_Default_TIdAntiFreezeBase_Active Constant 3282
ID_Default_TIdAntiFreezeBase_ApplicationHasPriority Constant 3283
ID_Default_TIdAntiFreezeBase_IdleTimeOut Constant 3283
ID_Default_TIdAntiFreezeBase_OnlyWhenIdle Constant 3283
Id_DNS_HSIZE Constant 3284
Id_EHR_GENERIC_OK Constant 3284
Id_EHR_GENERIC_PERM Constant 3284
Id_EHR_GENERIC_TRANS Constant 3285
Id_EHR_MB_DISABLED_PERM Constant 3285
Id_EHR_MB_DISABLED_TEMP Constant 3285
Id_EHR_MB_FULL Constant 3285
Id_EHR_MB_ML_EXPAN_PERM Constant 3286
Id_EHR_MB_ML_EXPAN_TEMP Constant 3286
Id_EHR_MB_MSG_LEN_LIMIT Constant 3286
Id_EHR_MB_OTHER_STATUS_OK Constant 3286
Id_EHR_MB_OTHER_STATUS_PERM Constant 3287
Id_EHR_MB_OTHER_STATUS_TRANS Constant 3287
Id_EHR_MD_INCORRECT_CONFIG_PERM Constant 3287

xlvi Internet Direct (Indy) Version 10.1.5


Id_EHR_MD_INCORRECT_CONFIG_TRANS Constant 3287
Id_EHR_MD_MAIL_SYSTEM_FULL Constant 3288
Id_EHR_MD_NOT_CAPABLE_FEAT_PERM Constant 3288
Id_EHR_MD_NOT_CAPABLE_FEAT_TRANS Constant 3288
Id_EHR_MD_NOT_EXCEPTING_PERM Constant 3288
Id_EHR_MD_NOT_EXCEPTING_TRANS Constant 3289
Id_EHR_MD_OTHER_OK Constant 3289
Id_EHR_MD_OTHER_PERM Constant 3289
Id_EHR_MD_OTHER_TRANS Constant 3289
Id_EHR_MD_TOO_BIG Constant 3290
Id_EHR_MED_CONV_FAILED_PERM Constant 3290
Id_EHR_MED_CONV_FAILED_TRANS Constant 3290
Id_EHR_MED_CONV_LOSS_ERROR Constant 3290
Id_EHR_MED_CONV_LOSS_WARNING Constant 3291
Id_EHR_MED_CONV_REQUIRED_NOT_SUP_PERM Constant 3291
Id_EHR_MED_CONV_REQUIRED_NOT_SUP_TRANS Constant 3291
Id_EHR_MED_CONV_REQUIRED_PROHIB_PERM Constant 3291
Id_EHR_MED_CONV_REQUIRED_PROHIB_TRANS Constant 3292
Id_EHR_MED_NOT_SUPPORTED Constant 3292
Id_EHR_MED_OTHER_OK Constant 3292
Id_EHR_MED_OTHER_PERM Constant 3292
Id_EHR_MED_OTHER_TRANS Constant 3293
Id_EHR_MSG_AMBIG_DEST Constant 3293
Id_EHR_MSG_BAD_DEST Constant 3293
Id_EHR_MSG_BAD_DEST_SYNTAX Constant 3293
Id_EHR_MSG_BAD_DEST_SYST Constant 3294
Id_EHR_MSG_BAD_SENDER_ADDR Constant 3294
Id_EHR_MSG_DEST_MOVED_NOFORWARD Constant 3294
Id_EHR_MSG_OTH_OK Constant 3294
Id_EHR_MSG_OTH_PERM Constant 3295
Id_EHR_MSG_OTH_TRANS Constant 3295
Id_EHR_MSG_SENDER_BOX_SYNTAX Constant 3295
Id_EHR_MSG_VALID_DEST Constant 3295
Id_EHR_NR_BAD_CONNECTION Constant 3296
Id_EHR_NR_DELIVERY_EXPIRED_PERM Constant 3296
Id_EHR_NR_DELIVERY_EXPIRED_TEMP Constant 3296
Id_EHR_NR_DIR_SVR_FAILURE Constant 3296
Id_EHR_NR_LOOP_DETECTED Constant 3297
Id_EHR_NR_NO_ANSWER Constant 3297
Id_EHR_NR_OTHER_OK Constant 3297
Id_EHR_NR_OTHER_PERM Constant 3297
Id_EHR_NR_OTHER_TRANS Constant 3298
Id_EHR_NR_SYSTEM_CONGESTION Constant 3298
Id_EHR_NR_UNABLE_TO_ROUTE_PERM Constant 3298
Id_EHR_NR_UNABLE_TO_ROUTE_TRANS Constant 3298
Id_EHR_PR_INVALID_CMD Constant 3299
Id_EHR_PR_INVALID_CMD_ARGS Constant 3299
Id_EHR_PR_OTHER_OK Constant 3299
Id_EHR_PR_OTHER_PERM Constant 3299
Id_EHR_PR_OTHER_TEMP Constant 3300
Id_EHR_PR_SYNTAX_ERR Constant 3300
Id_EHR_PR_TOO_MANY_RECIPIENTS_PERM Constant 3300

Internet Direct (Indy) Version 10.1.5 xlvii


Id_EHR_PR_TOO_MANY_RECIPIENTS_TEMP Constant 3300
Id_EHR_PR_WRONG_VER_PERM Constant 3301
Id_EHR_PR_WRONG_VER_TRANS Constant 3301
Id_EHR_SEC_CONV_REQ_NOT_POSSIBLE Constant 3301
Id_EHR_SEC_CRYPT_ALG_NOT_SUP_PERM Constant 3301
Id_EHR_SEC_CRYPT_ALG_NOT_SUP_TRANS Constant 3302
Id_EHR_SEC_CRYPT_FAILURE_PERM Constant 3302
Id_EHR_SEC_CRYPT_FAILURE_TRANS Constant 3302
Id_EHR_SEC_DEL_NOT_AUTH Constant 3302
Id_EHR_SEC_EXP_NOT_AUTH Constant 3303
Id_EHR_SEC_INTEGRETIY_FAILED_TRANS Constant 3303
Id_EHR_SEC_INTEGRETIY_FAILED_WARN Constant 3303
Id_EHR_SEC_NOT_SUPPORTED Constant 3303
Id_EHR_SEC_OTHER_OK Constant 3304
Id_EHR_SEC_OTHER_PERM Constant 3304
Id_EHR_SEC_OTHER_TRANS Constant 3304
Id_EHR_USE_STARTTLS Constant 3304
Id_ETH_HSIZE Constant 3305
Id_ETHER_ADDR_LEN Constant 3305
Id_ETHERTYPE_ARP Constant 3305
Id_ETHERTYPE_IP Constant 3305
Id_ETHERTYPE_LOOPBACK Constant 3306
Id_ETHERTYPE_PUP Constant 3306
Id_ETHERTYPE_REVARP Constant 3306
Id_ETHERTYPE_VLAN Constant 3306
Id_HTTPMethodConnect Constant 3307
Id_HTTPMethodDelete Constant 3307
Id_HTTPMethodGet Constant 3308
Id_HTTPMethodHead Constant 3308
Id_HTTPMethodOptions Constant 3309
Id_HTTPMethodPost Constant 3309
Id_HTTPMethodPut Constant 3310
Id_HTTPMethodTrace Constant 3310
Id_ICMP_AUTH_FAILED Constant 3311
Id_ICMP_BAD_SPI Constant 3311
Id_ICMP_CONV_32BIT_ROLLOVER_AND_ACK Constant 3311
Id_ICMP_CONV_DONTCONV_OPTION Constant 3311
Id_ICMP_CONV_IP_HEADER_LEN_EXCEEDED Constant 3312
Id_ICMP_CONV_OVERALL_LENGTH_EXCEEDED Constant 3312
Id_ICMP_CONV_PORT_OUT_OF_RANGE Constant 3312
Id_ICMP_CONV_TRANS_HEADER_LEN_EXCEEDED Constant 3312
Id_ICMP_CONV_TRANS_PROT_255 Constant 3313
Id_ICMP_CONV_UNKNOWN_MAN_OPTION Constant 3313
Id_ICMP_CONV_UNKNOWN_MAN_TRANS_OPTION Constant 3313
Id_ICMP_CONV_UNKNWON_UNSEP_OPTION Constant 3313
Id_ICMP_CONV_UNSEP_TRANSPORT Constant 3314
Id_ICMP_CONV_UNSPEC Constant 3314
Id_ICMP_DATAGRAM_CONV Constant 3314
Id_ICMP_DECOMPRESS_FAILED Constant 3314
Id_ICMP_DECRYPTION_FAILED Constant 3315
Id_ICMP_ECHO Constant 3315
Id_ICMP_ECHO_HSIZE Constant 3315

xlviii Internet Direct (Indy) Version 10.1.5


Id_ICMP_ECHOREPLY Constant 3315
Id_ICMP_HSIZE Constant 3316
Id_ICMP_IPv6_I_AM_HERE Constant 3316
Id_ICMP_IPv6_WHERE_ARE_YOU Constant 3316
Id_ICMP_IREQ Constant 3316
Id_ICMP_IREQREPLY Constant 3317
Id_ICMP_MASK_HSIZE Constant 3317
Id_ICMP_MASKREPLY Constant 3317
Id_ICMP_MASKREQ Constant 3317
Id_ICMP_MOB_HOST_REDIR Constant 3318
Id_ICMP_MOB_REG_REPLY Constant 3318
Id_ICMP_MOB_REG_REQ Constant 3318
Id_ICMP_NEED_AUTHENTICATION Constant 3318
Id_ICMP_NEED_AUTHORIZATION Constant 3319
Id_ICMP_PARAMPROB Constant 3319
Id_ICMP_PARAMPROB_OPTABSENT Constant 3319
Id_ICMP_PHOTURIS Constant 3319
Id_ICMP_REDIRECT Constant 3320
Id_ICMP_REDIRECT_HOST Constant 3320
Id_ICMP_REDIRECT_HSIZE Constant 3320
Id_ICMP_REDIRECT_NET Constant 3320
Id_ICMP_REDIRECT_TOSHOST Constant 3321
Id_ICMP_REDIRECT_TOSNET Constant 3321
Id_ICMP_ROUTERADVERT Constant 3321
Id_ICMP_ROUTERSOLICIT Constant 3321
Id_ICMP_SKIP Constant 3322
Id_ICMP_SOURCEQUENCH Constant 3322
Id_ICMP_TIMEXCEED_HSIZE Constant 3322
Id_ICMP_TIMXCEED Constant 3322
Id_ICMP_TIMXCEED_INTRANS Constant 3323
Id_ICMP_TIMXCEED_REASS Constant 3323
Id_ICMP_TRACEROUTE Constant 3323
Id_ICMP_TRACEROUTE_NO_ROUTE Constant 3323
Id_ICMP_TRACEROUTE_PACKET_FORWARDED Constant 3324
Id_ICMP_TS_HSIZE Constant 3324
Id_ICMP_TSTAMP Constant 3324
Id_ICMP_TSTAMPREPLY Constant 3324
Id_ICMP_UNREACH Constant 3325
Id_ICMP_UNREACH_FILTER_PROHIB Constant 3325
Id_ICMP_UNREACH_HOST Constant 3325
Id_ICMP_UNREACH_HOST_PRECEDENCE Constant 3325
Id_ICMP_UNREACH_HOST_PROHIB Constant 3326
Id_ICMP_UNREACH_HOST_UNKNOWN Constant 3326
Id_ICMP_UNREACH_HSIZE Constant 3326
Id_ICMP_UNREACH_ISOLATED Constant 3326
Id_ICMP_UNREACH_NEEDFRAG Constant 3327
Id_ICMP_UNREACH_NET Constant 3327
Id_ICMP_UNREACH_NET_PROHIB Constant 3327
Id_ICMP_UNREACH_NET_UNKNOWN Constant 3327
Id_ICMP_UNREACH_PORT Constant 3328
Id_ICMP_UNREACH_PRECEDENCE_CUTOFF Constant 3328
Id_ICMP_UNREACH_PROTOCOL Constant 3328

Internet Direct (Indy) Version 10.1.5 xlix


Id_ICMP_UNREACH_SRCFAIL Constant 3328
Id_ICMP_UNREACH_TOSHOST Constant 3329
Id_ICMP_UNREACH_TOSNET Constant 3329
Id_ICMP6_ECHO_HSIZE Constant 3329
Id_IGMP_HSIZE Constant 3329
Id_IGMP_LEAVE_GROUP Constant 3330
Id_IGMP_MEMBERSHIP_QUERY Constant 3330
Id_IGMP_V1_MEMBERSHIP_REPORT Constant 3330
Id_IGMP_V2_MEMBERSHIP_REPORT Constant 3330
Id_IOHandler_MaxCapturedLines Constant 3331
Id_IP_DF Constant 3331
Id_IP_HSIZE Constant 3331
Id_IP_MAXPACKET Constant 3332
Id_IP_MF Constant 3332
Id_IP_OFFMASK Constant 3332
Id_IP_RF Constant 3332
Id_IPMC_3Com Constant 3333
Id_IPMC_3Com_AMP3 Constant 3333
Id_IPMC_8x8 Constant 3333
Id_IPMC_Administratively_Max Constant 3334
Id_IPMC_Administratively_Min Constant 3334
Id_IPMC_AGENTVIEW Constant 3334
Id_IPMC_Al_MPP_Hello Constant 3335
Id_IPMC_Alchemy Constant 3335
Id_IPMC_All_CDT_Routers Constant 3335
Id_IPMC_All_Routers Constant 3336
Id_IPMC_All_Systems Constant 3336
Id_IPMC_ampr_info Constant 3337
Id_IPMC_Artificial_Horizons Constant 3337
Id_IPMC_AUDIONEWS Constant 3337
Id_IPMC_B1RMonitor Constant 3338
Id_IPMC_Base_Address Constant 3338
Id_IPMC_Border_Max Constant 3338
Id_IPMC_Border_Min Constant 3339
Id_IPMC_Cal_Max Constant 3339
Id_IPMC_Cal_Min Constant 3339
Id_IPMC_CDPD_Max Constant 3340
Id_IPMC_CDPD_Min Constant 3340
Id_IPMC_ciena Constant 3341
Id_IPMC_Cisco_nhap Constant 3341
Id_IPMC_cisco_rp_announce Constant 3341
Id_IPMC_cisco_rp_discovery Constant 3342
Id_IPMC_CN Constant 3342
Id_IPMC_CNN Constant 3342
Id_IPMC_CNR_Max Constant 3343
Id_IPMC_CNR_Min Constant 3343
Id_IPMC_compaq_peer Constant 3343
Id_IPMC_CoolCast_Max Constant 3344
Id_IPMC_CoolCast_Min Constant 3344
Id_IPMC_Cornell_Max Constant 3345
Id_IPMC_Cornell_Min Constant 3345
Id_IPMC_CS_Multicasting Constant 3345

l Internet Direct (Indy) Version 10.1.5


Id_IPMC_dantz Constant 3346
Id_IPMC_dcap_clients Constant 3346
Id_IPMC_dcap_servers Constant 3346
Id_IPMC_designated_sbm Constant 3347
Id_IPMC_DHCP_All_PIM_Routers Constant 3347
Id_IPMC_DHCP_Server Constant 3347
Id_IPMC_DHCP_SERVERS Constant 3348
Id_IPMC_dieboldmcast Constant 3348
Id_IPMC_digistar Constant 3349
Id_IPMC_DirecPC_SI Constant 3349
Id_IPMC_DIS_Max Constant 3349
Id_IPMC_DIS_Min Constant 3350
Id_IPMC_DLSw_Max Constant 3350
Id_IPMC_DLSw_Min Constant 3350
Id_IPMC_Domain_Max Constant 3351
Id_IPMC_Domain_Min Constant 3351
Id_IPMC_Dow_Max Constant 3351
Id_IPMC_Dow_Min Constant 3352
Id_IPMC_DTC_Announcement Constant 3352
Id_IPMC_dtn_mc Constant 3353
Id_IPMC_DVMRP_on_MOSPF Constant 3353
Id_IPMC_DVMRP_Routers Constant 3353
Id_IPMC_DXCLUSTER Constant 3354
Id_IPMC_EMS_InterDev Constant 3354
Id_IPMC_EMWIN Constant 3354
Id_IPMC_ETC_Control Constant 3355
Id_IPMC_extended_sys Constant 3355
Id_IPMC_ff_system_Management Constant 3355
Id_IPMC_gatekeeper Constant 3356
Id_IPMC_GE_FANUC Constant 3356
Id_IPMC_GilatSkySurfer Constant 3357
Id_IPMC_GLOBECAST_ID Constant 3357
Id_IPMC_GLOP_Max Constant 3357
Id_IPMC_GLOP_Min Constant 3358
Id_IPMC_HAVI_Sim Constant 3358
Id_IPMC_heartbeat Constant 3358
Id_IPMC_Hewlett_Max Constant 3359
Id_IPMC_Hewlett_Min Constant 3359
Id_IPMC_host_announce Constant 3359
Id_IPMC_host_request Constant 3360
Id_IPMC_hp_device_disc Constant 3360
Id_IPMC_HSPP Constant 3361
Id_IPMC_HYPERFEED Constant 3361
Id_IPMC_HYPERFEED_Max Constant 3361
Id_IPMC_HYPERFEED_Min Constant 3362
Id_IPMC_iapp Constant 3362
Id_IPMC_IAPP2 Constant 3362
Id_IPMC_iberiagames Constant 3363
Id_IPMC_IETF_1_Audio Constant 3363
Id_IPMC_IETF_1_Low_Audio Constant 3363
Id_IPMC_IETF_1_Video Constant 3364
Id_IPMC_IETF_2_Audio Constant 3364

Internet Direct (Indy) Version 10.1.5 li


Id_IPMC_IETF_2_Low_Audio Constant 3365
Id_IPMC_IETF_2_Video Constant 3365
Id_IPMC_IGMP Constant 3365
Id_IPMC_IGRP_Routers Constant 3366
Id_IPMC_IIG_Max Constant 3366
Id_IPMC_IIG_Min Constant 3366
Id_IPMC_imFtmSvc Constant 3367
Id_IPMC_INDIGO_VHDP Constant 3367
Id_IPMC_Infront Constant 3367
Id_IPMC_Intline Constant 3368
Id_IPMC_Intline_1 Constant 3368
Id_IPMC_Intline_10 Constant 3369
Id_IPMC_Intline_11 Constant 3369
Id_IPMC_Intline_12 Constant 3369
Id_IPMC_Intline_13 Constant 3370
Id_IPMC_Intline_14 Constant 3370
Id_IPMC_Intline_15 Constant 3370
Id_IPMC_Intline_2 Constant 3371
Id_IPMC_Intline_3 Constant 3371
Id_IPMC_Intline_4 Constant 3371
Id_IPMC_Intline_5 Constant 3372
Id_IPMC_Intline_6 Constant 3372
Id_IPMC_Intline_7 Constant 3373
Id_IPMC_Intline_8 Constant 3373
Id_IPMC_Intline_9 Constant 3373
Id_IPMC_INTV_Max Constant 3374
Id_IPMC_INTV_Min Constant 3374
Id_IPMC_Invisible_Max Constant 3374
Id_IPMC_Invisible_Min Constant 3375
Id_IPMC_IPAllIntermediate_Systems Constant 3375
Id_IPMC_IPAllL1ISs Constant 3375
Id_IPMC_IPAllL2ISs Constant 3376
Id_IPMC_isma_1 Constant 3376
Id_IPMC_isma_2 Constant 3377
Id_IPMC_itb301 Constant 3377
Id_IPMC_jini_announcement Constant 3377
Id_IPMC_jini_request Constant 3378
Id_IPMC_LiebDevMgmg_DM Constant 3378
Id_IPMC_ll_sbms Constant 3378
Id_IPMC_lmsc_calren_1 Constant 3379
Id_IPMC_lmsc_calren_2 Constant 3379
Id_IPMC_lmsc_calren_3 Constant 3379
Id_IPMC_lmsc_calren_4 Constant 3380
Id_IPMC_Mac Constant 3380
Id_IPMC_Make Constant 3381
Id_IPMC_marratech_cc Constant 3381
Id_IPMC_mbone_vcr_directory Constant 3381
Id_IPMC_mcntp_directory Constant 3382
Id_IPMC_MDAP Constant 3382
Id_IPMC_mdhcpdisover Constant 3382
Id_IPMC_mDNS Constant 3383
Id_IPMC_Mercantile_Max Constant 3383

lii Internet Direct (Indy) Version 10.1.5


Id_IPMC_Mercantile_Min Constant 3383
Id_IPMC_Metropol_Max Constant 3384
Id_IPMC_Metropol_Min Constant 3384
Id_IPMC_Microsoft_DS Constant 3385
Id_IPMC_Microsoft_Max Constant 3385
Id_IPMC_Microsoft_Min Constant 3385
Id_IPMC_MLOADD Constant 3386
Id_IPMC_MMP_bundle_discovery1 Constant 3386
Id_IPMC_MMP_bundle_discovery2 Constant 3386
Id_IPMC_mmtp_poll Constant 3387
Id_IPMC_Mobile_Agents Constant 3387
Id_IPMC_MRM Constant 3387
Id_IPMC_MS_IP_TV_Max Constant 3388
Id_IPMC_MS_IP_TV_Min Constant 3388
Id_IPMC_MSP Constant 3389
Id_IPMC_MTP_Protocol Constant 3389
Id_IPMC_mtrace Constant 3389
Id_IPMC_multihasc_com Constant 3390
Id_IPMC_Multimedia_Max Constant 3390
Id_IPMC_Multimedia_Min Constant 3390
Id_IPMC_Music_Service Constant 3391
Id_IPMC_NBC_Pfn Constant 3391
Id_IPMC_NBC_Pro Constant 3391
Id_IPMC_NCC_NET_Max Constant 3392
Id_IPMC_NCC_NET_Min Constant 3392
Id_IPMC_NDQMD1_Max Constant 3393
Id_IPMC_NDQMD1_Min Constant 3393
Id_IPMC_NLANR_Max Constant 3393
Id_IPMC_NLANR_Min Constant 3394
Id_IPMC_NLVL12 Constant 3394
Id_IPMC_NLVL12R Constant 3394
Id_IPMC_NODSA Constant 3395
Id_IPMC_NODSAR Constant 3395
Id_IPMC_NODSB Constant 3395
Id_IPMC_NODSBR Constant 3396
Id_IPMC_NODSC Constant 3396
Id_IPMC_NODSCR Constant 3397
Id_IPMC_NODSD Constant 3397
Id_IPMC_NODSDR Constant 3397
Id_IPMC_Nokia Constant 3398
Id_IPMC_NorthernData Constant 3398
Id_IPMC_NQDS4 Constant 3398
Id_IPMC_NQDS4R Constant 3399
Id_IPMC_NQDS5 Constant 3399
Id_IPMC_NQDS5R Constant 3399
Id_IPMC_NQDS6 Constant 3400
Id_IPMC_NQDS6R Constant 3400
Id_IPMC_NSS Constant 3401
Id_IPMC_NTDS1 Constant 3401
Id_IPMC_NTDS1R Constant 3401
Id_IPMC_NTDS2 Constant 3402
Id_IPMC_NTDS2R Constant 3402

Internet Direct (Indy) Version 10.1.5 liii


Id_IPMC_NTP_Protocol Constant 3402
Id_IPMC_nwn_adaptor Constant 3403
Id_IPMC_nwn_discovery Constant 3403
Id_IPMC_ODN_DTV_Max Constant 3403
Id_IPMC_ODN_DTV_Min Constant 3404
Id_IPMC_Organization_Local_Max Constant 3404
Id_IPMC_Organization_Local_Min Constant 3405
Id_IPMC_OSPFIGP_All_Routers Constant 3405
Id_IPMC_OSPFIGP_Designated_Routers Constant 3405
Id_IPMC_OTT Constant 3406
Id_IPMC_pdrncs Constant 3406
Id_IPMC_Pipesplatform Constant 3406
Id_IPMC_PolyCom Constant 3407
Id_IPMC_pq_lic_mcast Constant 3407
Id_IPMC_Private_Expiriment Constant 3407
Id_IPMC_ProCast Constant 3408
Id_IPMC_proshare_mc Constant 3408
Id_IPMC_Proxim Constant 3409
Id_IPMC_pt2_discover Constant 3409
Id_IPMC_ptk_cluster Constant 3409
Id_IPMC_PTP_alternate1 Constant 3410
Id_IPMC_PTP_alternate2 Constant 3410
Id_IPMC_PTP_alternate3 Constant 3410
Id_IPMC_PTP_primary Constant 3411
Id_IPMC_Query_Max Constant 3411
Id_IPMC_Query_Min Constant 3411
Id_IPMC_rasadv Constant 3412
Id_IPMC_Reliable_Max Constant 3412
Id_IPMC_Reliable_Min Constant 3413
Id_IPMC_Report_Max Constant 3413
Id_IPMC_Report_Min Constant 3413
Id_IPMC_RFE_Generic_Max Constant 3414
Id_IPMC_RFE_Generic_Min Constant 3414
Id_IPMC_RFE_Individual_Max Constant 3414
Id_IPMC_RFE_Individual_Min Constant 3415
Id_IPMC_RIP2_Routers Constant 3415
Id_IPMC_rln_server Constant 3415
Id_IPMC_router_to_switch Constant 3416
Id_IPMC_RSVP_encap_1 Constant 3416
Id_IPMC_RSVP_encap_2 Constant 3417
Id_IPMC_RSVP_ENCAPSULATION Constant 3417
Id_IPMC_rtv_audio Constant 3417
Id_IPMC_rtv_video Constant 3418
Id_IPMC_rwho Constant 3418
Id_IPMC_Rwhod Constant 3418
Id_IPMC_SAP_Max Constant 3419
Id_IPMC_SAP_Min Constant 3419
Id_IPMC_SAPv0 Constant 3419
Id_IPMC_SAPv1 Constant 3420
Id_IPMC_Satcast_1 Constant 3420
Id_IPMC_Satcast_2 Constant 3421
Id_IPMC_Satcast_3 Constant 3421

liv Internet Direct (Indy) Version 10.1.5


Id_IPMC_sde_discovery Constant 3421
Id_IPMC_SEANET_IMAGE Constant 3422
Id_IPMC_SEANET_TELEMETRY Constant 3422
Id_IPMC_serv_discovery Constant 3422
Id_IPMC_SGI_Dogfight Constant 3423
Id_IPMC_SharesLive Constant 3423
Id_IPMC_shinbroadband Constant 3423
Id_IPMC_SIAC_Market_Max Constant 3424
Id_IPMC_SIAC_Market_Min Constant 3424
Id_IPMC_SIAC_Market2_Max Constant 3425
Id_IPMC_SIAC_Market2_Min Constant 3425
Id_IPMC_SIAC_Market3_Max Constant 3425
Id_IPMC_SIAC_Market3_Min Constant 3426
Id_IPMC_SIAC_Max Constant 3426
Id_IPMC_SIAC_Min Constant 3426
Id_IPMC_SIAC_MYSE_Max Constant 3427
Id_IPMC_SIAC_MYSE_Min Constant 3427
Id_IPMC_Simple Constant 3427
Id_IPMC_SIP Constant 3428
Id_IPMC_Site_Local1_Max Constant 3428
Id_IPMC_Site_Local1_Min Constant 3429
Id_IPMC_Site_Local2_Max Constant 3429
Id_IPMC_Site_Local2_Min Constant 3429
Id_IPMC_Site_Local3_Max Constant 3430
Id_IPMC_Site_Local3_Min Constant 3430
Id_IPMC_Site_Local4_Max Constant 3430
Id_IPMC_Site_Local4_Min Constant 3431
Id_IPMC_Source_Max Constant 3431
Id_IPMC_Source_Min Constant 3431
Id_IPMC_SpectraLinkGW Constant 3432
Id_IPMC_ST_Hosts Constant 3432
Id_IPMC_ST_Routers Constant 3433
Id_IPMC_SUMAConfig Constant 3433
Id_IPMC_SUN Constant 3433
Id_IPMC_sun_mc_grp Constant 3434
Id_IPMC_SUN_NIS_Plus_Information Constant 3434
Id_IPMC_sunscalar Constant 3434
Id_IPMC_SVRLOC Constant 3435
Id_IPMC_SVRLOC_DA Constant 3435
Id_IPMC_Talarian_Max Constant 3435
Id_IPMC_Talarian_Min Constant 3436
Id_IPMC_Teleborsa Constant 3436
Id_IPMC_telerate Constant 3437
Id_IPMC_Tibco_1 Constant 3437
Id_IPMC_Tibco_2 Constant 3437
Id_IPMC_Tivoli Constant 3438
Id_IPMC_tms_production Constant 3438
Id_IPMC_tns_adv_multi Constant 3438
Id_IPMC_TRACKTICKER Constant 3439
Id_IPMC_TRACKTICKER_Max Constant 3439
Id_IPMC_TRACKTICKER_Min Constant 3439
Id_IPMC_TRIBALVOICE Constant 3440

Internet Direct (Indy) Version 10.1.5 lv


Id_IPMC_TS_MC_1 Constant 3440
Id_IPMC_TVE_ANNOUNCE Constant 3441
Id_IPMC_TVE_FILE Constant 3441
Id_IPMC_Unassigned Constant 3441
Id_IPMC_UUNET_Max Constant 3442
Id_IPMC_UUNET_Min Constant 3442
Id_IPMC_vcals_dmu Constant 3442
Id_IPMC_VMTP_Managers Constant 3443
Id_IPMC_VNP Constant 3443
Id_IPMC_VRRP Constant 3443
Id_IPMC_Walt_Max Constant 3444
Id_IPMC_Walt_Min Constant 3444
Id_IPMC_Where_Are_You_Max Constant 3445
Id_IPMC_Where_Are_You_Min Constant 3445
Id_IPMC_WORLD_Max Constant 3445
Id_IPMC_WORLD_Min Constant 3446
Id_IPMC_WOZ_Garage_Max Constant 3446
Id_IPMC_WOZ_Garage_Min Constant 3446
Id_IPMC_Xenoscience_Max Constant 3447
Id_IPMC_Xenoscience_Min Constant 3447
Id_IPMC_XingNet_Max Constant 3447
Id_IPMC_XingNet_Min Constant 3448
Id_IPMC_XINGTV Constant 3448
Id_IPMC_XRX Constant 3449
Id_IPMC_XYPOINT Constant 3449
Id_IPMC_zeroconfaddr_Max Constant 3449
Id_IPMC_zeroconfaddr_Min Constant 3450
Id_IPMC_zuba Constant 3450
Id_IPREL_AAP Constant 3450
Id_IPREL_DHCPV4 Constant 3451
Id_IPREL_DNS Constant 3451
Id_IPREL_MADCAP Constant 3451
Id_IPREL_MBUS Constant 3451
Id_IPREL_MZAP Constant 3452
Id_IPREL_SAP Constant 3452
Id_IPREL_SLPV2 Constant 3452
Id_IPREL_SSDP Constant 3452
Id_IPv6_HSIZE Constant 3453
Id_MAX_IPOPTLEN Constant 3453
Id_MN_68000 Constant 3453
Id_MN_Alto Constant 3454
Id_MN_Altos_6800 Constant 3454
Id_MN_Amdahl_V7 Constant 3454
Id_MN_Amiga_1000 Constant 3455
Id_MN_Amiga_1000_010 Constant 3455
Id_MN_Amiga_1000_020 Constant 3455
Id_MN_Amiga_1000_030 Constant 3456
Id_MN_Amiga_1000_EC030 Constant 3456
Id_MN_Amiga_1200 Constant 3456
Id_MN_Amiga_1200_030 Constant 3457
Id_MN_Amiga_1200_040 Constant 3457
Id_MN_Amiga_1200_EC030 Constant 3458

lvi Internet Direct (Indy) Version 10.1.5


Id_MN_Amiga_1200_EC040 Constant 3458
Id_MN_Amiga_1200_LC040 Constant 3458
Id_MN_Amiga_2000 Constant 3459
Id_MN_Amiga_2000_010 Constant 3459
Id_MN_Amiga_2000_020 Constant 3459
Id_MN_Amiga_2000_030 Constant 3460
Id_MN_Amiga_2000_040 Constant 3460
Id_MN_Amiga_2000_EC030 Constant 3460
Id_MN_Amiga_2000_EC040 Constant 3461
Id_MN_Amiga_2000_LC040 Constant 3461
Id_MN_Amiga_3000 Constant 3462
Id_MN_Amiga_3000_040 Constant 3462
Id_MN_Amiga_3000_060 Constant 3462
Id_MN_Amiga_3000_EC040 Constant 3463
Id_MN_Amiga_3000_LC040 Constant 3463
Id_MN_Amiga_4000_030 Constant 3463
Id_MN_Amiga_4000_040 Constant 3464
Id_MN_Amiga_4000_060 Constant 3464
Id_MN_Amiga_4000_EC030 Constant 3464
Id_MN_Amiga_4000_LC040 Constant 3465
Id_MN_Amiga_500 Constant 3465
Id_MN_Amiga_500_010 Constant 3466
Id_MN_Amiga_500_020 Constant 3466
Id_MN_Amiga_500_030 Constant 3466
Id_MN_Amiga_500_EC030 Constant 3467
Id_MN_Amiga_600 Constant 3467
Id_MN_Apollo Constant 3467
Id_MN_Apple_Macintosh Constant 3468
Id_MN_Apple_Powerbook Constant 3468
Id_MN_Atari_104ST Constant 3468
Id_MN_ATT_3B1 Constant 3469
Id_MN_ATT_3B2 Constant 3469
Id_MN_ATT_3B20 Constant 3470
Id_MN_ATT_7300 Constant 3470
Id_MN_AXP Constant 3470
Id_MN_BBN_C_60 Constant 3471
Id_MN_Burroughs_B_29 Constant 3471
Id_MN_Burroughs_B_4800 Constant 3471
Id_MN_Butterfly Constant 3472
Id_MN_C_30 Constant 3472
Id_MN_C_70 Constant 3472
Id_MN_Cadlinc Constant 3473
Id_MN_CadR Constant 3473
Id_MN_CD32 Constant 3474
Id_MN_CDC_170 Constant 3474
Id_MN_CDC_170_750 Constant 3474
Id_MN_CDC_173 Constant 3475
Id_MN_CDTV Constant 3475
Id_MN_CDTV_060 Constant 3475
Id_MN_Celerity_1200 Constant 3476
Id_MN_Club_386 Constant 3476
Id_MN_Compaq_386_20 Constant 3476

Internet Direct (Indy) Version 10.1.5 lvii


Id_MN_Comten_3690 Constant 3477
Id_MN_CP8040 Constant 3477
Id_MN_Cray_1 Constant 3478
Id_MN_Cray_2 Constant 3478
Id_MN_Cray_X_MP Constant 3478
Id_MN_CTIWS_117 Constant 3479
Id_MN_Dandelion Constant 3479
Id_MN_DEC_10 Constant 3479
Id_MN_DEC_1050 Constant 3480
Id_MN_DEC_1077 Constant 3480
Id_MN_DEC_1080 Constant 3480
Id_MN_DEC_1090 Constant 3481
Id_MN_DEC_1090B Constant 3481
Id_MN_DEC_1090T Constant 3482
Id_MN_DEC_2020T Constant 3482
Id_MN_DEC_2040 Constant 3482
Id_MN_DEC_2040T Constant 3483
Id_MN_DEC_2050T Constant 3483
Id_MN_DEC_2060 Constant 3483
Id_MN_DEC_2060T Constant 3484
Id_MN_DEC_2065 Constant 3484
Id_MN_DEC_AXP Constant 3484
Id_MN_DEC_Falcon Constant 3485
Id_MN_DEC_KS10 Constant 3485
Id_MN_DEC_VAX Constant 3486
Id_MN_DEC_VAX_11730 Constant 3486
Id_MN_DEC_VAXCluster Constant 3486
Id_MN_DEC_VAXStation Constant 3487
Id_MN_DECStation Constant 3487
Id_MN_Dorado Constant 3487
Id_MN_DPS8_70M Constant 3488
Id_MN_Elxsi_6400 Constant 3488
Id_MN_Emens Constant 3488
Id_MN_EverEx_386 Constant 3489
Id_MN_Foonly_F2 Constant 3489
Id_MN_Foonly_F3 Constant 3490
Id_MN_Foonly_F4 Constant 3490
Id_MN_Gould Constant 3490
Id_MN_Gould_6050 Constant 3491
Id_MN_Gould_6080 Constant 3491
Id_MN_Gould_9050 Constant 3491
Id_MN_Gould_9080 Constant 3492
Id_MN_H_316 Constant 3492
Id_MN_H_60_68 Constant 3492
Id_MN_H_68 Constant 3493
Id_MN_H_68_80 Constant 3493
Id_MN_H_89 Constant 3494
Id_MN_Honeywell_BPS_8_70 Constant 3494
Id_MN_Honeywell_DPS_6 Constant 3494
Id_MN_HP3000 Constant 3495
Id_MN_HP3000_64 Constant 3495
Id_MN_IBM_158 Constant 3495

lviii Internet Direct (Indy) Version 10.1.5


Id_MN_IBM_3081 Constant 3496
Id_MN_IBM_3084QX Constant 3496
Id_MN_IBM_3101 Constant 3496
Id_MN_IBM_360_67 Constant 3497
Id_MN_IBM_370_3033 Constant 3497
Id_MN_IBM_4331 Constant 3498
Id_MN_IBM_4341 Constant 3498
Id_MN_IBM_4361 Constant 3498
Id_MN_IBM_4381 Constant 3499
Id_MN_IBM_4956 Constant 3499
Id_MN_IBM_6152 Constant 3499
Id_MN_IBM_PC Constant 3500
Id_MN_IBM_PC_AT Constant 3500
Id_MN_IBM_PC_RT Constant 3500
Id_MN_IBM_PC_XT Constant 3501
Id_MN_IBM_RS_6000 Constant 3501
Id_MN_IBM_Series_1 Constant 3502
Id_MN_Imagen Constant 3502
Id_MN_Imagen_8_300 Constant 3502
Id_MN_Imsai Constant 3503
Id_MN_Integrated_Solutions Constant 3503
Id_MN_Integrated_Solutions_68K Constant 3503
Id_MN_Integrated_Solutions_Creator Constant 3504
Id_MN_Integrated_Solutions_Creator_8 Constant 3504
Id_MN_INTEL_386 Constant 3504
Id_MN_INTEL_IPSC Constant 3505
Id_MN_Is_1 Constant 3505
Id_MN_Is_68010 Constant 3506
Id_MN_LMI Constant 3506
Id_MN_LSI_11 Constant 3506
Id_MN_LSI_11_2 Constant 3507
Id_MN_LSI_11_23 Constant 3507
Id_MN_LSI_11_73 Constant 3507
Id_MN_M68000 Constant 3508
Id_MN_Mac_II Constant 3508
Id_MN_Mac_Powerbook Constant 3508
Id_MN_MacIntosh Constant 3509
Id_MN_MassComp Constant 3509
Id_MN_MC500 Constant 3510
Id_MN_Microport Constant 3510
Id_MN_MicroVAX Constant 3510
Id_MN_MicroVAX_I Constant 3511
Id_MN_MV_8000 Constant 3511
Id_MN_NAS3_5 Constant 3511
Id_MN_NCR_Comten_3690 Constant 3512
Id_MN_Next_N1000_316 Constant 3512
Id_MN_Now Constant 3512
Id_MN_Onyx_Z8000 Constant 3513
Id_MN_PDP_11 Constant 3513
Id_MN_PDP_11_23 Constant 3514
Id_MN_PDP_11_24 Constant 3514
Id_MN_PDP_11_3 Constant 3514

Internet Direct (Indy) Version 10.1.5 lix


Id_MN_PDP_11_34 Constant 3515
Id_MN_PDP_11_40 Constant 3515
Id_MN_PDP_11_44 Constant 3515
Id_MN_PDP_11_45 Constant 3516
Id_MN_PDP_11_50 Constant 3516
Id_MN_PDP_11_70 Constant 3516
Id_MN_PDP_11_73 Constant 3517
Id_MN_PE_3205 Constant 3517
Id_MN_PE_7_32 Constant 3518
Id_MN_PE_Perq Constant 3518
Id_MN_Plexus_P_60 Constant 3518
Id_MN_PLI Constant 3519
Id_MN_Pluribus Constant 3519
Id_MN_Prime_2250 Constant 3519
Id_MN_Prime_2350 Constant 3520
Id_MN_Prime_2450 Constant 3520
Id_MN_Prime_2655 Constant 3520
Id_MN_Prime_2755 Constant 3521
Id_MN_Prime_550II Constant 3521
Id_MN_Prime_750 Constant 3522
Id_MN_Prime_850 Constant 3522
Id_MN_Prime_9650 Constant 3522
Id_MN_Prime_9655 Constant 3523
Id_MN_Prime_9750 Constant 3523
Id_MN_Prime_9755 Constant 3523
Id_MN_Prime_9950 Constant 3524
Id_MN_Prime_9955 Constant 3524
Id_MN_Prime_9955II Constant 3524
Id_MN_Pyramid_90 Constant 3525
Id_MN_Pyramid_90MX Constant 3525
Id_MN_Pyramid_90X Constant 3526
Id_MN_Ridge Constant 3526
Id_MN_Ridge_32 Constant 3526
Id_MN_Ridge_32C Constant 3527
Id_MN_ROLM_1666 Constant 3527
Id_MN_RS_6000 Constant 3527
Id_MN_S1_MKIIA Constant 3528
Id_MN_Sequent_Balance_8000 Constant 3528
Id_MN_SGI_Iris_2400 Constant 3528
Id_MN_SGI_Iris_2500 Constant 3529
Id_MN_SGI_Iris_3010 Constant 3529
Id_MN_SGI_Iris_3020 Constant 3530
Id_MN_SGI_Iris_3030 Constant 3530
Id_MN_SGI_Iris_3110 Constant 3530
Id_MN_SGI_Iris_3115 Constant 3531
Id_MN_SGI_Iris_3120 Constant 3531
Id_MN_SGI_Iris_3130 Constant 3531
Id_MN_SGI_Iris_4D_120GTX Constant 3532
Id_MN_SGI_Iris_4D_120S Constant 3532
Id_MN_SGI_Iris_4D_20 Constant 3532
Id_MN_SGI_Iris_4D_20G Constant 3533
Id_MN_SGI_Iris_4D_210GTX Constant 3533

lx Internet Direct (Indy) Version 10.1.5


Id_MN_SGI_Iris_4D_210S Constant 3534
Id_MN_SGI_Iris_4D_220GTX Constant 3534
Id_MN_SGI_Iris_4D_220S Constant 3534
Id_MN_SGI_Iris_4D_240GTX Constant 3535
Id_MN_SGI_Iris_4D_240S Constant 3535
Id_MN_SGI_Iris_4D_25 Constant 3535
Id_MN_SGI_Iris_4D_25G Constant 3536
Id_MN_SGI_Iris_4D_25S Constant 3536
Id_MN_SGI_Iris_4D_280GTX Constant 3536
Id_MN_SGI_Iris_4D_280S Constant 3537
Id_MN_SGI_Iris_4D_50 Constant 3537
Id_MN_SGI_Iris_4D_50G Constant 3538
Id_MN_SGI_Iris_4D_50GT Constant 3538
Id_MN_SGI_Iris_4D_60 Constant 3538
Id_MN_SGI_Iris_4D_60G Constant 3539
Id_MN_SGI_Iris_4D_60GT Constant 3539
Id_MN_SGI_Iris_4D_60T Constant 3539
Id_MN_SGI_Iris_4D_70 Constant 3540
Id_MN_SGI_Iris_4D_70G Constant 3540
Id_MN_SGI_Iris_4D_70GT Constant 3540
Id_MN_SGI_Iris_4D_80GT Constant 3541
Id_MN_SGI_Iris_4D_80S Constant 3541
Id_MN_SGI_Iris_4Server_8 Constant 3542
Id_MN_SGI_Iris_CS_12 Constant 3542
Id_MN_Silicon_Graphics Constant 3542
Id_MN_Silicon_Graphics_Iris Constant 3543
Id_MN_SMI Constant 3543
Id_MN_Sperry_DCP_10 Constant 3543
Id_MN_Sun Constant 3544
Id_MN_Sun_100 Constant 3544
Id_MN_Sun_120 Constant 3544
Id_MN_Sun_130 Constant 3545
Id_MN_Sun_150 Constant 3545
Id_MN_Sun_170 Constant 3546
Id_MN_Sun_2 Constant 3546
Id_MN_Sun_2_100 Constant 3546
Id_MN_Sun_2_120 Constant 3547
Id_MN_Sun_2_130 Constant 3547
Id_MN_Sun_2_140 Constant 3547
Id_MN_Sun_2_150 Constant 3548
Id_MN_Sun_2_160 Constant 3548
Id_MN_Sun_2_170 Constant 3548
Id_MN_Sun_2_50 Constant 3549
Id_MN_Sun_3_110 Constant 3549
Id_MN_Sun_3_140 Constant 3550
Id_MN_Sun_3_150 Constant 3550
Id_MN_Sun_3_160 Constant 3550
Id_MN_Sun_3_180 Constant 3551
Id_MN_Sun_3_200 Constant 3551
Id_MN_Sun_3_260 Constant 3551
Id_MN_Sun_3_280 Constant 3552
Id_MN_Sun_3_470 Constant 3552

Internet Direct (Indy) Version 10.1.5 lxi


Id_MN_Sun_3_480 Constant 3552
Id_MN_Sun_3_50 Constant 3553
Id_MN_Sun_3_60 Constant 3553
Id_MN_Sun_3_75 Constant 3554
Id_MN_Sun_3_80 Constant 3554
Id_MN_Sun_386i_250 Constant 3554
Id_MN_Sun_4_110 Constant 3555
Id_MN_Sun_4_150 Constant 3555
Id_MN_Sun_4_200 Constant 3555
Id_MN_Sun_4_260 Constant 3556
Id_MN_Sun_4_280 Constant 3556
Id_MN_Sun_4_330 Constant 3556
Id_MN_Sun_4_370 Constant 3557
Id_MN_Sun_4_390 Constant 3557
Id_MN_Sun_4_60 Constant 3558
Id_MN_Sun_50 Constant 3558
Id_MN_Sun_68000 Constant 3558
Id_MN_Symbolics_3600 Constant 3559
Id_MN_Symbolics_3670 Constant 3559
Id_MN_Symmetric_375 Constant 3559
Id_MN_Symult Constant 3560
Id_MN_Tandem_TXP Constant 3560
Id_MN_Tandy_6000 Constant 3560
Id_MN_Tek_6130 Constant 3561
Id_MN_TI_Explorer Constant 3561
Id_MN_TP_4000 Constant 3562
Id_MN_TRS_80 Constant 3562
Id_MN_Univac_1100 Constant 3562
Id_MN_Univac_1100_60 Constant 3563
Id_MN_Univac_1100_62 Constant 3563
Id_MN_Univac_1100_63 Constant 3563
Id_MN_Univac_1100_64 Constant 3564
Id_MN_Univac_1100_70 Constant 3564
Id_MN_Univac_1160 Constant 3564
Id_MN_Unknown Constant 3565
Id_MN_VAX Constant 3565
Id_MN_VAX_11_725 Constant 3566
Id_MN_VAX_11_730 Constant 3566
Id_MN_VAX_11_750 Constant 3566
Id_MN_VAX_11_780 Constant 3567
Id_MN_VAX_11_785 Constant 3567
Id_MN_VAX_11_790 Constant 3567
Id_MN_VAX_11_8600 Constant 3568
Id_MN_VAX_8600 Constant 3568
Id_MN_VAXCluster Constant 3568
Id_MN_VAXStation Constant 3569
Id_MN_Wang_PC002 Constant 3569
Id_MN_Wang_VS100 Constant 3570
Id_MN_Wang_VS400 Constant 3570
Id_MN_Wyse_386 Constant 3570
Id_MN_Wyse_WN5004 Constant 3571
Id_MN_Wyse_WN5008 Constant 3571

lxii Internet Direct (Indy) Version 10.1.5


Id_MN_Wyse_WN5104 Constant 3571
Id_MN_Wyse_WN5108 Constant 3572
Id_MN_Wyse_WX15C Constant 3572
Id_MN_Wyse_WX17C Constant 3572
Id_MN_Wyse_WX17M Constant 3573
Id_MN_Wyse_WX19C Constant 3573
Id_MN_Wyse_WX19M Constant 3574
Id_MN_Wyse_WYX14M Constant 3574
Id_MN_Wyse_WYX5 Constant 3574
Id_MN_Xerox_1108 Constant 3575
Id_MN_Xerox_8010 Constant 3575
Id_MN_Zenith_148 Constant 3575
ID_MSG_NODECODE Constant 3576
ID_MSG_PRIORITY Constant 3576
ID_MSG_USESNOWFORDATE Constant 3576
ID_NC_MASK_LENGTH Constant 3577
Id_NET_BSD_1_0 Constant 3577
Id_NET_BSD_1_1 Constant 3577
Id_NET_BSD_1_2 Constant 3578
Id_NET_BSD_1_3 Constant 3578
Id_NET_BSD_3_0 Constant 3578
Id_NET_BSD_3_11 Constant 3579
Id_NET_BSD_4_0 Constant 3579
Id_NET_BSD_4_1 Constant 3579
Id_NET_BSD_5_0 Constant 3580
ID_NETWORKCLASS Constant 3580
Id_OS_Aegis Constant 3580
Id_OS_AIX_370 Constant 3581
Id_OS_AIX_PS2 Constant 3581
Id_OS_Amiga_1_2 Constant 3581
Id_OS_Amiga_1_3 Constant 3582
Id_OS_Amiga_2_0 Constant 3582
Id_OS_Amiga_2_1 Constant 3582
Id_OS_Amiga_3_0 Constant 3583
Id_OS_Amiga_3_1 Constant 3583
Id_OS_Amiga_3_5 Constant 3584
Id_OS_Amiga_3_9 Constant 3584
Id_OS_Apollo Constant 3584
Id_OS_BEOS_4_5_2 Constant 3585
Id_OS_BEOS_5_0 Constant 3585
Id_OS_BS_2000 Constant 3585
Id_OS_Cedar Constant 3586
Id_OS_CGW Constant 3586
Id_OS_CHORUS Constant 3586
Id_OS_Chrysalis Constant 3587
Id_OS_CMOS Constant 3587
Id_OS_CMS Constant 3588
Id_OS_COS Constant 3588
Id_OS_CPIX Constant 3588
Id_OS_CTOS Constant 3589
Id_OS_CTSS Constant 3589
Id_OS_DCN Constant 3589

Internet Direct (Indy) Version 10.1.5 lxiii


Id_OS_DDNOS Constant 3590
Id_OS_DOMAIN Constant 3590
Id_OS_DOS Constant 3590
Id_OS_EDX Constant 3591
Id_OS_ELF Constant 3591
Id_OS_EMBOS Constant 3592
Id_OS_EMMOS Constant 3592
Id_OS_EPOS Constant 3592
Id_OS_FOONEX Constant 3593
Id_OS_FORTH Constant 3593
Id_OS_FUZZ Constant 3593
Id_OS_GCOS Constant 3594
Id_OS_GPOS Constant 3594
Id_OS_HDOS Constant 3594
Id_OS_Imagen Constant 3595
Id_OS_Impress Constant 3595
Id_OS_Instant_Internet Constant 3596
Id_OS_Intercom Constant 3596
Id_OS_Interlisp Constant 3596
Id_OS_IOS Constant 3597
Id_OS_IRIX Constant 3597
Id_OS_ISI Constant 3597
Id_OS_ITS Constant 3598
Id_OS_KOSOS Constant 3598
Id_OS_Linux Constant 3598
Id_OS_Linux_1_0 Constant 3599
Id_OS_Linux_1_2 Constant 3599
Id_OS_Linux_2_0 Constant 3600
Id_OS_Linux_2_2 Constant 3600
Id_OS_LISP Constant 3600
Id_OS_LISPM Constant 3601
Id_OS_LOCUS Constant 3601
Id_OS_MACOS Constant 3601
Id_OS_MINOS Constant 3602
Id_OS_MOS Constant 3602
Id_OS_MPE5 Constant 3602
Id_OS_MPEIX Constant 3603
Id_OS_MPEV Constant 3603
Id_OS_MSDOS Constant 3604
Id_OS_MULTICS Constant 3604
Id_OS_MUSIC Constant 3604
Id_OS_MUSICSP Constant 3605
Id_OS_MVS Constant 3605
Id_OS_MVSSP Constant 3605
Id_OS_NEXUS Constant 3606
Id_OS_NMS Constant 3606
Id_OS_NONSTOP Constant 3606
Id_OS_NOS_2 Constant 3607
Id_OS_NTOS Constant 3607
Id_OS_OpenBSD Constant 3608
Id_OS_OpenVMS Constant 3608
Id_OS_OS_2 Constant 3608

lxiv Internet Direct (Indy) Version 10.1.5


Id_OS_OS_4 Constant 3609
Id_OS_OS_6 Constant 3609
Id_OS_OSDDP Constant 3609
Id_OS_OSX Constant 3610
Id_OS_PCDOS Constant 3610
Id_OS_PERQOS Constant 3610
Id_OS_PLI Constant 3611
Id_OS_Primos Constant 3611
Id_OS_PSDDOSMIT Constant 3612
Id_OS_RISC_OS Constant 3612
Id_OS_RISC_OS_3_10 Constant 3612
Id_OS_RISC_OS_3_50 Constant 3613
Id_OS_RISC_OS_3_60 Constant 3613
Id_OS_RISC_OS_3_70 Constant 3613
Id_OS_RISC_OS_4_00 Constant 3614
Id_OS_RMXRDOS Constant 3614
Id_OS_ROS Constant 3614
Id_OS_RSX11M Constant 3615
Id_OS_RTE_A Constant 3615
Id_OS_Satops Constant 3616
Id_OS_SCO_Open_Desktop_1_0 Constant 3616
Id_OS_SCO_Open_Desktop_1_1 Constant 3616
Id_OS_SCO_Open_Desktop_2_0 Constant 3617
Id_OS_SCO_Open_Desktop_3_0 Constant 3617
Id_OS_SCO_Open_Desktop_Lite_3_0 Constant 3617
Id_OS_SCO_Open_Server_3_0 Constant 3618
Id_OS_SCO_Unix_3_2_0 Constant 3618
Id_OS_SCO_Unix_3_2V1_0 Constant 3618
Id_OS_SCO_Unix_3_2V2_0 Constant 3619
Id_OS_SCO_Unix_3_2V4_1 Constant 3619
Id_OS_SCO_Unix_3_2V4_2 Constant 3620
Id_OS_SCO_Unix_S_2V4_0 Constant 3620
Id_OS_SCO_Xenix_386_2_3_2 Constant 3620
Id_OS_SCO_Xenix_386_2_3_3 Constant 3621
Id_OS_SCO_Xenix_386_2_3_4 Constant 3621
Id_OS_SCS Constant 3621
Id_OS_SIMP Constant 3622
Id_OS_Sinix Constant 3622
Id_OS_SUN Constant 3622
Id_OS_SUN_OS_3_5 Constant 3623
Id_OS_SUN_OS_4_0 Constant 3623
Id_OS_Swift Constant 3624
Id_OS_Tac Constant 3624
Id_OS_Tandem Constant 3624
Id_OS_Tenex Constant 3625
Id_OS_The_Major_BBS Constant 3625
Id_OS_Tops10 Constant 3625
Id_OS_Tops20 Constant 3626
Id_OS_TOS Constant 3626
Id_OS_TP3010 Constant 3626
Id_OS_TRSDOS Constant 3627
Id_OS_Ultrix Constant 3627

Internet Direct (Indy) Version 10.1.5 lxv


Id_OS_Unix Constant 3628
Id_OS_Unix_BSD Constant 3628
Id_OS_Unix_PC Constant 3628
Id_OS_Unix_Unknown Constant 3629
Id_OS_Unix_V Constant 3629
Id_OS_Unix_V_1 Constant 3629
Id_OS_Unix_V_2 Constant 3630
Id_OS_Unix_V_3 Constant 3630
Id_OS_Unix_V1AT Constant 3630
Id_OS_UT2D Constant 3631
Id_OS_V Constant 3631
Id_OS_VM Constant 3632
Id_OS_VM_370 Constant 3632
Id_OS_VM_CMS Constant 3632
Id_OS_VM_SP Constant 3633
Id_OS_VMS Constant 3633
Id_OS_VMS_Eunice Constant 3633
Id_OS_VRTX Constant 3634
Id_OS_Waits Constant 3634
Id_OS_Wang Constant 3634
Id_OS_Win32 Constant 3635
Id_OS_Windows_95 Constant 3635
Id_OS_Windows_95OSR1 Constant 3636
Id_OS_Windows_95OSR2 Constant 3636
Id_OS_Windows_98 Constant 3636
Id_OS_Windows_CE Constant 3637
Id_OS_Windows_NT Constant 3637
Id_OS_Windows_NT_2 Constant 3637
Id_OS_Windows_NT_3 Constant 3638
Id_OS_Windows_NT_3_5 Constant 3638
Id_OS_Windows_NT_3_51 Constant 3638
Id_OS_Windows_NT_4 Constant 3639
Id_OS_Windows_NT_5 Constant 3639
Id_OS_WorldGroup Constant 3640
Id_OS_Wyse_Wyxware Constant 3640
Id_OS_X11R3 Constant 3640
Id_OS_XDE Constant 3641
Id_OS_Xenix Constant 3641
Id_PORT_3com_amp3 Constant 3641
Id_PORT_acap Constant 3642
Id_PORT_accessnetwork Constant 3643
Id_PORT_acp Constant 3644
Id_PORT_afpovertcp Constant 3645
Id_PORT_agentx Constant 3646
Id_PORT_aminet Constant 3647
Id_PORT_aodv Constant 3648
Id_PORT_asa_appl_proto Constant 3649
Id_PORT_asia Constant 3650
Id_PORT_asipregistry Constant 3651
Id_PORT_aurora_cmgr Constant 3652
Id_PORT_aux_bus_shunt Constant 3653
Id_PORT_bdp Constant 3654

lxvi Internet Direct (Indy) Version 10.1.5


Id_PORT_bh611 Constant 3655
Id_PORT_bhevent Constant 3656
Id_PORT_biff Constant 3657
Id_PORT_bmpp Constant 3658
Id_PORT_borland_dsj Constant 3659
Id_PORT_cab_protocol Constant 3660
Id_PORT_cal Constant 3661
Id_PORT_cimplex Constant 3662
Id_PORT_cisco_tdp Constant 3663
Id_PORT_citadel Constant 3664
Id_PORT_cloanto_net_1 Constant 3665
Id_PORT_codaauth2 Constant 3666
Id_PORT_collaborator Constant 3667
Id_PORT_compaq_evm Constant 3668
Id_PORT_connendp Constant 3669
Id_PORT_corba_iiop Constant 3670
Id_PORT_corba_iiop_ssl Constant 3671
Id_PORT_crs Constant 3672
Id_PORT_cryptoadmin Constant 3673
Id_PORT_dantz Constant 3674
Id_PORT_datex_asn Constant 3675
Id_PORT_dctp Constant 3676
Id_PORT_dec_dlm Constant 3677
Id_PORT_decbsrv Constant 3678
Id_PORT_dei_icda Constant 3679
Id_PORT_dhcp_failover Constant 3680
Id_PORT_dhcp_failover2 Constant 3681
Id_PORT_direct Constant 3682
Id_PORT_disclose Constant 3683
Id_PORT_dtag_ste_sb Constant 3684
Id_PORT_dtk Constant 3685
Id_PORT_dwr Constant 3686
Id_PORT_entrust_aaas Constant 3687
Id_PORT_entrust_aams Constant 3688
Id_PORT_entrust_ash Constant 3689
Id_PORT_entrust_sps Constant 3690
Id_PORT_escp_ip Constant 3691
Id_PORT_esro_emsdp Constant 3692
Id_PORT_eudora_set Constant 3693
Id_PORT_exec Constant 3694
Id_PORT_eyelink Constant 3695
Id_PORT_fcp Constant 3696
Id_PORT_FirstClass Constant 3697
Id_PORT_gnf_ncp Constant 3698
Id_PORT_ha_cluster Constant 3699
Id_PORT_hap Constant 3700
Id_PORT_hcp_wismar Constant 3701
Id_PORT_hello_port Constant 3702
Id_PORT_hmmp_ind Constant 3703
Id_PORT_hmmp_op Constant 3704
Id_PORT_http_alt Constant 3705
Id_PORT_http_rpc_epmap Constant 3706

Internet Direct (Indy) Version 10.1.5 lxvii


Id_PORT_hyperwave_isp Constant 3707
Id_PORT_iclcnet_locate Constant 3708
Id_PORT_iclcnet_svinfo Constant 3709
Id_PORT_ideafarm_catch Constant 3710
Id_PORT_ideafarm_chat Constant 3711
Id_PORT_idfp Constant 3712
Id_PORT_ieee_mms Constant 3713
Id_PORT_ieee_mms_ssl Constant 3714
Id_PORT_imap4_ssl_dp Constant 3715
Id_PORT_inbusiness Constant 3716
Id_PORT_intrinsa Constant 3717
Id_PORT_ipcd Constant 3718
Id_PORT_ipdd Constant 3719
Id_PORT_ipp Constant 3720
Id_PORT_isakmp Constant 3721
Id_PORT_ISO_ILL Constant 3722
Id_PORT_itm_mcell_s Constant 3723
Id_PORT_keyserver Constant 3724
Id_PORT_lanserver Constant 3725
Id_PORT_ldaps Constant 3726
Id_PORT_ldp Constant 3727
Id_PORT_login Constant 3728
Id_PORT_mac_srvr_admin Constant 3729
Id_PORT_mailbox_lm Constant 3730
Id_PORT_masqdialer Constant 3731
Id_PORT_matip_type_a Constant 3732
Id_PORT_matip_type_b Constant 3733
Id_PORT_mcns_sec Constant 3734
Id_PORT_mdc_portmapper Constant 3735
Id_PORT_mecomm Constant 3736
Id_PORT_meregister Constant 3737
Id_PORT_mftp Constant 3738
Id_PORT_mortgageware Constant 3739
Id_PORT_mrm Constant 3740
Id_PORT_msdp Constant 3741
Id_PORT_msexch_routing Constant 3742
Id_PORT_ndsauth Constant 3743
Id_PORT_nmap Constant 3744
Id_PORT_nsrmp Constant 3745
Id_PORT_obex Constant 3746
Id_PORT_odmr Constant 3747
Id_PORT_ohimsrv Constant 3748
Id_PORT_olsr Constant 3749
Id_PORT_omginitialrefs Constant 3750
Id_PORT_passgo Constant 3751
Id_PORT_passgo_tivoli Constant 3752
Id_PORT_password_chg Constant 3753
Id_PORT_pftp Constant 3754
Id_PORT_philips_vc Constant 3755
Id_PORT_pim_rp_disc Constant 3756
Id_PORT_pkix_3_ca_ra Constant 3757
Id_PORT_pssc Constant 3758

lxviii Internet Direct (Indy) Version 10.1.5


Id_PORT_ptcnameservice Constant 3759
Id_PORT_purenoise Constant 3760
Id_PORT_qbikgdp Constant 3761
Id_PORT_qmqp Constant 3762
Id_PORT_rda Constant 3763
Id_PORT_realm_rusd Constant 3764
Id_PORT_repcmd Constant 3765
Id_PORT_repscmd Constant 3766
Id_PORT_rlzdbase Constant 3767
Id_PORT_rmc Constant 3768
Id_PORT_rpc2portmap Constant 3769
Id_PORT_rrp Constant 3770
Id_PORT_rsvp_tunnel Constant 3771
Id_PORT_rsync Constant 3772
Id_PORT_rushd Constant 3773
Id_PORT_sanity Constant 3774
Id_PORT_scc_security Constant 3775
Id_PORT_sco_dtmgr Constant 3776
Id_PORT_sco_inetmgr Constant 3777
Id_PORT_sco_sysmgr Constant 3778
Id_PORT_sco_websrvrmg3 Constant 3779
Id_PORT_sco_websrvrmgr Constant 3780
Id_PORT_scoi2odialog Constant 3781
Id_PORT_secure_aux_bus Constant 3782
Id_PORT_semantix Constant 3783
Id_PORT_shrinkwrap Constant 3784
Id_PORT_siam Constant 3785
Id_PORT_silc Constant 3786
Id_PORT_smpnameres Constant 3787
Id_PORT_smsd Constant 3788
Id_PORT_snare Constant 3789
Id_PORT_sntp_heartbeat Constant 3790
Id_PORT_spmp Constant 3791
Id_PORT_srssend Constant 3792
Id_PORT_sshell Constant 3793
Id_PORT_stmf Constant 3794
Id_PORT_submission Constant 3795
Id_PORT_sun_dr Constant 3796
ID_PORT_surf Constant 3797
Id_PORT_syslog_conn Constant 3798
Id_PORT_tenfold Constant 3799
Id_PORT_tinc Constant 3800
Id_PORT_tns_cml Constant 3801
Id_PORT_tpip Constant 3802
Id_PORT_uuidgen Constant 3803
Id_PORT_vacdsm_app Constant 3804
Id_PORT_vacdsm_sws Constant 3805
Id_PORT_vatp Constant 3806
Id_PORT_vnas Constant 3807
Id_PORT_vpp Constant 3808
Id_PORT_vpps_qua Constant 3809
Id_PORT_vpps_via Constant 3810

Internet Direct (Indy) Version 10.1.5 lxix


Id_PORT_xfr Constant 3811
Id_PORT_xvttp Constant 3812
Id_RIP_HSIZE Constant 3813
Id_RIPCMD_MAX Constant 3813
Id_RIPCMD_POLL Constant 3813
Id_RIPCMD_POLLENTRY Constant 3813
Id_RIPCMD_REQUEST Constant 3814
Id_RIPCMD_RESPONSE Constant 3814
Id_RIPCMD_TRACEOFF Constant 3814
Id_RIPCMD_TRACEON Constant 3814
Id_RIPVER_0 Constant 3815
Id_RIPVER_1 Constant 3815
Id_RIPVER_2 Constant 3815
ID_SOCKS_AUTH Constant 3815
ID_SOCKS_VER Constant 3816
Id_TCP_ACK Constant 3816
Id_TCP_FIN Constant 3816
Id_TCP_HSIZE Constant 3816
Id_TCP_PUSH Constant 3817
Id_TCP_RST Constant 3817
Id_TCP_SYN Constant 3817
Id_TCP_URG Constant 3817
Id_TId_HTTPAutoStartSession Constant 3818
Id_TId_HTTPMaximumHeaderLineCount Constant 3818
Id_TId_HTTPServer_KeepAlive Constant 3818
Id_TId_HTTPServer_ParseParams Constant 3819
Id_TId_HTTPServer_SessionState Constant 3819
Id_TId_HTTPSessionTimeOut Constant 3819
Id_TIdFTP_DataConAssurance Constant 3820
Id_TIdFTP_DataPortProtection Constant 3820
Id_TIdFTP_HostPortDelimiter Constant 3820
Id_TIdFTP_Passive Constant 3821
Id_TIdFTP_TransferType Constant 3821
Id_TIdFTP_UseNATFastTrack Constant 3821
Id_TIdHTTP_HandleRedirects Constant 3821
Id_TIdHTTP_MaxAuthRetries Constant 3822
Id_TIdHTTP_MaxHeaderLines Constant 3822
Id_TIdHTTP_ProtocolVersion Constant 3822
Id_TIdHTTP_RedirectMax Constant 3823
Id_TIDICMP_ReceiveTimeout Constant 3823
Id_TIdRawBase_BufferSize Constant 3823
Id_TIdRawBase_Port Constant 3824
ID_UDP_BUFFERSIZE Constant 3824
Id_UDP_HSIZE Constant 3824
IdBeatsInDay Constant 3824
IdBoundPortDefault Constant 3825
IdCharsetNames Constant 3825
IdDayNames Constant 3827
IdDayShortNames Constant 3827
IdDaysInCentury Constant 3828
IdDaysInFourYears Constant 3828
IdDaysInLeapCentury Constant 3828

lxx Internet Direct (Indy) Version 10.1.5


IdDaysInLeapYear Constant 3829
IdDaysInLeapYearCycle Constant 3829
IdDaysInMonth Constant 3829
IdDaysInShortLeapYearCycle Constant 3829
IdDaysInShortNonLeapYearCycle Constant 3830
IdDaysInWeek Constant 3830
IdDaysInYear Constant 3830
IdDEF_UseEhlo Constant 3830
IdDefIdentQueryTimeOut Constant 3831
IdDefTimeout Constant 3831
IdDNSServerVersion Constant 3831
iddupAccept Constant 3831
iddupError Constant 3832
iddupIgnore Constant 3832
iDEFAULTPACKETSIZE Constant 3832
iDEFAULTREPLYBUFSIZE Constant 3832
IdEnabledDefault Constant 3833
IDF_DEFAULT_MS_TO_WAIT_TO_CLEAR_BUFFER Constant 3833
IdFetchCaseSensitiveDefault Constant 3833
IdFetchDeleteDefault Constant 3834
IdFetchDelimDefault Constant 3834
IdFILE_ATTRIBUTE_ARCHIVE Constant 3834
IdFILE_ATTRIBUTE_COMPRESSED Constant 3835
IdFILE_ATTRIBUTE_DEVICE Constant 3835
IdFILE_ATTRIBUTE_DIRECTORY Constant 3835
IdFILE_ATTRIBUTE_ENCRYPTED Constant 3835
IdFILE_ATTRIBUTE_HIDDEN Constant 3836
IdFILE_ATTRIBUTE_NORMAL Constant 3836
IdFILE_ATTRIBUTE_NOT_CONTENT_INDEXED Constant 3836
IdFILE_ATTRIBUTE_OFFLINE Constant 3836
IdFILE_ATTRIBUTE_READONLY Constant 3837
IdFILE_ATTRIBUTE_REPARSE_POINT Constant 3837
IdFILE_ATTRIBUTE_SPARSE_FILE Constant 3837
IdFILE_ATTRIBUTE_SYSTEM Constant 3837
IdFILE_ATTRIBUTE_TEMPORARY Constant 3838
IdFromBeginning Constant 3838
IdFromCurrent Constant 3838
IdFromEnd Constant 3838
IdGopherItem_Binary Constant 3839
IdGopherItem_BinDOS Constant 3839
IdGopherItem_BinHex Constant 3839
IdGopherItem_CSO Constant 3839
IdGopherItem_Directory Constant 3840
IdGopherItem_Document Constant 3840
IdGopherItem_Error Constant 3840
IdGopherItem_GIF Constant 3840
IdGopherItem_HTML Constant 3841
IdGopherItem_Image Constant 3841
IdGopherItem_Image2 Constant 3841
IdGopherItem_Information Constant 3841
IdGopherItem_MIME Constant 3842
IdGopherItem_Movie Constant 3842

Internet Direct (Indy) Version 10.1.5 lxxi


IdGopherItem_Redundant Constant 3842
IdGopherItem_Search Constant 3843
IdGopherItem_Sound Constant 3843
IdGopherItem_Sound2 Constant 3843
IdGopherItem_Telnet Constant 3843
IdGopherItem_TN3270 Constant 3844
IdGopherItem_UUE Constant 3844
IdGopherPlusAbstract Constant 3844
IdGopherPlusAdmin Constant 3844
IdGopherPlusAsk Constant 3845
IdGopherPlusAskFileName Constant 3845
IdGopherPlusAskLong Constant 3845
IdGopherPlusAskPassword Constant 3845
IdGopherPlusChoose Constant 3846
IdGopherPlusChooseFile Constant 3846
IdGopherPlusData_BeginSign Constant 3846
IdGopherPlusData_EndSign Constant 3847
IdGopherPlusData_ErrorBeginSign Constant 3847
IdGopherPlusData_ErrorUnknownSize Constant 3847
IdGopherPlusData_UnknownSize Constant 3847
IdGopherPlusDirectoryInformation Constant 3848
IdGopherPlusError_ItemMoved Constant 3848
IdGopherPlusError_NotAvailable Constant 3848
IdGopherPlusError_TryLater Constant 3848
IdGopherPlusIndicator Constant 3849
IdGopherPlusInfo Constant 3849
IdGopherPlusInformation Constant 3849
IdGopherPlusSelect Constant 3850
IdGopherPlusViews Constant 3850
IdHelpVisibleDef Constant 3850
IdHexDigits Constant 3850
IdHoursInDay Constant 3851
IdHoursInHalfDay Constant 3851
IdIdentQryTimeout Constant 3851
IdIPAddrMonInterval Constant 3852
IdIPFamily Constant 3852
IdIRCCTCP Constant 3852
IdIRCDCC Constant 3853
IdIRCStatChars Constant 3853
IdIRCUserModeChars Constant 3853
IdListenQueueDefault Constant 3853
IdMaxLineLengthDefault Constant 3854
IdMillisecondsInDay Constant 3854
IdMillisecondsInHour Constant 3855
IdMillisecondsInMinute Constant 3855
IdMilliSecondsInSecond Constant 3855
IdMillisecondsInWeek Constant 3855
IdMinutesInHour Constant 3856
IdMonthNames Constant 3856
IdMonthShortNames Constant 3856
IdMonthsInYear Constant 3856
IdOctalDigits Constant 3857

lxxii Internet Direct (Indy) Version 10.1.5


IdParseParamsDefault Constant 3857
IdPOPRT_xact_backup Constant 3857
IdPORT_3COM_TSMUX Constant 3858
IdPORT_914c_g Constant 3859
IdPORT_9pfs Constant 3860
IdPORT_ACAS Constant 3861
IdPORT_accessbuilder Constant 3862
IdPORT_aci Constant 3863
IdPORT_acmaint_dbd Constant 3864
IdPORT_acmaint_transd Constant 3865
IdPORT_ACR_NAME Constant 3866
IdPORT_aed_512 Constant 3867
IdPORT_alpes Constant 3868
IdPORT_ampr_rcmd Constant 3869
IdPORT_ANASTRADER Constant 3870
IdPORT_anet Constant 3871
IdPORT_ANSANOTIFY Constant 3872
IdPORT_ANY_FILE Constant 3873
IdPORT_ANYDIAL Constant 3874
IdPORT_ANYPRINTER Constant 3875
IdPORT_ANYPRIVATE_TERMINAL Constant 3876
IdPORT_ANYRJE Constant 3877
IdPORT_ANYTERMINALLINK Constant 3878
IdPORT_ANYTERMINIL Constant 3879
IdPORT_apertus_ldp Constant 3880
IdPORT_appleqtc Constant 3881
IdPORT_appleqtcsrvr Constant 3882
IdPORT_applix Constant 3883
IdPORT_ariel1 Constant 3884
IdPORT_ariel2 Constant 3885
IdPORT_ariel3 Constant 3886
IdPORT_arns Constant 3887
IdPORT_as_servermap Constant 3888
IdPORT_asa Constant 3889
IdPORT_at_3 Constant 3890
IdPORT_at_5 Constant 3891
IdPORT_at_7 Constant 3892
IdPORT_at_8 Constant 3893
IdPORT_at_echo Constant 3894
IdPORT_at_nbp Constant 3895
IdPORT_at_rtmp Constant 3896
IdPORT_at_zis Constant 3897
IdPORT_AUDIONEWS Constant 3898
IdPORT_audit Constant 3899
IdPORT_AUDITD Constant 3900
IdPORT_aurp Constant 3901
IdPORT_AUTH Constant 3902
IdPORT_avian Constant 3903
IdPORT_banyan_rpc Constant 3904
IdPORT_banyan_vip Constant 3905
IdPORT_BBN_LOGIN Constant 3906
IdPORT_bftp Constant 3907

Internet Direct (Indy) Version 10.1.5 lxxiii


IdPORT_bgp Constant 3908
IdPORT_bgs_nsi Constant 3909
IdPORT_bl_idm Constant 3910
IdPORT_bnet Constant 3911
IdPORT_BOOTPC Constant 3912
IdPORT_BOOTPS Constant 3913
IdPORT_busboy Constant 3914
IdPORT_cadlock Constant 3915
IdPORT_cadlock2 Constant 3916
IdPORT_CAIlic Constant 3917
IdPORT_cdc Constant 3918
IdPORT_CFDPTKT Constant 3919
IdPORT_CHARGEN Constant 3920
IdPORT_chshell Constant 3921
IdPORT_CISCO_FNA Constant 3922
IdPORT_cisco_sys Constant 3923
IdPORT_cisco_tna Constant 3924
IdPORT_cl_1 Constant 3925
IdPORT_clearcase Constant 3926
IdPORT_cmd Constant 3927
IdPORT_cmip_agent Constant 3928
IdPORT_cmip_man Constant 3929
IdPORT_COMPRESSNET_CMP Constant 3930
IdPORT_COMPRESSNET_MGM Constant 3931
IdPORT_comscm Constant 3932
IdPORT_con Constant 3933
IdPORT_concert Constant 3934
IdPORT_conference Constant 3935
IdPORT_contentserver Constant 3936
IdPORT_courier Constant 3937
IdPORT_COVIA Constant 3938
IdPORT_creativepartnr Constant 3939
IdPORT_creativeserver Constant 3940
IdPORT_cronus Constant 3941
IdPORT_csi_sgwp Constant 3942
IdPORT_CSNET_NS Constant 3943
IdPORT_CTF Constant 3944
IdPORT_cvc_hostd Constant 3945
IdPORT_cybercash Constant 3946
IdPORT_cycleserv Constant 3947
IdPORT_cycleserv2 Constant 3948
IdPORT_dasp Constant 3949
IdPORT_datasurfsrv Constant 3950
IdPORT_datasurfsrvsec Constant 3951
IdPORT_DAYTIME Constant 3952
IdPORT_dbase Constant 3953
IdPORT_DCP Constant 3954
IdPORT_ddm_byte Constant 3955
IdPORT_ddm_dfm Constant 3956
IdPORT_ddm_rdb Constant 3957
IdPORT_decap Constant 3958
IdPORT_decladebug Constant 3959

lxxiv Internet Direct (Indy) Version 10.1.5


IdPORT_decvms_sysmgt Constant 3960
IdPORT_DEOS Constant 3961
IdPORT_device Constant 3962
IdPORT_deviceshare Constant 3963
IdPORT_dhcp_client_v6 Constant 3964
IdPORT_dhcp_server_v6 Constant 3965
IdPORT_DICT Constant 3966
IdPORT_digital_vrc Constant 3967
IdPORT_dis Constant 3968
IdPORT_DISCARD Constant 3969
IdPORT_DIXIE Constant 3970
IdPORT_dls Constant 3971
IdPORT_dls_mon Constant 3972
IdPORT_dn6_nlm_aud Constant 3973
IdPORT_dn6_smm_red Constant 3974
IdPORT_dna_cml Constant 3975
IdPORT_DNSIX Constant 3976
IdPORT_DOMAIN Constant 3977
IdPORT_doom Constant 3978
IdPORT_dsETOS Constant 3979
IdPORT_dsf Constant 3980
IdPORT_dsfgw Constant 3981
IdPORT_DSP Constant 3982
IdPORT_dsp3270 Constant 3983
IdPORT_ECHO Constant 3984
IdPORT_efs Constant 3985
IdPORT_elcsd Constant 3986
IdPORT_embl_ndt Constant 3987
IdPORT_emfis_cntl Constant 3988
IdPORT_emfis_data Constant 3989
IdPORT_entomb Constant 3990
IdPORT_entrustmanager Constant 3991
IdPORT_ERPC Constant 3992
IdPORT_etcp Constant 3993
IdPORT_fatserv Constant 3994
IdPORT_FINGER Constant 3995
IdPORT_flexlm Constant 3996
IdPORT_fln_spx Constant 3997
IdPORT_FSP Constant 3998
IdPORT_FTP Constant 3998
IdPORT_ftp_agent Constant 3999
IdPORT_FTP_DATA Constant 4000
IdPORT_ftps Constant 4001
IdPORT_ftps_data Constant 4002
IdPORT_fujitsu_dev Constant 4003
IdPORT_gacp Constant 4004
IdPORT_garcon Constant 4005
IdPORT_genie Constant 4006
IdPORT_genrad_mux Constant 4007
IdPORT_ginad Constant 4008
IdPORT_go_login Constant 4009
IdPORT_GOPHER Constant 4010

Internet Direct (Indy) Version 10.1.5 lxxv


IdPORT_GPPITNP Constant 4011
IdPORT_GRAPHICS Constant 4012
IdPORT_gss_http Constant 4013
IdPORT_GSS_XLICEN Constant 4014
IdPORT_hassle Constant 4015
IdPORT_hems Constant 4016
IdPORT_HOSTNAME Constant 4017
IdPORT_HOSTS2_NS Constant 4018
IdPORT_hp_alarm_mgr Constant 4019
IdPORT_hp_collector Constant 4020
IdPORT_hp_managed_node Constant 4021
IdPORT_HTTP Constant 4022
IdPORT_HTTPProxy Constant 4023
IdPORT_hybrid_pop Constant 4023
IdPORT_hyper_g Constant 4024
IdPORT_iafdbase Constant 4025
IdPORT_iafserver Constant 4026
IdPORT_iasd Constant 4027
IdPORT_ibm_app Constant 4028
IdPORT_icad_el Constant 4029
IdPORT_imap3 Constant 4030
IdPORT_IMAP4 Constant 4031
IdPORT_IMAP4S Constant 4032
IdPORT_imsp Constant 4033
IdPORT_infoseek Constant 4034
IdPORT_ingres_net Constant 4035
IdPORT_intecourier Constant 4036
IdPORT_integra_sme Constant 4037
IdPORT_ipcserver Constant 4038
IdPORT_ipx Constant 4039
IdPORT_IRC Constant 4040
IdPORT_IRCS Constant 4041
IdPORT_is99c Constant 4042
IdPORT_is99s Constant 4043
IdPORT_ISI_GL Constant 4044
IdPORT_iso_ip Constant 4045
IdPORT_iso_tp0 Constant 4046
IdPORT_ISO_TSAP Constant 4047
IdPORT_iso_tsap_c2 Constant 4048
IdPORT_KERBEROS Constant 4049
IdPORT_kerberos_adm Constant 4050
IdPORT_kis Constant 4051
IdPORT_klogin Constant 4052
IdPORT_knet_cmp Constant 4053
IdPORT_kpasswd Constant 4054
IdPORT_kryptolan Constant 4055
IdPORT_kshell Constant 4056
IdPORT_LA_MAINT Constant 4057
IdPORT_ldap Constant 4058
IdPORT_legent_1 Constant 4059
IdPORT_legent_2 Constant 4060
IdPORT_link Constant 4061

lxxvi Internet Direct (Indy) Version 10.1.5


IdPORT_ljk_login Constant 4062
IdPORT_loadav Constant 4063
IdPORT_loc_srv Constant 4064
IdPORT_locus_con Constant 4065
IdPORT_LOCUS_MAP Constant 4066
IdPORT_LPD Constant 4067
IdPORT_macon_tcp Constant 4068
IdPORT_mailq Constant 4069
IdPORT_maitrd Constant 4070
IdPORT_McIDAS Constant 4071
IdPORT_mdbs_daemon Constant 4072
IdPORT_mdqs Constant 4073
IdPORT_METAGRAM Constant 4074
IdPORT_meter Constant 4075
IdPORT_meter_udemon Constant 4076
IdPORT_MFCOBOL Constant 4077
IdPORT_micom_pfs Constant 4078
IdPORT_microsoft_ds Constant 4079
IdPORT_MIT_DOV Constant 4080
IdPORT_MIT_ML_DEV Constant 4081
IdPORT_MIT_ML_DEV2 Constant 4082
IdPORT_mobileip_agent Constant 4083
IdPORT_mobilip_mn Constant 4084
IdPORT_mondex Constant 4085
IdPORT_monitor Constant 4086
IdPORT_MPM Constant 4087
IdPORT_MPM_FLAGS Constant 4088
IdPORT_MPM_SND Constant 4089
IdPORT_mpp Constant 4090
IdPORT_mptn Constant 4091
IdPORT_ms_rome Constant 4092
IdPORT_ms_shuttle Constant 4093
IdPORT_MSG_AUTH Constant 4094
IdPORT_MSG_ICMP Constant 4095
IdPORT_MSP Constant 4096
IdPORT_multiplex Constant 4097
IdPORT_mumps Constant 4098
IdPORT_mylex_mapd Constant 4099
IdPORT_NAMESERVER Constant 4100
IdPORT_namp Constant 4101
IdPORT_nas Constant 4102
IdPORT_nced Constant 4103
IdPORT_ncld Constant 4104
IdPORT_nest_protocol Constant 4105
IdPORT_netbios_dgm Constant 4106
IdPORT_netbios_ns Constant 4107
IdPORT_netbios_ssn Constant 4108
IdPORT_netgw Constant 4109
IdPORT_netnews Constant 4110
IdPORT_netrcs Constant 4111
IdPORT_NETRJS1 Constant 4112
IdPORT_NETRJS2 Constant 4113

Internet Direct (Indy) Version 10.1.5 lxxvii


IdPORT_NETRJS3 Constant 4114
IdPORT_NETRJS4 Constant 4115
IdPORT_netsc_dev Constant 4116
IdPORT_netsc_prod Constant 4117
IdPORT_NETSTAT Constant 4118
IdPORT_netviewdm1 Constant 4119
IdPORT_netviewdm2 Constant 4120
IdPORT_netviewdm3 Constant 4121
IdPORT_netwall Constant 4122
IdPORT_netware_ip Constant 4123
IdPORT_new_rwho Constant 4124
IdPORT_NEWACCT Constant 4125
IdPORT_news Constant 4126
IdPORT_NextStep Constant 4127
IdPORT_NI_FTP Constant 4128
IdPORT_NI_MAIL Constant 4129
IdPORT_nip Constant 4130
IdPORT_nlogin Constant 4131
IdPORT_nnsp Constant 4132
IdPORT_NNTP Constant 4133
IdPORT_notify Constant 4134
IdPORT_npmp_gui Constant 4135
IdPORT_npmp_local Constant 4136
IdPORT_npmp_trap Constant 4137
IdPORT_NPP Constant 4138
IdPORT_npp2 Constant 4139
IdPORT_nqs Constant 4140
IdPORT_ns Constant 4141
IdPORT_nss_routing Constant 4142
IdPORT_NSW_FE Constant 4143
IdPORT_ntalk Constant 4144
IdPORT_OBJCALL Constant 4145
IdPORT_ocbinder Constant 4146
IdPORT_ock Constant 4147
IdPORT_ocs_amu Constant 4148
IdPORT_ocs_cmu Constant 4149
IdPORT_ocserver Constant 4150
IdPORT_omserv Constant 4151
IdPORT_onmux Constant 4152
IdPORT_opc_job_start Constant 4153
IdPORT_opc_job_track Constant 4154
IdPORT_openvms_sysipc Constant 4155
IdPORT_osu_nms Constant 4156
IdPORT_pawserv Constant 4157
IdPORT_pcmail_srv Constant 4158
IdPORT_pdap Constant 4159
IdPORT_ph Constant 4160
IdPORT_phonebook Constant 4161
IdPORT_photuris Constant 4162
IdPORT_pirp Constant 4163
IdPORT_POP2 Constant 4164
IdPORT_POP3 Constant 4165

lxxviii Internet Direct (Indy) Version 10.1.5


IdPORT_POP3S Constant 4166
IdPORT_pov_ray Constant 4167
IdPORT_powerburst Constant 4168
IdPORT_print_srv Constant 4169
IdPORT_prm_nm Constant 4170
IdPORT_prm_sm Constant 4171
IdPORT_profile Constant 4172
IdPORT_prospero Constant 4173
IdPORT_pump Constant 4174
IdPORT_puparp Constant 4175
IdPORT_puprouter Constant 4176
IdPORT_PWDGEN Constant 4177
IdPORT_qft Constant 4178
IdPORT_qmtp Constant 4179
IdPORT_QOTD Constant 4180
IdPORT_qrh Constant 4181
IdPORT_qsc Constant 4182
IdPORT_quotad Constant 4183
IdPORT_RAP Constant 4184
IdPORT_rcp Constant 4185
IdPORT_RE_MAIL_CK Constant 4186
IdPORT_remote_kis Constant 4187
IdPORT_remotefs Constant 4188
IdPORT_rfile Constant 4189
IdPORT_ris Constant 4190
IdPORT_ris_cm Constant 4191
IdPORT_RJE Constant 4192
IdPORT_RLP Constant 4193
IdPORT_rmonitor Constant 4194
IdPORT_rmt Constant 4195
IdPORT_router Constant 4196
IdPORT_rpasswd Constant 4197
IdPORT_rrh Constant 4198
IdPORT_rsh_spx Constant 4199
IdPORT_rsvd Constant 4200
IdPORT_RTELNET Constant 4201
IdPORT_rtip Constant 4202
IdPORT_rtsp Constant 4203
IdPORT_rxe Constant 4204
IdPORT_s_net Constant 4205
IdPORT_saft Constant 4206
IdPORT_scohelp Constant 4207
IdPORT_scx_proxy Constant 4208
IdPORT_sdnskmp Constant 4209
IdPORT_send Constant 4210
IdPORT_servstat Constant 4211
IdPORT_sfs_config Constant 4212
IdPORT_sfs_smp_net Constant 4213
IdPORT_SFTP Constant 4214
IdPORT_sgcp Constant 4215
IdPORT_sgmp Constant 4216
IdPORT_sgmp_traps Constant 4217

Internet Direct (Indy) Version 10.1.5 lxxix


IdPORT_sift_uft Constant 4218
IdPORT_silverplatter Constant 4219
IdPORT_skronk Constant 4220
IdPORT_SMAKYNET Constant 4221
IdPORT_smartsdp Constant 4222
IdPORT_smpte Constant 4223
IdPORT_smsp Constant 4224
IdPORT_SMTP Constant 4225
IdPORT_smux Constant 4226
IdPORT_SNAGAS Constant 4227
IdPORT_SNEWS Constant 4228
IdPORT_snmp Constant 4229
IdPORT_snmptrap Constant 4230
IdPORT_SNTP Constant 4231
IdPORT_SOCKS Constant 4232
IdPORT_softpc Constant 4233
IdPORT_sonar Constant 4234
IdPORT_spsc Constant 4235
IdPORT_sql_net Constant 4236
IdPORT_SQLNET Constant 4237
IdPORT_SQLSERV Constant 4238
IdPORT_sqlsrv Constant 4239
IdPORT_src Constant 4240
IdPORT_srmp Constant 4241
IdPORT_ss7ns Constant 4242
IdPORT_SSH Constant 4243
IdPORT_SSL Constant 4244
IdPORT_ssmtp Constant 4245
IdPORT_statsrv Constant 4246
IdPORT_streettalk Constant 4247
IdPORT_SU_MIT_TG Constant 4248
IdPORT_submit Constant 4249
IdPORT_SUNRPC Constant 4250
IdPORT_SUPDUP Constant 4251
IdPORT_sur_meas Constant 4252
IdPORT_svrloc Constant 4253
IdPORT_SWIFT_RVF Constant 4254
IdPORT_synoptics_trap Constant 4255
IdPORT_synotics_broker Constant 4256
IdPORT_synotics_relay Constant 4257
IdPORT_syslog Constant 4258
IdPORT_SYSTAT Constant 4259
IdPORT_TACACS_DS Constant 4260
IdPORT_TACNEWS Constant 4261
IdPORT_talk Constant 4262
IdPORT_TCPMUX Constant 4263
IdPORT_tcpnethaspsrv Constant 4264
IdPORT_teedtap Constant 4265
IdPORT_tell Constant 4266
IdPORT_TELNET Constant 4267
IdPORT_TelnetS Constant 4268
IdPORT_tempo Constant 4269

lxxx Internet Direct (Indy) Version 10.1.5


IdPORT_TFTP Constant 4270
IdPORT_ticf_1 Constant 4271
IdPORT_ticf_2 Constant 4272
IdPORT_timbuktu Constant 4273
IdPORT_TIME Constant 4274
IdPORT_timed Constant 4275
IdPORT_tn_tl_fd1 Constant 4276
IdPORT_tn_tl_w1 Constant 4277
IdPORT_tn_tl_w2 Constant 4278
IdPORT_tnETOS Constant 4279
IdPORT_tserver Constant 4280
IdPORT_uaac Constant 4281
IdPORT_uarps Constant 4282
IdPORT_uis Constant 4283
IdPORT_ulistserv Constant 4284
IdPORT_ulpnet Constant 4285
IdPORT_unidata_ldm Constant 4286
IdPORT_unify Constant 4287
IdPORT_UNITARY Constant 4288
IdPORT_ups Constant 4289
IdPORT_urm Constant 4290
IdPORT_utime Constant 4291
IdPORT_utmpcd Constant 4292
IdPORT_utmpsd Constant 4293
IdPORT_uucp Constant 4294
IdPORT_UUCP_PATH Constant 4295
IdPORT_uucp_rlogin Constant 4296
IdPORT_vemmi Constant 4297
IdPORT_VETTCP Constant 4298
IdPORT_vid Constant 4299
IdPORT_vmnet Constant 4300
IdPORT_vmpwscs Constant 4301
IdPORT_vsinet Constant 4302
IdPORT_webster Constant 4303
IdPORT_who Constant 4304
IdPORT_whoami Constant 4305
IdPORT_WHOIS Constant 4306
IdPORT_WHOIS_PLUS Constant 4307
IdPORT_work_sol Constant 4308
IdPORT_wpages Constant 4309
IdPORT_wpgs Constant 4310
IdPORT_xdmcp Constant 4311
IdPORT_XFER Constant 4312
IdPORT_XNS_AUTH Constant 4313
IdPORT_XNS_CH Constant 4314
IdPORT_xns_courier Constant 4315
IdPORT_XNS_MAIL Constant 4316
IdPORT_XNS_TIME Constant 4317
IdPORT_xyplex_mux Constant 4318
IdPORT_z39_50 Constant 4319
IdPORT_zserv Constant 4320
IDRemoteFixPort Constant 4321

Internet Direct (Indy) Version 10.1.5 lxxxi


IDRemoteUseStdErr Constant 4321
IdS_IEXEC Constant 4321
IdS_IREAD Constant 4322
IdS_IRGRP Constant 4322
IdS_IROTH Constant 4322
IdS_IRUSR Constant 4322
IdS_IRWXG Constant 4323
IdS_IRWXO Constant 4323
IdS_IRWXU Constant 4323
IdS_ISGID Constant 4323
IdS_ISUID Constant 4324
IdS_ISVTX Constant 4324
IdS_IWGRP Constant 4324
IdS_IWOTH Constant 4324
IdS_IWRITE Constant 4325
IdS_IWUSR Constant 4325
IdS_IXGRP Constant 4325
IdS_IXOTH Constant 4325
IdS_IXUSR Constant 4326
IdSecondsInDay Constant 4326
IdSecondsInHalfDay Constant 4326
IdSecondsInHour Constant 4326
IdSecondsInLeapYear Constant 4327
IdSecondsInMinute Constant 4327
IdSecondsInWeek Constant 4327
IdSecondsInYear Constant 4327
IdSMTPSvrReceivedString Constant 4328
IdSocksAuthGSSApi Constant 4328
IdSocksAuthNoAcceptableMethods Constant 4328
IdSocksAuthNoAuthenticationRequired Constant 4328
IdSocksAuthUsernamePassword Constant 4329
IdSocksLoginFailure Constant 4329
IdSocksLoginSuccess Constant 4329
IdStati Constant 4329
IdThreadComponentDefaultPriority Constant 4330
IdThreadComponentDefaultStopMode Constant 4330
IdTimeoutDefault Constant 4331
IdTimeoutInfinite Constant 4331
IdUserAccountDefaultAccess Constant 4331
IdWaitAllThreadsTerminatedCount Constant 4332
IdWaitAllThreadsTerminatedStep Constant 4332
IdYearsInCentury Constant 4333
IdYearsInLeapYearCycle Constant 4333
IdYearsInShortLeapYearCycle Constant 4333
IMAP_BAD Constant 4333
IMAP_BYE Constant 4334
IMAP_CONT Constant 4334
IMAP_NO Constant 4334
IMAP_OK Constant 4334
IMAP_PREAUTH Constant 4335
INREPLYTO Constant 4335
InvalidWindowsFilenameChars Constant 4336

lxxxii Internet Direct (Indy) Version 10.1.5


IP_WATCH_HIST_FILENAME Constant 4337
IP_WATCH_HIST_MAX Constant 4337
IP_WATCH_INTERVAL Constant 4337
IPMCastHi Constant 4338
IPMCastLo Constant 4338
iQr_Answer Constant 4338
iQr_Question Constant 4339
iRCodeFormatError Constant 4339
iRCodeNameError Constant 4339
iRCodeNoError Constant 4339
iRCodeNotImplemented Constant 4340
iRCodeQueryNotFound Constant 4340
iRCodeQueryNotImplement Constant 4340
iRCodeQueryOK Constant 4340
iRCodeQueryReturned Constant 4341
iRCodeRefused Constant 4341
iRCodeServerFailure Constant 4341
LF Constant 4341
LWS Constant 4342
MailBoxAttributes Constant 4342
MAILFROM_ACCEPT Constant 4342
MAILFROM_CMD Constant 4343
MAX_MEM_LEVEL Constant 4343
MAX_PACKET_SIZE Constant 4343
MAX_WBITS Constant 4344
MaxMIMEBinToASCIIType Constant 4344
MaxMIMECompressType Constant 4344
MaxMIMEEncType Constant 4344
MaxMIMEMessageDigestType Constant 4345
MaxMIMESubTypes Constant 4345
MaxMIMEType Constant 4345
MAXTIMEOUT Constant 4345
MaxWord Constant 4346
MessageFlags Constant 4346
MILLISECOND_LENGTH Constant 4346
MIME7Bit Constant 4347
MIMEEncBase64 Constant 4347
MIMEEncNISTSHA Constant 4347
MIMEEncRLECompress Constant 4348
MIMEEncRSAMD2 Constant 4348
MIMEEncRSAMD4 Constant 4348
MIMEEncRSAMD5 Constant 4348
MIMEEncUUEncode Constant 4349
MIMEEncXXEncode Constant 4349
MIMEFullApplicationOctetStream Constant 4349
MIMEGenericMultiPart Constant 4349
MIMEGenericText Constant 4350
MIMESplit Constant 4350
MIMESubMacBinHex40 Constant 4350
MIMESubOctetStream Constant 4350
MIMETypeApplication Constant 4351
MIMETypeAudio Constant 4351

Internet Direct (Indy) Version 10.1.5 lxxxiii


MIMETypeImage Constant 4351
MIMETypeMessage Constant 4351
MIMETypeMultipart Constant 4352
MIMETypeText Constant 4352
MIMETypeVideo Constant 4352
MIMEXVal Constant 4352
MINTIMEOUT Constant 4354
MLST Constant 4354
monthnames Constant 4354
MS_DOS_ALL_FILES Constant 4354
MS_DOS_CURDIR Constant 4355
MSG_END Constant 4356
MSG_START Constant 4356
MVS_JES_Status Constant 4356
ND_NEIGHBOR_ADVERT Constant 4357
ND_NEIGHBOR_SOLICIT Constant 4357
ND_REDIRECT Constant 4357
ND_ROUTER_ADVERT Constant 4357
ND_ROUTER_SOLICIT Constant 4358
NLST Constant 4358
NODETAILS Constant 4358
NOVELLNETWAREPSU Constant 4358
NTPMaxInt Constant 4359
NULL_IP Constant 4359
OK Constant 4359
opRemove Constant 4359
OS2PARSER Constant 4360
PARENT_DIR Constant 4360
PARTSEP Constant 4360
PATH_DEVICE_SEP_DOS Constant 4360
PATH_DEVICE_SEP_UNIX Constant 4361
PATH_DEVICE_SEP_VMS Constant 4361
PATH_FILENAME_SEP_DOS Constant 4361
PATH_FILENAME_SEP_UNIX Constant 4361
PATH_FILENAME_SEP_VMS Constant 4362
PATH_SUBDIR_SEP_DOS Constant 4362
PATH_SUBDIR_SEP_UNIX Constant 4362
PATH_SUBDIR_SEP_VMS Constant 4362
PDUGetNextRequest Constant 4363
PDUGetRequest Constant 4363
PDUGetResponse Constant 4363
PDUSetRequest Constant 4363
PDUTrap Constant 4364
POWER_1 Constant 4364
POWER_2 Constant 4364
POWER_3 Constant 4365
POWER_4 Constant 4365
QueryRecordCount Constant 4366
QueryRecordTypes Constant 4366
QueryRecordValues Constant 4366
RAW_WBITS Constant 4367
RCPTTO_ACCEPT Constant 4367

lxxxiv Internet Direct (Indy) Version 10.1.5


RCPTTO_CMD Constant 4367
RDTYPE_DIR Constant 4368
RDTYPE_END Constant 4368
RDTYPE_FILE Constant 4368
RDTYPE_SKIP Constant 4369
RSDNSServerAXFRError_QuerySequenceError Constant 4369
RSDNSServerSettingError_MappingHostError Constant 4369
RSET_ACCEPT Constant 4369
RSET_CMD Constant 4370
RSH_FORCEPORTSINRANGE Constant 4370
sBlockSize Constant 4370
SCCN_FEAT Constant 4371
sContentDisposition Constant 4371
sContentTypeFormData Constant 4371
sContentTypeOctetStream Constant 4371
sContentTypePlaceHolder Constant 4372
sFileNamePlaceHolder Constant 4373
sLineBreak Constant 4373
SLongDayNameFri Constant 4374
SLongDayNameMon Constant 4374
SLongDayNameSat Constant 4374
SLongDayNameSun Constant 4374
SLongDayNameThu Constant 4375
SLongDayNameTue Constant 4375
SLongDayNameWed Constant 4375
SLongMonthNameApr Constant 4375
SLongMonthNameAug Constant 4376
SLongMonthNameDec Constant 4376
SLongMonthNameFeb Constant 4376
SLongMonthNameJan Constant 4376
SLongMonthNameJul Constant 4377
SLongMonthNameJun Constant 4377
SLongMonthNameMar Constant 4377
SLongMonthNameMay Constant 4377
SLongMonthNameNov Constant 4378
SLongMonthNameOct Constant 4378
SLongMonthNameSep Constant 4378
SSCN_ERR_NEGOTIATION_REPLY Constant 4379
SSCN_OFF Constant 4379
SSCN_OK_REPLY Constant 4380
SSCN_ON Constant 4380
SShortDayNameFri Constant 4380
SShortDayNameMon Constant 4380
SShortDayNameSat Constant 4381
SShortDayNameSun Constant 4381
SShortDayNameThu Constant 4381
SShortDayNameTue Constant 4381
SShortDayNameWed Constant 4382
SShortMonthNameApr Constant 4382
SShortMonthNameAug Constant 4382
SShortMonthNameDec Constant 4382
SShortMonthNameFeb Constant 4383

Internet Direct (Indy) Version 10.1.5 lxxxv


SShortMonthNameJan Constant 4383
SShortMonthNameJul Constant 4383
SShortMonthNameJun Constant 4383
SShortMonthNameMar Constant 4384
SShortMonthNameMay Constant 4384
SShortMonthNameNov Constant 4384
SShortMonthNameOct Constant 4384
SShortMonthNameSep Constant 4385
ST_ERR Constant 4385
ST_ERR_AUTH Constant 4385
ST_ERR_IN_USE Constant 4385
ST_ERR_LOGIN_DELAY Constant 4386
ST_ERR_SYS_PERM Constant 4386
ST_ERR_SYS_TEMP Constant 4386
ST_OK Constant 4386
ST_SASLCONTINUE Constant 4387
STIRCOMEXPOS390 Constant 4387
STIRCOMUNIX Constant 4387
STIRCOMUNIXNS Constant 4387
STIRCOMUNIXROOT Constant 4388
SWITCH_BOTH_TIME_YEAR Constant 4388
SWITCH_CLASSIFY Constant 4388
SWITCH_COLS_ACCROSS Constant 4388
SWITCH_COLS_DOWN Constant 4389
SWITCH_COMMA_STREAM Constant 4389
SWITCH_HIDE_DIRPOINT Constant 4389
SWITCH_LONG_FORM Constant 4389
SWITCH_ONE_COL Constant 4390
SWITCH_ONE_DIR Constant 4390
SWITCH_PRINT_BLOCKS Constant 4390
SWITCH_PRINT_INODE Constant 4390
SWITCH_QUOTEDNAME Constant 4391
SWITCH_RECURSIVE Constant 4391
SWITCH_SHOW_ALLPERIOD Constant 4391
SWITCH_SLASHDIR Constant 4391
SWITCH_SORT_REVERSE Constant 4392
SWITCH_SORTBY_CTIME Constant 4392
SWITCH_SORTBY_EXT Constant 4392
SWITCH_SORTBY_MTIME Constant 4392
SWITCH_SORTBY_SIZE Constant 4393
SYST_ID_NT Constant 4393
SYST_ID_UNIX Constant 4393
TAB Constant 4393
TANDEM_GUARDIAN_ID Constant 4394
TFTP_ACK Constant 4394
TFTP_DATA Constant 4394
TFTP_ERROR Constant 4395
TFTP_OACK Constant 4395
TFTP_RRQ Constant 4395
TFTP_WRQ Constant 4395
TIME_BASEDATE Constant 4396
TIME_TIMEOUT Constant 4396

lxxxvi Internet Direct (Indy) Version 10.1.5


TLS_AUTH_NAMES Constant 4396
TNC_AO Constant 4397
TNC_AYT Constant 4397
TNC_BREAK Constant 4397
TNC_DATA_MARK Constant 4397
TNC_DO Constant 4398
TNC_DONT Constant 4398
TNC_EC Constant 4398
TNC_EL Constant 4398
TNC_EOR Constant 4399
TNC_GA Constant 4399
TNC_IAC Constant 4399
TNC_IP Constant 4400
TNC_NOP Constant 4400
TNC_SB Constant 4400
TNC_SE Constant 4400
TNC_WILL Constant 4401
TNC_WONT Constant 4401
TNO_3270REGIME Constant 4401
TNO_AMSN Constant 4401
TNO_AUTH Constant 4402
TNO_BINARY Constant 4402
TNO_BYTE_MACRO Constant 4402
TNO_DET Constant 4402
TNO_EA Constant 4403
TNO_ECHO Constant 4403
TNO_ENCRYPT Constant 4403
TNO_EOL Constant 4404
TNO_EOR Constant 4404
TNO_LINEMODE Constant 4404
TNO_LOGOUT Constant 4404
TNO_NAWS Constant 4405
TNO_OCRD Constant 4405
TNO_OFD Constant 4405
TNO_OHTD Constant 4405
TNO_OHTS Constant 4406
TNO_OLD Constant 4406
TNO_OLW Constant 4406
TNO_OM Constant 4406
TNO_OPS Constant 4407
TNO_OVT Constant 4407
TNO_OVTD Constant 4407
TNO_RCTE Constant 4408
TNO_RECONNECT Constant 4408
TNO_RFLOW Constant 4408
TNO_SGA Constant 4408
TNO_SL Constant 4409
TNO_STATUS Constant 4409
TNO_SUPDUP Constant 4409
TNO_SUPDUP_OUTPUT Constant 4409
TNO_TACACS_ID Constant 4410
TNO_TERM_SPEED Constant 4410

Internet Direct (Indy) Version 10.1.5 lxxxvii


TNO_TERMTYPE Constant 4410
TNO_TIMING_MARK Constant 4410
TNO_TLN Constant 4411
TNO_X3PAD Constant 4411
TNO_XDISPLOC Constant 4411
TNOS_NAME Constant 4412
TNOS_REPLY Constant 4412
TNOS_TERM_IS Constant 4412
TNOS_TERMTYPE_SEND Constant 4412
TOPS20_DIRFILE_SEP Constant 4413
TOPS20_VOLPATH_SEP Constant 4413
tpHigher Constant 4413
tpHighest Constant 4413
tpIdAboveNormal Constant 4414
tpIdBelowNormal Constant 4414
tpIdHighest Constant 4414
tpIdle Constant 4414
tpIdLowest Constant 4415
tpIdNormal Constant 4415
tpListener Constant 4415
tpLower Constant 4416
tpLowest Constant 4416
tpNormal Constant 4416
tpTimeCritical Constant 4416
TypeCode_A Constant 4417
TypeCode_AAAA Constant 4417
TypeCode_AFSDB Constant 4417
TypeCode_AXFR Constant 4417
TypeCode_CERT Constant 4418
TypeCode_CName Constant 4418
TypeCode_DNAME Constant 4418
TypeCode_Error Constant 4418
TypeCode_HINFO Constant 4419
TypeCode_ISDN Constant 4419
TypeCode_IXFR Constant 4419
TypeCode_KEY Constant 4419
TypeCode_KX Constant 4420
TypeCode_LOC Constant 4420
TypeCode_MB Constant 4420
TypeCode_MD Constant 4420
TypeCode_MF Constant 4421
TypeCode_MG Constant 4421
TypeCode_MINFO Constant 4421
TypeCode_MR Constant 4421
TypeCode_MX Constant 4422
TypeCode_NAPTR Constant 4422
TypeCode_NS Constant 4422
TypeCode_NSAP Constant 4422
TypeCode_NSAP_PTR Constant 4423
TypeCode_NULL Constant 4423
TypeCode_NXT Constant 4423
TypeCode_OPTIONAL Constant 4423

lxxxviii Internet Direct (Indy) Version 10.1.5


TypeCode_PTR Constant 4424
TypeCode_PX Constant 4424
TypeCode_QPOS Constant 4424
TypeCode_R31 Constant 4424
TypeCode_R32 Constant 4425
TypeCode_R34 Constant 4425
TypeCode_R40 Constant 4425
TypeCode_RP Constant 4425
TypeCode_RT Constant 4426
TypeCode_Service Constant 4426
TypeCode_SIG Constant 4426
TypeCode_SOA Constant 4426
TypeCode_STAR Constant 4427
TypeCode_TXT Constant 4427
TypeCode_V6Addr Constant 4427
TypeCode_WKS Constant 4427
TypeCode_X25 Constant 4428
TZ_ADT Constant 4428
TZ_AHST Constant 4429
TZ_AST Constant 4429
TZ_AT Constant 4430
TZ_BST Constant 4431
TZ_BT Constant 4432
TZ_CAT Constant 4432
TZ_CCT Constant 4433
TZ_CDT Constant 4434
TZ_CET Constant 4435
TZ_CST Constant 4435
TZ_EADT Constant 4436
TZ_EAST Constant 4437
TZ_EDT Constant 4438
TZ_EET Constant 4439
TZ_EST Constant 4439
TZ_FST Constant 4440
TZ_FWT Constant 4441
TZ_GMT Constant 4442
TZ_GST Constant 4442
TZ_HDT Constant 4443
TZ_HST Constant 4444
TZ_IDLE Constant 4445
TZ_IDLW Constant 4445
TZ_JST Constant 4446
TZ_MDT Constant 4447
TZ_MEST Constant 4448
TZ_MESZ Constant 4449
TZ_MET Constant 4449
TZ_MEWT Constant 4450
TZ_MST Constant 4451
TZ_NT Constant 4452
TZ_NZDT Constant 4452
TZ_NZST Constant 4453
TZ_NZT Constant 4454

Internet Direct (Indy) Version 10.1.5 lxxxix


TZ_PDT Constant 4455
TZ_PST Constant 4455
TZ_SST Constant 4456
TZ_SWT Constant 4457
TZ_UT Constant 4458
TZ_UTC Constant 4459
TZ_WADT Constant 4459
TZ_WAST Constant 4460
TZ_WAT Constant 4461
TZ_WET Constant 4462
TZ_YDT Constant 4462
TZ_YST Constant 4463
TZ_ZP4 Constant 4464
TZ_ZP5 Constant 4465
TZ_ZP6 Constant 4465
TZM_A Constant 4466
TZM_Alpha Constant 4468
TZM_B Constant 4469
TZM_Bravo Constant 4471
TZM_C Constant 4472
TZM_Charlie Constant 4473
TZM_D Constant 4475
TZM_Delta Constant 4476
TZM_E Constant 4478
TZM_Echo Constant 4479
TZM_F Constant 4481
TZM_Foxtrot Constant 4482
TZM_G Constant 4484
TZM_Golf Constant 4485
TZM_H Constant 4487
TZM_Hotel Constant 4488
TZM_J Constant 4489
TZM_Juliet Constant 4491
TZM_K Constant 4492
TZM_Kilo Constant 4494
TZM_L Constant 4495
TZM_Lima Constant 4497
TZM_M Constant 4498
TZM_Mike Constant 4500
TZM_N Constant 4501
TZM_November Constant 4503
TZM_O Constant 4504
TZM_Oscar Constant 4505
TZM_P Constant 4507
TZM_Papa Constant 4508
TZM_Q Constant 4510
TZM_Quebec Constant 4511
TZM_R Constant 4513
TZM_Romeo Constant 4514
TZM_S Constant 4516
TZM_Sierra Constant 4517
TZM_T Constant 4519

xc Internet Direct (Indy) Version 10.1.5


TZM_Tango Constant 4520
TZM_U Constant 4521
TZM_Uniform Constant 4523
TZM_V Constant 4524
TZM_Victor Constant 4526
TZM_W Constant 4527
TZM_Whiskey Constant 4529
TZM_X Constant 4530
TZM_XRay Constant 4532
TZM_Y Constant 4533
TZM_Yankee Constant 4535
TZM_Z Constant 4536
TZM_Zulu Constant 4537
UNITREE Constant 4539
UnitreeStoreTypes Constant 4539
UNIX Constant 4539
UNIX_ALL_FILES Constant 4540
UNIX_CURDIR Constant 4540
UNIX_DIR_SIZE Constant 4540
UNIX_LINKTO_SYM Constant 4540
UNIXSTARTDATE Constant 4541
VALID_ENH_CODES Constant 4541
VALID_POP3_STR Constant 4541
VALID_TAGGEDREPLIES Constant 4541
ValidClassChars Constant 4542
ValidClassVals Constant 4542
VMS_ALL_FILES Constant 4542
VMS_BLOCK_SIZE Constant 4542
VMS_RELPATH_PREFIX Constant 4543
VSE_PowerQueue_Dispositions Constant 4543
VSERootDirItemTypes Constant 4543
wdays Constant 4543
WFFTP Constant 4544
WhiteSpace Constant 4544
WINNTID Constant 4544
wsBad Constant 4544
wsBye Constant 4545
wsContinue Constant 4545
Wship6_dll Constant 4546
wsNo Constant 4546
wsOk Constant 4546
wsPreAuth Constant 4547
XMAILER_HEADER Constant 4547
Z_ASCII Constant 4547
Z_BEST_COMPRESSION Constant 4547
Z_BEST_SPEED Constant 4548
Z_BINARY Constant 4548
Z_BLOCK Constant 4548
Z_BUF_ERROR Constant 4548
Z_DATA_ERROR Constant 4549
Z_DEFAULT_COMPRESSION Constant 4549
Z_DEFAULT_STRATEGY Constant 4549

Internet Direct (Indy) Version 10.1.5 xci


Z_DEFLATED Constant 4549
Z_ERRNO Constant 4550
Z_FILTERED Constant 4550
Z_FINISH Constant 4550
Z_FULL_FLUSH Constant 4550
Z_HUFFMAN_ONLY Constant 4551
Z_MEM_ERROR Constant 4551
Z_NEED_DICT Constant 4551
Z_NO_COMPRESSION Constant 4551
Z_NO_FLUSH Constant 4552
Z_NULL Constant 4552
Z_OK Constant 4552
Z_PARTIAL_FLUSH Constant 4552
Z_RLE Constant 4553
Z_STREAM_END Constant 4553
Z_STREAM_ERROR Constant 4553
Z_SYNC_FLUSH Constant 4553
Z_UNKNOWN Constant 4554
Z_VERSION_ERROR Constant 4554
ZLIB_VERNUM Constant 4554
zlib_version Constant 4554
Files 4555
IdAllFTPListParsers.pas 4555
IdAntiFreezeBase.pas 4555
IdASN1Util.pas 4556
IdAssignedNumbers.pas 4557
IdAttachment.pas 4585
IdAttachmentFile.pas 4585
IdAttachmentMemory.pas 4586
IdAuthentication.pas 4586
IdAuthenticationDigest.pas 4587
IdAuthenticationManager.pas 4587
IdAuthenticationNTLM.pas 4588
IdBaseComponent.pas 4588
IdBuffer.pas 4588
IdChargenServer.pas 4589
IdChargenUDPServer.pas 4589
IdCharsets.pas 4590
IdCmdTCPClient.pas 4590
IdCmdTCPServer.pas 4591
IdCoder.pas 4591
IdCoder00E.pas 4592
IdCoder3to4.pas 4593
IdCoderBinHex4.pas 4593
IdCoderHeader.pas 4594
IdCoderMIME.pas 4595
IdCoderQuotedPrintable.pas 4596
IdCoderUUE.pas 4597
IdCoderXXE.pas 4599
IdCommandHandlers.pas 4602
IdComponent.pas 4602
IdCompressionIntercept.pas 4603

xcii Internet Direct (Indy) Version 10.1.5


IdCompressorZLibEx.pas 4605
IdConnectThroughHttpProxy.pas 4605
IdContainers.pas 4605
IdContext.pas 4606
IdCookie.pas 4606
IdCookieManager.pas 4607
IdCustomHTTPServer.pas 4608
IdCustomTCPServer.pas 4609
IdCustomTransparentProxy.pas 4609
IdDateTimeStamp.pas 4610
IdDayTime.pas 4613
IdDayTimeServer.pas 4614
IdDayTimeUDP.pas 4614
IdDayTimeUDPServer.pas 4614
IdDICT.pas 4615
IdDICTCommon.pas 4615
IdDICTServer.pas 4616
IdDiscardServer.pas 4616
IdDiscardUDPServer.pas 4617
IdDNSCommon.pas 4617
IdDNSResolver.pas 4620
IdDNSServer.pas 4621
IdEcho.pas 4622
IdEchoServer.pas 4623
IdEchoUDP.pas 4623
IdEchoUDPServer.pas 4624
IdEMailAddress.pas 4624
IdException.pas 4624
IdExceptionCore.pas 4625
IdExplicitTLSClientServerBase.pas 4626
IdFinger.pas 4627
IdFingerServer.pas 4628
IdFSP.pas 4628
IdFTP.pas 4629
IdFTPBaseFileSystem.pas 4631
IdFTPCommon.pas 4631
IdFTPList.pas 4634
IdFTPListOutput.pas 4635
IdFTPListParseAS400.pas 4635
IdFTPListParseBase.pas 4636
IdFTPListParseBullGCOS7.pas 4636
IdFTPListParseBullGCOS8.pas 4637
IdFTPListParseChameleonNewt.pas 4637
IdFTPListParseCiscoIOS.pas 4637
IdFTPListParseDistinctTCPIP.pas 4637
IdFTPListParseEPLF.pas 4638
IdFTPListParseHellSoft.pas 4638
IdFTPListParseKA9Q.pas 4638
IdFTPListParseMicrowareOS9.pas 4638
IdFTPListParseMPEiX.pas 4639
IdFTPListParseMusic.pas 4639
IdFTPListParseMVS.pas 4639

Internet Direct (Indy) Version 10.1.5 xciii


IdFTPListParseNCSAForDOS.pas 4640
IdFTPListParseNCSAForMACOS.pas 4640
IdFTPListParseNovellNetware.pas 4640
IdFTPListParseNovellNetwarePSU.pas 4640
IdFTPListParseOS2.pas 4641
IdFTPListParsePCNFSD.pas 4641
IdFTPListParseStercomOS390Exp.pas 4641
IdFTPListParseStercomUnixEnt.pas 4642
IdFTPListParseStratusVOS.pas 4642
IdFTPListParseSuperTCP.pas 4642
IdFTPListParseTandemGuardian.pas 4643
IdFTPListParseTOPS20.pas 4643
IdFTPListParseTSXPlus.pas 4643
IdFTPListParseUnisysClearPath.pas 4643
IdFTPListParseUnix.pas 4644
IdFTPListParseVM.pas 4644
IdFTPListParseVMS.pas 4644
IdFTPListParseVSE.pas 4645
IdFTPListParseVxWorks.pas 4645
IdFTPListParseWfFTP.pas 4645
IdFTPListParseWindowsNT.pas 4646
IdFTPListParseWinQVTNET.pas 4646
IdFTPListParseXecomMicroRTOS.pas 4646
IdFTPListTypes.pas 4646
IdFTPServer.pas 4648
IdFTPServerContextBase.pas 4650
IdGlobal.pas 4650
IdGlobalCore.pas 4654
IdGlobalProtocols.pas 4654
IdGopher.pas 4656
IdGopherConsts.pas 4657
IdGopherServer.pas 4658
IdHash.pas 4658
IdHashCRC.pas 4659
IdHashElf.pas 4659
IdHashMessageDigest.pas 4660
IdHashSHA1.pas 4660
IdHeaderList.pas 4661
IdHL7.pas 4661
IdHTTP.pas 4662
IdHTTPHeaderInfo.pas 4663
IdHTTPProxyServer.pas 4664
IdHTTPServer.pas 4664
IdIcmpClient.pas 4665
IdIdent.pas 4665
IdIdentServer.pas 4666
IdIMAP4.pas 4666
IdIMAP4Server.pas 4668
IdIntercept.pas 4669
IdInterceptSimLog.pas 4669
IdInterceptThrottler.pas 4670
IdIOHandler.pas 4670

xciv Internet Direct (Indy) Version 10.1.5


IdIOHandlerSocket.pas 4671
IdIOHandlerStack.pas 4671
IdIOHandlerStream.pas 4672
IdIPAddress.pas 4672
IdIPAddrMon.pas 4672
IdIPMCastBase.pas 4673
IdIPMCastClient.pas 4674
IdIPMCastServer.pas 4674
IdIPWatch.pas 4675
IdIRC.pas 4675
IdIrcServer.pas 4677
IdLogBase.pas 4677
IdLogDebug.pas 4677
IdLogEvent.pas 4678
IdLogFile.pas 4678
IdLogStream.pas 4679
IdLPR.pas 4679
IdMailBox.pas 4680
IdMappedFTP.pas 4680
IdMappedPOP3.pas 4681
IdMappedPortTCP.pas 4681
IdMappedPortUDP.pas 4681
IdMappedTelnet.pas 4682
IdMessage.pas 4682
IdMessageClient.pas 4683
IdMessageCoder.pas 4683
IdMessageCoderMIME.pas 4684
IdMessageCoderQuotedPrintable.pas 4686
IdMessageCoderUUE.pas 4687
IdMessageCoderXXE.pas 4687
IdMessageCoderYenc.pas 4688
IdMessageCollection.pas 4688
IdMessageParts.pas 4689
IdMIMETypes.pas 4690
IdMultipartFormData.pas 4691
IdNetworkCalculator.pas 4691
IdNNTP.pas 4692
IdNNTPServer.pas 4693
IdNTLM.pas 4693
IdObjs.pas 4694
IdObjsBase.pas 4695
IdObjsVCL.pas 4695
IdOSFileName.pas 4695
IdOTPCalculator.pas 4696
IdPOP3.pas 4696
IdPOP3Server.pas 4697
IdQotd.pas 4698
IdQotdServer.pas 4698
IdQOTDUDP.pas 4698
IdQOTDUDPServer.pas 4699
IdRawBase.pas 4699
IdRawClient.pas 4700

Internet Direct (Indy) Version 10.1.5 xcv


IdRawFunctions.pas 4700
IdRawHeaders.pas 4701
IdRemoteCMDClient.pas 4704
IdRemoteCMDServer.pas 4704
IdReply.pas 4705
IdReplyFTP.pas 4705
IdReplyIMAP4.pas 4706
IdReplyPOP3.pas 4706
IdReplyRFC.pas 4707
IdReplySMTP.pas 4707
IdResourceStrings.pas 4709
IdResourceStringsCore.pas 4710
IdResourceStringsProtocols.pas 4710
IdRexec.pas 4710
IdRexecServer.pas 4710
IdRSH.pas 4711
IdRSHServer.pas 4711
IdSASL.pas 4711
IdSASL_CRAM_MD5.pas 4712
IdSASLAnonymous.pas 4712
IdSASLCollection.pas 4713
IdSASLExternal.pas 4713
IdSASLLogin.pas 4713
IdSASLOTP.pas 4714
IdSASLPlain.pas 4714
IdSASLSKey.pas 4714
IdSASLUserPass.pas 4715
IdScheduler.pas 4715
IdSchedulerOfThread.pas 4715
IdSchedulerOfThreadDefault.pas 4716
IdSchedulerOfThreadPool.pas 4716
IdServerInterceptLogBase.pas 4717
IdServerInterceptLogEvent.pas 4717
IdServerInterceptLogFile.pas 4717
IdServerIOHandler.pas 4717
IdServerIOHandlerSocket.pas 4718
IdServerIOHandlerStack.pas 4718
IdSimpleServer.pas 4718
IdSMTP.pas 4719
IdSMTPBase.pas 4720
IdSMTPRelay.pas 4720
IdSMTPServer.pas 4721
IdSNMP.pas 4722
IdSNPP.pas 4723
IdSNTP.pas 4723
IdSocketHandle.pas 4724
IdSocks.pas 4724
IdSocksServer.pas 4725
IdSSL.pas 4726
IdSSLOpenSSL.pas 4726
IdStack.pas 4727
IdStackBSDBase.pas 4728

xcvi Internet Direct (Indy) Version 10.1.5


IdStackConsts.pas 4729
IdStackDotNet.pas 4729
IdStackLinux.pas 4730
IdStackWindows.pas 4730
IdStream.pas 4731
IdStreamNET.pas 4731
IdStreamVCL.pas 4731
IdStrings.pas 4732
IdStruct.pas 4732
IdSync.pas 4733
IdSys.pas 4733
IdSysBase.pas 4735
IdSysLog.pas 4735
IdSysLogMessage.pas 4735
IdSysLogServer.pas 4736
IdSysNativeVCL.pas 4737
IdSystat.pas 4737
IdSystatServer.pas 4737
IdSystatUDP.pas 4738
IdSystatUDPServer.pas 4738
IdSysVCL.pas 4739
IdSysVCLNET.pas 4739
IdSysWin32.pas 4739
IdTask.pas 4740
IdTCPClient.pas 4740
IdTCPConnection.pas 4740
IdTCPServer.pas 4741
IdTCPStream.pas 4741
IdTelnet.pas 4741
IdTelnetServer.pas 4743
IdText.pas 4744
IdThread.pas 4744
IdThreadComponent.pas 4745
IdThreadSafe.pas 4745
IdTime.pas 4746
IdTimeServer.pas 4746
IdTimeUDP.pas 4747
IdTimeUDPServer.pas 4747
IdTraceRoute.pas 4747
IdTrivialFTP.pas 4748
IdTrivialFTPBase.pas 4748
IdTrivialFTPServer.pas 4749
IdUDPBase.pas 4750
IdUDPClient.pas 4750
IdUDPServer.pas 4751
IdUnixTime.pas 4751
IdUnixTimeServer.pas 4752
IdUnixTimeUDP.pas 4752
IdUnixTimeUDPServer.pas 4753
IdURI.pas 4753
IdUserAccounts.pas 4753
IdUserPassProvider.pas 4754

Internet Direct (Indy) Version 10.1.5 xcvii


IdVCard.pas 4754
IdWhois.pas 4755
IdWhoIsServer.pas 4756
IdWship6.pas 4756
IdYarn.pas 4756
IdZLib.pas 4757
IdZLibCompressorBase.pas 4759
IdZLibConst.pas 4759

Appendices 4761
Internet Assigned Numbers Authority 4762
IANA Internet Multicast Group Addresses 4762
IANA Machine Names 4762
IANA Official Character Sets 4762
IANA Operating System Names 4762
IANA Port Numbers 4763
IANA Protocol Numbers 4764
IANA Version Numbers 4764
Timezones 4765
TZ-Abbreviations 4765
TZ-ISO-3166-1 4766
TZ-Military 4775
TZ-Olson 4776

xcviii Internet Direct (Indy) Version 10.1.5


Internet Direct (Indy)
Introduction to the Indy Project
The Indy Project is a Open Source group. The Indy Project maintains several active Open Source projects which have evolved from
the original Internet Direct (Indy) project.

Indy.Sockets
Indy.Sockets is an open source blocking socket library that supports clients, servers, TCP, UDP, raw sockets, as well as over 100
higher level protocols such as SMTP, POP3, NNTP, HTTP, and many more. Indy.Sockets is available for C#, C++, Delphi, Visual
Basic.NET, any .NET language, and Kylix. The Indy.Sockets FCL build is a managed assembly and is compatible with the Microsoft
.NET framework, and Mono.

Indy.Docs
Indy.Docs is a volunteer effort to maintain and improve documentation for the Internet Direct (Indy.Sockets) component suite.

Participation in the Indy Documentation project is open to anyone with a little time, and a little knowledge of the Indy component
suite. While programming knowledge is useful, it is not required. This makes the Indy Documentation project a great way for anyone
to contribute to the success of Indy, and to have their work read by an ever-increasing number of Indy users.

Bubelen
Bubelen is a system for building and maintaining bubbles. A bubble is a piece of code for testing, developing, profiling, debugging,
and stress testing. Bubbles are similar to boxes which are used in box testing (sometimes also referred to as unit testing), however
bubbles are not designed with the only goal being testing.

Indy.Data
Indy.Data is a new project that provides a very unique data access layer in C# for ADO.NET.

IndySoap
Indy Soap is a Open Source Library for implementing Web Services using Borland environments. IndySoap is not tied to Indy
sockets for transport services, though Indy based transport services are included.

Internet Direct (Indy) Version 10.1.5 1


What is Indy.Sockets?

What is Indy.Sockets?
Indy.Sockets is an internet component suite that uses the blocking socket model. Indy.Sockets includes both clients and servers
using TCP, UDP, and raw sockets. Indy.Sockets also includes clients and servers for higher level protocols such as SMTP, POP3,
NNTP, HTTP, and many more.

Supported Languages
Indy.Sockets is developed using the Object Pascal language (commonly referred to as Delphi), but can used in any of the following
programming languages:

• C#
• C++
• Delphi
• J#.NET
• Visual Basic.NET
• Any other .NET language

Run-time Environments
Indy.Sockets can be used to develop applications for a number of run-time environments and platforms, including:

• Win32
• Linux
• .NET version 1.1
• Mono

Integrated Development Environments


Indy.Sockets can be used in a number of IDEs, including:

Borland Delphi
Borland C++ Builder
Borland C# Builder
Borland Kylix
Borland Developer Studio (Delphi 2005)
Visual Studio.NET

Indy.Sockets is a single source library; one version of the source code is used to produce the libraries and assemblies used for
each of the targeted platforms and design-time environments.

For Borland IDEs, Indy.Sockets is built using packages. For the VCL.NET environment, Indy.Sockets is a managed assemblies and
is compatible with the Microsoft .NET framework. For IDEs on the .NET platform that do not support the Delphi language (Visual
Studio.NET and Mono), Indy.Sockets is provided as a single managed assembly.

2 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

Introduction to Indy
An introduction to Internet Direct (Indy) written by the project Coordinator (and original author).

Introductory Note
I originally wrote this article in the days of Indy 8.0. Most of the article still applies and is very useful for newer versions of Indy. If
you like this article and would like to read many more in depth articles, please check out Indy in Depth.

• Author: Chad Z. Hower (aka "Kudzu")


• Home Page

Indy is Blocking
Indy uses blocking socket calls. Blocking calls are much like reading and writing to a file. When you read data, or write data, the
function will not return until the operation is complete. The difference from working with files is that the call may take much longer as
data may not be immediately ready for reading or writing (It can only operate as fast as the network or the modem can handle the
data).

For example, to connect simply call the connect method and wait for it to return. If it succeeds, it will return when it does. If it fails, it
will raise an exception.

Blocking is NOT Evil


Blocking sockets have been repeatedly attacked with out warrant. Contrary to popular belief, blocking sockets are not evil.

When Winsock was "ported" to Windows, a problem quickly arose. In Unix it was common to fork (kind of like multi threading, but
with separate processes instead of threads). Unix clients and daemons would fork processes, which would run, and use blocking
sockets. Windows 3.x could not fork and did not support multi threading. Using the blocking interface "locked" user interfaces and
made programs unresponsive. So asynchronous extensions were added to WinSock to allow Windows 3.x with its shortcomings to
use Winsock without "locking" the main and only thread of a program. This however required a different way of programming., and
Microsoft and others vilified blocking vehemently so as to mask the shortcomings of Windows 3.x.

Then along came Win32 which could properly multi-thread. But at this point, everyone's mind had been changed (i.e. Developers
believed blocking sockets were evil), and it is hard to "backtrack" once a statement has been made. So the continued vilification of
blocking sockets continues.

In reality, blocking sockets are the ONLY way Unix does sockets. Blocking sockets also offer other advantages, and are much
better for threading, security, and other aspects. Some extensions have been added for non-blocking sockets in Unix. However they
work quite differently than in Windows. They also are not standard, and not in wide use. Blocking sockets under Unix still are used
in almost every case, and will continue to be so.

Pros of Blocking

Easy to Blocking is very easy to program. All user code can exist in one place, and in a sequential order.
program
Easy to port Since Unix uses blocking sockets, portable code can be written easily. Indy uses this fact to achieve its single
source solution.

Internet Direct (Indy) Version 10.1.5 3


Introduction to Indy

Work well in Since blocking sockets are sequential they are inherently encapsulated and therefore very easily used in threads.
threads

Cons of Blocking

User Blocking socket calls do not return until they have accomplished their task. When such calls are made in the main
Interface thread of an application, the application cannot process the user interface messages. This causes the User Interface to
"Freeze" "freeze" because the update, repaint and other messages cannot be processed until the blocking socket calls return
control to the applications message processing loop.

TIdAntiFreeze
Indy has a special component that solves the User Interface freeze problem transparently. Simply add one TIdAntiFreeze anywhere
in your application, and you can perform standard blocking Indy calls in your program without the User Interface being frozen.

The TIdAntiFreeze works by internally timing out calls to the stack and calling Application.ProcessMessages during timeouts. The
external calls to Indy continue to block, and thus work exactly as without a TIdAntiFreeze otherwise. Use of a TIdAntiFreeze allows
for all the advantages of blocking sockets, without the most prominent disadvantage.

Threading
Threading is almost always used with blocking sockets. Non-blocking sockets can be threaded as well, but they require some extra
handling and their advantages are lost with blocking sockets. Threading will be discussed briefly as it is important in writing blocking
socket servers. Threading can also be used to write advanced blocking clients.

Threading Advantages

Prioritization Individual threads priorities can be adjusted. This allows individual server tasks or individual connections to be
given more or less CPU time.
Encapsulation Each connection will be self-contained and less likely to interfere with other connections.
Security Each thread can have different security attributes.
Multiple Threading automatically will take advantage of multiple processors.
Processors
No Threading provides true concurrency. Without threading all requests must be handled by a single thread. For this
Serialization to work each task to be performed must be broken up into small pieces that can always execute quickly. If any
task part blocks or takes time to execute all other task parts will be put on hold until it is complete. After each task
part is complete, the next one is processed, etc. With threading, each task can be programmed as a complete task
and the operating system will divide CPU time among the tasks.

Thread Pooling
The creation and destruction of threads can be resource intensive. This is especially evident with servers that have short-lived
connections. Such servers create a thread use it for very brief time and then destroy it. This causes for a very high frequency of
creation and destruction of threads. An example of this is a time or even and web server. A single request is sent, and a simple
answer returned. When using a browser to browse a web site hundreds of connections and disconnections to the server may occur.

Thread pooling can alleviate such situations. Instead of creating and destroying threads on demand, threads are borrowed from a
list of inactive but already created list (pool). When a thread is no longer needed it is redeposited into the pool instead of being
destroyed. While threads are in the pool they are marked inactive and thus do not consume CPU cycles. For a further improvement,
the size of the pool can be adjusted dynamically to meet the current needs of the system.

4 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

Indy supports thread pooling using specialized schedulers for server components.

Hundreds of Threads
With a busy server hundreds or even thousands of threads can easily be needed. There is a common misconception that hundreds
of threads will instantly kill your system. This is a false belief.

With most servers threads spend most of their time waiting on data. While waiting on blocking calls the thread will be inactive. Thus
in a server with 500 threads only 50 may be active at a single time.

The number of threads that your system has running now may surprise you. With only minimal services started and the following
applications running:

My system has 333 threads currently created:

Even with 333 threads you can see that my CPU utilization is only at 1%. A heavily used IIS (Microsoft Internet Information Server)
will create hundreds or thousands more threads.

Threads and Global Sections


Whenever multiple threads need to access data in a read/write fashion they must control access to the data to protect its integrity.
This can be intimidating to programmers new to threading. However most servers do not require global data. Most servers perform
compartmentalized functions. That is each thread performs an isolated task. Global read/write sections are an issue for many multi
threaded applications, but global read/write sections typically are not an issue for most socket servers.

Indy Methodology
Indy is different than other Winsock components you may be familiar with. If you've worked with other components, the best
approach for you may be to forget how they work. Nearly all other components use non-blocking (asynchronous) calls and act
asynchronously. They require you to respond to events, set up state machines, and often perform wait loops.

For example, with other components, when you call connect you must wait for a connect event to fire, or loop until a property
indicates that you are connected. With Indy you merely call Connect, and wait for it to return. If it succeeds, it will return when it
does. If it fails, it will raise an exception. Working with Indy is very much like working with files. Indy allows you to put all your code
in one place, instead of scattered throughout different events. In addition, Indy is much easier and more suited to threading.

How Indy is Different Quick Overview

• Uses blocking calls


• Does not rely on events - Indy has events that can be used for informational purposes, but are not required.
• Designed to be threaded - Indy is designed with threading in mind. Indy can be used without threading however.
• Sequential programming

Details
Indy not only uses blocking calls (synchronous) but it acts as such. A typical Indy session looks like this:
with AnIndyClient do
begin
Connect;
try
// Do your stuff here
finally
Disconnect;
end;

Internet Direct (Indy) Version 10.1.5 5


Introduction to Indy

end;
Other components may look something similar to this:
procedure TFormMain.TestOnClick(Sender: TComponent);
begin
with SocketComponent do
begin
Connect;
try
while not Connected do
begin
if IsError then
begin
Abort;
end;
Application.ProcessMessages;

OutData := 'Data To send';


while length(OutData) > 0 do
begin
Application.ProcessMessages;
end;
finally
Disconnect;
end;
end;
end;

procedure TFormMain.OnConnectError;
begin
IsError := True;
end;

procedure TFormMain.OnRead;
var
i: Integer;
begin
i := SocketComponent.Send(OutData);
OutData := Copy(OutData, i + 1, MaxInt);
end;
Most components do not do a very good job of isolating the programmer from stack. Many components instead of isolating the user
from the complexities of stack merely pass them on or provide a Delphi/CB wrapper for the stack. The Indy Way

Indy is designed from the ground up to be threadable. Building servers and clients in Indy is similar to the way Unix servers and
clients are built, except that it is much easier, because you have Indy and Delphi. Unix apps typically call the stack directly with little
or no abstraction layer.

Typically Unix servers have one or more "listener" processes which looks for incoming client requests. For each client that it needs
to serve, it will fork a new process to handle each client. This make programming very easy as each process deals with only one
client. The process also runs in its own security context, which can be set by the listener or the process based on credentials,
authentication, or other means.

Indy servers work very similarly. Windows unlike Unix does not fork well, but it does thread well. Indy servers allocate a thread for
each client connection.

Indy servers set up a listening thread that is separate from the main thread of the program. The listener thread listens for incoming
client requests. For each client that it answers, it spawns a new thread to service that client. The appropriate events are then fired
within the context of that thread. Overview of Indy Clients

Indy is designed to provide a very high level of abstraction. Intricacies and details of the TCP/IP stack are hidden from the Indy
programmer. A typical Indy client session looks like this:
with IndyClient do
begin
Host := 'zip.pbe.com'; // Host to call
Port := 6000; // Port to call the server on
Connect;
try
// Do your stuff here

6 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

finally
Disconnect;
end;
end;

Overview of Indy Servers


Indy server components create a listener thread that is separate from the main thread of the program. The listener thread listens for
incoming client requests. For each client that it answers, it then spawns a new thread to service that client. The appropriate events
are then fired within the context of that thread.

Practical Examples
The following examples should normally be encapsulated into descendant components for easy reuse, but for the sake of
demonstration the examples will be done as simple applications. Several projects will be presented to show a variety of situations.
These examples are also available as a zip file.

Example 1 - Zip Code Lookup


The first project has been designed to be as simple as possible. Zip Code Lookup will allow a client to ask a server what city and
state a zip code is for.

For those of you outside the United State who may not know what a zip code is, a zip code is a US postal code that specifies a
postal delivery area. Zip codes are numeric and 5 digits long.

Protocol
The first step in building a client or server is to understand the protocol. For standard protocols this is done by reading the
appropriate RFC. For Zip Code Lookup a protocol has been defined and is below.

Most protocols are conversational and plain text. Conversational means that a command is given, a status response follows, and
possibly data. Protocols that are very limited are often not conversational, but are still plain text. Zip Code Lookup is plain text, but
not conversational. Plain text makes protocols much easier to debug, and also to interface to using different programming
languages and operating systems.

Upon connection the server will respond with a welcome message, then accept a command. That command can be "ZipCode x"
(Where x is the zip code) or "Quit". A ZipCode command will be responded to with a single line response, or an empty line if no
entry exists. Quit will cause the server to disconnect the connection. The server will accept multiple commands, until a Quit

Internet Direct (Indy) Version 10.1.5 7


Introduction to Indy

command is received.

Server Source Code


unit ServerMain;

interface

uses
Windows, Messages, SysUtils, Classes,
Graphics, Controls, Forms, Dialogs,
IdBaseComponent, IdComponent, IdTCPServer;

type
TformMain = class(TForm)
IdTCPServer1: TIdTCPServer;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure IdTCPServer1Connect(AThread: TIdPeerThread);
procedure IdTCPServer1Execute(AThread: TIdPeerThread);
private
ZipCodeList: TStrings;
public
end;

var
formMain: TformMain;

implementation

{R *.DFM}

procedure TformMain.IdTCPServer1Connect(AThread: TIdPeerThread);


begin
AThread.Connection.WriteLn('Indy Zip Code Server Ready.');
end;

procedure TformMain.IdTCPServer1Execute(AThread: TIdPeerThread);


var
sCommand: string;
begin
with AThread.Connection do
begin
sCommand := ReadLn;
if SameText(sCommand, 'QUIT') then
begin
Disconnect;
end
else if SameText(Copy(sCommand, 1, 8), 'ZipCode ') then
begin
WriteLn(ZipCodeList.Values[Copy(sCommand, 9, MaxInt)]);
end;
end;
end;

procedure TformMain.FormCreate(Sender: TObject);


begin
ZipCodeList := TStringList.Create;
ZipCodeList.LoadFromFile(ExtractFilePath(Application.EXEName) +
'ZipCodes.dat');
end;

procedure TformMain.FormDestroy(Sender: TObject);


begin
ZipCodeList.Free;
end;

end.
The only parts that are Indy specific are the IdTCPServer1 component, IdTCPServer1Connect method, and the
IdTCPServer1Execute method.

8 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

IdTCPServer1 is a TIdTCPServer and is a component on the form. The following properties were altered from the default:

• Active = True - Set the server to listen when the application is run.
• DefaultPort = 6000 - An arbitrary number for this demo. This is the port the listener will listen on for incoming client requests.
The IdTCPServer1Execute method is hooked to the OnExecute event of the server. The OnExecute event is fired by the server
after a client connection has been accepted. The OnExecute event is uniquely different from other events you may be familiar with.
OnExecute is executed in the context of a thread. The thread the event is called from is passed in the AThread argument of the
method. This is important as many OnExecute events may be executing at the same time. This was done with an event so that a
server could be built without the requirement of building a new component. There are also methods that can be overridden when
descendant components are created.

The OnConnect is called after a connection has been accepted, and a thread created for it. In this server it is used to send the
welcome message to the client. This could also be done in the OnExecute event if desired.

The OnExecute event will be called repeatedly until the connection is disconnected or broken. This eliminates the need to check the
connection and loop inside the event.

IdTCPServer1Execute uses two basic Indy functions, ReadLn and WriteLn. ReadLn reads a line from the connection and WriteLn
writes a line to the connection.
sCommand := ReadLn;
The above line reads the command from the client and puts the input into the local string variable sCommand.
if SameText(sCommand, 'QUIT') then
begin
Disconnect;
end
else if SameText(Copy(sCommand, 1, 8), 'ZipCode ') then
begin
WriteLn(ZipCodeList.Values[Copy(sCommand, 9, MaxInt)]);
end;
Next the input in sCommand is parsed to see which command the client issued.

If the command is "Quit" the connection is disconnected. No more reading or writing of the connection is permitted after a
disconnect call. When the event is exited after this, the listener will not call it again. The listener will clean up the thread and the
connection.

If the command is "ZipCode" the parameter after the command is extracted and used to look up the city and state. The city and
state is then written to the connection, or an empty string if one a match for the parameter is not found.

Finally the method is exited. The server will recall the event again as long as the connection is connected, allowing the client to
issue multiple commands.

Client Source Code


unit ClientMain;

interface

uses
Windows, Messages, SysUtils, Classes,
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient;

type
TformMain = class(TForm)
Client: TIdTCPClient;
IdAntiFreeze1: TIdAntiFreeze;
Panel1: TPanel;
Panel2: TPanel;
memoInput: TMemo;
lboxResults: TListBox;

Internet Direct (Indy) Version 10.1.5 9


Introduction to Indy

Panel3: TPanel;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
public
end;

var
formMain: TformMain;

implementation

{R *.DFM}

procedure TformMain.Button2Click(Sender: TObject);


begin
memoInput.Clear;
lboxResults.Clear;
end;

procedure TformMain.Button1Click(Sender: TObject);


var
i: integer;
s: string;
begin
butnLookup.Enabled := true;
try
lboxResults.Clear;
with Client do
begin
Connect;
try
lboxResults.Items.Add(ReadLn);
for i := 0 to memoInput.Lines.Count - 1 do
begin
WriteLn('ZipCode ' + memoInput.Lines[i]);
lboxResults.Items.Add(memoInput.Lines[i]);
s := ReadLn;
if s = '' then
begin
s := '-- No entry found for this zip code.';
end;
lboxResults.Items.Add(s);
lboxResults.Items.Add('');
end;
WriteLn('Quit');
finally
Disconnect;
end;
end;
finally
butnLookup.Enabled := true;
end;
end;

end.
The only parts that are Indy specific are the Client component and the Button1Click method.

Client is a TIdTCPClient and is a component on the form. The following properties were altered from the default:

• Host = 127.0.0.1 - Host was set to contact a server on the same machine as the client.
• Port = 6000 - An arbitrary number for this demo. This is the port that the client will contact the server with.
Button1Click is a method that is hooked to the OnClick event of Button1. When the button is clicked it executes this method. The
Indy portion of this method can be reduced to the following:

10 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

1. Connect to Server ( Connect; )


2. Read welcome message from the
server.

3. For each line the user entered in the TMemo:


1. Send request to server (WriteLn('ZipCode ' + memoInput.Lines[i]);)
2. Read response from server (s := ReadLn;)
4. Send Quit command ( WriteLn('Quit'); )
5. Disconnect (Disconnect;)

Testing
These demos were pre-tested and will work as long as TCP/IP is installed and active on your system. You can change this to run
across the network from one computer to another by running the server on another computer and changing the host property of the
client to the IP or TCP/IP name of the machine the server is running on. Otherwise it will look for the server on the same computer
as the client.

To test the projects, compile and run the server. Then compile and run the client. Enter a zip code(s) into the memo field on the left
and click lookup.

Debugging
Plain text protocols can be debugged easily because they can be tested using a telnet session. To do this you merely need to know
what port the server is running on. Zip Code Lookup Server listens on port 6000.

Run Zip Code Lookup Server again. Next open a command window (a.k.a Dos Window). Now type:

telnet 127.0.0.1 6000 <enter>


You are now connected to the Zip Code Lookup Server. Some servers will greet you with a welcome message. This one does not.
You will not see your keystrokes. Most servers do not echo the commands as it would be a waste of bandwidth. You can however
change your telnet settings by setting "Echo On". Different telnet clients will call this feature different things. A few do not even have
this option. Now type:

zipcode 37642 <enter>


You will see the server respond with:

CHURCH HILL, TN
To disconnect from the server enter:

quit <enter>

Example 2 - DB Access
This demo will simulate a server that must perform a blocking task other than a socket call. Many servers have this requirement.
Servers that need to make database calls, calls to external routines, or calculations often cannot break up the logic of the calls as
they are external calls, or complexity defies this. Calls to a database cannot be broken up into smaller calls and the developer must
wait for the database call to return. This is not limited to database calls. Compression, calculations, or other processing can all fall
into this category.

For the sake of demonstration, imagine that this server makes a call to a database with a SQL statement that takes 5 seconds to
execute. To simplify the demo, a Sleep(5000) has been substituted.

This example will also be covered in much less detail than the previous example as many of the concepts should now be
understandable.

Internet Direct (Indy) Version 10.1.5 11


Introduction to Indy

Source Code
unit main;

interface

uses
Windows, Messages, SysUtils, Classes,
Graphics, Controls, Forms, Dialogs,
IdBaseComponent, IdComponent, IdTCPServer;

type
TformMain = class(TForm)
IdTCPServer1: TIdTCPServer;
procedure IdTCPServer1Execute(AThread: TIdPeerThread);
private
public
end;

var
formMain: TformMain;

implementation
{R *.DFM}

procedure TformMain.IdTCPServer1Execute(AThread: TIdPeerThread);


var
i: integer;
begin
with AThread.Connection do
begin
WriteLn('Hello. DB Server ready.');
i := StrToIntDef(ReadLn, 0);
// Sleep is substituted for a long DB or other call
Sleep(5000);
WriteLn(IntToStr(i * 7));
Disconnect;
end;
end;

end.
Since the Execute event occurs within the context of a thread, the processing code can take as long as necessary. Each client will
have its own thread and will not block other clients.

Testing
To test the DB Server, compile and run it. Telnet to it on port 6001. The server will respond with a welcome message. Enter a
number. The server will "process" your request and return 5 seconds later with the answer.

More!
This article is an extract from the book Indy in Depth. Indy in Depth is an e-book which you can subscribe to and receive the
complete book by e-mail. Also check out the Atozed Indy Portal at www.atozedsoftware.com.

Additional information is available at the following sites:

• Building Kylix Applications


• Chapter 20 - Overview of Internet Direct
• Chapter 21 - Using Internet Direct
• Building Kylix Applications Website

12 Internet Direct (Indy) Version 10.1.5


Introduction to Indy

About the Author


Chad Z. Hower, a.k.a. "Kudzu" is the original author and project coordinator for Internet Direct (Indy). Indy consists of over 110
components and is included as a part of Delphi, Kylix and C++ Builder. Chad's background includes work in the employment,
security, chemical, energy, trading, telecommunications, wireless, and insurance industries. Chad's area of specialty is TCP/IP
networking and programming, inter-process communication, distributed computing, Internet protocols, and object-oriented
programming. When not programming, he likes to cycle, kayak, hike, downhill ski, drive, and do just about anything outdoors. Chad,
whose motto is "Programming is an art form that fights back", also posts free articles, programs, utilities and other oddities at Kudzu
World at http://www.Hower.org/Kudzu/. Chad is an American ex-patriate who currently spends his summers in St. Petersburg,
Russia and his winters in Limassol, Cyprus. Chad can be reached using this form.

Chad works as a Senior Developer for Atozed Software.

Internet Direct (Indy) Version 10.1.5 13


Licenses

Licenses
Internet Direct (Indy) is dual licensed. You can review which license better suits your needs, and use that license. You can even
change your mind later if you have previously chosen one.

The Indy BSD License


The Indy BSD license is a very no nonsense license that allows you to do almost anything you want with Indy, provided you provide
proper attribution. The Indy BSD License can be found at:

http://www.nevrona.com/Indy/BSDLicense.html.

The Indy MPL License


To make it easier and consistent for JEDI users, we also offer an MPL v1.1 (Mozilla Public License). The Indy MPL License can be
found at:

http://www.mozilla.org/MPL/MPL-1.1.html .

Mozilla is the Open Source initiative formulated by Netscape for the next generation of their web browsers. Netscape states "We
believe this license satisfies the Debian Free Software Guidelines which provide a commonly accepted definition of "free software,"
much like other free software licenses such as GPL or BSD."

Project JEDI's implementation of the MPL allows developers to use its code in their applications ("Larger Work") regardless of
whether the intended distribution will be in the public domain or as commercial applications, as long as the license conditions are
met. For a more detailed explanation, an annotated version of the license is available at:

Annotated MPL License (http://www.mozilla.org/MPL/annotated.html)

14 Internet Direct (Indy) Version 10.1.5


Technical Support

Technical Support
How and where to get technical support for Internet Direct (Indy).

Where can I get technical support?


Indy technical support is available from several sources.

Consult the Indy web site for updated materials, including:

• Source Code
• Documentation
• Demos
• KnowledgeBase
• FAQ
• Articles

Read First!
Please do NOT send email directly to the members of the Indy Pit Crew unless specifically requested to do so (typically when a
crew member needs additional information) or responding to an email from a member of the Indy Pit Crew.

Due to the amount of time the members of the Indy Pit Crew spend in the newsgroups while still earning their daily bread, they are
unable to respond to technical questions via email. Technical questions are best directed to the appropriate newsgroup.

If you require fast priority answers beyond what we provide freely out of our spare time and of our own free will with no financial
compensation, please see the paid support options below. Even with paid support, since Indy itself is completely free, it is still a
cheap option.

If you are still not convinced why you should not send us mail directly please consider the following additional items:

• Indy is developed using a team approach. This means that certain people are responsible for certain parts of code. By sending
email, you likely have sent it to the wrong person or perhaps someone who cannot quickly determine the answer.

• Email reaches one person and thus puts the load completely on that person. By using the options below, the complete Indy Pit
Crew as well as many other Indy users will see your question and the appropriate person will be able to respond. In addition you
are likely to receive a variety of answers from different people to further assist you.

• Also, please read How To Ask Questions The Smart Way.

Technical Articles and FAQ


Many answers can be found in the technical articles listed at this web site and the FAQ. Please read these to see if the answer your
questions.

Internet Direct (Indy) Version 10.1.5 15


Technical Support

Commercial Priority Support

Indy Experts Support


Open source software is fantastic, but often lacks support. Indy Experts Support solves this problem for Indy. Indy Experts Support
provides your company with priority e-mail and phone support in a very cost effective manner.

Indy Experts Support includes:

• Priority e-mail support


• Phone support
• Direct access to Indy authors and project leaders
• Custom code snippets and small projects
• Priority bug fixes and Code review.
• Consulting via Indy Consulting
The Indy Experts Support team consists of the foremost experts in Indy:

• Chad Z. Hower - Original Author and Project Leader of Indy


• Hadi Hariri - Project Co-Leader of Indy
• Bas Gooijen - Prominent Indy Core Team Member

Peer Support
Team Indy often answers questions related to using Indy on the public newsgroups and in discussion forums. Team Indy monitors
these groups regularly. By using them , everyone can benefit from the information resulting from your post.

Indy Newsgroups
Peer technical support for Indy is available on public newsgroups or web forums.

Web access to the Indy Newsgroups is provided by Atozed Software.

For NNTP access, use the news.atozed.com newsgroup. This is not a web address and you will need a news reader such as
Outlook Express or other to access them.

Yahoo Groups
Use the Indy-Dev-Public discussion group to discuss Indy with other developers.

SSL Support
Intellicom hosts an SSL support forum. This forum is specifically for issues related to using OpenSSL with the Indy library.

Borland Forums
If you are using Borland products, you can also use forums hosted by Borland. Borland hosts the following NNTP newsgroups at
forums.borland.com:

16 Internet Direct (Indy) Version 10.1.5


Technical Support

• borland.public.delphi.internet.winsock
• borland.public.cppbuilder.internet.socket
• borland.public.kylix.internet.sockets
If you cannot access these groups using NNTP, you can use your web browser and the web interface at
http://newsgroups.borland.com.

Problem and Bug Reporting


Please help us to help you by following the following thse guidelines, or the most recent ones on the Indy Bug Page.

The Indy Bug Page. is available for access by the general public. Posting access is restricted in the new bug system (for the time
being). In the future, we will open it up to more users as we formulate a reliable and efficient user verification method.

Browse the Bug List


Check the bug list to see if a bug has already been reported. Please do not report bugs for Indy 9 unless they are critical or at least
rather important. Indy 9 is in a state of near freeze and Indy 10 is the focus of our development. Check the dev snapshot and see if
it still exists. If it is still an issue, please use the newsgroups or web forums to report the bug where a user with a bug system
account can pre screen it and enter it into the bug system.

Newsgroups
NNTP Access - Atozed Software hosts free peer support Indy Newsgroups at news.atozed.com. This is not a web address and you
will need a news reader such as Outlook Express or other to access them.

Web Forums
Web Forums - The newsgroups can be accessed by a web gateway for those who prefer a web interface or cannot reach the news
server because of firewall or other issues.

Please use the appropriate groups


Please post Indy questions only in atozedsoftware.indy.* newsgroups

• and not in the other groups! It should be obvious that .announce,


.intraweb and other are not Indy forums however some users insist on irritating other users if their question is not answered in the
Indy forums. Indy questions posted in non Indy forums will not be answered and may result your being banned from the server.

The Indy news groups are atozedsoftware.indy.*.

If you find any problems with the bug system itself, please be kind enough to report them in the atozedsoftware.bugbegone.general
newsgroup .

Internet Direct (Indy) Version 10.1.5 17


Project Links

Project Links
The following are some useful links for accessing resources related to the Internet Direct (Indy) project:

• Indy Project Home Page


• Indy.Sockets Home Page
• Indy.Docs Home Page
• Indy.Sockets Source Code
• Indy.Sockets Documentation
• Indy.Sockets Demos
• Indy.Sockets KnowledgeBase
• Indy.Sockets FAQ
• Indy.Sockets Articles
• Indy Newsgroupsat Atozed Software
• Indy-Dev-Public Discussion Group
• SSL support forum at Intelicom.
• newsgroups.borland.com
• borland.public.delphi.internet.winsock
• borland.public.cppbuilder.internet.socket
• borland.public.kylix.internet.sockets
• Borland newsgroups on the Web.
• Indy Bug List.

18 Internet Direct (Indy) Version 10.1.5


Sponsors and Donors

Sponsors and Donors


Sponsors and Donors for the Internet Direct (Indy) project.

Corporate Sponsors
The following companies have provided products, services, or resources that are used by the Indy project.

Nevrona Designs
Nevrona Designs is one of the primary Corporate sponsors for the Open Source Internet Direct (Indy.Sockets) project. Nevrona
Designs is a producer of tools for Delphi and C++ developers that include:

• Rave Visual and Code-Based Reporting Tool


• ReportPrinter Pro
• IndyPro
• AdHocery
• ND-Patterns
• ND-Source
Nevrona Designs also provides World-Wide-Web and FTP hosting for the Internet Direct (Indy.Sockets) project.

Atozed Software
Atozed Software distributes and licenses developer tools and consumer software products. Atozed also provides offshore
development, and training services.

Atozed Software believes in strong customer support, rapid development of products, and close contact with its customer base to
produce the best products possible.

Atozed Software provides Consumer Software, including:

• A to Z Project Billing.
• ELK News
• IntraWeb
• IntraWeb Studio
Atozed Software provides Developer Tools for Borland, Java, and Visual Studio delvelopment environments, including:

• Indy Plus
• Indy in Depth
• Indy Install
• Indy News
• Indy Experts
Atozed Software also hosts the Indy Portal Site for Internet Direct-related news, consulting, training, support, articles, demos, and
more.

Internet Direct (Indy) Version 10.1.5 19


Sponsors and Donors

GIT (Gestion et Informatique pour Tous S.A.)


GIT (Gestion et Informatique pour Tous S.A.) was founded in 1981, in the early days of micro-computers. The founders decided to
create professional software packages, easily used without specific special computer knowledge and at an affordable price, even
for small and medium-sized businesses. This formula has been a key factor in the company's success.

For 20 years, thanks to our team, our clients and friends, we have created user-friendly software packages adapted to the needs of
EVERY ONE, from the smallest to the largest, from individuals to multinationals.

Constantly in touch with our customers and with their help, we have moved forward, followed the most sophisticated technical
advances and developed a business using the guidelines of creativity, management and service.

Solidly implanted in the Geneva market, GIT continues its expansion in Switzerland, in Europe and throughout the world, while
remaining faithful to its principles : independence, creativity and professionalism. It is worth noting that GIT already has over 3500
clients in more than 82 countries.

Donors
The following organizations have donated software and licenses for tools used in maintaining Indy projects:

• Atozed Software has donated IntraWeb Studio which is used to maintain the Indy Project website.

• VSoft Technologies has donated FinalBuilder which is used to perform builds for Indy.Sockets and Indy.Docs distributables.

• ToolsFactory has donated Doc-O-Matic which is used to capture, maintain, and generate the documentation for the Indy.Docs
project.

• Borland maintains a StarTeam server and repositiory which is used for version control in the Indy.Sockets project.

• Quality Software Components has donated TeamCoherence which is used for version control in the Indy.Data project.

20 Internet Direct (Indy) Version 10.1.5


Credits

Credits
Participants in the Internet Direct (Indy) project.

Internet Direct (Indy)

Project Organizer: Chad Z. Hower (aka Kudzu)

Mercury Team
The Mercury Team is the Indy "Steering Committee", and makes all the executive decisions affecting the project.

Chairperson: Chad Z. Hower (aka Kudzu)


Vice-Chairperson: Hadi Hariri

Mercury Team Members (Alphabetically by last name):

Bas Gooijen
Jim Gunkel
Stéphane Grobéty
Hadi Hariri
Mark Holmes
Chad Z. Hower (aka Kudzu)
Gregor Ibic
Remy Lebeau
Andrew Peter Mee
Rune Moberg
J. Peter Mugaas
Allen O'Neill
Andrew Neillans
Don Siders
Jon Skeet

Indy Core Team (aka the "Indy Pit Crew")


The Indy Core Team is the team that actively works on the core. protocol, and system packages. The Core Team works both on its
own as well as with members of the Dev Team. All changes that are merged into the Indy core are done via this Team.

Members of the Indy Core Team are chosen from members of the Dev Team from time to time. If you want to become a part of the

Internet Direct (Indy) Version 10.1.5 21


Credits

core team, join the Dev Team and get active!

Chairperson: Chad Z. Hower (aka Kudzu)


Vice-Chairperson: Hadi Hariri

Indy Core is further divided into sub teams or comittees:

Indy Core Team

Chairperson: Chad Z. Hower (aka Kudzu)

Indy Protocols Team

Chairperson: Stéphane Grobéty


Chairperson: Bas Gooijen

QA and Box Testing

Chairperson: <unfilled>

Indy Core Team Members (Alphabetically by last name):

Allen Bauer
Doychin Bondzhev
Marco Cantu
Dennies Chang
Chuck Chopp
Marc Clifton
Idan Cohen
Ciaran Costelloe
Andrew Cumming
Yahia El-Qasem
Mattias Fagerlund
Holger Flick
Bas Gooijen
Owen Green
Grahame Grieve
Stéphane Grobéty

22 Internet Direct (Indy) Version 10.1.5


Credits

Simon Grossenbacher
Félix Guillemot
Jim Gunkel
Andreas Hausladen
Henrick Hellström
Eric Hill
Benedikt Hochstrasser
Mark Holmes
Chad Z. Hower (aka Kudzu)
Gregor Ibic
Patric Ionescu
John Jacobson
Darren Kosinski
Remy Lebeau
Jack Mays
Bruce McGee
Andrew Peter Mee
Joerg Meier
Ryan Mills
Olaf Monien
J. Peter Mugaas
Andrew Neillans
Dave Nottage
Allen O'Neill
Jan Pedersen
Sergio Perry
Tommi Prami
Yahia El-Qasem
Slaven Radic
Andrew P. Rybin
Don Siders
Byron Smith
Jason Southwell
Ben Taylor
Matthijs ter Woord
Vladimir Vassiliev
Colin Wilson
Vadim Yakovlev

Retired / Past Members / Contributors

Internet Direct (Indy) Version 10.1.5 23


Credits

Johannes Berg
Alex Brainman
Daaron Dwyer
Roman Evstyunichev
Russell Garner
Gordon Hamm
Victor Ho
Keith Peter Johnson
Michael Justin
Alex Konshin
Amedeo Lanza
Laurence Liew
R. Brian Lindahl
Mark Lussier
Dr. Harley J. Mackenzie
Ray Malone
Rune Moberg
Mario Mueller
Ozz Nixon
Dave Nosker
Chuck Smith
Charles Stack
Steve 'Sly' Williams

Indy Demo Team


The Demo Team is for those interested in contributing and/or discussing issues for the current Indy Demos.

Chairperson: Allen O'Neill

Indy Documentation Team


The Indy Docs Team is a volunteer effort to provide documentation for the Internet Direct (Indy) component suite. The Docs Team
is for those interested in contributing and/or discussing issues for the Indy Documentation.

Chairperson: Don Siders

Indy Docs Team Members (Alphabetically by last name):

24 Internet Direct (Indy) Version 10.1.5


Credits

Chad Z. Hower (Kudzu)


Stéphane Grobéty
Hadi Hariri
J. Peter Mugaas

Indy Distribution Team


The Indy Distribution Team is the team that prepares Indy source code and help files releases for distribution to the Open Source
community.

Chairperson: J. Peter Mugaas

Indy Dev Team


The Indy Dev Team is for those interested in contributing and/or discussing issues for the current Indy core. The Dev Team has
read only access to the current core as well as direct access to members of the Core Team. Any one interested in developing for
the Indy core should start here. This team is also open to lurkers and learners. Contributions are not required.

Chairperson: Chad Z. Hower (Kudzu)


Vice-Chairperson: Hadi Hariri

Internet Direct (Indy) Version 10.1.5 25


Introduction to Indy.Sockets version 10
An introduction to Internet Direct (Indy) version 10.

Internet Direct (Indy) Version 10.1.5 27


What's new in Indy.Sockets Version 10?

What's new in Indy.Sockets Version 10?


Indy 10 represents the next evolution of the open source Internet component suite. Indy is the most comprehensive socket library
available for any language and contains support for TCP, UDP, ICMP, SMTP, POP3, IMAP4, HTTP, NNTP, FTP, and many more
protocols. In fact, Indy implements more than 120 protocols and Internet standards!

.Net Platform Support


Indy 10 adds to its impressive list of supported platforms by including support for the the .Net framework in the new release. Indy 10
supports the .Net platform using DCCIL and the Delphi .Net compiler. By using DCCIL, Indy 10 can be used in Delphi 2005, as well
as other .Net hosted languages like C#, ASP.NET, Visual Basic.Net, and J#.Net.

Borland IDE userws can build packages or assemblies directly from the Indy.Sockets source code. Pre-compiled assemblies are
available for use with other IDEs.

IP Version 6 Address Support


Support for the IP Version 6 address family has been added for all TCP- and UDP-based clients and servers. If IPv6 addresses are
supported for your platform or Operating System, Indy 10 allows their use.

Support for the Windows Fiber and IOCP APIs


Indy 10 provides experimental support for the Fiber and I/O Completion Ports API in the Windows platforms. This support is
designed to aid in creating more scalable servers where thousands of simultaneous client connections are required. For small- and
medium-sized projects, the traditional thread-based servers are still available.

Fiber and IOCP APIs are supported only for the Windows 2000, 2003, and XP operating systems using Delphi version 7. Windows
95, 98, and ME are not supported. Delphi compilers prior to version 7 are also unsupported due to critical changes in the VCL since
those releases.

Additions to the Indy Library


Indy 10 includes many additions that improve support for common Internet Standards on the platforms supported by the Indy
library, including:

• Memory, Stream, and File based mail attachments


• Additional character sets supported in mail messages
• BinHex encoding and decoding in mail messages
• YEnc encoding and decoding in mail messages
• Additional transparent proxy support
• HTTP Proxy server component
• WebDAV client
• Socks server component
• DNS server component
• Transport Level Security (TLS) support
• SASL authentication support

28 Internet Direct (Indy) Version 10.1.5


What's new in Indy.Sockets Version 10?

• OTP support
• Many additional parsers for FTP list formats
• SHA1 hashing algorithm
• IP Address monitor for all IP addresses and adapters
• IP Multicast server component
• SMTP Relay component
• VCL and .Net stream wrapper classes

Internet Direct (Indy) Version 10.1.5 29


Packages and Assemblies

Packages and Assemblies


An overview of the Packages and Assemblies in the Internet Direct (Indy) source code.

Indy.Sockets Packages
The source code in the Indy 10 library has been reorganized into the following packages:

• IndySystem
• IndyCore
• IndyProtocols
• IndySuperCore (for use with Delphi 7 only)
Each package (and the source files used in the package) are stored in separate directories. For example, Delphi 2005 could have
Indy package files and source code in the following directories:

C:\Program Files\Borland\BDS\3.0\Source\Indy10\System
C:\Program Files\Borland\BDS\3.0\Source\Indy10\Core
C:\Program Files\Borland\BDS\3.0\Source\Indy10\Protocols

Each package includes a run-time .DPK file for Delphi compiler versions 4, 5, 6, 7, 2005 (and beyond). For packages that also
include installable IDE components, there is also a design-time .DPK file for Delphi compiler versions 4, 5, 6, 7, 2005 (and beyond).

The compiler version is used as a suffix in the package file name. For example, Delphi 2005 (compiler version 9.0) uses the suffix
'90' in all package file names.

Delphi 5 Packages

Path Run-time Package Design-time Package


.\System IndySystem50.dpk n/a
.\Core IndyCore50.dpk dclIndyCore50.dpk
.\Protocols IndyProtocols50.dpk dclIndyProtocols50.dpk

Delphi 6 Packages

Path Run-time Package Design-time Package


.\System IndySystem60.dpk n/a
.\Core IndyCore60.dpk dclIndyCore60.dpk
.\Protocols IndyProtocols60.dpk dclIndyProtocols60.dpk

30 Internet Direct (Indy) Version 10.1.5


Packages and Assemblies

Delphi 7 Packages

Path Run-time Package Design-time Package


.\System IndySystem70.dpk n/a
.\Core IndyCore70.dpk dclIndyCore70.dpk
.\Protocols IndyProtocols70.dpk dclIndyProtocols70.dpk
.\SuperCore IndySuperCore70.dpk dclIndySuperCore70.dpk

Delphi 2005 VCL Packages

Path Run-time Package Design-time Package


.\System IndySystem90.dpk n/a
.\Core IndyCore90.dpk dclIndyCore90.dpk
.\Protocols IndyProtocols90.dpk dclIndyProtocols90.dpk

Delphi 2005 .NET Packages

Path Run-time Package Design-time Package


.\System IndySystem90Net.dpk n/a
.\Core IndyCore90Net.dpk dclIndyCore90Net.dpk
.\Protocols IndyProtocols90Net.dpk dclIndyProtocols90Net.dpk

Delphi 2006 VCL Packages

Path Run-time Package Design-time Package


.\System IndySystem100.dpk n/a
.\Core IndyCore100.dpk dclIndyCore100.dpk
.\Protocols IndyProtocols100.dpk dclIndyProtocols100.dpk

Delphi 2006 .NET Packages

Path Run-time Package Design-time Package


.\System IndySystem100Net.dpk n/a
.\Core IndyCore100Net.dpk dclIndyCore100Net.dpk
.\Protocols IndyProtocols100Net.dpk dclIndyProtocols100Net.dpk

If you are using a version of Indy.Sockets that is installed along with the Borland Developer Studio 2006 IDE and compilers, the

Internet Direct (Indy) Version 10.1.5 31


Packages and Assemblies

compiler verison suffix is omitted from the package names. For Instance:

Delphi 2006 Borland-Installed .NET Packages

Path Run-time Package Design-time Package


.\System IndySystem.dpk n/a
.\Core IndyCore.dpk dclIndyCore.dpk
.\Protocols IndyProtocols.dpk dclIndyProtocols.dpk

Delphi 2006 Borland-Installed Win32 Packages

Path Run-time Package Design-time Package


.\System IndySystem.dpkw n/a
.\Core IndyCore.dpkw dclIndyCore.dpkw
.\Protocols IndyProtocols.dpkw dclIndyProtocols.dpkw

The IndySystem Package


The IndySystem package (IndySystemXX.dpk) provides system-level support for constructs used in the Indy library. For instance:

• Winsock2 header translations


• Socket handle classes for supported platforms
• Stream implementations for VCL and .Net
• Run-time library support classes for VCL, VCL.Net, and the .Net FCL
• Utility Classes/Procedures/Functions
• Exceptions
• The base component in the Indy library
• GUI integration classes for blocking socket operations

The IndyCore Package


The IndyCore package includes the essential base classes and components needed to implement ICMP, TCP, and UDP clients or
servers, including:

• Buffers used for reading and writing in the Indy library


• An ICMP client
• A TCP client and server
• A TCP client and server that implement support for command handlers
• A UDP client and server
• IP address classes
• IOHandlers

32 Internet Direct (Indy) Version 10.1.5


Packages and Assemblies

• Intercepts
• Logging components
• RFC-compliant message response formats
• Threads
• Thread-safe data types
• A design-time GUI integration class
The IndyCore package does not include support for any of the higher-level protocols.

The IndyProtocols Package


The IndyProtocols package implements classes need to create and support clients and servers for Internet Standard protocols, like:

HTTP QOTD
FTP RSH
SMTP SASL
NNTP SNMP
POP3 Socks
IMAP4 SysStat
DNS TFTP
Finger WebDAV
Gopher Hashing algorithms
HL7 MIME, UUE, and XXE message handling
Ident Encryption and Decryption
WhoIs Compression using ZLib
SNTP Cookies
Time URI
Echo VCard

The IndySuperCore Package


The IndySuperCore package provides support for advance functionality available on Windows server platforms for the Fibers API,
I/O Completion Ports, and chained IOHandlers.

The IndySuperCore package is designed to aid in creating more scalable servers where thousands of simultaneous client
connections are required.

Fiber and IOCP APIs are supported only for the Windows 2000, 2003, and XP operating systems using Delphi version 7. Windows
95, 98, and ME are not supported. Delphi compilers prior to version 7 are also unsupported due to critical changes in the VCL since
those releases.

For more detailed information about differences in the implementations for the Indy 9 and Indy 10 libraries, please refer to the
"Migrating to Indy 10" section in the documentation.

.Net Assemblies
Indy.Sockets is developed using the Delphi programming language (formerly know as Object Pascal). Borland IDE users can
compile packages and assemblies using the package files included in the source code for the library. For users on .NET platform
that do not include support for the Delphi language (including VS.NET and Mono), the Indy.Sockets.DLL pre-compiled assembly is

Internet Direct (Indy) Version 10.1.5 33


Packages and Assemblies

available from the Indy website.

34 Internet Direct (Indy) Version 10.1.5


Installing and Un-installing

Installing and Un-installing


An overview of Installing and Removing Internet Direct (Indy) packages using various IDEs.

Installation in Borland IDEs


Installing Indy.Sockets in a Borland IDE involves using the run-time and design-time packages files for the target platform (Win32 or
.NET) to compile the source code in the library. After compiling the packages and source code, design-time packages are installed
in the IDE to make the components available on the component palette.

Make sure that any previous version of Indy is removed before installing the new version (see below).

Paths and Options


Indy source code is normally stored in a directory in a path used for source code for the compiler. For instance:

C:\Program Files\Borland\bds\3.0\source\Indy10
C:\Program Files\Borland\bds\3.0\source\Indy10\System
C:\Program Files\Borland\bds\3.0\source\Indy10\Core
C:\Program Files\Borland\bds\3.0\source\Indy10\Protocols

The actual directory names can differ if you're using a version of Indy installed as part of the Borland IDE Installation. The directory
names may need to be changed if you want to use a different path, or a path that is shared between several IDE versions.

When building Packages, there are project/package options that allow the end-user to specify where the compiled output of the
package and its units are stored.

Option Usage
Output Specifies where the compiler should put the Delphi compiled units and the executable file.
directory
Unit output Specifies a separate directory to contain the .dcu (Win32) or .dcuil (.NET) files. The location of these files can be
directory changed on the Tools -> Delphi -> Options -> Library menu by setting the DCP/DCPIL output directory path.

Search path Specifies the location of your source files. Only those files on the compiler's search path or the library search path
will be included in the build. If you try to build your project with a file not on the search path, you will receive a
compiler error. You must include the entire search path. Separate multiple directory path names with a semicolons.
Whitespace before or after the semicolon is allowed but not required. Relative and absolute path names are
allowed, including path names relative to the current position. If you check the Use Debug DCUILs option on the
Project -> Options -> Compiler menu, the Debug DCUIL path from Tools -> Debugger -> Options -> Borland
.NET Debugger is prepended to this search path.

Internet Direct (Indy) Version 10.1.5 35


Installing and Un-installing

Debug Specifies the search path for the debugger. The debugger searches paths defined by the compiler by default. If the
source path directory structure has changed since the last compile, a path can be entered here to include a file in the debugging
session. For Win32 and .NET Delphi language projects, additional directories will be searched in the following order:
1. Debug Source path (this option).
2. Browsing path, specified on the
Tools -> Options -> Delphi -> Options -> Library menu.
3. Debug Source path, specified on the
Tools -> Options -> Debugger -> Options -> Borland Debuggers menu.
Package Specifies where the compiler puts generated package files.
output
directory
DCP/DCPIL Specifies where the .dcp (Win32) or .dcpil (.NET) file is placed at compilation time. If left blank, the global
output dir DCP/DCPIL output directory specified in the Tools -> Options -> Environment -> Options -> Delphi -> Options
-> Library menu is used instead.

You must manually add any paths changed using the project/package options using the Tools -> Environment Options -> Delphi
Options -> Library menu options. These need to be specified separately for Win32 and .NET usage. These options allow you to
specify directories, compiler, and linker options for all packages.

Item Description
Library path Specifies search paths where compiler can find the source files for the package. The compiler can find only those
files listed in the library path. If you try to build your package with a file not on the library path, you will receive a
compiler error.
Package Specifies where the compiler should put compiled packages files.
output
directory
DCP/DCPIL Specifies a separate directory to contain the .dcp (Win32) or .dcpil (.NET) files.
output
directory
Browsing Specifies the directories where the Project Browser looks for unit files when it cannot find an identifier on the project
path search path or source path. For Win32 and .NET Delphi language projects, the directories specified with this option
are appended to the debug source path for the project. So the debugger search order for unit files is determined by
the following path settings:
1. The Debug Source path, specified on
the Project -> Options -> Directories/Conditionals menu.
2. Browsing path
3. The Debug Source path, specified on
the Tools -> Options -> Debugger Options -> Borland Debuggers menu.
Debug To use this option, you must set Use Debug DCU/DCUILs on the ProjectOptionsCompiler page. When that option is
DCU/DCUIL set and a path is given, the debugger looks for the .dcu (Win32) or .dcuil (.NET) files in this path before looking in
path the unit search path.

Make sure that the Browsing Path option includes the directories where the Indy.Sockets source code is located, and that the
Library option includes a path to the compiler output for the Indy.Sockets packages. Debug Path is required only when a separate
pre-compiled version of debug DCUs are stored on your system.

For example, add the following to the Browsing path for Borland Delphi 2005 and above:

($BDS)\source\Indy10\System
($BDS)\source\Indy10\Core

36 Internet Direct (Indy) Version 10.1.5


Installing and Un-installing

($BDS)\source\Indy10\Protocols

Add the following to the Library path for Borland Delphi 2005 and above:

($BDS)\lib\Indy10

Add the following to the Debug path for Borland Delphi 2005 and above:

($BDS)\lib\debug\Indy10

Delphi and C++ Builder Installation


Installing Indy.Sockets in a Borland IDE involves using the run-time and design-time packages files to compile the source code in
the library. After compiling the packages and source code, design-time packages are installed in the IDE to make the components
available on the component palette.

For Delphi and C++ Builder, the run-time package files should be opened and compiled in the following order:

• IndySystem (in Lib\System)


• IndyCore (in Lib\Core)
• IndyProtocols (in Lib\Protocols)
• IndySuperCore (in Lib\SuperCore) (for Delphi 7 only)
For Delphi and C++ Builder, the design-time package files should be opened, compiled, and installed in the following order:

• dclIndyCore (in Lib\Core)


• dclIndyProtocols (in Lib\Protocols)
• dclSuperCore (in Lib\SuperCore) (for Delphi 7 only)

Installation in Kylix
For the Kylix IDE, the run-time package files should be opened and compiled in the following order:

• IndySystemK3 (in Lib\System)


• IndyCoreK3 (in Lib\Core)
• IndyProtocolsK3 (in Lib\Protocols)
For the Kylix IDE, the design-time package files should be opened, compiled, and installed in the following order:

• dclIndyCoreK3 (in Lib\Core)


• dclIndyProtocolsK3 (in Lib\Protocols)
Please note that Kylix (and Linux in general) is case sensitive and you may have to adjust certain paths or filenames to match your
system.

Internet Direct (Indy) Version 10.1.5 37


Installing and Un-installing

Installation for Visual Studio.NET


To use Indy.Sockets in the Visual Studio.NET IDE (or with Mono), you must have the pre-compiled Indy.Sockets.DLL assembly
available on the Indy website. Indy.Sockets is developed using the Delphi (formerly known as Object Pascal) language, so the
assembly cannot be rebuilt from the source code using these IDEs.

Store the Indy.Sockets.DLL assembly in a path where you can add an Assembly Reference to the project or solution for the file
Indy.Sockets.dll.

Please not that the Indy.Sockets assembly for .NET does not contain all Indy features and protocols yet. We are adding more and
more of them each week. Currently it contains about 95% of the functionality including TCP clients and servers, UDP, FTP, NNTP,
SMTP, POP3, IMAP4 (client), and more.

Visual Studio .NET Requirements

• .NET Framework version 1.1


• Visual Studio.NET 2003, or any other .NET Development environment. Visual Studio.NET 2002 cannot be used because it does
not support the 1.1 framework.

Removing Indy.Sockets from a Borland IDE


Removing Indy.Sockets from a Borland IDE generally requires removing the run-time and design-time packages from the list of
installed packages in the IDE.

If you are using a version of Indy.Sockets that was installed as part of the installation process for the Borland IDE, you will need to
use the Borland Installer to remove the components (or use the Add/Remove Program option in the Control Panel). The Borland
Installer also includes debug versions of the .OBJ and/or .DCU files which need to be manually deleted.

In general, deleting the following files from the specified directories will ensure that the Indy.Sockets version 10 library has been
removed.

($BDS)\bin\IndySystem*.bpl
($BDS)\bin\IndyCore*.bpl
($BDS)\bin\IndyProtocols*.bpl
($BDS)\bin\dclIndyCore*.bpl
($BDS)\bin\dclIndyProtocols*.bpl
($BDS)\bin\IndySystem*.dll
($BDS)\bin\IndyCore*.dll
($BDS)\bin\IndyProtocols*.dll
($BDS)\lib\Indy10\Id*.dcu
($BDS)\lib\Indy10\Id*.dcuil
($BDS)\lib\Indy10\Id*.dcpil
($BDS)\lib\Indy10\Indy*.dcp
($BDS)\lib\Indy10\Indy*.dcpil
($BDS)\lib\debug\Indy10\Id*.dcu
($BDS)\lib\debug\Indy10\Id*.dcuil
($BDS)\lib\debug\Indy10\Id*.dcpil
($BDS)\lib\debug\Indy10\Indy*.dcp
($BDS)\lib\debug\Indy10\Indy*.dcpil

38 Internet Direct (Indy) Version 10.1.5


Installing and Un-installing

Please note that using the Project/Package options to change paths will result in the previous list being invalid for your Indy.Sockets
installation. Use the Browsing, Library, and Debug paths indicated in the Project/Package options when deleting files.

Make sure that you also remove any Library path settings in the IDE search paths using the Tools -> Environment Options ->
Library menu options.

Internet Direct (Indy) Version 10.1.5 39


Migrating to Indy.Sockets Version 10
Updating any sufficiently large code base always introduces issues of code compatibility. Updating to Internet Direct (Indy) version
10 is no exception to this general rule. Because of bug fixes, new features, refactoring, and requirements for .Net compatibility,
some of your Indy 9 code may no longer work.

In this section, we'll review some of the issues encountered when migrating from the Indy 9 to the Indy 10 code base. Migrating
from earlier Indy versions, including Indy 8 (or even Winshoes), is not discussed in this section. The issues are the same, but they
occur on an even larger scale.

Internet Direct (Indy) Version 10.1.5 41


.Net compatibility

.Net compatibility
Indy 10 adds to its impressive list of supported platforms by including Windows .Net for the new release. Indy 10 supports the .Net
platform using DCCIL and Delphi .Net compiler. By using DCCIL, Indy 10 can be used in Delphi 8 as well as other .Net hosted
languages like C#, ASP.NET, Visual Basic.Net, and J#.Net.

To accomplish this porting feat, some changes were required of the Indy code base. These changes include the following items
specific to supporting the .Net platform:

• Use of CLR, CIL, and MANAGEDCODE compiler defines


• Replaced unsafe code for CLR execution
• Replaced unsafe types for CLR execution
• Modified constructors for visual components
• Isolated dependencies on VCL and .Net string handling
• Isolated dependencies on VCL and .Net stream implementations

Unsafe Code and Types


Some common techniques widely used by programmers in the past may no longer be available for "safe" or "managed" code in
.Net. Some of the most prominent items that are no longer available in .NET include:

• Untyped variables
• AfterConstruction and BeforeDestruction
• Pointers
• Sets
• Globals
• Class cracking
• Win32

Pointers
Pointers are the typical cause for unsafe code. In modern object-oriented code, pointers have been relegated to infrequent use,
mostly for calling operating system API's or interacting with external DLL's. There is no magic replacement for the use of pointers,
but there is a multi-faceted approach which includes the use of:

• String Indexes
• Object references
• IntPtr
• Dynamic arrays
Because the Pointer type is no longer permitted in managed code, this means that the address of operator (the @ symbol) is no
longer permitted. However there is one exception: the @ symbol can still be used with procedure pointers. In this one specific case
the @ operator is permitted because the Delphi compiler recognizes this specific case and translates it to a .NET delegate. That is,
internally no pointer is used, but the use of the @ symbol is preserved for backwards compatibility.

42 Internet Direct (Indy) Version 10.1.5


.Net compatibility

Buffers (Untyped Variables)


Since untyped variables rely on the use of Pointers, they are also no longer available in safe code. Use of untyped variables must
be replaced with object references or overloaded methods that accept arguments for specific data types.

Win32
The Win32 API is no longer available in safe code either. However, since Windows is the only current platform for which .NET is
released, it is still common place to call the Win32 API directly. This practice makes the code unsafe, and should be avoided or
isolated into a separate unmanaged assembly.

Instead of calling the Win32 API, FCL or RTL classes should be used when possible. If a Win32 API call must be called, P/Invoke
can be used. P/Invoke is a way for safe code to call unsafe code. Delphi does much of the P/Invoke work automatically in a manner
similar to calling an extern in Delphi 7. Most Win32 API's have already been mapped in the Windows unit and can be called directly
by using this unit.

Globals
Globals of all kinds are no longer available. This includes global variables, procedures, and functions. Because everything in .Net is
a class, no global procedures or variables can exist. a class.

To replace globals, class statics can be used. A static is a variable or method that exists in the class, rather than in a single
instance of the class. Delphi has always had static methods that could be called on the class, but the introduction of static variables
is new in Delphi 8.

Sets
Sets are another item that are not really removed, but implemented in .Net through some compiler magic. When using Delphi code,
sets are available and function nearly the same as before. However, if a C# user or Visual Basic user tries to use your set, he will
encounter some difficulty. Delphi exports sets as integer values and indexes. They can in fact use them, but the usage will be a bit
awkward and require boolean operations. If you are using sets, you should only use them in Delphi code that is not exported. If you
need to export set functionality you should rethink the interface and export it as a class instead.

Strings
Strings have changed significantly in their implementation, with backward compatibility preserved when possible. The biggest
change to the string type is that all strings are now Unicode-enabled. Each character in a Unicode string consists of two bytes (or
more), instead of one as before. This does not affect normal string operations, but many developers regularly use strings as
dynamic buffers for binary data. Strings can no longer contain binary data. Instead of using strings for binary data, other specifically
suited constructs such as byte arrays or binary streams should be used instead.

Strings in .NET are also immutable. Immutable is just a fancy word for saying that they are not changeable. Dynamic strings have
been a tenet of programming for a long time. Strings in .NET can be changed of course, but not without reallocating storage for the
data type and performing copy/update operations for its altered values. In Delphi for .Net, this operation has been implemented
transparently, but can have very negative impacts on performance.

StringBuilder
.Net provides an FCL class called StringBuilder that is used for manipulating string values. Using StringBuilder, string values can be
changed without constant reallocation for the string storage. While StringBuilder solves the problem in .NET, it is not available in
Win32. A StringBuilder class is available on the Borland Developer Network for the Win32 platform, and allows use of StringBuilder
in both Win32 and .NET.

StringBuilder is a good solution for managing dynamic Unicode strings. In many cases, Unicode is not required (or allowed) and

Internet Direct (Indy) Version 10.1.5 43


.Net compatibility

should be treated as ASCII values. For instance: TCP commands. Indy implements a buffered class that handles binary data, as
well as ASCII values called TIdBuffer. Storage in TIdBuffer is allocated a sequence of Byte values, and allows use of the class
instance for handling ASCII strings or binary data. TIdBuffer also manages the memory required for the buffer by reducing the
number of reallocations needed when adding or removing buffer values.

String Default Values


Another difference in strings is the default value for an uninitialized string type. On the Win32 platform, uninitialized strings would
always have the value '' (empty string). On the .Net platform, string types are an object reference and are given the uninitialized
value of Nil for the object reference. As a result, common coding techniques that check for empty strings (and ignore the value of
the object reference) could cause exceptions. Delphi for .Net preserves backward compatibility by masking this difference between
the Win32 and .Net platform; checking for '' in the string type value will also check for Nil as the value for the object reference.

AnsiString
The AnsiString type is still available in Delphi and produces single byte strings. Use of AnsiString types can adversely affect
performance in .Net code, as well. Since .Net is Unicode enabled, passing AnsiString types (when String types are expected) forces
conversions to be performed when passing the argument and when receiving the return value. AnsiStrings are safe for usage in
Delphi code, but should be replaced with Unicode strings for use with RTL and FCL.

TList and TStrings


In the RTL library, TList and TStrings accept an additional "tag" value known as Object for each item in the list. In Win32, this was
represented as a Pointer and commonly typecast to other values/types when accessed. For example:

MyStringList.AddObject('Line one', Pointer(1));


Since pointers are not available in .NET, this no longer works. However pointers are compatible with TObject, so the code can be
changed to:

MyStringList.AddObject('Line one', TObject(1));


This code compiles in both .NET and Win32.

Other Items
Other Delphi language features are no longer available in the Delphi for .NET environment because they result in "unsafe" code, or
used "unsafe" types. These items include RTL types and functions like GetMem, FreeMem, ReAllocMem, FillChar, Move,
BlockRead, BlockWrite, and PChar. As a result, code in the Indy library has been rewritten to avoid these platform-specific items.

Stream Implementations in Indy


Another area of change in the Indy 10 library is use of stream implementations. In Delphi, TStream has traditionally relied on use of
untyped arguments. For Win32, the TStream has relied on the ReadBuffer and WriteBuffer methods and untyped parameters for
the buffer used in the operation. While this provided an "easy" way to allow many data types to be read and written, it is
incompatible with .NET. TStream in .Net now uses overloaded methods with a specific overload for each supported data type.

TIdStream is an Indy class that can assist with these differences. TIdStream is not 100% interface compatible with TStream, but it
does accept a TStream in its constructor. It then marshals or proxies its consistent interface onto the differing implementations of
TStream for Win32 and .Net.

Indy uses the TIdStream class in the library implementation that defines a wrapper for stream classes. TIdStream isolates the
differences between stream implementations for the platforms supported by the Indy library.

To minimize the number of overloaded methods required for TStream and .Net Stream arguments, TIdStream provides an implicit
converter for VCL to .Net stream types.

44 Internet Direct (Indy) Version 10.1.5


.Net compatibility

TIdStream overrides the methods used for reading and writing to the stream that isolates the differences between pointers and
memory allocation for the .Net platform. Platform specific code is then included that overrides methods that perform read and write
operations using the stream wrapper.

Many method and operations requiring stream input or output use instances of TIdStream to ensure that platform compatibility is
maintained in the library implementation.

Other Type-Specific Issues


Some Delphi features like sets and unsigned integers are not CLS-compliant. This does not mean that you can no longer use them
in your Delphi code, and it doesn't even mean that you can't export them as part of your cross-language component's public
interface. What it does mean is that the compiler will warn you that you are using a non-CLS feature on the .Net platform, and that
you should include secondary features that manipulate your non-compliant features in a CLS-compliant way. For example, if you
publish a set property, you should also publish methods that can Include() and Exclude() values and methods that can do tests like
"This in That".

Happily for Delphi users, the CLS is case-insensitive, so that any libraries that 'natively' rely on case differences to separate one
identifier from another will have to include case-insensitive aliases.

The CLS also requires that all languages use Unicode identifiers. Thus, programmers who don't think in English will be able to use
identifiers that make sense to them.

Visual Components and Constructors


Constructor and destructor behavior has changed considerably in .Net. Some of these changes extend to the implementation of
constructors used for visual components (most of the Indy clients and servers). To account for the differences between the
designers used in IDE, and the lack of default parameter values in .Net, the object hierarchy for visual components has been
changed to descend from TIdInitializerComponent. TIdInitializerComponent is used to consolidate differences between constructors
as implemented in the .Net and VCL environments.

In the IDE and in other .Net environment, constructors (for visual components) are generally called without arguments. In the VCL
environment, constructors (for visual components) are generally called with an owner for free notifications. TIdInitializerComponent
accounts for these differences by implementing overloaded constructors for both platforms that accept the expected arguments.

TIdInitializerComponent also implements the protected virtual procedure InitComponent which eliminates the need for overridden
constructors in descendant classes. Descendant classes override the InitComponent method to perform component initialization
operations that were traditionally reserved for overridden (or overloaded) constructors.

Initialization and Finalization


Delphi developers have come to rely on initialization and finalization sections to initialize global variables, create global objects, and
more. When using code directly in Delphi 8, initialization and finalization sections work much as they do in Win32 versions of
Delphi. But when code is placed in an assembly for use in other .Net languages, Initialization and Finalization sections are called in
an unpredictable order. In addition, no interdependencies are permitted between the sections in assemblies.

In .Net, classes are not initialized until they are actually used. This causes delayed initialization, and in some cases initialization
sections are never called at all. Since Delphi exports units as classes and the initialization sections as class initializers, this causes
a behavioral change. In such situations initialization sections are often called much later than before, and in many cases never at
all. Initialization sections which self-register classes are particularly problematic as they never get called to register the class, and
thus the class is never used, and thus never has its initializer called.

For the .Net environment, initialization sections are not called unless a reference has been added for the unit. Delphi for .Net makes
initializations and globals part of a "Unit" class. So initialization sections won't get called until the Unit class is used. Delphi 8 EXEs
are ok, but assemblies (ie VS.NET and probably asms in some cases when used from a D8 EXE) do not call their initialization
sections.

This can be solved by using IdBaseComponent in Indy, which iterates through the list of unit classes and forces manual calls to the
initialization sections. InitComponent is used to loop through the list of classes in the assembly, and for each named Unit the class

Internet Direct (Indy) Version 10.1.5 45


.Net compatibility

constructor which causes the initialization section to be called.

46 Internet Direct (Indy) Version 10.1.5


Packages Changes

Packages Changes
One significant change in Indy 10 is the reorganization of the library into four separate packages.

• IndySystem
• IndyCore
• IndyProtocols
• IndySuperCore
Each package, except IndySystem, consists of both a runtime and designtime .DPK file for Delphi compiler versions 4, 5, 6, 7, 8,
Delphi 2005, Delphi 2006, and Kylix 3. (IndySystem has only a runtime .DPK file - the designtime .DPK is not required.)

.DPK files for the packages include the package name and the compiler version as part of the package file name. For instance, the
IndySystem package file for Delphi 7 is represented by the following:

IndySystem70.dpk
For platforms that offer support for .Net, the package file naming convention is similar but includes a suffix that indicates support for
the .Net platform. For example:

IndySystem80Net.dpk
For packages that include designtime components, an additional package file is available. For instance, the designtime IndyCore
package file for Delphi 7 is represented by the following:

dclIndyCore70.dpk
.DPK files are located in the same directory as the source code for the package. The following is a list of the package file names
and directory names relative to the Indy installation directory:

Indy Packages for Delphi 4 Pro and Enterprise

.\System\IndySystem40.dpk
.\Core\IndyCore.40.dpk
.\Core\dclIndyCore.40.dpk
.\Protocols\IndyProtocols40.dpk
.\Protocols\dclIndyProtocols40.dpk

Indy Packages for Delphi 5

.\System\IndySystem50.dpk
.\Core\IndyCore.50.dpk
.\Core\dclIndyCore.50.dpk
.\Protocols\IndyProtocols50.dpk
.\Protocols\dclIndyProtocols50.dpk

Internet Direct (Indy) Version 10.1.5 47


Packages Changes

Indy Packages for Delphi 6

.\System\IndySystem60.dpk
.\Core\IndyCore.60.dpk
.\Core\dclIndyCore.60.dpk
.\Protocols\IndyProtocols60.dpk
.\Protocols\dclIndyProtocols60.dpk

Indy Packages for Delphi 7

.\System\IndySystem70.dpk
.\Core\IndyCore.70.dpk
.\Core\dclIndyCore.70.dpk
.\Protocols\IndyProtocols70.dpk
.\Protocols\dclIndyProtocols70.dpk
.\SuperCore\IndySuperCore.70.dpk
.\SuperCore\dclIndySuperCore.70.dpk

Indy Packages for Delphi 8

.\System\IndySystem80Net.dpk
.\Core\IndyCore.80Net.dpk
.\Core\dclIndyCore.80Net.dpk
.\Protocols\IndyProtocols80Net.dpk
.\Protocols\dclIndyProtocols80Net.dpk

Indy Packages for Delphi 2005 (Win32 support)

.\System\IndySystem90.dpk
.\Core\IndyCore.90.dpk
.\Core\dclIndyCore.90.dpk
.\Protocols\IndyProtocols90.dpk
.\Protocols\dclIndyProtocols90.dpk

Indy Packages for Delphi 2005 (.Net support)

48 Internet Direct (Indy) Version 10.1.5


Packages Changes

.\System\IndySystem90Net.dpk
.\Core\IndyCore.90Net.dpk
.\Core\dclIndyCore.90Net.dpk
.\Protocols\IndyProtocols90Net.dpk
.\Protocols\dclIndyProtocols90Net.dpk

Indy Packages for Delphi 2006 (Win32 support)

.\System\IndySystem90.dpk
.\Core\IndyCore.90.dpk
.\Core\dclIndyCore.90.dpk
.\Protocols\IndyProtocols90.dpk
.\Protocols\dclIndyProtocols90.dpk

Indy Packages for Delphi 2006 (.Net support)

.\System\IndySystem100Net.dpk
.\Core\IndyCore.100Net.dpk
.\Core\dclIndyCore.100Net.dpk
.\Protocols\IndyProtocols100Net.dpk
.\Protocols\dclIndyProtocols100Net.dpk

Installing Indy Using Package Files


Installation of the Indy library using the package files is a very simple process. Package files need to be built in the following order:

• IndySystem
• IndyCore
• IndyProtocols
• (optional) IndySuperCore (for Delphi 7 only)
If a package has both runtime and designtime .DPK files, the runtime .DPK must be compiled. The designtime .DPK file must be
compiled and installed in the IDE. Since source code resides in separate directories for each package, the directory name for any
dependent package must be added to the library search path using the IDE options. For example, the following steps are required
to install Indy 10 for Delphi 7 including the optional IndySuperCore package:

Package Package file name Action(s)


IndySystem $(Indy)\System\IndySystem70.dpk Compile
IndyCore $(Indy)\Core\IndyCore70.dpk Compile
IndyCore $(Indy)\Core\dclIndyCore70.dpk Compile/Install
IndyProtocols $(Indy)\Protocols\IndyProtocols70.dpk Compile

Internet Direct (Indy) Version 10.1.5 49


Packages Changes

IndyProtocols $(Indy)\Protocols\dclIndyProtocols70.dpk Compile/Install


IndySuperCore $(Indy)\SuperCore\IndySuperCore70.dpk Compile
IndySuperCore $(Indy)\SuperCore\dclIndySuperCore70.dpk Compile/Install

Changes to the Uses Clause


As a result of package and unit changes, the Uses clause in programs may need to be edited to reflect that the proper file name is
in use. This could be a result of different search or library paths in the IDE, but most often it is because something moved from one
unit to another unit and can no longer be resolved at compile time.

When attempting to open a project created with a prior version of Indy, you may receive warnings about missing properties when
loading DFM files. This is caused by Forms or Frames that contain visual Indy components with properties that have been removed
or renamed in Indy

10. In most cases, you can Ignore the error message, recompile, and
save to the form to eliminate the warning. In the worst case, you may be required to removed the troublesome component and
re-add the component in the IDE.

For more information about .Net-specific code and issues, please refer to the Delphi documentation in the "Porting Applications to
VCL for .Net" section.

50 Internet Direct (Indy) Version 10.1.5


Changes to the Object Hierarchy

Changes to the Object Hierarchy


In this section, we will review some specific changes made to the object hierarchy in Indy 10. These changes will have an impact on
any code migrated from Indy 9.

TIdInitializerComponent
TIdInitializerComponent is a TComponent descendant that acts as the ancestor class for Indy visual components.
TIdInitializerComponent is used to consolidate differences between constructors as implemented in the .Net and VCL environments.

In the .Net environment, constructors (for visual components) are generally called without arguments. In the VCL environment,
constructors (for visual components) are generally called with an owner for free notifications. TIdInitializerComponent accounts for
these differences by implementing overloaded constructors for both platforms that accept the expected arguments.

TIdInitializerComponent also implements the protected virtual procedure InitComponent which eliminates the need for overridden
constructors in descendant classes used as visual components. Descendant classes should override the virtual InitComponent
method to perform component initialization operations that were traditionally reserved for overridden (or overloaded) constructors.

TIdTCPConnection
There have been some subtle (or not so subtle - depending on your point of view) revisions to the TIdTCPConnection interface in
Indy 10. These changes revolve around refactoring involving the IOHandler and Intercept properties.

Indy 9 introduced the concept of the IOHandler, which was designed to encapsulate the input and output mechanism used for
connecting, disconnecting, sending, and receiving data on the connection. The idea was to provide an interface for IO mechanisms
that use streams, files, et al. The difficulty was that methods used to read and write using the IOHandler were included in
TIdTCPConnection. Methods often needed to be overloaded in order to accept the correct argument types, and forward the method
request to the correct method in the IOHandler property.

In Indy 10, this encapsulation has been improved and extended by moving the methods that read or write data into the IOHandler
class instance. The same general refactoring has been made for the Intercept property. As a result, code that accessed methods
formerly in TIdTCPConnection may need to be updated to use methods that are now located in the TIdTCPConnection.IOHandler
or TIdTCPConnection.Intercept properties. In addition, Write methods that included the data type for the buffer argument as part of
the method name (like WriteString, WriteInteger, et al.) have been converted to overloaded methods with the name Write.

As an example, for the following Indy 9 code:

AConnection.WriteLn('QUIT');
AConnection.WriteInteger(Length(AShortString));
AConnection.WriteString(AString);
Use the following code in Indy 10:

AConnection.IOHandler.WriteLn('QUIT');
AConnection.IOHandler.Write(Integer(Length(AShortString)));
AConnection.IOHandler.Write(AString);

TIdTCPServer
There have also been changes in both the architecture and the interface for TIdTCPServer. First, the basic TCP/IP based server
has been revised to use a new threading architecture for the client connections to the server. This architecture handles both native
Win32 threads and lightweight threads in the Win32 Fiber API. (Please note that this feature requires use of the optional
IndySuperCore package and is supported on Delphi 7 only).

To accommodate the different types of executable client tasks, TIdTCPServer has gained a Scheduler architecture that handles
creation, execution, and termination of tasks for client connections. These executable tasks are now derived from the TIdContext

Internet Direct (Indy) Version 10.1.5 51


Changes to the Object Hierarchy

class instead of TIdPeerThread.

Executing client connections are now stored in the Contexts property, instead of the ActiveThreads property. Contexts will contain
instances of the class indicated in ContextClass. The ContextClass property indicates the type of executable task created in listener
threads for client connections and added to the Contexts property. TIdContext essentially replaces the TIdPeerThread class used in
Indy 9, and extends the concept to support fibers as well as native threads.

The Scheduler replaces the ThreadMgr used in Indy 9. There are basically two types of Schedulers available for TIdTCPServer:
Thread-based and Fiber-based. Each is designed to work with a specific type of executable task that represents the client
connections. There are further Scheduler refinements that allow a pool of pre-allocated Threads, or Threads which perform
scheduling for dependent Fibers.

The default Scheduler implementation in TIdTCPServer uses a Thread to represent each client connection. Threads are a common
feature found on all platforms and Operating Systems hosting the Indy library.

While TIdTCPServer does not use Fibers unless a Scheduler supporting Fibers is assigned (TIdSchedulerOfFiber), the Yarn
abstraction is an important one that is central to the use of the Scheduler. When the Scheduler supports Threads, it deals only with
a Yarn at the Thread level. When the Scheduler supports Fibers, it deals with a Yarn at the Fiber level.

As a result of the change from TIdPeerThread to TIdContext, most code that implements an event handler procedure will need to
be updated. Since the type passed as an argument for the thread of execution has changed, the procedure must be updated to
accept the new argument type.

For example, the Indy 9 code for an OnExecute event handler:

procedure TMyForm.ServerExecute(AThread: TIdPeerThread);


begin
...
The Indy 10 code for an OnExecute event handler:

procedure TMyForm.ServerExecute(AContext: TIdContext);


begin
...
Additional code changes may be required when accessing methods for the Connection in TIdContext - especially those that access
methods moved from the connection to its IOHandler.

Another change in TIdTCPServer is the removal of TIdCommandHandler support. Support for command handlers in TIdTCPServer
represented unwanted and unnecessary overhead in servers that did not implement the feature. To reduce this overhead, and to
simplify implementation details, use and support for the command handlers collection has been moved to a TIdTCPServer
descendant called TIdCmdTCPServer.

Both clients and servers in Indy 10 have gained support for IP version 6 address formats. Use the IPVersion property in socket
handles and bindings to indicate IP address family supported for the connection.

Protocol Clients and Servers


Indy 10, clients and servers that implement Internet Standard protocols (like TIdHTTP, TIdFTP, etc.) have ungone some interface
revisions. Some changes were required to implement the .Net compatibility provided in the IndySystem and Indy Core packages.
Other changes allowed use of IP version 6 addresses in the protocol clients. Some clients and servers were modified to implement
new features or capabilities like SASL authentication, ZLib compression/decompression, TLS (Transport Level Security), OTP
(One-Time Password) support, and the like.

HTTP Client and Server


Aside from changes required in the IndyCore package for .Net compatibility, the HTTP Client in Indy 10 (TIdHTTP) has not
undergone a lot of revisions in the interface for the client. Overloaded variants of the Get, Put, Post, and Trace methods were
added to accommodate use of different argument types. Properties were added for using compression and decompression in
accordance with the HTTP protocol (Compressor), and limiting the effects of sites that might use header-bombing in an HTTP
response (MaxHeaderLines).

52 Internet Direct (Indy) Version 10.1.5


Changes to the Object Hierarchy

More detailed information, please refer to the TIdHTTP documentation in the Reference section.

The HTTP server component (TIdHTTPServer) is unchanged in Indy 10.

FTP Client and FTP Server


In Indy 10, the FTP client (TIdFTP) has gained a lot of new features. For instance:

• Better detection and parsing of directory listings.


• Compression and decompression using the IOHandler for MODE Z connections.
• Support for STARTSSL.
• Support for SASL and other authentication types.
• Support for CRC calculations.
• Support for FXP or server-to-server transfers.
• Support for FTP SITE ZONE.
• Better proxy server support.
• Better data channel transfer timeout support.
• Additional event handlers for directory listing and file retrieval.
While these changes have required properties or methods to be added, the basic interface for the FTP client remains the same.
There have been changes in the TIdFTPListOutput properties stored in the DirectoryListing collection.

The FTP server components (TIdFTPServer) and its associated classes have seen a lot revisions. Some of these changes are
related to the change from TIdPeerThread to TIdContent as the ancestor for client connections. Many changes were made to
accommodate new features (as implemented in the client).

Messaging Architecture
Components used in the implementation of message-based protocol clients and servers have been updated in Indy 10. Like other
functional areas in the library, some changes were required to maintain platform compatibility for .Net. Other changes were improve
the internal implementation and handling of messages and message parts, and to provide new features. Most changes, though,
have been made to improve compliance with the relevant RFC standards.

Some of the changes are transparent and involve only the implementation code (as in message encoders and decoders). Others do
affect the public and published interfaces for classes used in or by the client and server components.

TIdMessage
TIdMessage is the class used to represent messages in the protocol-based message clients and servers. In Indy 10, code for
TIdMessage has been reorganized and may require updates to the code as well as the Uses clause for units using the message or
message parts.

These changes were required to allow implementing better and more extensive support for message parts in the message
construct. This includes better handling of the MIMEBoundary and it's use in related message parts. TIdMessage now allows a
hierarchical relationship between related message parts starting with the new ParentPart property, and cascading through the
MessageParts maintained for the message instance.

The internal mechanisms used to store and retrieve message parts have been enhanced, as well. These enhancements include the
capability to use memory- or file-based attachment message parts in the message instance, and to control the default attachment
type using the new OnCreateAttachment event handler.

Other subtle changes have been made to TIdMessage that may affect the default behavior when handling message instances. As
an example, temporary files created for storing attachments in the message are now deleted when the message is freed. This is a
change from previous versions of Indy, and can result in data loss if message storage is not fully implemented in application code.

Internet Direct (Indy) Version 10.1.5 53


Changes to the Object Hierarchy

Use the new DeleteTempFiles property to alter the default behavior.

Another subtle change to TIdMessage is the ability to store one or more email addresses in the From: header for the message. In
previous version of Indy, this property maintained a single email address. Use the new FromList property to maintain a list of
addresses where the message originated.

Use the following code in Indy 10:

with AMessage.FromList.Add do
begin
Text := '"John Doe" <jdoe@somedomain.org>';
end;
or:

with AMessage.FromList.Add do
begin
User := 'John Doe';
Address := 'jdoe@somedomain.org';
end;
As indicated in the preceeding example, items added to the email address list should now use the User property (instead of Name).
This avoids any conflict that might occur with the collection item name used in the object inspector.

Other properties added to TIdMessage include the following:

• InReplyTo
• LastGeneratedHeaders
• ConvertPreamble
• GenerateBCCListInHeader
• IsMsgSinglePartMime

Message Parts
Another area of improvement in Indy 10 is the architecture and handling of messsage parts used in TIdMessage. The architecture
has been updated to allow stream-based operations for loading, storing, transmitting, and receiveing the message parts. The object
hierarchy has also changed to implement the memory- or file-based storage used for message parts.

As a result, TIdAttachment is now an abstract ancestor class for attachment message parts. Applications should use
TIdAttachmentFile or TIdAttachmentMemory when creating attachment message parts, or allow the TIdMessage instance to
implement a default behavior using its OnCreateAttachment event handler. Applications will still use TIdText to represent text-based
message parts.

Each of the message part classes has a new PartType value that indicates if the message part represents a text part or a binary
attachment. In addition, ContentID and ContentLocation can now be maintained for the message part instances in a given message.

Another facet of the messaging architecture that has been revised in Indy 10 is the representation of related message parts in a
message, as used in "multipart/alternative" and "multipart/mime" messages. Indy 10 has altered its implementation of the message
parts collection to allow representation of nested MIME message parts. This includes better use and recognition of the MIME
boundary for message parts. The ParentPart property in TIdMessage and TIdAttachment descendants is used to express the
relationship among the various message parts.

Messaging Clients and Servers


Most of the clients and servers that use message-based transmission protocols (such as POP3, SMTP, IMAP4, and NNTP) have
been revised in Indy 10. Some of these changes were required to maintain cross platform compatibility as a result of .Net support.
For the most part, these revisions were performed to provide additional functionality in the client or server. The notable exception is
the IMAP4 client (TIdIMAP4); because of the complexity of the IMAP protocol and implementation "issues" present in Indy 9, this
client was essentially rewritten.

54 Internet Direct (Indy) Version 10.1.5


Changes to the Object Hierarchy

TIdMessageClient
TIdMessageClient is the common ancestor for all client that handle message-based protocol transmissions and receipts. In Indy 10,
TIdMessageClient has a new ancestor class (TIdExplicitTLSClient) that provides support for TLS (Transport Level Security) in all of
the descendant class that require the capability. Properties in TIdExplicitTLSClient indicate if use of TLS is allowed, required, or
implied. Methods in TIdExplicitTLSClient perform the handshaking and negotiation needed to establish the secure transport and list
the capabilities supported for the connection to the remote server. Event handlers are also provided that the actions to perform
when TLS is requested but not available due to handshaking or feature negotiation errors in protocol exchanges.

The TIdMessageClient interface has been altered to include MsgLineLength and MsgLineFold properties used when transmitting
MIME-enabled messages.

For a detail explanation of these new properties, please refer to the TIdMessageClient documentation in the Reference section.

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

TIdSMTP
The TIdSMTP client is used to transmit or post mail messages and newsgroup articles. In Indy 10, additional properties and
methods have been introduced to support new features including:

• TLS Support
• SMTP Extension Commands
• SASL Authentication
• Command Pipelining
For a detailed explanation of new properties, please refer to the TIdSMTP documentation in the Reference section.

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

TIdPOP3
The TIdPOP3 client is used to access mail stored on a remote server using the POP3 protocol. In Indy 10, TIdPOP3 has been
extended to include additional features that include:

• AUTH Command Support


• APOP Command Support
• SASL Support
• TLS Support
There are some subtle changes in the implementation of TIdPOP3 that may result in behavior that differs from the default Indy 9
implementation. First of all, the Connect methods no longer accepts a timeout value as an argument; use the ConnectTimeout
property for this purpose.

For example, the following code in Indy 9:

AIdPOP3.Connect(5000);
Should be coded as the following in Indy 10:

AIdPOP3.ConnectTimeout := 5000;
AIdPOP3.Connect;
Secondly, the Connect method automatically calls the Login method when AutoLogin contains True (the default value). Make sure
that all properties required to establish the POP3 session are set prior to calling the Connect method.

For example, the following code in Indy 9:

Internet Direct (Indy) Version 10.1.5 55


Changes to the Object Hierarchy

AIdPOP3.Connect(5000);
Could be coded as the following in Indy 10:

AIdPOP3.AutoLogin := False;
AIdPOP3.ConnectTimeout := 5000;
AIdPOP3.Connect;

// do some things here before logging in to the server

if AIdPOP3.Connected then AIdPOP3.Login;


Finally, Indy 10 clears any existing values in the TIdMessage class instance used in methods that retrieve message content. This is
a change to the default behavior in Indy 9, and could cause problems if reuse of header values (or custom headers) in the message
instance is expected.

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

For a detailed explanation of new properties, please refer to the TIdPOP3 documentation in the Reference section.

TIdIMAP4
TIdIMAP4 is the messaging client that implements support for the IMAP version 4 protocol. IMAP is a fairly complicated protocol,
and the client delivered in Indy 9 did not properly support some aspects of the protocol or it's idiosyncracies when handling
mailboxes and messages. To correct these issues, much (actually most) of the code for the TIdIMAP4 client in Indy 10 has be
rewritten.

While some of these changes are isolated to the implementation of procedures and methods, others are reflected in the public and
published interface for TIdIMAP4. Code calling methods from the previous version may require alteration because of new method
signatures in Indy 10 (different types used for arguments, or completely new overloaded methods).

Some of the revisions in TIDIMAP4 include the following:

• Modified UTF-7 encoding and decoding for mailbox names,


• Additional methods to support message access using UID.
• Improved support for accessing message or message parts.
• Added Raw message retrieval using relative message numbers or UID.
• Support for SASL authentication.
• Support for TLS.
• Improved parsing and handling of IMAP server responses.
• Added support for BinHex-encoded message parts.
• Added work event handlers for message parts.
• Added OnAlert event for warnings attached to messages.
Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

TIdNNTP
TIdNNTP is the messaging client used for NNTP messages. In Indy 10, additional event handlers, properties, and methods have
been added to better support the NNTP protocol.

• Support for SSL.


• Support for TLS.
• Support for NNTP AUTH.
• Support for NNTP LIST EXTENSIONS.

56 Internet Direct (Indy) Version 10.1.5


Changes to the Object Hierarchy

• Added OnXHdr and OnXOVER event handlers.


Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

For a detailed explanation of new properties, please refer to the TIdNNTP documentation in the Reference section.

Server-specific Revisions
In general, all of the servers in Indy have received revisions to both their published/published interface, and their implementation.
This comes as a result of the changes required to maintain cross platform compatibility (for .Net), and use of TIdContext for
execution of connections to the servers.

Code written for event handles in Indy 9 may no longer compile under Indy 10. This comes as a result of changes to method
signatures - where new or different types are used in arguments to the event handler.

Other changes may be required when accessing methods moved to the IOHandler for the socket connection. Please refer to the
preceeding sections on TIdTCPServer and TIdTCPConnection, or the corresponding documentation in the Reference section for
more details.

For developers creating protocol servers, or deriving classes from Indy 10 protocol server, please be aware that the object
hierarchy has changed. Most servers that implement high-level protocol support are now derived from TIdExplicitTLSServer. This
provides common functionality required for TLS (Transport Level Security) in all of the messaging servers.

For instance, the following indicates the new ancestry for TIdNNTPServer:

TIdNNTPServer = class(TIdExplicitTLSServer)
While this change is largely transparent (other that providing access to additional properties, methods, and events), it may have an
impact on descendant classes.

TIdSMTPServer
In Indy 10, TIdSMTPServer has been changed (as discussed in the previous section), and includes other SMTP-specific
enhancements. Most revisions involve features added for TLS and SASL authentication, but also include enhanced error reporting
for the SMTP client contexts. TIdSMTPServer includes a default implementation for command handler procedures like
CommandNOOP, CommandQUIT, and CommandStartTLS, etc.

In addition, TIdSMTPServer now supports command pipelining. Pipelining is an SMTP extension where the client can send groups
of SMTP commands without waiting for a response to each individual command. The server implementation must still provide event
handlers (like OnMsgReceive, OnUserLogin, OnMailFrom, OnRcptTo, and OnReceived) that make use of the pipelining capability,
in accordance with the SMTP specifications.

TIdPOP3Server
In Indy 10, TIdPOP3Server has been changed (as discussed in the previous section), and includes other POP-specific
enhancements. Most revisions involve features added for TLS and SASL authentication, but also include enhanced capabilities for
the POP3 client contexts like the APOP challenge prompt.

TIdPOP3Server also includes support for command handler procedures (like OnLIST, OnRETR, OnDELE, OnUIDL, OnSTAT, etc).

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

For a detailed explanation of new properties, please refer to the TIdPOP3Server documentation in the Reference section.

TIdIMAP4Server
In Indy 10, TIdIMAP4Server has been changed (as discussed in the previous section), and includes other IMAP-specific
enhancements. Most revisions involve features added for TLS and SASL authentication, but also includes enhanced capabilities for
the IMAP client contexts. For instance, TIdIMAP4PeerContext includes properties to represent the connection state and the
selected mailbox for the IMAP client.

Internet Direct (Indy) Version 10.1.5 57


Changes to the Object Hierarchy

TIdIMAP4Server now includes support for command handler procedures (like OnCommandCAPABILITY, OnCommandNOOP,
OnCommandLOGOUT, OnCommandAUTHENTICATE, OnCommandLOGIN, OnCommandSELECT, etc). A default implementation
for command handlers used in the server are provided, but can be overridden using event handler procedures in the server
implementation.

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

For a detailed explanation of new properties, please refer to the TIdIMAP4Server documentation in the Reference section.

TIdNNTPServer
In Indy 10, TIdNNTPServer has been changed (as discussed in the previous section), and includes other NNTP-specific
enhancements. Most revisions involve features added for TLS and SASL authentication, but also includes enhanced capabilities for
the NNTP client contexts.

TIdNNTPServer now includes support for command handler procedures (like OnCommandCAPABILITY, OnCommandNOOP,
OnCommandLOGOUT, OnCommandAUTHENTICATE, OnCommandLOGIN, OnCommandSELECT, etc). A default implementation
for command handlers used in the server are provided, but can be overridden using event handler procedures in the server
implementation. TIdNNTPServer also includes support for NNTP extension commands, as per the relevant RFCs.

For existing Indy 9 code, most changes involve new method signatures for server methods and event handler declarations. Most of
these changes are required to maintain cross platform compatibility, but some are directory related to type changes in methods or
event types.

Additional code changes may be required to maintain cross platform compatibility, as discussed in previous sections.

For a detailed explanation of new properties, please refer to the TIdNNTPServer documentation in the Reference section.

58 Internet Direct (Indy) Version 10.1.5


Symbol Reference

Internet Direct (Indy) Version 10.1.5 59


EDecompressionError Class Classes

Classes

EComponentError Class
File
IdIRC ( 4675)

Hierarchy

Pascal
EComponentError = class(EIdException);
Description
EComponentError is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

ECompressionError Class
File
IdZLib ( 4757)

Hierarchy

Pascal
ECompressionError = class(EZlibError);
Description
ECompressionError is a EZlibError ( 183) descendant.

See Also
EZlibError ( 183)

EDecompressionError Class
File
IdZLib ( 4757)

Hierarchy

60 Internet Direct (Indy) Version 10.1.5


Classes EHL7CommunicationError Class

Pascal
EDecompressionError = class(EZlibError);
Description
EDecompressionError is a EZlibError ( 183) descendant.

See Also
EZlibError ( 183)

EHL7CommunicationError Class
File
IdHL7 ( 4661)

Hierarchy

Pascal
EHL7CommunicationError = class(EIdException);
Description
EHL7CommunicationError EIdException ( 76) descendant

See Also
EIdException ( 76)

EHL7CommunicationError Members
The following tables list the members exposed by EHL7CommunicationError.

Properties
Property Description
InterfaceName ( 62)

Methods
Method Description
Create ( 62)
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
Property
read only

EHL7CommunicationError Methods
The Methods of the EHL7CommunicationError class are listed here.

Internet Direct (Indy) Version 10.1.5 61


EIdAlreadyConnected Class Classes

Methods
Method Description
Create ( 62)

Legend
Constructor

EHL7CommunicationError.Create Constructor
Pascal
constructor Create(
AnInterfaceName: String;
AMessage: String
);
Parameters
Parameters Description
AnInterfaceName
AMessage

Description
Create

EHL7CommunicationError Properties
The Properties of the EHL7CommunicationError class are listed here.

Properties
Property Description
InterfaceName ( 62)

Legend
Property
read only

EHL7CommunicationError.InterfaceName Property
Pascal
property InterfaceName: String;
Description
InterfaceName is a Public read-only String property

EIdAlreadyConnected Class
Exception ( 4733) raised in TIdTCPClientCustom ( 2340) when the connection has already been establshed.

File
IdExceptionCore ( 4625)

Hierarchy

62 Internet Direct (Indy) Version 10.1.5


Classes EIdBlockingNotSupported Class

Pascal
EIdAlreadyConnected = class(EIdException);
Description
EIdAlreadyConnected is an EIdException ( 76) descendant that represents the exception raised in the Connect method in
TIdTCPClientCustom ( 2340) when the connection has already been establshed.

See Also
EIdException ( 76)

TIdTCPClientCustom.Connect ( 2342)

EIdAlreadyRegisteredAuthenticationMethod Class
Exception ( 4733) raised when registering an Authentication method that already exists.

File
IdAuthentication ( 4586)

Hierarchy

Pascal
EIdAlreadyRegisteredAuthenticationMethod = class(EIdException);
Description
EIdAlreadyRegisteredAuthenticationMethod is an EIdException ( 76) descendant that represents the exception raised when
registering an Authentication method that already exists.

EIdAlreadyRegisteredAuthenticationMethod is used in the RegisterAuthenticationMethod ( 2893) procedure when a


TIdAuthenticationClass ( 3005) already exists that matches the requested authentication class name.

See Also
EIdException ( 76)

TIdAuthenticationClass ( 3005)

RegisterAuthenticationMethod ( 2893)

EIdBlockingNotSupported Class
Exception ( 4733) raised when blocking sockets are not supported for the operating system or platform hosting the Indy library.

File
IdException ( 4624)

Hierarchy

Pascal
EIdBlockingNotSupported = class(EIdException);
Description
EIdBlockingNotSupported is an EIdException ( 76) descendant that represents the exception raised when a socket cannot be
initialized as a blocking (as opposed to an asynchronous) socket.

Internet Direct (Indy) Version 10.1.5 63


EIdCanNotBindRang Class Classes

EIdBlockingNotSupported is used only in the implementation of TIdStackLinux.SetBlocking ( 2228) when blocking socket
operations are not supported on the Linux distribution.

See Also
EIdException ( 76)

TIdStackLinux ( 2216)

EIdCanNotBindPortInRange Class
Exception ( 4733) raised during bind for reserved port numbers.

File
IdException ( 4624)

Hierarchy

Pascal
EIdCanNotBindPortInRange = class(EIdSocketHandleError);
Description
EIdCanNotBindPortInRange is an EIdSocketHandleError ( 154) descendant that represents an exception raised when
TIdSocketHandle ( 2071) Bind operation cannot allocate a reserved port number in the range specified by TIdSocketHandle (
2071) in the ClientPortMin and ClientPortMax properties.

EIdCanNotBindPortInRange uses the constant value RSCanNotBindRange, including the mimimum and maximum port numbers, to
form the exception message text.

See Also
EIdSocketHandleError ( 154)

TIdSocketHandle ( 2071)

TIdSocketHandle.ClientPortMin ( 2087)

TIdSocketHandle.ClientPortMax ( 2086)

TIdSocketHandle.Bind ( 2075)

EIdCanNotBindRang Class
Exception ( 4733) raised if an error occurs when binding to reserved port numbers.

File
IdRemoteCMDClient ( 4704)

Hierarchy

Pascal
EIdCanNotBindRang = class(EIdException);
Description
EIdCanNotBindRang is an EIdException ( 76) descendant that represents an exception raised if an error occurs when binding to
port numbers in a reserved port number range.

64 Internet Direct (Indy) Version 10.1.5


Classes EIdCannotSetIPVersionWhenConnected

See Also
EIdException ( 76)

EIdCanNotCreateMessagePart Class
Indicates an error in the TIdMessagePart ( 1614) constructor.

File
IdMessageParts ( 4689)

Hierarchy

Pascal
EIdCanNotCreateMessagePart = class(EIdMessageException);
Description
EIdCanNotCreateMessagePart is an EIdMessageException ( 116) descendant used to identify an error in the constructor for a
TIdMessagePart ( 1614) instance.

EIdCanNotCreateMessagePart generally indicates that the constructor has been called with the abstract base class
TIdMessagePart ( 1614) instead of a TIdText ( 2404) or TIdAttachment ( 227) descendant.

See Also
TIdText ( 2404)

TIdAttachment ( 227)

EIdCannotSetIPVersionWhenConnected Class
Exception ( 4733) raised when setting the IP version for a connected socket handle.

File
IdException ( 4624)

Hierarchy

Pascal
EIdCannotSetIPVersionWhenConnected = class(EIdSocketHandleError);
Description
EIdCannotSetIPVersionWhenConnected is an EIdSocketHandleError ( 154) descendant that represents the exception raised
when setting the IP Version for a socket handle that has already been bound.

EIdCannotSetIPVersionWhenConnected uses the resource string RSCannotSetIPVersionWhenConnected as text for the exception.

EIdCannotSetIPVersionWhenConnected is raised in the write access specifier for the TIdSocketHandle.IPVersion ( 2088)
property.

See Also
EIdSocketHandleError ( 154)

TIdSocketHandle.Bind ( 2075)

Internet Direct (Indy) Version 10.1.5 65


EIdCmdTCPClientConnectError Class Classes

TIdSocketHandle.IPVersion ( 2088)

RSCannotSetIPVersionWhenConnected

EIdCannotUseNonSocketIOHandler Class
File
IdSimpleServer ( 4718)

Hierarchy

Pascal
EIdCannotUseNonSocketIOHandler = class(EIdException);
Description
Descends from EIdException ( 76).

See Also
EIdException ( 76)

EIdClosedSocket Class
Exception ( 4733) raised when a connection has been unexpectedly closed during a socket operation.

File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdClosedSocket = class(EIdException);
Description
EIdClosedSocket is an EIdException ( 76) descendant that represents an exception raised when a connection has been
unexpectedly closed during a socket operation.

EIdClosedSocket is used in the implement of the ReadFromSource method in TIdIOHandlerStack ( 1342) and
TIdSSLIOHandlerSocketOpenSSL ( 2137) used for the IOHandler in socket connections. EIdClosedSocket is also used in
protocol-level implementations like the OnExecute event handler in TIdCustomHTTPServer ( 434) and the Disconnect method in
TIdIMAP4 ( 1150).

See Also
EIdException ( 76)

TIdIOHandlerStack.ReadFromSource

TIdSSLIOHandlerSocketOpenSSL.ReadFromSource

TIdCustomHTTPServer.OnExecute

TIdIMAP4.Disconnect ( 1166)

66 Internet Direct (Indy) Version 10.1.5


Classes EIdCompressionError Class

EIdCmdTCPClientConnectError Class
Exception ( 4733) raised when TIdCmdTCPClient ( 317) cannot connect to the remote host.

File
IdCmdTCPClient ( 4590)

Hierarchy

Pascal
EIdCmdTCPClientConnectError = class(EIdCmdTCPClientError);
Description
EIdCmdTCPClientConnectError is an EIdCmdTCPClientError ( 67) descendant that represents the exception raised when
TIdCmdTCPClient ( 317) cannot connect to the remote host or create ( 77) the listener thread for the client.
EIdCmdTCPClientConnectError normally contains a message represented by the constant RSNoCreateListeningThread.

See Also
EIdCmdTCPClientError ( 67)

TIdCmdTCPClient.Connect ( 319)

TIdCmdTCPClientListeningThread ( 323)

RSNoCreateListeningThread

EIdCmdTCPClientError Class
Ancestor for Exceptions raised when an error occurs in TIdCmdTCPClient ( 317).

File
IdCmdTCPClient ( 4590)

Hierarchy

Pascal
EIdCmdTCPClientError = class(EIdException);
Description
EIdCmdTCPClientError is an EIdException ( 76) descendant that specifies the common ancestor for exceptions raised during
execution of TIdCmdTCPClient ( 317) methods. An exception specific to the implementation of TIdCmdTCPClient ( 317) should
always be a EIdCmdTCPClientError descendant.

See Also
EIdException ( 76)

EIdCmdTCPClientConnectError ( 67)

Internet Direct (Indy) Version 10.1.5 67


EIdCompressorInitFailure Class Classes

EIdCompressionError Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
EIdCompressionError = class(EIdCompressionException);
Description
EIdCompressionError is a EIdCompressionException ( 68) descendant.

See Also
EIdCompressionException ( 68)

EIdCompressionException Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
EIdCompressionException = class(EIdException);
Description
EIdCompressionException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdCompressorInitFailure Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
EIdCompressorInitFailure = class(EIdCompressionException);
Description
EIdCompressorInitFailure is a EIdCompressionException ( 68) descendant.

68 Internet Direct (Indy) Version 10.1.5


Classes EIdConnectException Class

See Also
EIdCompressionException ( 68)

EIdConnClosedGracefully Class
Exception ( 4733) raised when a connection has close gracefully during socket operations.

File
IdException ( 4624)

Hierarchy

Pascal
EIdConnClosedGracefully = class(EIdSilentException);
Description
EIdSilentException ( 145) is a EIdSilentException ( 145) descendant that represents the exception raised when a connection has
been closed gracefully.

EIdSilentException ( 145) is raised when a valid socket descriptor has not been allocated during a check for a readable socket
handle in TIdSocketHandle.Readable ( 2078).

EIdSilentException ( 145) is also raised when reading a stream in TIdIOHandler.ReadStream ( 1308).

As an EIdSilentException ( 145) descendant, EIdConnClosedGracefully responds like the VCL EAbort ( 4733) exception. It is
recommended that you set your IDE to ignore those exceptions by clicking Tools -> Debugger Options -> Language Exceptions ->
Add and entering the value "EIdSilentException ( 145)".

See Also
EIdSilentException ( 145)

TIdSocketHandle.Readable ( 2078)

TIdIOHandler.ReadStream ( 1308)

TIdCustomHTTP.ReadResult

EIdConnectException Class
Exception ( 4733) raised when an error occurs while establishing a connection for a socket.

File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdConnectException = class(EIdException);
Description
EIdConnectException is an EIdException ( 76) descendant that represents an exception raised when an error occurs while
establishing a connection for a socket.

EIdConnectException is used in the implementation of the ConnectClient method in TIdIOHandlerStack ( 1342) and in the

Internet Direct (Indy) Version 10.1.5 69


EIdCorruptServicesFile Class Classes

Resolve method in TIdDNSResolver ( 600).

See Also
EIdException ( 76) TIdIOHandlerStack.ConnectClient

TIdDNSResolver.Resolve ( 604)

EIdConnectionStateError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdConnectionStateError = class(EIdException);
Description
EIdConnectionStateError is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdConnectTimeout Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdConnectTimeout = class(EIdException);
Description
EIdConnectTimeout is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdCorruptServicesFile Class
Exception ( 4733) raised when a service file entry is corrupted.

File
IdGlobal ( 4650)

Hierarchy

70 Internet Direct (Indy) Version 10.1.5


Classes EIdDecompressionError Class

Pascal
EIdCorruptServicesFile = class(EIdException);
Description
EIdCorruptServicesFile is a EIdException ( 76) descendant that represents an Exception ( 4733) raised when a service file entry
is corrupted. EIdCorruptServicesFile is used in the IdPorts ( 2818) function to indicate that a service entry has been encountered
with an invalid or missing port number.

See Also
EIdException ( 76)

IdPorts ( 2818)

EIdCouldNotBindSocket Class
Exception ( 4733) when binding a socket descriptor.

File
IdException ( 4624)

Hierarchy

Pascal
EIdCouldNotBindSocket = class(EIdSocketHandleError);
Description
EIdCouldNotBindSocket is an EIdSocketHandleError ( 154) descendant that represents the exception raised when
TIdSocketHandle.Bind ( 2075) encounters an error while binding the protocol family, address, and port number for the socket
descriptor.

EIdCouldNotBindSocket uses the resource string RSCouldNotBindSocket as the text for the exception.

See Also
EIdSocketHandleError ( 154)

EIdInvalidPortRange ( 111)

EIdCanNotBindPortInRange ( 64)

TIdSocketHandle.Bind ( 2075)

EIdDecompressionError Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
EIdDecompressionError = class(EIdCompressionException);
Description
EIdDecompressionError is a EIdCompressionException ( 68) descendant.

Internet Direct (Indy) Version 10.1.5 71


EIdDirectSMTPCannotResolveMX Class Classes

See Also
EIdCompressionException ( 68)

EIdDecompressorInitFailure Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
EIdDecompressorInitFailure = class(EIdCompressionException);
Description
EIdDecompressorInitFailure is a EIdCompressionException ( 68) descendant.

See Also
EIdCompressionException ( 68)

EIdDirectSMTPCannotAssignHost Class
Exception ( 4733) raised when assigning the Host property in TIdSMTPRelay ( 2036).

File
IdSMTPRelay ( 4720)

Hierarchy

Pascal
EIdDirectSMTPCannotAssignHost = class(EIdException);
Description
EIdDirectSMTPCannotAssignHost is an EIdException ( 76) descendant that represents the exception raised when trying to
directly assign the Host property in TIdSMTPRelay ( 2036).

EIdDirectSMTPCannotAssignHost is raised with the message RSDirSMTPCantAssignHost.

The Host property cannot be assigned directly in TIdSMTPRelay ( 2036). Set the value in the DNSServer property used to resolve
the mail exchange server for addresses found in email messages handled by the TIdSMTPRelay ( 2036) component.

See Also
EIdException ( 76)

TIdSMTPRelay.DNSServer ( 2041)

EIdDirectSMTPCannotResolveMX Class
Exception ( 4733) raised when a mail exchange server cannot be resolved for an email address domain.

72 Internet Direct (Indy) Version 10.1.5


Classes EIdDnsResolverError Class

File
IdSMTPRelay ( 4720)

Hierarchy

Pascal
EIdDirectSMTPCannotResolveMX = class(EIdException);
Description
EIdDirectSMTPCannotResolveMX EIdException ( 76) descendant that represents the exception raised when a mail exchange
server cannot be resolved for an email address domain.

EIdDirectSMTPCannotResolveMX is raised with the message RSDirSMTPInvalidEMailAddress or


RSDirSMTPNoMXRecordsForDomain.

RSDirSMTPInvalidEMailAddress indicates that an email address was detected that did not include a domain component in the
email address.

RSDirSMTPNoMXRecordsForDomain indicates the domain for an email address could not be resolved because a DNS MX record
could not be found for the domain.

See Also
EIdException ( 76)

TIdSMTPRelay.ResolveMXServers

TIdSMTPRelay.Send ( 2040)

EIdDisconnectedProbablyIdledOut Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
EIdDisconnectedProbablyIdledOut = class(EIdException);
Description
EIdDisconnectedProbablyIdledOut is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdDnsResolverError Class
File
IdExceptionCore ( 4625)

Hierarchy

Internet Direct (Indy) Version 10.1.5 73


EIdDoesNotSupportAPOP Class Classes

Pascal
EIdDnsResolverError = class(EIdException);
Description
EIdDnsResolverError is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdDNSServerSettingException Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
EIdDNSServerSettingException = class(EIdSilentException);
Description
EIdDNSServerSettingException is a EIdSilentException ( 145) descendant.

See Also
EIdSilentException ( 145)

EIdDNSServerSyncException Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
EIdDNSServerSyncException = class(EIdSilentException);
Description
EIdDNSServerSyncException is a EIdSilentException ( 145) descendant.

See Also
EIdSilentException ( 145)

EIdDoesNotSupportAPOP Class
File
IdPOP3 ( 4696)

74 Internet Direct (Indy) Version 10.1.5


Classes EIdEndOfStream Class

Hierarchy

Pascal
EIdDoesNotSupportAPOP = class(EIdPOP3Exception);
Description
EIdDoesNotSupportAPOP is a EIdPOP3Exception ( 133) descendant.

See Also
EIdPOP3Exception ( 133)

EIdEmailParseError Class
Exception ( 4733) raised while parsing the tet of an email address.

File
IdEMailAddress ( 4624)

Hierarchy

Pascal
EIdEmailParseError = class(EIdException);
Description
EIdEmailParseError is a EIdException ( 76) descendant that represents the exception raised when an invalid value is detected
while parsing values in TIdEMailAddressItem.Text ( 646) into the properties for an TIdEMailAddress email address.

See Also
EIdException ( 76)

TIdEMailAddressItem.Address ( 644)

TIdEMailAddressItem.Text ( 646)

EIdEmptySASLList Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdEmptySASLList = class(EIdSASLException);
Description
EIdEmptySASLList is a EIdSASLException ( 143) descendant.

See Also
EIdSASLException ( 143)

Internet Direct (Indy) Version 10.1.5 75


EIdException Class Classes

EIdEndOfStream Class
Exception ( 4733) raised when an unexpected end of stream is encountered.

File
IdGlobal ( 4650)

Hierarchy

Pascal
EIdEndOfStream = class(EIdException);
Description
EIdEndOfStream is an EIdException ( 76) descendant that represents the exception raised when an unexpected end of a stream
is encountered during a read operation.

EIdEndOfStream is raised in the ReadLnFromStream ( 2890) function.

See Also
EIdException ( 76)

ReadLnFromStream ( 2890)

EIdException Class
Exception ( 4733) class raised in the Indy library.

File
IdException ( 4624)

Hierarchy

Pascal
EIdException = class(EIdExceptionBase);
Description
EIdException is an EIdExceptionBase ( 4733) descendant that represents a common ancestor for exceptions raised in the Indy
library. All exceptions explicitly raised by the Indy library must descend from EIdException. This is the class that differentiates Indy
exceptions from non Indy exceptions.

Use EIdSilentException ( 145) for exceptions that can be ignored in the IDE.

Use EIdWrapperException ( 181) for non-Socket exceptions raised by the .Net framework.

See Also
EIdExceptionBase ( 4733)

TClassIdException ( 3001)

EIdSilentException ( 145)

EIdWrapperException ( 181)

76 Internet Direct (Indy) Version 10.1.5


Classes EIdException Class

EIdException Members
The following tables list the members exposed by EIdException.

Methods
Method Description
Create ( 77)
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual

EIdException Methods
The Methods of the EIdException class are listed here.

Methods
Method Description
Create ( 77)
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual

EIdException.Create Constructor
Pascal
constructor Create(
AMsg: string
); virtual; overload;
Parameters
Parameters Description
AMsg Error message for the exception.

Description
Create is an overloaded constructor for the object instance.

Create calls the inherited Create method using the value in AMsg as an argument. Create is declared as a virtual method to allow
descendant classes to easily re-implement the constructor.

See Also
Create

Internet Direct (Indy) Version 10.1.5 77


EIdException Class Classes

EIdException.IfAssigned Method
Raises an instance of the exception based on an object reference.

Pascal
class procedure IfAssigned(
const ACheck: TObject;
const AMsg: string = ''
);
Parameters
Parameters Description
ACheck Object reference to check for a non-Nil value.
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
IfAssigned is a class method used to raise an instance of the exception class when the TObject reference in ACheck has been
assigned a non-Nil value. As a class method, IfAssigned can be called without creating a prior instance of the exception class.

When the object reference in ACheck contains a non-Nil value, IfAssigned calls Toss ( 81) with the value in AMsg to raise the
exception class instance.

Use IfNotAssigned ( 79) to raise an instance of the exception class when the object reference contains a Nil value.

Example
Using class methods in an Indy Exception descendant.
EIdException.IfNotAssigned(AnObject,
'Object has not been created.');

EIdException.IfAssigned(AnObject.Data,
'Object already has data.');

EIdException.IfTrue(AnObject.ClosedGracefully,
'Object connection has closed before completion.');

EIdException.IfFalse(AnObject.Active,
'Object connection is not open.');

EIdException.IfNotInRange(AnObject.Port, 30000, 39999,


'Object port number is invalid for this protocol.');

// no exception raised... continue processing.


See Also
EIdException.IfNotAssigned ( 79)

EIdException.IfFalse Method
Raises an instance of the exception based on an expression value.

Pascal
class procedure IfFalse(
const ACheck: Boolean;
const AMsg: string = ''
);
Parameters
Parameters Description
ACheck Condition to check for a False value.
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
IfFalse is a class procedure used to raise an instance of the exception class when the condition in ACheck returns a False value. As

78 Internet Direct (Indy) Version 10.1.5


Classes EIdException Class

a class method, IfFalse can be called without creating a prior instance of the exception class.

When the condition in ACheck contains False, IfFalse calls Toss ( 81) with the value in AMsg to raise the exception class instance.

Use IfTrue ( 80) to raise an instance of the exception class when the condition in ACheck contains True.

Example
Using class methods in an Indy Exception descendant.
EIdException.IfNotAssigned(AnObject, 'Object has not been created.');

EIdException.IfAssigned(AnObject.Data, 'Object already has data.');

EIdException.IfTrue(AnObject.ClosedGracefully,
'Object connection has closed before completion.');

EIdException.IfFalse(AnObject.Active,
'Object connection is not open.');

EIdException.IfNotInRange(AnObject.Port, 30000, 39999,


'Object port number is invalid for this protocol.');

// no exception raised... continue processing.


See Also
EIdException.IfTrue ( 80)

EIdException.IfNotAssigned Method
Raises an instance of the exception based on an object reference.

Pascal
class procedure IfNotAssigned(
const ACheck: TObject;
const AMsg: string = ''
);
Parameters
Parameters Description
ACheck Object reference to check for a Nil value.
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
IfNotAssigned is a class procedure used to raise an instance of the exception class when the TObject reference in ACheck contains
an unassigned value. As a class method, IfNotAssigned can be called without creating a prior instance of the exception class.

When the object reference in ACheck contains a Nil value, IfNotAssigned calls Toss ( 81) with the value in AMsg to raise the
exception class instance.

Use IfAssigned ( 78) to raise an instance of the exception class when the object reference contains a non-Nil value.

Example
Using class methods in an Indy Exception descendant.
EIdException.IfNotAssigned(AnObject, 'Object has not been created.');

EIdException.IfAssigned(AnObject.Data, 'Object already has data.');

EIdException.IfTrue(AnObject.ClosedGracefully,
'Object connection has closed before completion.');

EIdException.IfFalse(AnObject.Active,
'Object connection is not open.');

EIdException.IfNotInRange(AnObject.Port, 30000, 39999,


'Object port number is invalid for this protocol.');

// no exception raised... continue processing.

Internet Direct (Indy) Version 10.1.5 79


EIdException Class Classes

See Also
EIdException.IfAssigned ( 78)

EIdException.IfNotInRange Method
Raises an instance of the exception when the value is not in the specified range.

Pascal
class procedure IfNotInRange(
const AValue: Integer;
const AMin: Integer;
const AMax: Integer;
const AMsg: string = ''
);
Parameters
Parameters Description
AValue Value to check for the minimum and maximum range values.
AMin Minimum value for the range check.
AMax Maximum value for the range check.
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
IfNotInRange is a class procedure used to raise an instance of the exception class when the value in AValue is not in the range
specified by AMin and AMax. When the value in AValue is not in the specified range, IfNotInRange calls Toss ( 81) with the value
in AMsg to raise the exception class instance.

As a class method, IfNotInRange can be called without creating a prior instance of the exception class.

Example
Using class methods in an Indy Exception descendant.
EIdException.IfNotAssigned(AnObject, 'Object has not been created.');

EIdException.IfAssigned(AnObject.Data, 'Object already has data.');

EIdException.IfTrue(AnObject.ClosedGracefully,
'Object connection has closed before completion.');

EIdException.IfFalse(AnObject.Active,
'Object connection is not open.');

EIdException.IfNotInRange(AnObject.Port, 30000, 39999,


'Object port number is invalid for this protocol.');

// no exception raised... continue processing.

EIdException.IfTrue Method
Raises an instance of the exception based on an expression value.

Pascal
class procedure IfTrue(
const ACheck: Boolean;
const AMsg: string = ''
);
Parameters
Parameters Description
ACheck Condition to check for a True value.
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
IfTrue is a class procedure used to raise an instance of the exception class when the condition in ACheck returns a True value. As

80 Internet Direct (Indy) Version 10.1.5


Classes EIdExtensionAlreadyExists Class

a class method, IfTrue can be called without creating a prior instance of the exception class.

When the condition in ACheck contains True, IfTrue calls Toss ( 81) with the value in AMsg to raise the exception class instance.

Use IfFalse ( 78) to raise an instance of the exception class when the condition in ACheck contains False.

Example
Using class methods in an Indy Exception descendant.
EIdException.IfNotAssigned(AnObject, 'Object has not been created.');

EIdException.IfAssigned(AnObject.Data, 'Object already has data.');

EIdException.IfTrue(AnObject.ClosedGracefully,
'Object connection has closed before completion.');

EIdException.IfFalse(AnObject.Active,
'Object connection is not open.');

EIdException.IfNotInRange(AnObject.Port, 30000, 39999,


'Object port number is invalid for this protocol.');

// no exception raised... continue processing.


See Also
EIdException.IfFalse ( 78)

EIdException.Toss Method
Raises the exception class with the specified message.

Pascal
class procedure Toss(
const AMsg: string
);
Parameters
Parameters Description
AMsg Exception ( 4733) message text to assign to the exception instance.

Description
Toss is a class procedure used to raise an instance of the exception class with the exception message specified in AMsg. As a
class method, Toss can be called without creating a prior instance of the exception class.

Toss is used in the implementation of other class methods in EIdException ( 76).

See Also
IfAssigned ( 78)

IfNotAssigned ( 79)

IfFalse ( 78)

IfTrue ( 80)

IfNotInRange ( 80)

EIdExtensionAlreadyExists Class
File
IdGlobalProtocols ( 4654)

Internet Direct (Indy) Version 10.1.5 81


EIdFiberFinished Class Classes

Hierarchy

Pascal
EIdExtensionAlreadyExists = class(EIdException);
Description
EIdExtensionAlreadyExists is an EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdFailedToRetreiveTimeZoneInfo Class
Exception ( 4733) raised when the Time Zone could not be retrieved.

File
IdGlobalProtocols ( 4654)

Hierarchy

Pascal
EIdFailedToRetreiveTimeZoneInfo = class(EIdException);
Description
EIdFailedToRetreiveTimeZoneInfo is an EIdException ( 76) descendant that represents the exception raised in OffsetFromUTC
when Time Zone information could not be retrieved on the user's computer.

See Also
EIdException ( 76)

OffsetFromUTC

EIdFiber Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdFiber = class(EIdException);
Description
EIdFiber is an EIdException ( 76) descendant

See Also
EIdException ( 76)

82 Internet Direct (Indy) Version 10.1.5


Classes EIdFileNotFound Class

EIdFiberFinished Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdFiberFinished = class(EIdFiber);
Description
EIdFiberFinished is an EIdFiber ( 82) descendant

See Also
EIdFiber ( 82)

EIdFibersNotSupported Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdFibersNotSupported = class(EIdFiber);
Description
EIdFibersNotSupported is an EIdFiber ( 82) descendant

See Also
EIdFiber ( 82)

EIdFileNotFound Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdFileNotFound = class(EIdTCPConnectionError);
Description
EIdFileNotFound is an EIdTCPConnectionError ( 165) descendant

Internet Direct (Indy) Version 10.1.5 83


EIdFileSystemFileNotFound Class Classes

See Also
EIdTCPConnectionError ( 165)

EIdFileSystemCannotRemoveDir Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
EIdFileSystemCannotRemoveDir = class(EIdFileSystemException);
Description
EIdFileSystemCannotRemoveDir is a EIdFileSystemException ( 84) descendant.

See Also
EIdFileSystemException ( 84)

EIdFileSystemException Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
EIdFileSystemException = class(EIdException);
Description
EIdFileSystemException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdFileSystemFileNotFound Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
EIdFileSystemFileNotFound = class(EIdFileSystemException);

84 Internet Direct (Indy) Version 10.1.5


Classes EIdFileSystemPermissionDenied Class

Description
EIdFileSystemFileNotFound is a EIdFileSystemException ( 84) descendant.

See Also
EIdFileSystemException ( 84)

EIdFileSystemNotADir Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
EIdFileSystemNotADir = class(EIdFileSystemException);
Description
EIdFileSystemNotADir is a EIdFileSystemException ( 84) descendant.

See Also
EIdFileSystemException ( 84)

EIdFileSystemNotAFile Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
EIdFileSystemNotAFile = class(EIdFileSystemException);
Description
EIdFileSystemNotAFile is a EIdFileSystemException ( 84) descendant.

See Also
EIdFileSystemException ( 84)

EIdFileSystemPermissionDenied Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Internet Direct (Indy) Version 10.1.5 85


EIdFSPFileNotFound Class Classes

Pascal
EIdFileSystemPermissionDenied = class(EIdFileSystemException);
Description
EIdFileSystemPermissionDenied is a EIdFileSystemException ( 84) descendant.

See Also
EIdFileSystemException ( 84)

EIdFSPException Class
File
IdFSP ( 4628)

Hierarchy

Pascal
EIdFSPException = class(EIdException);
Description
EIdFSPException is a EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdFSPFileAlreadyExists Class
File
IdFSP ( 4628)

Hierarchy

Pascal
EIdFSPFileAlreadyExists = class(EIdFSPException);
Description
EIdFSPFileAlreadyExists is a EIdFSPException ( 86) descendant

See Also
EIdFSPException ( 86)

EIdFSPFileNotFound Class
File
IdFSP ( 4628)

86 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPAUTHException Class

Hierarchy

Pascal
EIdFSPFileNotFound = class(EIdFSPException);
Description
EIdFSPFileNotFound is a EIdFSPException ( 86) descendant

See Also
EIdFSPException ( 86)

EIdFSPPacketTooSmall Class
File
IdFSP ( 4628)

Hierarchy

Pascal
EIdFSPPacketTooSmall = class(EIdFSPException);
Description
EIdFSPPacketTooSmall is a EIdFSPException ( 86) descendant

See Also
EIdFSPException ( 86)

EIdFSPProtException Class
File
IdFSP ( 4628)

Hierarchy

Pascal
EIdFSPProtException = class(EIdFSPException);
Description
EIdFSPProtException is a EIdFSPException ( 86) descendant

See Also
EIdFSPException ( 86)

Internet Direct (Indy) Version 10.1.5 87


EIdFTPBoundPortMinLess Class Classes

EIdFTPAUTHException Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPAUTHException = class(EIdFTPException);
Description
EIdFTPAUTHException is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPBoundPortMaxGreater Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPBoundPortMaxGreater = class(EIdFTPServerException);
Description
EIdFTPBoundPortMaxGreater is a EIdFTPServerException ( 94) descendant.

See Also
EIdFTPServerException ( 94)

EIdFTPBoundPortMinLess Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPBoundPortMinLess = class(EIdFTPServerException);
Description
EIdFTPBoundPortMinLess is a EIdFTPServerException ( 94) descendant.

88 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPConnAssuranceFailure Class

See Also
EIdFTPServerException ( 94)

EIdFTPCannotBeNegative Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPCannotBeNegative = class(EIdFTPServerException);
Description
EIdFTPCannotBeNegative is a EIdFTPServerException ( 94) descendant.

See Also
EIdFTPServerException ( 94)

EIdFTPCanNotSetAUTHCon Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPCanNotSetAUTHCon = class(EIdFTPAUTHException);
Description
EIdFTPCanNotSetAUTHCon is a EIdFTPAUTHException ( 88) descendant.

See Also
EIdFTPAUTHException ( 88)

EIdFTPConnAssuranceFailure Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPConnAssuranceFailure = class(EIdFTPException);

Internet Direct (Indy) Version 10.1.5 89


EIdFTPFileAlreadyExists Class Classes

Description
EIdFTPConnAssuranceFailure is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPDataPortProtection Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPDataPortProtection = class(EIdFTPException);
Description
EIdFTPDataPortProtection is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPException Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPException = class(EIdException);
Description
EIdFTPException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdFTPFileAlreadyExists Class
File
IdFTP ( 4629)

Hierarchy

90 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPMustUseExtWithNATFastTrack

Pascal
EIdFTPFileAlreadyExists = class(EIdFTPException);
Description
EIdFTPFileAlreadyExists is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPImplicitTLSRequiresSSL Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPImplicitTLSRequiresSSL = class(EIdFTPServerException);
Description
EIdFTPImplicitTLSRequiresSSL is a EIdFTPServerException ( 94) descendant.

See Also
EIdFTPServerException ( 94)

EIdFTPMustUseExtWithIPv6 Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPMustUseExtWithIPv6 = class(EIdFTPException);
Description
EIdFTPMustUseExtWithIPv6 is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPMustUseExtWithNATFastTrack Class
File
IdFTP ( 4629)

Internet Direct (Indy) Version 10.1.5 91


EIdFTPNoDataPortProtectionAfterCCC Classes

Hierarchy

Pascal
EIdFTPMustUseExtWithNATFastTrack = class(EIdFTPException);
Description
EIdFTPMustUseExtWithNATFastTrack is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPNoAUTHWOSSL Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPNoAUTHWOSSL = class(EIdFTPAUTHException);
Description
EIdFTPNoAUTHWOSSL is a EIdFTPAUTHException ( 88) descendant.

See Also
EIdFTPAUTHException ( 88)

EIdFTPNoCCCWOEncryption Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPNoCCCWOEncryption = class(EIdFTPException);
Description
EIdFTPNoCCCWOEncryption is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

92 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPOnCustomFTPProxyRequired Class

EIdFTPNoDataPortProtectionAfterCCC Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPNoDataPortProtectionAfterCCC = class(EIdFTPDataPortProtection);
Description
EIdFTPNoDataPortProtectionAfterCCC is a EIdFTPDataPortProtection ( 90) descendant.

See Also
EIdFTPDataPortProtection ( 90)

EIdFTPNoDataPortProtectionWOEncryption Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPNoDataPortProtectionWOEncryption = class(EIdFTPDataPortProtection);
Description
EIdFTPNoDataPortProtectionWOEncryption is a EIdFTPDataPortProtection ( 90) descendant.

See Also
EIdFTPDataPortProtection ( 90)

EIdFTPOnCustomFTPProxyRequired Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPOnCustomFTPProxyRequired = class(EIdFTPException);
Description
EIdFTPOnCustomFTPProxyRequired is a EIdFTPException ( 90) descendant.

Internet Direct (Indy) Version 10.1.5 93


EIdFTPServerNoOnListDirectory Class Classes

See Also
EIdFTPException ( 90)

EIdFTPPassiveMustBeTrueWithNATFT Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPPassiveMustBeTrueWithNATFT = class(EIdFTPException);
Description
EIdFTPPassiveMustBeTrueWithNATFT is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPServerException Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPServerException = class(EIdException);
Description
EIdFTPServerException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdFTPServerNoOnListDirectory Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
EIdFTPServerNoOnListDirectory = class(EIdFTPServerException);

94 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPSToSBothMostSupportSSCN Class

Description
EIdFTPServerNoOnListDirectory is a EIdFTPServerException ( 94) descendant.

See Also
EIdFTPServerException ( 94)

EIdFTPServerSentInvalidPort Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPServerSentInvalidPort = class(EIdFTPException);
Description
EIdFTPServerSentInvalidPort is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPSiteToSiteTransfer Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPSiteToSiteTransfer = class(EIdFTPException);
Description
EIdFTPSiteToSiteTransfer is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPSToSBothMostSupportSSCN Class
File
IdFTP ( 4629)

Hierarchy

Internet Direct (Indy) Version 10.1.5 95


EIdFTPSToSNoDataProtection Class Classes

Pascal
EIdFTPSToSBothMostSupportSSCN = class(EIdFTPSiteToSiteTransfer);
Description
EIdFTPSToSBothMostSupportSSCN is a EIdFTPSiteToSiteTransfer ( 95) descendant.

See Also
EIdFTPSiteToSiteTransfer ( 95)

EIdFTPSToSIPProtoMustBeSame Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPSToSIPProtoMustBeSame = class(EIdFTPSiteToSiteTransfer);
Description
EIdFTPSToSIPProtoMustBeSame is a EIdFTPSiteToSiteTransfer ( 95) descendant.

See Also
EIdFTPSiteToSiteTransfer ( 95)

EIdFTPSToSNATFastTrack Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPSToSNATFastTrack = class(EIdFTPSiteToSiteTransfer);
Description
EIdFTPSToSNATFastTrack is a EIdFTPSiteToSiteTransfer ( 95) descendant.

See Also
EIdFTPSiteToSiteTransfer ( 95)

EIdFTPSToSNoDataProtection Class
File
IdFTP ( 4629)

96 Internet Direct (Indy) Version 10.1.5


Classes EIdFTPUploadFileNameCanNotBeEmpty

Hierarchy

Pascal
EIdFTPSToSNoDataProtection = class(EIdFTPSiteToSiteTransfer);
Description
EIdFTPSToSNoDataProtection is a EIdFTPSiteToSiteTransfer ( 95) descendant.

See Also
EIdFTPSiteToSiteTransfer ( 95)

EIdFTPSToSTransModesMustBeSame Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPSToSTransModesMustBeSame = class(EIdFTPSiteToSiteTransfer);
Description
EIdFTPSToSTransModesMustBeSame is a EIdFTPSiteToSiteTransfer ( 95) descendant.

See Also
EIdFTPSiteToSiteTransfer ( 95)

EIdFTPUnknownOTPMethodException Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPUnknownOTPMethodException = class(EIdFTPException);
Description
EIdFTPUnknownOTPMethodException is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

Internet Direct (Indy) Version 10.1.5 97


EIdHostRequired Class Classes

EIdFTPUploadFileNameCanNotBeEmpty Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPUploadFileNameCanNotBeEmpty = class(EIdFTPException);
Description
EIdFTPUploadFileNameCanNotBeEmpty is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdFTPWrongIOHandler Class
File
IdFTP ( 4629)

Hierarchy

Pascal
EIdFTPWrongIOHandler = class(EIdFTPException);
Description
EIdFTPWrongIOHandler is a EIdFTPException ( 90) descendant.

See Also
EIdFTPException ( 90)

EIdHostRequired Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdHostRequired = class(EIdException);
Description
EIdHostRequired is a EIdException ( 76) descendant.

98 Internet Direct (Indy) Version 10.1.5


Classes EIdHTTPHeaderAlreadyWritten Class

See Also
EIdException ( 76)

EIdHTTPCannotSwitchSessionStateWhenActive Class
HTTP server exception for changing state on an active server.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
EIdHTTPCannotSwitchSessionStateWhenActive = class(EIdHTTPServerError);
Description
EIdHTTPCannotSwitchSessionStateWhenActive is an EIdHTTPServerError ( 102) descendant raised when a HTTP server
attempts to change the value of the SessionState property for an Active HTTP server.

See Also
EIdHTTPServerError ( 102)

TIdCustomHTTPServer.SessionState ( 442)

TIdCustomHTTPServer.Active

EIdHTTPErrorParsingCommand Class
HTTP server exception for an unknown HTTP command.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
EIdHTTPErrorParsingCommand = class(EIdHTTPServerError);
Description
EIdHTTPErrorParsingCommand is an EIdHTTPServerError ( 102) exception descendant raised when a HTTP server is unable to
determine the HTTP command from a client connection.

EIdHTTPErrorParsingCommand is raised during execution of the TIdContext ( 376) for a client session when trying to read a
malformed HTTP command, version number, and arguments from the client connection.

See Also
EIdHTTPServerError ( 102)

TIdHTTPServer ( 1102)

TIdContext ( 376)

Internet Direct (Indy) Version 10.1.5 99


EIdHTTPProtocolException Class Classes

EIdHTTPHeaderAlreadyWritten Class
HTTP response exception raised during writing headers.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
EIdHTTPHeaderAlreadyWritten = class(EIdHTTPServerError);
Description
EIdHTTPHeaderAlreadyWritten is an EIdHTTPServerError ( 102) descendant that represents the exception raised when
TIdHTTPResponseInfo ( 1089) attempts to write headers for a response where the headers have already been written.

See Also
EIdHTTPServerError ( 102)

TIdHTTPResponseInfo.WriteHeader ( 1095)

TIdHTTPResponseInfo.HeaderHasBeenWritten ( 1098)

EIdHTTPProtocolException Class
Exception ( 4733) raised during processing of a HTTP response.

File
IdHTTP ( 4662)

Hierarchy

Pascal
EIdHTTPProtocolException = class(EIdReplyRFCError);
Description
EIdHTTPProtocolException is a EIdReplyRFCError ( 140) descendant that represents an exception type raised by the HTTP
protocol handler during processing of an HTTP response. EIdHTTPProtocolException is generally raised when an unexpected
numeric HTTP response code is received from the HTTP response.

EIdHTTPProtocolException reimplements the alternate constructor CreateError ( 101) to facilitate creating an exception instance
with the values specified in the arguments to the constructor.

EIdHTTPProtocolException also implements ErrorMessage ( 102) to describe the text in the protocol error message.

See Also
EIdReplyRFCError ( 140)

EIdHTTPProtocolException Members
The following tables list the members exposed by EIdHTTPProtocolException.

100 Internet Direct (Indy) Version 10.1.5


Classes EIdHTTPProtocolException Class

Properties
Property Description
ErrorCode ( 141)
ErrorMessage ( 102) Text for the HTTP protocol error response.

Methods
Method Description
Create ( 77)
CreateError ( 101) Constructor for the exception instance.
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual
Property
read only

EIdHTTPProtocolException Methods
The Methods of the EIdHTTPProtocolException class are listed here.

Methods
Method Description
CreateError ( 101) Constructor for the exception instance.

Legend
Constructor
virtual

EIdHTTPProtocolException.CreateError Constructor
Constructor for the exception instance.

Pascal
constructor CreateError(
const anErrCode: Integer;
const asReplyMessage: string;
const asErrorMessage: string
); virtual; reintroduce;
Parameters
Parameters Description
anErrCode Numeric error code from the HTTP response.
asReplyMessage General description of the error.
asErrorMessage Context specific text for the error message. CreateError also assigns the value in asErrorMessage to the
ErrorMessage ( 102) property prior to raising the exception.

Description
CreateError is the constructor for the exception. CreateError calls the inherited CreateError method using the anErrCode and
asReplyMessage

Internet Direct (Indy) Version 10.1.5 101


EIdHTTPServerError Class Classes

EIdHTTPProtocolException Properties
The Properties of the EIdHTTPProtocolException class are listed here.

Properties
Property Description
ErrorMessage ( 102) Text for the HTTP protocol error response.

Legend
Property
read only

EIdHTTPProtocolException.ErrorMessage Property
Text for the HTTP protocol error response.

Pascal
property ErrorMessage: string;
Description
ErrorMessage is a read-ony String property that represents the text portion of a protocol error received in a HTTP response.
ErrorMessage is initalized using an argument in the CreateError ( 101) constructor.

EIdHttpProxyError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdHttpProxyError = class(EIdException);
Description
EIdHttpProxyError is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdHTTPServerError Class
Ancestor for Indy HTTP exceptions.

File
IdCustomHTTPServer ( 4608)

Hierarchy

102 Internet Direct (Indy) Version 10.1.5


Classes EIdIcmpException Class

Pascal
EIdHTTPServerError = class(EIdException);
Description
EIdHTTPServerError is an EIdException ( 76) descendant that is the ancestor for all HTTP-related exceptions in Indy.

See Also
EIdException ( 76)

EIdHTTPHeaderAlreadyWritten ( 100)

EIdHTTPErrorParsingCommand ( 99)

EIdHTTPUnsupportedAuthorisationScheme ( 103)

EIdHTTPCannotSwitchSessionStateWhenActive ( 99)

EIdHTTPUnsupportedAuthorisationScheme Class
HTTP server exception for an invalid authentication scheme.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
EIdHTTPUnsupportedAuthorisationScheme = class(EIdHTTPServerError);
Description
EIdHTTPUnsupportedAuthorisationScheme is an EIdHTTPServerError ( 102) exception descendant raised when a HTTP server
has received a request with an invalid Authorization header.

When "Authorization" is used in the request, it must contain the "Basic" authentication type with Base64-encoded user and
password information.

See Also
EIdHTTPServerError ( 102)

TIdHTTPRequestInfo ( 1077)

EIdIcmpException Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdIcmpException = class(EIdException);
Description
EIdIcmpException is an EIdException ( 76) descendant

Internet Direct (Indy) Version 10.1.5 103


EIdIdentInvalidPort Class Classes

See Also
EIdException ( 76)

EIdIdentException Class
Exception ( 4733) type that is the ancestor for Ident protocol exceptions.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentException = class(EIdException);
Description
EIdIdentException is a EIdException ( 76) descendant that represents the exception type that is the ancestor for Ident protocol
exceptions.

See Also
EIdIdentReply ( 106)

EIdIdentInvalidPort ( 105)

EIdIdentNoUser ( 105)

EIdIdentHiddenUser ( 104)

EIdIdentUnknownError ( 106)

EIdIdentQueryTimeOut ( 105)

EIdIdentHiddenUser Class
Exception ( 4733) raised when a HIDDEN-USER message is found in an Ident protocol reply.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentHiddenUser = class(EIdIdentReply);
Description
EIdIdentHiddenUser is an EIdIdentReply ( 106) descendant that represents the exception raised an HIDDEN-USER error is
received in the protocol reply in TIdIdent.Reply ( 1141).

EIdIdentHiddenUser will be raised when the protocol reply is parsed in TIdIdent.Query ( 1140).

See Also
EIdIdentReply ( 106) TIdIdent.Reply ( 1141) TIdIdent.Query ( 1140)

104 Internet Direct (Indy) Version 10.1.5


Classes EIdIdentQueryTimeOut Class

EIdIdentInvalidPort Class
Exception ( 4733) raised when an INVALID-PORT message is found in an Ident protocol reply.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentInvalidPort = class(EIdIdentReply);
Description
EIdIdentInvalidPort is an EIdIdentReply ( 106) descendant that represents the exception raised an INVALID-PORT error is
received in the protocol reply in TIdIdent.Reply ( 1141).

EIdIdentInvalidPort will be raised when the protocol reply is parsed in TIdIdent.Query ( 1140).

See Also
EIdIdentReply ( 106) TIdIdent.Reply ( 1141) TIdIdent.Query ( 1140)

EIdIdentNoUser Class
Exception ( 4733) raised when a NO-USER message is found in an Ident protocol reply.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentNoUser = class(EIdIdentReply);
Description
EIdIdentNoUser is an EIdIdentReply ( 106) descendant that represents the exception raised a NO-USER error is received in the
protocol reply in TIdIdent.Reply ( 1141).

EIdIdentNoUser will be raised when the protocol reply is parsed in TIdIdent.Query ( 1140).

See Also
EIdIdentReply ( 106) TIdIdent.Reply ( 1141) TIdIdent.Query ( 1140)

EIdIdentQueryTimeOut Class
Exception ( 4733) raised when a timeout occurs while reading an Ident protocol reply.

File
IdIdent ( 4665)

Internet Direct (Indy) Version 10.1.5 105


EIdIdentUnknownError Class Classes

Hierarchy

Pascal
EIdIdentQueryTimeOut = class(EIdIdentReply);
Description
EIdIdentQueryTimeOut is an EIdIdentReply ( 106) descendant that represents the exception raised when a timeout occurs while
reading the Ident protocol reply in TIdIdent.Query ( 1140).

EIdIdentQueryTimeOut will be raised if ReadLn is unable to read the value for TIdIdent.Reply ( 1141) prior to the elapsed value in
TIdIdent.QueryTimeout. If a timeout occurs, the connection is closed prior to raising the EIdIdentQueryTimeOut exception.

See Also
EIdIdentReply ( 106) TIdIdent.Query ( 1140) TIdIdent.Reply ( 1141)

EIdIdentReply Class
Ancestor for all Ident protocol errors in an Ident protocol reply.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentReply = class(EIdIdentException);
Description
EIdIdentReply is an EIdIdentException ( 104) descendant that represents the ancestor class for all exception raised when an error
message has been detected and parsed from the protocol reply in TIdIdent.Reply ( 1141).

See Also
EIdIdentInvalidPort ( 105) EIdIdentNoUser ( 105) EIdIdentHiddenUser ( 104) EIdIdentUnknownError ( 106)
EIdIdentQueryTimeOut ( 105) TIdIdent.Reply ( 1141)

EIdIdentUnknownError Class
Exception ( 4733) raised when a UNKNOWN-ERROR message is found in an Ident protocol reply.

File
IdIdent ( 4665)

Hierarchy

Pascal
EIdIdentUnknownError = class(EIdIdentReply);
Description
EIdIdentUnknownError is an EIdIdentReply ( 106) descendant that represents the exception raised an UNKNOWN-ERROR error

106 Internet Direct (Indy) Version 10.1.5


Classes EIdInterceptCircularLink Class

is received in the protocol reply in TIdIdent.Reply ( 1141).

EIdIdentUnknownError will be raised when the protocol reply is parsed in TIdIdent.Query ( 1140).

See Also
EIdIdentReply ( 106) TIdIdent.Reply ( 1141) TIdIdent.Query ( 1140)

EIdIMAP4ImplicitTLSRequiresSSL Class
File
IdIMAP4Server ( 4668)

Hierarchy

Pascal
EIdIMAP4ImplicitTLSRequiresSSL = class(EIdIMAP4ServerException);
Description
EIdIMAP4ImplicitTLSRequiresSSL is a EIdIMAP4ServerException ( 107) descendant

See Also
EIdIMAP4ServerException ( 107)

EIdIMAP4ServerException Class
File
IdIMAP4Server ( 4668)

Hierarchy

Pascal
EIdIMAP4ServerException = class(EIdException);
Description
EIdIMAP4ServerException is a EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdInterceptCircularLink Class
Exception ( 4733) raised on recursive intercept assignment.

File
IdIntercept ( 4669)

Hierarchy

Internet Direct (Indy) Version 10.1.5 107


EIdInvalidAlgorithm Class Classes

Pascal
EIdInterceptCircularLink = class(EIdException);
Description
EIdInterceptCircularLink is an EIdException ( 76) descendant that represents an exception type raised when a
TIdConnectionIntercept ( 368) assignment has detected a recursive assignment for the given class type.

EIdInterceptCircularLink is raised when TIdConnectionIntercept ( 368) contains the same object reference as the new intercept
value.

See Also
EIdException ( 76)

EIdInterceptPropInvalid Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdInterceptPropInvalid = class(EIdTCPConnectionError);
Description
EIdInterceptPropInvalid is an EIdTCPConnectionError ( 165) descendant

See Also
EIdTCPConnectionError ( 165)

EIdInterceptPropIsNil Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdInterceptPropIsNil = class(EIdTCPConnectionError);
Description
EIdInterceptPropIsNil is an EIdTCPConnectionError ( 165) descendant

See Also
EIdTCPConnectionError ( 165)

EIdInvalidAlgorithm Class
Exception ( 4733) raised when an invalid algorithm is encountered in the Message Digest challenge/response.

108 Internet Direct (Indy) Version 10.1.5


Classes EIdInvalidIPAddress Class

File
IdAuthenticationDigest ( 4587)

Hierarchy

Pascal
EIdInvalidAlgorithm = class(EIdException);
Description
EIdInvalidAlgorithm is an EIdException ( 76) descendant that represents the exception type raised when TIdDigestAuthentication
( 573) performs the challenge/response exchange, and detects an algorithm other than 'MD5' as expected in the Message Digest
algorithm.

EIdInvalidFTPListingFormat Class
Exception ( 4733) raised when an invalid format is detected while parsing the contents of a directory listing in the FTP client.

File
IdFTPList ( 4634)

Hierarchy

Pascal
EIdInvalidFTPListingFormat = class(EIdException);
Description
EIdInvalidFTPListingFormat is an EIdException ( 76) descendant that represents the exception raised when an invalid format is
detected while parsing the contents of a directory listing in the FTP client.

See Also
EIdException ( 76)

EIdInvalidIPAddress Class
Exception ( 4733) raised when converting an invalid IP address string to it's native representation.

File
IdException ( 4624)

Hierarchy

Pascal
EIdInvalidIPAddress = class(EIdSocketHandleError);
Description
EIdInvalidIPAddress is an EIdSocketHandleError ( 154) descendant that represents an exception raised when an error occurs
trying to translate a string containing an IP address into it's TInAddr representation.

Internet Direct (Indy) Version 10.1.5 109


EIdInvalidPortRange Class Classes

See Also
EIdSocketHandleError ( 154)

EIdInvalidIPv6Address Class
Exception ( 4733) raised when creating an IPv6 address from its' representation as a string.

File
IdGlobal ( 4650)

Hierarchy

Pascal
EIdInvalidIPv6Address = class(EIdException);
Description
EIdInvalidIPv6Address is an EIdException ( 76) descendant raised when attempting to convert a string representing an IPv6
network address to its' representation as a TIdIPv6Address ( 3040) datat type.

EIdInvalidIPv6Address is raised in the IPv6ToIdIPv6Address ( 2846) function when a canonical IP address cannot be constructed
for the provided string argument.

EIdInvalidIPv6Address uses the values in both RSInvalidIPv6Address and the IP address to form the exception message.

See Also
EIdException ( 76)

IPv6ToIdIPv6Address ( 2846)

RSInvalidIPv6Address

EIdInvalidObjectType Class
Exception ( 4733) raised for an invalid file stream for a file data item.

File
IdMultipartFormData ( 4691)

Hierarchy

Pascal
EIdInvalidObjectType = class(EIdException);
Description
EIdInvalidObjectType is a EIdException ( 76) descendant that represents the exception type raised a multipart form data field
cannot locate the TStream associated with file data item.

See Also
EIdException ( 76)

110 Internet Direct (Indy) Version 10.1.5


Classes EIdInvalidServiceName Class

EIdInvalidPortRange Class
Represents an exception raised during bind due to an invalid port number range.

File
IdException ( 4624)

Hierarchy

Pascal
EIdInvalidPortRange = class(EIdSocketHandleError);
Description
EIdInvalidPortRange is an EIdSocketHandleError ( 154) descendant that represents an exception raised when a socket handle
cannot using a port number for a requested range of port numbers.

EIdInvalidPortRange is raised in TIdSocketHandle ( 2071) when the Bind method encounters client port ranges where the
minimum port number is larger than the maximum port number. EIdInvalidPortRange uses the constant value RSInvalidPortRange,
including the mimimum and maximum port numbers, to form the exception message text.

See Also
EIdSocketHandleError ( 154)

EIdCouldNotBindSocket ( 71)

EIdCanNotBindPortInRange ( 64)

TIdSocketHandle.Bind ( 2075)

TIdSocketHandle.ClientPortMin ( 2087)

TIdSocketHandle.ClientPortMax ( 2086)

EIdInvalidServiceName Class
Exception ( 4733) raised when a service name cannot be resolved to a port number.

File
IdStackBSDBase ( 4728)

Hierarchy

Pascal
EIdInvalidServiceName = class(EIdException);
Description
EIdInvalidServiceName is an EIdException ( 76) descendant that represents the exception raised when attempting resolve a
service name to a valid port number.

EIdInvalidServiceName is raised in TIdStackLinux.WSGetServByName ( 2232) and TIdStackWindows.WSGetServByName (


2249) with the exception message RSInvalidServiceName.

See Also
EIdException ( 76)

Internet Direct (Indy) Version 10.1.5 111


EIdIoHandlerRequiresLargeStream Class Classes

RSInvalidServiceName

EIdInvalidSocket Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdInvalidSocket = class(EIdException);
Description
EIdInvalidSocket is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdIOHandlerPropInvalid Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdIOHandlerPropInvalid = class(EIdTCPConnectionError);
Description
EIdIOHandlerPropInvalid is an EIdTCPConnectionError ( 165) descendant

See Also
EIdTCPConnectionError ( 165)

EIdIoHandlerRequiresLargeStream Class
Exception ( 4733) raised TIdIOHandler ( 1284) when writing a stream in TIdIOHandler ( 1284) that requires a 64-bit size not
supported in the IOHandler.

File
IdIOHandler ( 4670)

Hierarchy

Pascal
EIdIoHandlerRequiresLargeStream = class(EIdIoHandler);

112 Internet Direct (Indy) Version 10.1.5


Classes EIdIPVersionUnsupported Class

Description
EIdIoHandlerRequiresLargeStream is an EIdIoHandler descendant that is the exception raised in TIdIOHandler ( 1284) when the
Write method is called using a stream instance that cannot handle the 64-bit size required for the write operation.

See Also
EIdIoHandler

EIdIPv6Unavailable Class
Exception ( 4733) raised when IP version 6 addresses are not supported in the Indy library.

File
IdStackWindows ( 4730)

Hierarchy

Pascal
EIdIPv6Unavailable = class(EIdException);
Description
EIdIPv6Unavailable is an EIdException ( 76) descendant raised when an IP version 6 address is passed to the HostByAddress
method.

EIdIPv6Unavailable is created with the exception message indicates in the resource string RSIPv6Unavailable.

EIdIPv6Unavailable indicates that IP version address support has not been compiled into the Indy library, or is not support on the
platform or Operating System hosting the Indy library.

See Also
EIdException ( 76)

EIdIPv6Unavailable

TIdStackWindows.HostByAddress ( 2240)

EIdIPVersionUnsupported Class
Exception ( 4733) raised during conversion of IP addresses.

File
IdStackBSDBase ( 4728)

Hierarchy

Pascal
EIdIPVersionUnsupported = class(EIdStackError);
Description
EIdIPVersionUnsupported is an EIdStackError ( 164) descendant that represents the exception raised when attempting to convert
an IP address. EIdIPVersionUnsupported indicates that an IP address family other than version 4 or version 6 has been requested.

EIdIPVersionUnsupported is used in TIdStackBSDBase.TranslateTInAddrToString ( 2196) and


TIdStackBSDBase.TranslateStringToTInAddr ( 2195).

Internet Direct (Indy) Version 10.1.5 113


EIdMCastException Class Classes

See Also
EIdStackError ( 164)

TIdStackBSDBase.TranslateTInAddrToString ( 2196)

TIdStackBSDBase.TranslateStringToTInAddr ( 2195)

EIdLPRErrorException Class
This exception is raised when the LPR daemon indicates that an error occurred.

File
IdLPR ( 4679)

Hierarchy

Pascal
EIdLPRErrorException = class(EIdException);
Description
This exception is raised when the LPR daemon indicates that an error occurred.

See Also
TIdLPR ( 1469)

EIdMaxCaptureLineExceeded Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdMaxCaptureLineExceeded = class(EIdException);
Description
EIdMaxCaptureLineExceeded is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdMCastException Class
Ancestor for all Multicast-related exceptions.

File
IdIPMCastBase ( 4673)

114 Internet Direct (Indy) Version 10.1.5


Classes EIdMCastNotValidAddress Class

Hierarchy

Pascal
EIdMCastException = class(EIdException);
Description
EIdMCastException is an EIdException ( 76) descendant that represents the event type that is the ancestor for all
Multicast-related exceptions.

See Also
EIdException ( 76) EIdMCastNoBindings ( 115) EIdMCastNotValidAddress ( 115)

EIdMCastNoBindings Class
Exception ( 4733) raised when an error occurs during binding allocation.

File
IdIPMCastBase ( 4673)

Hierarchy

Pascal
EIdMCastNoBindings = class(EIdMCastException);
Description
EIdMCastNoBindings is an EIdMCastException ( 114) descendant that represents an exception type raised when an error occurs
while creating a binding for TIdIPMCastClient ( 1379).

See Also
EIdMCastException ( 114) TIdIPMCastClient.Bindings ( 1381)

EIdMCastNotValidAddress Class
Exception ( 4733) raised when an error occurs during binding allocation.

File
IdIPMCastBase ( 4673)

Hierarchy

Pascal
EIdMCastNotValidAddress = class(EIdMCastException);
Description
EIdMCastNotValidAddress is an EIdMCastException ( 114) descendant that represents an exception type raised when an error
occurs while setting or writing to the Multicast group address for a TIdIPMCastBase ( 1377) component.

TIdIPMCastBase.IsValidMulticastGroup ( 1378) is used to determine if the group address is a valid multicast address.

Internet Direct (Indy) Version 10.1.5 115


EIdMessageException Class Classes

See Also
EIdMCastException ( 114) TIdIPMCastBase.IsValidMulticastGroup ( 1378) TIdIPMCastServer ( 1387) TIdIPMCastClient (
1379)

EIdMCastReceiveErrorZeroBytes Class
File
IdIPMCastBase ( 4673)

Hierarchy

Pascal
EIdMCastReceiveErrorZeroBytes = class(EIdMCastException);
Description
EIdMCastReceiveErrorZeroBytes is a EIdMCastException ( 114) descendant

See Also
EIdMCastException ( 114)

EIdMessageCannotLoad Class
Exeception raised when attempting to load a message from an invalid or missing file name.

File
IdMessage ( 4682)

Hierarchy

Pascal
EIdMessageCannotLoad = class(EIdMessageException);
Description
EIdMessageCannotLoad is an EIdMessageException ( 116) descendant that represents the exception raised when an invalid or
missing file name is used in TIdMessage.LoadFromFile ( 1532).

See Also
TIdMessage.LoadFromFile ( 1532)

EIdMessageException Class
File
IdExceptionCore ( 4625)

Hierarchy

116 Internet Direct (Indy) Version 10.1.5


Classes EIdMessageYencInvalidCRCException

Pascal
EIdMessageException = class(EIdException);
Description
EIdMessageException is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdMessageYencCorruptionException Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
EIdMessageYencCorruptionException = class(EIdMessageYencException);
Description
EIdMessageYencCorruptionException EIdMessageYencException ( 117) descendant

See Also
EIdMessageYencException ( 117)

EIdMessageYencException Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
EIdMessageYencException = class(EIdMessageException);
Description
EIdMessageYencException EIdMessageException ( 116) descendant

See Also
EIdMessageException ( 116)

EIdMessageYencInvalidCRCException Class
File
IdMessageCoderYenc ( 4688)

Internet Direct (Indy) Version 10.1.5 117


EIdMissingColon Class Classes

Hierarchy

Pascal
EIdMessageYencInvalidCRCException = class(EIdMessageYencException);
Description
EIdMessageYencInvalidCRCException EIdMessageYencException ( 117) descendant

See Also
EIdMessageYencException ( 117)

EIdMessageYencInvalidSizeException Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
EIdMessageYencInvalidSizeException = class(EIdMessageYencException);
Description
EIdMessageYencInvalidSizeException EIdMessageYencException ( 117) descendant

See Also
EIdMessageYencException ( 117)

EIdMissingColon Class
Represents the exception raised when the colon at the start or end of the BinHex 4.0 content cannot be located during decoding.

File
IdCoderBinHex4 ( 4593)

Hierarchy

Pascal
EIdMissingColon = class(EIdException);
Description
EIdMissingColon is an Exception ( 4733) descendant that represents the exception raised when the colon at the start or end of the
BinHex 4.0 content cannot be located during decoding.

EIdMissingColon is raised in the TIdDecoderBinHex4.Decode ( 541) method with the following messages:

• Block passed to TIdDecoderBinHex4.Decode ( 541) is missing a starting colon


• Block passed to TIdDecoderBinHex4.Decode ( 541) is missing a terminating colon

118 Internet Direct (Indy) Version 10.1.5


Classes EIdNNTPException Class

See Also
TIdDecoderBinHex4.Decode ( 541)

EIdMustUseOpenProxy Class
Exception ( 4733) raised when sending or receiving datagrams through a proxy server.

File
IdUDPClient ( 4750)

Hierarchy

Pascal
EIdMustUseOpenProxy = class(EIdUDPException);
Description
EIdMustUseOpenProxy is an EIdUDPException ( 178) descendant that represents the exception raised when sending or receiving
datagrams through a proxy server.

See Also
EIdUDPException ( 178)

ReceiveBuffer

SendBuffer

EIdNNTPConnectionRefused Class
Indicates a connection to the NNTP server has been refused.

File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPConnectionRefused = class(EIdReplyRFCError);
Description
EIdNNTPConnectionRefused is an EIdReplyRFCError ( 140) descendant raised when an the TIdNNTP.Connect ( 1695) method
receives the 502 NNTP response code.

See Also
TIdNNTP.Connect ( 1695)

EIdReplyRFCError ( 140)

Internet Direct (Indy) Version 10.1.5 119


EIdNNTPNoOnNewGroupsList Class Classes

EIdNNTPException Class
Ancestor class for NNTP exceptions.

File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPException = class(EIdException);
Description
EIdNNTPException is an EIdException ( 76) descendant that is the ancestor for NNTP exceptions in the Indy library.

See Also
EIdNNTPNoOnNewGroupsList ( 120)

EIdNNTPNoOnNewNewsList ( 121)

EIdNNTPNoOnNewsgroupList ( 121)

EIdNNTPStringListNotInitialized ( 123)

EIdNNTPImplicitTLSRequiresSSL Class
File
IdNNTPServer ( 4693)

Hierarchy

Pascal
EIdNNTPImplicitTLSRequiresSSL = class(EIdNNTPServerException);
Description
EIdNNTPImplicitTLSRequiresSSL EIdNNTPServerException ( 122) descendant

See Also
EIdNNTPServerException ( 122)

EIdNNTPNoOnNewGroupsList Class
NNTP exception for retrieval of the new Newsgroups list.

File
IdNNTP ( 4692)

Hierarchy

120 Internet Direct (Indy) Version 10.1.5


Classes EIdNNTPNoOnNewsgroupList Class

Pascal
EIdNNTPNoOnNewGroupsList = class(EIdNNTPException);
Description
EIdNNTPNoOnNewGroupsList is an EIdNNTPException ( 120) exception descendant raised when TIdNNTP.GetNewGroupsList
( 1714) is called and the TIdNNTP.OnNewGroupsList ( 1734) event handler has not been assigned.

See Also
TIdNNTP.GetNewGroupsList ( 1714)

TIdNNTP.OnNewGroupsList ( 1734)

EIdNNTPException ( 120)

EIdNNTPNoOnNewNewsList Class
Exception ( 4733) for retrieval of the new NNTP new message list.

File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPNoOnNewNewsList = class(EIdNNTPException);
Description
EIdNNTPNoOnNewNewsList is an EIdNNTPException ( 120) descendant raised when TIdNNTP.GetNewNewsList ( 1715) is
called and the TIdNNTP.OnNewNewsList ( 1736) event handler has not been assigned.

See Also
TIdNNTP.GetNewNewsList ( 1715)

TIdNNTP.OnNewNewsList ( 1736)

EIdNNTPException ( 120)

EIdNNTPNoOnNewsgroupList Class
Exception ( 4733) for NNTP newsgroup list retrieval.

File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPNoOnNewsgroupList = class(EIdNNTPException);
Description
EIdNNTPNoOnNewsgroupList is an EIdNNTPException ( 120) exception descendant raised when TIdNNTP.GetNewsgroupList
( 1717) is called and a TIdNNTP.OnNewsgroupList ( 1737) event handler has not been assigned.

Internet Direct (Indy) Version 10.1.5 121


EIdNNTPServerException Class Classes

See Also
TIdNNTP.GetNewsgroupList ( 1717)

TIdNNTP.OnNewsgroupList ( 1737)

EIdNNTPException ( 120)

EIdNNTPNoOnXHDREntry Class
File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPNoOnXHDREntry = class(EIdNNTPException);
Description
EIdNNTPNoOnXHDREntry EIdNNTPException ( 120) descendant

See Also
EIdNNTPException ( 120)

EIdNNTPNoOnXOVER Class
File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPNoOnXOVER = class(EIdNNTPException);
Description
EIdNNTPNoOnXOVER EIdNNTPException ( 120) descendant

See Also
EIdNNTPException ( 120)

EIdNNTPServerException Class
File
IdNNTPServer ( 4693)

Hierarchy

122 Internet Direct (Indy) Version 10.1.5


Classes EIdNoExecuteSpecified Class

Pascal
EIdNNTPServerException = class(EIdException);
Description
EIdNNTPServerException EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdNNTPStringListNotInitialized Class
Exception ( 4733) for unsuccessful message retrieval.

File
IdNNTP ( 4692)

Hierarchy

Pascal
EIdNNTPStringListNotInitialized = class(EIdNNTPException);
Description
EIdNNTPStringListNotInitialized is an EIdNNTPException ( 120) exception descendant raised when TIdNNTP.Check ( 1695) is
called and the TStringList container for messages has not been initialized.

See Also
TIdNNTP.Check ( 1695)

EIdNNTPException ( 120)

EIdNoDataToRead Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdNoDataToRead = class(EIdTCPConnectionError);
Description
EIdNoDataToRead is an EIdTCPConnectionError ( 165) descendant

See Also
EIdTCPConnectionError ( 165)

Internet Direct (Indy) Version 10.1.5 123


EIdNotASocket Class Classes

EIdNoExecuteSpecified Class
Unused at the moment.

File
IdCustomTCPServer ( 4609)

Hierarchy

Pascal
EIdNoExecuteSpecified = class(EIdTCPServerError);
Description
EIdNoExecuteSpecified is a EIdTCPServerError ( 166) descendant that is unused at the moment.

See Also
EIdTCPServerError ( 166)

EIdTCPNoOnExecute ( 166)

TIdCustomTCPServer.OnExecute

TIdTCPServer.OnExecute ( 2379)

EIdNotAllBytesSent Class
Exception ( 4733) raised for an incomplete socket transmission.

File
IdException ( 4624)

Hierarchy

Pascal
EIdNotAllBytesSent = class(EIdSocketHandleError);
Description
EIdNotAllBytesSent is an EIdSocketHandleError ( 154) descendant that represents the exception raised when TIdSocketHandle
( 2071) is unable to send all bytes in a transmission to the peer connection.

EIdNotAllBytesSent is raised in TIdStackWindows.WSSendTo ( 2250) when the WinSock SendTo() API returns a value (other
than Id_SOCKET_ERROR) that does not match the length of send buffer.

EIdNotAllBytesSent used the resource string in RSNotAllBytesSent to construct the message for the exception.

See Also
TIdSocketHandle.WSSendTo

EIdSocketHandleError ( 154) EIdPackageSizeTooBig ( 132)

Id_WSAEMSGSIZE

Id_SOCKET_ERROR

124 Internet Direct (Indy) Version 10.1.5


Classes EIdNotEnoughDataInBuffer Class

EIdNotASocket Class
Exception ( 4733) raised when a socket operation is performed using an invalid socket handle.

File
IdStackBSDBase ( 4728)

Hierarchy

Pascal
EIdNotASocket = class(EIdSocketError);
Description
EIdNotASocket is an EIdSocketError ( 152) descendant that represents the exception raised when a socket operation is
performed using an invalid socket handle.

EIdNotASocket is created in RaiseSocketError when the error number for the last socket operation contains Id_WSAENOTSOCK.
The message for the exception will contain the value in the resource string RSStackENOTSOCK.

Please note that you can add EIdNotASocket to the list of ignored exceptions in the IDE. This will treat EIdNotASocket just like
silent exceptions in the IDE. Your program will still run correctly, but the debugger will not stop on it.

See Also
EIdSocketError ( 152)

TIdStackBSDBase.RaiseSocketError ( 2189)

Id_WSAENOTSOCK

EIdNotConnected Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdNotConnected = class(EIdException);
Description
EIdNotConnected is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdNotEnoughDataInBuffer Class
Exception ( 4733) raised when extracting data from the buffer.

Internet Direct (Indy) Version 10.1.5 125


EIdObjectTypeNotSupported Class Classes

File
IdBuffer ( 4588)

Hierarchy

Pascal
EIdNotEnoughDataInBuffer = class(EIdException);
Description
EIdNotEnoughDataInBuffer is an EIdException ( 76) descendant that represents an exception raised when extracting data from
the buffer.

EIdNotEnoughDataInBuffer indicates that not enough data exists in the buffer to satisfy the extraction request.

See Also
EIdException ( 76)

TIdBuffer.ExtractToBytes ( 287)

TIdBuffer.ExtractToIdBuffer ( 289)

TIdBuffer.ExtractToStream ( 292)

EIdNumberInvalid Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
EIdNumberInvalid = class(EIdException);
Description
EIdNumberInvalid is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdObjectTypeNotSupported Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdObjectTypeNotSupported = class(EIdTCPConnectionError);
Description
EIdObjectTypeNotSupported is an EIdTCPConnectionError ( 165) descendant

126 Internet Direct (Indy) Version 10.1.5


Classes EIdOSSLAcceptError Class

See Also
EIdTCPConnectionError ( 165)

EIdOpenSSLError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOpenSSLError = class(EIdException);
Description
EIdOpenSSLError is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdOpenSSLLoadError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOpenSSLLoadError = class(EIdOpenSSLError);
Description
EIdOpenSSLLoadError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLAcceptError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLAcceptError = class(EIdOpenSSLError);

Internet Direct (Indy) Version 10.1.5 127


EIdOSSLCreatingContextError Class Classes

Description
EIdOSSLAcceptError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLConnectError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLConnectError = class(EIdOpenSSLError);
Description
EIdOSSLConnectError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLCouldNotLoadSSLLibrary Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLCouldNotLoadSSLLibrary = class(EIdOpenSSLLoadError);
Description
EIdOSSLCouldNotLoadSSLLibrary is a EIdOpenSSLLoadError ( 127) descendant.

See Also
EIdOpenSSLLoadError ( 127)

EIdOSSLCreatingContextError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

128 Internet Direct (Indy) Version 10.1.5


Classes EIdOSSLLoadingCertError Class

Pascal
EIdOSSLCreatingContextError = class(EIdOpenSSLError);
Description
EIdOSSLCreatingContextError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLDataBindingError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLDataBindingError = class(EIdOpenSSLError);
Description
EIdOSSLDataBindingError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLGetMethodError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLGetMethodError = class(EIdOpenSSLError);
Description
EIdOSSLGetMethodError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLLoadingCertError Class
File
IdSSLOpenSSL ( 4726)

Internet Direct (Indy) Version 10.1.5 129


EIdOSSLModeNotSet Class Classes

Hierarchy

Pascal
EIdOSSLLoadingCertError = class(EIdOpenSSLLoadError);
Description
EIdOSSLLoadingCertError is a EIdOpenSSLLoadError ( 127) descendant.

See Also
EIdOpenSSLLoadError ( 127)

EIdOSSLLoadingKeyError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLLoadingKeyError = class(EIdOpenSSLLoadError);
Description
EIdOSSLLoadingKeyError is a EIdOpenSSLLoadError ( 127) descendant.

See Also
EIdOpenSSLLoadError ( 127)

EIdOSSLLoadingRootCertError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLLoadingRootCertError = class(EIdOpenSSLLoadError);
Description
EIdOSSLLoadingRootCertError is a EIdOpenSSLLoadError ( 127) descendant.

See Also
EIdOpenSSLLoadError ( 127)

130 Internet Direct (Indy) Version 10.1.5


Classes EIdOTPSASLException Class

EIdOSSLModeNotSet Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLModeNotSet = class(EIdOpenSSLError);
Description
EIdOSSLModeNotSet is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOSSLSettingCipherError Class
File
IdSSLOpenSSL ( 4726)

Hierarchy

Pascal
EIdOSSLSettingCipherError = class(EIdOpenSSLError);
Description
EIdOSSLSettingCipherError is a EIdOpenSSLError ( 127) descendant.

See Also
EIdOpenSSLError ( 127)

EIdOTPSASLException Class
Ancestor for exceptions raised in the SASL OTP famework.

File
IdSASLOTP ( 4714)

Hierarchy

Pascal
EIdOTPSASLException = class(EIdException);
Description
EIdOTPSASLException is an EIdException ( 76) descendant that represents the ancestor for exceptions raised in the SASL OTP

Internet Direct (Indy) Version 10.1.5 131


EIdPackageSizeTooBig Class Classes

famework in the Indy library.

See Also
EIdException ( 76) EIdOTPSASLUnknownOTPMethodException ( 132)

EIdOTPSASLUnknownOTPMethodException Class
Exception ( 4733) raised for an invalid OTP extended response in a server challenge.

File
IdSASLOTP ( 4714)

Hierarchy

Pascal
EIdOTPSASLUnknownOTPMethodException = class(EIdOTPSASLException);
Description
EIdOTPSASLUnknownOTPMethodException is an EIdOTPSASLException ( 131) descendant that represents the exception
raised when generating an OTP client response.

EIdOTPSASLUnknownOTPMethodException is raised when an invalid OTP extended response is encountered in a server


challenge.

EIdOTPSASLUnknownOTPMethodException can be raised in TIdSASLOTP.ContinueAuthenticate ( 1946) with the following


exception message text:

Unknown OTP method


See Also
EIdOTPSASLException ( 131)

EIdPackageSizeTooBig Class
Exception ( 4733) raised for an invalid datagram size.

File
IdException ( 4624)

Hierarchy

Pascal
EIdPackageSizeTooBig = class(EIdSocketHandleError);
Description
EIdPackageSizeTooBig is an EIdSocketHandleError ( 154) descendant that represents the exception raised when
TIdSocketHandle.SendTo ( 2082) is unable to send a large datagram.

EIdPackageSizeTooBig is raised in TIdStackWindows.WSSendTo ( 2250) when the WinSock SendTo() API returns the value
Id_SOCKET_ERROR, and the last error message is Id_WSAEMSGSIZE.

EIdNotAllBytesSent ( 124) uses the resource string in RSPackageSizeTooBig to construct the message for the exception.

132 Internet Direct (Indy) Version 10.1.5


Classes EIdPOP3ReplyException Class

See Also
TIdSocketHandle.SendTo ( 2082)

EIdSocketHandleError ( 154)

EIdNotAllBytesSent ( 124)

Id_SOCKET_ERROR

Id_WSAEMSGSIZE

RSPackageSizeTooBig

EIdPOP3Exception Class
File
IdPOP3 ( 4696)

Hierarchy

Pascal
EIdPOP3Exception = class(EIdException);
Description
EIdPOP3Exception is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdPOP3ImplicitTLSRequiresSSL Class
File
IdPOP3Server ( 4697)

Hierarchy

Pascal
EIdPOP3ImplicitTLSRequiresSSL = class(EIdPOP3ServerException);
Description
EIdPOP3ImplicitTLSRequiresSSL is a EIdPOP3ServerException ( 134) descendant.

See Also
EIdPOP3ServerException ( 134)

EIdPOP3ReplyException Class
File
IdReplyPOP3 ( 4706)

Internet Direct (Indy) Version 10.1.5 133


EIdPortRequired Class Classes

Hierarchy

Pascal
EIdPOP3ReplyException = class(EIdException);
Description
EIdPOP3ReplyException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdPOP3ReplyInvalidEnhancedCode Class
File
IdReplyPOP3 ( 4706)

Hierarchy

Pascal
EIdPOP3ReplyInvalidEnhancedCode = class(EIdPOP3ReplyException);
Description
EIdPOP3ReplyInvalidEnhancedCode is a EIdPOP3ReplyException ( 133) descendant.

See Also
EIdPOP3ReplyException ( 133)

EIdPOP3ServerException Class
File
IdPOP3Server ( 4697)

Hierarchy

Pascal
EIdPOP3ServerException = class(EIdException);
Description
EIdPOP3ServerException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

134 Internet Direct (Indy) Version 10.1.5


Classes EIdReadLnMaxLineLengthExceeded Class

EIdPortRequired Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdPortRequired = class(EIdException);
Description
EIdPortRequired is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdRangeException Class
Exception ( 4733) raised when an index out of range error occurs in the Indy library.

File
IdException ( 4624)

Hierarchy

Pascal
EIdRangeException = class(EIdException);
Description
EIdRangeException is an EIdException ( 76) descendant that represents the exception raised when an index out of range error
occurs in the Indy library.

EIdRangeException is raised in the BytesToString ( 2728) function when the index value is not in the range required to access
values in the TIdBytes ( 3007) passed to the routine.

See Also
EIdException ( 76)

BytesToString ( 2728)

EIdReadLnMaxLineLengthExceeded Class
File
IdExceptionCore ( 4625)

Hierarchy

Internet Direct (Indy) Version 10.1.5 135


EIdReplyIMAP4Error Class Classes

Pascal
EIdReadLnMaxLineLengthExceeded = class(EIdException);
Description
EIdReadLnMaxLineLengthExceeded is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdReadTimeout Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdReadTimeout = class(EIdException);
Description
EIdReadTimeout is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdReplyError Class
Base class for reply exceptions.

File
IdReply ( 4705)

Hierarchy

Pascal
EIdReplyError = class(EIdException);
Description
EIdReplyError is an EIdException ( 76) descendant that represents the base class for exceptions raised in message responses (or
replies).

EIdReplyError is the ancestor for TIdRFCRplyError.

See Also
EIdException ( 76)

TIdRFCRplyError

136 Internet Direct (Indy) Version 10.1.5


Classes EIdReplyIMAP4Error Class

EIdReplyIMAP4Error Class
File
IdReplyIMAP4 ( 4706)

Hierarchy

Pascal
EIdReplyIMAP4Error = class(EIdReplyError);
Description
EIdReplyIMAP4Error is a EIdReplyError ( 136) descendant.

See Also
EIdReplyError ( 136)

EIdReplyIMAP4Error Members
The following tables list the members exposed by EIdReplyIMAP4Error.

Methods
Method Description
Create ( 77)
CreateError ( 137)
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual

EIdReplyIMAP4Error Methods
The Methods of the EIdReplyIMAP4Error class are listed here.

Methods
Method Description
CreateError ( 137)

Legend
Constructor

EIdReplyIMAP4Error.CreateError Constructor
Pascal
constructor CreateError(
const AReplyMessage: string
);

Internet Direct (Indy) Version 10.1.5 137


EIdReplyPOP3Error Class Classes

Parameters
Parameters Description
AReplyMessage Scope is const. Type is string.

Description
CreateError is a constructor for the object instance.

EIdReplyPOP3Error Class
File
IdReplyPOP3 ( 4706)

Hierarchy

Pascal
EIdReplyPOP3Error = class(EIdReplyError);
Description
EIdReplyPOP3Error is a EIdReplyError ( 136) descendant.

See Also
EIdReplyError ( 136)

EIdReplyPOP3Error Members
The following tables list the members exposed by EIdReplyPOP3Error.

Properties
Property Description
EnhancedCode ( 139)
ErrorCode ( 139)

Methods
Method Description
Create ( 77)
CreateError ( 139)
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual
Property
read only

EIdReplyPOP3Error Methods
The Methods of the EIdReplyPOP3Error class are listed here.

138 Internet Direct (Indy) Version 10.1.5


Classes EIdReplyRFCError Class

Methods
Method Description
CreateError ( 139)

Legend
Constructor
virtual

EIdReplyPOP3Error.CreateError Constructor
Pascal
constructor CreateError(
const AErrorCode: String;
const AReplyMessage: string;
const AEnhancedCode: String = ''
); virtual; reintroduce;
Parameters
Parameters Description
AErrorCode Scope is const. Type is String.
AReplyMessage Scope is const. Type is string.
AEnhancedCode Scope is const. Type is String.

Description
CreateError is a reintroduced,virtual constructor for the object instance.

EIdReplyPOP3Error Properties
The Properties of the EIdReplyPOP3Error class are listed here.

Properties
Property Description
EnhancedCode ( 139)
ErrorCode ( 139)

Legend
Property
read only

EIdReplyPOP3Error.EnhancedCode Property
Pascal
property EnhancedCode: String;
Description
EnhancedCode is a Public read-only String property.

EIdReplyPOP3Error.ErrorCode Property
Pascal
property ErrorCode: String;
Description
ErrorCode is a Public read-only String property.

Internet Direct (Indy) Version 10.1.5 139


EIdReplyRFCError Class Classes

EIdReplyRFCError Class
Exception ( 4733) raised for RFC-compliant protocol responses.

File
IdReplyRFC ( 4707)

Hierarchy

Pascal
EIdReplyRFCError = class(EIdReplyError);
Description
EIdReplyRFCError is an EIdReplyError ( 136) descendant that represents the generic exception raised for RFC-compliant
protocol responses.

EIdReplyRFCError implements an ErrorCode ( 141) property for the protocol response, and an alternate cosntructor for creating
the exception with a given error code and message text.

EIdReplyRFCError is used as an ancestor class for protocol-specific errors, like EIdHTTPProtcolException,


EIdNNTPConnectionRefused ( 119), and EIdSMTPREplyError.

See Also
EIdReplyError ( 136)

EIdHTTPProtcolException

EIdNNTPConnectionRefused ( 119)

EIdSMTPREplyError

EIdReplyRFCError Members
The following tables list the members exposed by EIdReplyRFCError.

Properties
Property Description
ErrorCode ( 141)

Methods
Method Description
Create ( 77)
CreateError ( 141) Constructor for the object instance.
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual
Property
read only

140 Internet Direct (Indy) Version 10.1.5


Classes EIdResolveError Class

EIdReplyRFCError Methods
The Methods of the EIdReplyRFCError class are listed here.

Methods
Method Description
CreateError ( 141) Constructor for the object instance.

Legend
Constructor
virtual

EIdReplyRFCError.CreateError Constructor
Constructor for the object instance.

Pascal
constructor CreateError(
const AErrorCode: Integer;
const AReplyMessage: string
); virtual; reintroduce;
Parameters
Parameters Description
AErrorCode Numeric protocol response code for the exception.
AReplyMessage Textual message for the protocol response exception.

Description
CreateError is an alternate constructor for the exception instance, and initializes the exception with the ErrorCode ( 141) and
Message indicated in AErrorCode and AReplyMessage.

Use TIdReplyRFC.RaiseReplyError ( 1853) to create ( 77) and raise an instance of the exception using an RFC response.

EIdReplyRFCError Properties
The Properties of the EIdReplyRFCError class are listed here.

Properties
Property Description
ErrorCode ( 141)

Legend
Property
read only

EIdReplyRFCError.ErrorCode Property
Pascal
property ErrorCode: Integer;
Description
ErrorCode is a read-only Integer property that represents the numeric response code from a protocol response that results in the
exception being raised.

Use CreateError ( 141) to instance an exception instance with a given numeric code and message text.

Internet Direct (Indy) Version 10.1.5 141


EIdReverseResolveError Class Classes

EIdResolveError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdResolveError = class(EIdSocketError);
Description
EIdResolveError is an EIdSocketError ( 152) descendant

See Also
EIdSocketError ( 152)

EIdResponseError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdResponseError = class(EIdException);
Description
EIdResponseError is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdReverseResolveError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdReverseResolveError = class(EIdSocketError);
Description
EIdReverseResolveError is an EIdSocketError ( 152) descendant

142 Internet Direct (Indy) Version 10.1.5


Classes EIdSASLMsg Class

See Also
EIdSocketError ( 152)

EIdSASLException Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdSASLException = class(EIdException);
Description
EIdSASLException is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdSASLMechNeeded Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdSASLMechNeeded = class(EIdSASLException);
Description
EIdSASLMechNeeded is a EIdSASLException ( 143) descendant.

See Also
EIdSASLException ( 143)

EIdSASLMsg Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdSASLMsg = class(EIdException);

Internet Direct (Indy) Version 10.1.5 143


EIdSchedulerException Class Classes

Description
EIdSASLMsg is a EIdException ( 76) descendant.

See Also
EIdException ( 76)

EIdSASLNotSupported Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdSASLNotSupported = class(EIdSASLException);
Description
EIdSASLNotSupported is a EIdSASLException ( 143) descendant.

See Also
EIdSASLException ( 143)

EIdSASLNotValidForProtocol Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
EIdSASLNotValidForProtocol = class(EIdSASLMsg);
Description
EIdSASLNotValidForProtocol is a EIdSASLMsg ( 143) descendant.

See Also
EIdSASLMsg ( 143)

EIdSchedulerException Class
File
IdExceptionCore ( 4625)

Hierarchy

144 Internet Direct (Indy) Version 10.1.5


Classes EIdSilentException Class

Pascal
EIdSchedulerException = class(EIdException);
Description
EIdSchedulerException is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdSchedulerMaxThreadsExceeded Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSchedulerMaxThreadsExceeded = class(EIdSchedulerException);
Description
EIdSchedulerMaxThreadsExceeded is an EIdSchedulerException ( 144) descendant

See Also
EIdSchedulerException ( 144)

EIdSetSizeExceeded Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSetSizeExceeded = class(EIdException);
Description
EIdSetSizeExceeded is an EIdException ( 76) descendant

See Also
EIdException ( 76)

EIdSilentException Class
Exception ( 4733) that behaves like the VCL EAbort ( 4733) exception.

File
IdException ( 4624)

Internet Direct (Indy) Version 10.1.5 145


EIdSMTPReplyError Class Classes

Hierarchy

Pascal
EIdSilentException = class(EIdException);
Description
EIdSilentException is an EIdException ( 76) descendant that represents an exception class which should behave like the VCL
EAbort ( 4733) exception. Use the settings in the IDE to include EIdSilentException in the list of ignored exceptions under Tools ->
Debugger Options.

Notes
An Exception ( 4733) must be handled your application code to avoid being raised at runtime, or in the IDE debugger.

See Also
EIdException ( 76)

EIdSMTPReply Class
Ancestor class for exceptions raised when handling values in SMTP enhanced status code replies.

File
IdReplySMTP ( 4707)

Hierarchy

Pascal
EIdSMTPReply = class(EIdException);
Description
EIdSMTPReply is an EIdException ( 76) descendant that represents the ancestor class for exceptions raised when handling
values in SMTP enhanced status code replies.

See Also
EIdException ( 76)

EIdSMTPReplyError Class
File
IdReplySMTP ( 4707)

Hierarchy

Pascal
EIdSMTPReplyError = class(EIdReplyRFCError);
Description
EIdSMTPReplyError is an EIdReplyRFCError ( 140) descendant that represents an exception raised for selected SMTP response
codes.

146 Internet Direct (Indy) Version 10.1.5


Classes EIdSMTPReplyError Class

EIdSMTPReplyError extends EIdReplyRFCError ( 140) by supporting the numeric and enhanced response codes as well
message text for the exception.

See Also
EIdReplyRFCError ( 140)

EIdSMTPReplyError Members
The following tables list the members exposed by EIdSMTPReplyError.

Properties
Property Description
EnhancedCode ( 148) The enhanced status code for the exception instance.
ErrorCode ( 141)

Methods
Method Description
Create ( 77)
CreateError ( 147) Constructor for the exception instance.
Destroy ( 148) Frees the exception instance.
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.
Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual
Property
read only

EIdSMTPReplyError Methods
The Methods of the EIdSMTPReplyError class are listed here.

Methods
Method Description
CreateError ( 147) Constructor for the exception instance.
Destroy ( 148) Frees the exception instance.

Legend
Constructor
virtual

EIdSMTPReplyError.CreateError Constructor
Constructor for the exception instance.

Pascal
constructor CreateError(
const AErrCode: Integer;
AEnhanced: TIdSMTPEnhancedCode;
const AReplyMessage: string
); reintroduce;

Internet Direct (Indy) Version 10.1.5 147


EIdSMTPReplyError Class Classes

Parameters
Parameters Description
AErrCode Numeric SMTP response code for the exception
AEnhanced The SMTP Enhanced Status Code for the exception.
AReplyMessage The enhanced status code and message text for the exception.

Description
CreateError is the reintroduced constructor for the exception instance.

CreateError calls the inherited CreateError constructor using AErrCode and AReplyMessage as arguments

CreateError initializes the TIdSMTPEnhancedCode ( 2033) instance assigned to the EnhancedCode ( 148) property and sets
the enhanced reply to the value in AReplyMessage.

See Also
EIdSMTPReplyError.EnhancedCode ( 148)

EIdSMTPReplyError.Destroy Destructor
Frees the exception instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the exception instance.

Destroy frees the resources allocated in CreateError ( 147) to the EnhancedCode ( 148) property, and calls the inherited Destroy
method.

See Also
EIdSMTPReplyError.CreateError ( 147)

EIdSMTPReplyError.EnhancedCode ( 148)

EIdSMTPReplyError Properties
The Properties of the EIdSMTPReplyError class are listed here.

Properties
Property Description
EnhancedCode ( 148) The enhanced status code for the exception instance.

Legend
Property
read only

EIdSMTPReplyError.EnhancedCode Property
The enhanced status code for the exception instance.

Pascal
property EnhancedCode: TIdSMTPEnhancedCode;
Description
EnhancedCode is a read-only TIdSMTPEnhancedCode ( 2033) property that represents the enhanced status code for the
exception instance, as described in the Internet Standards documents:

The value in EnhancedCode is assigned when the exception is created in CreateError.

148 Internet Direct (Indy) Version 10.1.5


Classes EIdSMTPServerError Class

See Also
EIdSMTPReplyError.CreateError

EIdSMTPReplyInvalidClass Class
Exception raised when an invalid valid is assigned to the status class in an SMTP enhanced status code reply.

File
IdReplySMTP ( 4707)

Hierarchy

Pascal
EIdSMTPReplyInvalidClass = class(EIdSMTPReply);
Description
EIdSMTPReplyInvalidClass is an EIdSMTPReply descendant that represents the exception raised when an invalid Cardinal value is
assigned to the StatusClass for an SMTP enhanced status code reply.

See Also
EIdSMTPReply

TIdSMTPEnhancedCode.StatusClass

RSSMTPReplyInvalidClass

EIdSMTPReplyInvalidReplyString Class
Exception raised when an invalid value is found in an SMTP enhanced status code reply.

File
IdReplySMTP ( 4707)

Hierarchy

Pascal
EIdSMTPReplyInvalidReplyString = class(EIdSMTPReply);
Description
EIdSMTPReplyInvalidReplyString is an EIdSMTPReply descendant that represents the exception raised when an invalid value is
assigned to the StatusClass, Subject, or Details for an SMTP enhanced status code reply.

EIdSMTPReplyInvalidReplyString is raised in TIdSMTPEnhancedCode.ReplyAsStr.

See Also
EIdSMTPReply

TIdSMTPEnhancedCode.ReplyAsStr

ValidClassChars

Internet Direct (Indy) Version 10.1.5 149


EIdSNPPConnectionRefused Class Classes

EIdSMTPServerError Class
File
IdSMTPServer ( 4721)

Hierarchy

Pascal
EIdSMTPServerError = class(EIdException);
Description
EIdSMTPServerError is a EIdException descendant.

See Also
EIdException

EIdSMTPServerNoRcptTo Class
File
IdSMTPServer ( 4721)

Hierarchy

Pascal
EIdSMTPServerNoRcptTo = class(EIdSMTPServerError);
Description
EIdSMTPServerNoRcptTo is a EIdSMTPServerError descendant.

See Also
EIdSMTPServerError

EIdSNPPConnectionRefused Class
Exception raised when an SNPP client connection cannot be established.

File
IdSNPP ( 4723)

Hierarchy

Pascal
EIdSNPPConnectionRefused = class(EIdReplyRFCError);
Description
EIdSNPPConnectionRefused is an EIdReplyRFCError descendant that represents the exception raised when an SNPP client

150 Internet Direct (Indy) Version 10.1.5


Classes EIdSNPPProtocolError Class

connection cannot be established.

EIdSNPPConnectionRefused may be raised as a result of the SNPP refusing the client connection in TIdSNPP.Connect.

See Also
TIdSNPP.Connect EIdReplyRFCError

EIdSNPPException Class
Ancestor for SNPP exceptions types.

File
IdSNPP ( 4723)

Hierarchy

Pascal
EIdSNPPException = class(EIdException);
Description
EIdSNPPException is an EIdException descendant that represents the exception type used as the ancestor for other SNPP
exceptions, like EIdSNPPNoMultiLineMessages.

See Also
EIdException EIdSNPPNoMultiLineMessages

EIdSNPPNoMultiLineMessages Class
Exception raised when sending a multi-line SNPP message.

File
IdSNPP ( 4723)

Hierarchy

Pascal
EIdSNPPNoMultiLineMessages = class(EIdSNPPException);
Description
EIdSNPPNoMultiLineMessages is an EIdSNPPException descendant that represents the exception raised when an SNPP client
attempts to send a multi-line message in TIdSNPP.SendMessage.

See Also
EIdSNPPException TIdSNPP.SendMessage

EIdSNPPProtocolError Class
Exception raised when handling SNPP Protocol responses.

Internet Direct (Indy) Version 10.1.5 151


EIdSocketError Class Classes

File
IdSNPP ( 4723)

Hierarchy

Pascal
EIdSNPPProtocolError = class(EIdReplyRFCError);
Description
EIdSNPPProtocolError is an EIdReplyRFCError descendant that represents the exception raised when handling SNPP Protocol
responses.

See Also
EIdReplyRFCError

EIdSocketError Class
Exception raised when a socket error occurs while reading or writing using the Internet protocol stack.

File
IdStack ( 4727)

Hierarchy

Pascal
EIdSocketError = class(EIdException);
Description
EIdSocketError is an EIdException descendant that represents exceptions raise when a socket error occurs while reading or writing
using the Internet protocol stack.

EIdSocketError reflects the error number and message returned by the protocol stack for the platform.

See Also
EIdException

EIdSocketError Members
The following tables list the members exposed by EIdSocketError.

Properties
Property Description
LastError ( 154) Error number for the socket exception.

Methods
Method Description
Create ( 77)
CreateError ( 153) Constructor for the object instance.
IfAssigned ( 78) Raises an instance of the exception based on an object reference.
IfFalse ( 78) Raises an instance of the exception based on an expression value.
IfNotAssigned ( 79) Raises an instance of the exception based on an object reference.
IfNotInRange ( 80) Raises an instance of the exception when the value is not in the specified range.
IfTrue ( 80) Raises an instance of the exception based on an expression value.

152 Internet Direct (Indy) Version 10.1.5


Classes EIdSocketError Class

Toss ( 81) Raises the exception class with the specified message.

Legend
Constructor
virtual
Property
read only

EIdSocketError Methods
The Methods of the EIdSocketError class are listed here.

Methods
Method Description
CreateError ( 153) Constructor for the object instance.

Legend
Constructor
virtual

EIdSocketError.CreateError Constructor
Constructor for the object instance.

Pascal
constructor CreateError(
const AErr: Integer;
const AMsg: string
); virtual;
Parameters
Parameters Description
AErr Error number for the socket exception.
AMsg Message text for the socket exception.

Description
CreateError is a virtual constructor for the object instance.

CreateError calls the inherited constructor using the value in AMsg as the content of the exception message. CreateError also sets
the value in the LastError property to the value specified in AErr.

See Also
EIdSocketError.LastError

EIdSocketError Properties
The Properties of the EIdSocketError class are listed here.

Properties
Property Description
LastError ( 154) Error number for the socket exception.

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 153


EIdSocksAuthError Class Classes

EIdSocketError.LastError Property
Error number for the socket exception.

Pascal
property LastError: Integer;
Description
LastError is a read-only Integer property that indicates the error number from the socket exception.

LastError is updated when CreateError is called.

EIdSocketHandleError Class
Ancestor for Indy socket handle errors.

File
IdException ( 4624)

Hierarchy

Pascal
EIdSocketHandleError = class(EIdException);
Description
EIdSocketHandleError is an EIdException descendant that is the ancestor class for Indy TIdSocketHandle errors.

Applications do not generally create instances of EIdSocketHandleError. Use one of the descendant classes that represent the
specific socket error encountered.

See Also
EIdException

EIdPackageSizeTooBig

EIdNotAllBytesSent

EIdCouldNotBindSocket

EIdCanNotBindPortInRange

EIdInvalidPortRange

EIdCannotSetIPVersionWhenConnected

EIdInvalidIPAddress

EIdSocksAuthError Class
File
IdExceptionCore ( 4625)

Hierarchy

154 Internet Direct (Indy) Version 10.1.5


Classes EIdSocksRequestFailed Class

Pascal
EIdSocksAuthError = class(EIdSocksError);
Description
EIdSocksAuthError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksAuthMethodError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksAuthMethodError = class(EIdSocksError);
Description
EIdSocksAuthMethodError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksError = class(EIdException);
Description
EIdSocksError is an EIdException descendant

See Also
EIdException

EIdSocksRequestFailed Class
File
IdExceptionCore ( 4625)

Internet Direct (Indy) Version 10.1.5 155


EIdSocksServerAddressError Class Classes

Hierarchy

Pascal
EIdSocksRequestFailed = class(EIdSocksError);
Description
EIdSocksRequestFailed is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksRequestIdentFailed Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksRequestIdentFailed = class(EIdSocksError);
Description
EIdSocksRequestIdentFailed is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksRequestServerFailed Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksRequestServerFailed = class(EIdSocksError);
Description
EIdSocksRequestServerFailed is an EIdSocksError descendant

See Also
EIdSocksError

156 Internet Direct (Indy) Version 10.1.5


Classes EIdSocksServerConnectionRefusedError

EIdSocksServerAddressError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerAddressError = class(EIdSocksError);
Description
EIdSocksServerAddressError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerCommandError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerCommandError = class(EIdSocksError);
Description
EIdSocksServerCommandError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerConnectionRefusedError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerConnectionRefusedError = class(EIdSocksError);
Description
EIdSocksServerConnectionRefusedError is an EIdSocksError descendant

Internet Direct (Indy) Version 10.1.5 157


EIdSocksServerNetUnreachableError Class Classes

See Also
EIdSocksError

EIdSocksServerGeneralError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerGeneralError = class(EIdSocksError);
Description
EIdSocksServerGeneralError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerHostUnreachableError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerHostUnreachableError = class(EIdSocksError);
Description
EIdSocksServerHostUnreachableError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerNetUnreachableError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerNetUnreachableError = class(EIdSocksError);

158 Internet Direct (Indy) Version 10.1.5


Classes EIdSocksServerTTLExpiredError Class

Description
EIdSocksServerNetUnreachableError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerPermissionError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerPermissionError = class(EIdSocksError);
Description
EIdSocksServerPermissionError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerRespondError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksServerRespondError = class(EIdSocksError);
Description
EIdSocksServerRespondError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksServerTTLExpiredError Class
File
IdExceptionCore ( 4625)

Hierarchy

Internet Direct (Indy) Version 10.1.5 159


EIdSocksSvrInvalidLogin Class Classes

Pascal
EIdSocksServerTTLExpiredError = class(EIdSocksError);
Description
EIdSocksServerTTLExpiredError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSocksSvrAccessDenied Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrAccessDenied = class(EIdSocksSvrException);
Description
EIdSocksSvrAccessDenied is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

EIdSocksSvrException Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrException = class(EIdException);
Description
EIdSocksSvrException is a EIdException descendant.

See Also
EIdException

EIdSocksSvrInvalidLogin Class
File
IdSocksServer ( 4725)

160 Internet Direct (Indy) Version 10.1.5


Classes EIdSocksSvrUnexpectedClose Class

Hierarchy

Pascal
EIdSocksSvrInvalidLogin = class(EIdSocksSvrException);
Description
EIdSocksSvrInvalidLogin is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

EIdSocksSvrNotSupported Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrNotSupported = class(EIdSocksSvrException);
Description
EIdSocksSvrNotSupported is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

EIdSocksSvrSocks5WrongATYP Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrSocks5WrongATYP = class(EIdSocksSvrException);
Description
EIdSocksSvrSocks5WrongATYP is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

Internet Direct (Indy) Version 10.1.5 161


EIdSocksSvrWrongSocksVer Class Classes

EIdSocksSvrUnexpectedClose Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrUnexpectedClose = class(EIdSocksSvrException);
Description
EIdSocksSvrUnexpectedClose is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

EIdSocksSvrWrongSocksCmd Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrWrongSocksCmd = class(EIdSocksSvrException);
Description
EIdSocksSvrWrongSocksCmd is a EIdSocksSvrException descendant.

See Also
EIdSocksSvrException

EIdSocksSvrWrongSocksVer Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
EIdSocksSvrWrongSocksVer = class(EIdSocksSvrException);
Description
EIdSocksSvrWrongSocksVer is a EIdSocksSvrException descendant.

162 Internet Direct (Indy) Version 10.1.5


Classes EIdSSLProtocolReplyError Class

See Also
EIdSocksSvrException

EIdSocksUDPNotSupportedBySOCKSVersion Class
File
IdSocks ( 4724)

Hierarchy

Pascal
EIdSocksUDPNotSupportedBySOCKSVersion = class(EIdException);
Description
EIdSocksUDPNotSupportedBySOCKSVersion is a EIdException descendant

See Also
EIdException

EIdSocksUnknownError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSocksUnknownError = class(EIdSocksError);
Description
EIdSocksUnknownError is an EIdSocksError descendant

See Also
EIdSocksError

EIdSSLProtocolReplyError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdSSLProtocolReplyError = class(EIdException);

Internet Direct (Indy) Version 10.1.5 163


EIdStackInitializationFailed Class Classes

Description
EIdSSLProtocolReplyError is an EIdException descendant

See Also
EIdException

EIdStackError Class
Ancestor for stack exceptions raised in the Indy library.

File
IdStackBSDBase ( 4728)

Hierarchy

Pascal
EIdStackError = class(EIdException);
Description
EIdStackError is an EIdException descendant that is the ancestor for stack

Exceptions
Exceptions Description
general exception type, instead of the more specialized
instances like

Example
try
// ...
except
on E: EIdStackError do HandleStackException(E);
on E: EIdIPVersionUnsupported do HandleIPVersionException(E);
// ...
end;
See Also
EIdException

EIdStackInitializationFailed

EIdStackSetSizeExceeded

EIdIPVersionUnsupported

EIdStackInitializationFailed Class
Exception raised when the protocol stack cannot be initialized.

File
IdStackBSDBase ( 4728)

Hierarchy

164 Internet Direct (Indy) Version 10.1.5


Classes EIdTCPConnectionError Class

Pascal
EIdStackInitializationFailed = class(EIdStackError);
Description
EIdStackInitializationFailed is an EIdStackError descendant that represent the exception raised when the protocol stack cannot be
initialized for the platform or Operating System hosting the Indy library.

EIdStackInitializationFailed is created in the constructor for TIdStackWindows when the protocol stack cannot be loaded and/or
started using WSAStartup from the Windows API.

EIdStackInitializationFailed is created with the exception message defined in the resource string RSWinsockInitializationError.

See Also
EIdStackError

RSWinsockInitializationError

TIdStackWindows.Create

EIdStackSetSizeExceeded Class
Exception raised when the number of allocated socket handles exceeds the limit for the protocol stack.

File
IdStackBSDBase ( 4728)

Hierarchy

Pascal
EIdStackSetSizeExceeded = class(EIdStackError);
Description
EIdStackSetSizeExceeded is an EIdStackError descendant raised when the number of allocated socket handles for the protocol
stack exceeds the limit for the platform or Operating System hosting the Indy Library.

EIdStackSetSizeExceeded is raised when adding a TIdStackSocketHandle socket handle instance to the TIdSocketListLinux or
TIdSocketListWindows socket lists.

EIdStackSetSizeExceeded is raised with the exception message defined in the resource string RSSetSizeExceeded.

See Also
EIdStackError

RSSetSizeExceeded

TIdStackSocketHandle

TIdSocketListLinux.Add

TIdSocketListWindows.Add

EIdTCPConnectionError Class
File
IdExceptionCore ( 4625)

Internet Direct (Indy) Version 10.1.5 165


EIdTCPServerError Class Classes

Hierarchy

Pascal
EIdTCPConnectionError = class(EIdException);
Description
EIdTCPConnectionError is an EIdException descendant

See Also
EIdException

EIdTCPNoOnExecute Class
Exception raised when OnExecute has not been assigned for TIdTCPServer.

File
IdTCPServer ( 4741)

Hierarchy

Pascal
EIdTCPNoOnExecute = class(EIdTCPServerError);
Description
EIdTCPNoOnExecute is a EIdTCPServerError descendant that represents the exception raised when the event handler has not
been assigned for the TIdTCPServer.OnExecute property.

EIdTCPNoOnExecute is raised a run-time when the Active property for TIdTCPServer is changed from False to True, and the
OnExecute event handler has not been assigned.

See Also
EIdTCPServerError TIdTCPServer.OnExecute TIdCustomTCPServer.OnExecute TIdCustomTCPServer.Active

EIdTCPServerError Class
Ancestor for TCP server exceptions.

File
IdCustomTCPServer ( 4609)

Hierarchy

Pascal
EIdTCPServerError = class(EIdException);
Description
EIdTCPServerError is a EIdException descendant that is the ancestor for TCP server exceptions in the Indy library, like
EIdTCPNoOnExecute and EIdTerminateThreadTimeout.

166 Internet Direct (Indy) Version 10.1.5


Classes EIdTelnetServerOnDataAvailableIsNil Class

See Also
EIdException

EIdTCPNoOnExecute

EIdTerminateThreadTimeout

EIdTelnetClientConnectError Class
Exception for Telnet connection errors.

File
IdTelnet ( 4741)

Hierarchy

Pascal
EIdTelnetClientConnectError = class(EIdTelnetError);
Description
EIdTelnetClientConnectError is an EIdTelnetError descendant that represents the exception raised when an error occurs in
TIdTelnet.Connect.

See Also
EIdTelnetError

TIdTelnet.Connect

EIdTelnetError Class
Ancestor for Indy Telnet exceptions.

File
IdTelnet ( 4741)

Hierarchy

Pascal
EIdTelnetError = class(EIdException);
Description
EIdTelnetError is an EIdException descendant that is the ancestor class for Indy Telnet exceptions.

See Also
EIdTelnetClientConnectError

EIdTelnetServerOnDataAvailableIsNil

Internet Direct (Indy) Version 10.1.5 167


EIdTextInvalidCount Class Classes

EIdTelnetServerOnDataAvailableIsNil Class
Exception for Telnet OnDataAvailable event notification.

File
IdTelnet ( 4741)

Hierarchy

Pascal
EIdTelnetServerOnDataAvailableIsNil = class(EIdTelnetError);
Description
EIdTelnetServerOnDataAvailableIsNil is an EIdTelnetError exception descendant raised when TIdTelnet.OnDataAvailable is
triggered and no event handler has been assigned for the notification.

See Also
EIdTelnetError

TIdTelnet.OnDataAvailable

EIdTerminateThreadTimeout Class
Exception raised while waiting for termination of active threads.

File
IdCustomTCPServer ( 4609)

Hierarchy

Pascal
EIdTerminateThreadTimeout = class(EIdTCPServerError);
Description
EIdTerminateThreadTimeout is an EIdTCPServerError descendant that represents the exception raised when a timeout occurs
while waiting for termination of active threads in TIdTCPServer.

EIdTerminateThreadTimeout can be raised when attempting to terminate all active threads when the server is no longer active, and
the timeout period in TerminateWaitTime has elapsed.

See Also
EIdTCPServerError

EIdTextInvalidCount Class
Indicates an error creating text message parts.

File
IdMessage ( 4682)

168 Internet Direct (Indy) Version 10.1.5


Classes EIdTFTPException Class

Hierarchy

Pascal
EIdTextInvalidCount = class(EIdMessageException);
Description
EIdTextInvalidCount is a EIdMessageException exception descendant that identifies when a error has occurred while creating
TIdText portions of TIdMessage during message transmission.

EIdTextInvalidCount is the exception raised when headers are generated for a message in TIdMessage.GenerateHeader.

See Also
EIdMessageException

TIdSMTP.Send

TIdMessage.GenerateHeader

EIdTFTPAccessViolation Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPAccessViolation = class(EIdTFTPException);
Description
EIdTFTPAccessViolation is an EIdTFTPException descendant

See Also
EIdTFTPException

EIdTFTPAllocationExceeded Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPAllocationExceeded = class(EIdTFTPException);
Description
EIdTFTPAllocationExceeded is an EIdTFTPException descendant

See Also
EIdTFTPException

Internet Direct (Indy) Version 10.1.5 169


EIdTFTPFileNotFound Class Classes

EIdTFTPException Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPException = class(EIdException);
Description
EIdTFTPException is an EIdException descendant

See Also
EIdException

EIdTFTPFileAlreadyExists Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPFileAlreadyExists = class(EIdTFTPException);
Description
EIdTFTPFileAlreadyExists is an EIdTFTPException descendant

See Also
EIdTFTPException

EIdTFTPFileNotFound Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPFileNotFound = class(EIdTFTPException);
Description
EIdTFTPFileNotFound is an EIdTFTPException descendant

170 Internet Direct (Indy) Version 10.1.5


Classes EIdTFTPOptionNegotiationFailed Class

See Also
EIdTFTPException

EIdTFTPIllegalOperation Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPIllegalOperation = class(EIdTFTPException);
Description
EIdTFTPIllegalOperation is an EIdTFTPException descendant

See Also
EIdTFTPException

EIdTFTPNoSuchUser Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPNoSuchUser = class(EIdTFTPException);
Description
EIdTFTPNoSuchUser is an EIdTFTPException descendant

See Also
EIdTFTPException

EIdTFTPOptionNegotiationFailed Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPOptionNegotiationFailed = class(EIdTFTPException);

Internet Direct (Indy) Version 10.1.5 171


EIdThreadException Class Classes

Description
EIdTFTPOptionNegotiationFailed is an EIdTFTPException descendant

See Also
EIdTFTPException

EIdTFTPUnknownTransferID Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTFTPUnknownTransferID = class(EIdTFTPException);
Description
EIdTFTPUnknownTransferID is a EIdTFTPException descendant

See Also
EIdTFTPException

EIdThreadClassNotSpecified Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdThreadClassNotSpecified = class(EIdThreadMgrError);
Description
EIdThreadClassNotSpecified is a EIdThreadMgrError descendant

See Also
EIdThreadMgrError

EIdThreadException Class
Ancestor for exception raised in the Indy threading framework.

File
IdThread ( 4744)

Hierarchy

172 Internet Direct (Indy) Version 10.1.5


Classes EIdTLSClientCanNotSetWhileActive Class

Pascal
EIdThreadException = class(EIdException);
Description
EIdThreadException is a EIdException descendant that represents the ancestor class for exception raised by the Indy threading
framework. EIdThreadException is used as the ancestor for more specfic exception types like EIdThreadTerminateAndWaitFor.

See Also
EIdException

EIdThreadTerminateAndWaitFor

EIdThreadMgrError Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdThreadMgrError = class(EIdException);
Description
EIdThreadMgrError is a EIdException descendant

See Also
EIdException

EIdThreadTerminateAndWaitFor Class
Exception raised when waiting for a terminating thread that may have already been freed.

File
IdThread ( 4744)

Hierarchy

Pascal
EIdThreadTerminateAndWaitFor = class(EIdThreadException);
Description
EIdThreadTerminateAndWaitFor is a EIdThreadException descendant that represents an exception type raised when waiting for a
terminating thread that may have already been freed. EIdThreadTerminateAndWaitFor is raised when TerminateAndWaitFor is
called for a thread instances, and FreeOnTerminate contains True.

See Also
EIdThreadException

TIdThread.TerminateAndWaitFor

Internet Direct (Indy) Version 10.1.5 173


EIdTLSClientException Class Classes

EIdTLSClientCanNotSetWhileActive Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientCanNotSetWhileActive = class(EIdTLSClientException);
Description
EIdTLSClientCanNotSetWhileActive is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSClientCanNotSetWhileConnected Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientCanNotSetWhileConnected = class(EIdTLSClientException);
Description
EIdTLSClientCanNotSetWhileConnected is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSClientException Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientException = class(EIdException);
Description
EIdTLSClientException is a EIdException descendant.

174 Internet Direct (Indy) Version 10.1.5


Classes EIdTLSClientTLSNegCmdFailed Class

See Also
EIdException

EIdTLSClientSSLIOHandlerRequred Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientSSLIOHandlerRequred = class(EIdTLSClientException);
Description
EIdTLSClientSSLIOHandlerRequred is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSClientTLSHandShakeFailed Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientTLSHandShakeFailed = class(EIdTLSClientException);
Description
EIdTLSClientTLSHandShakeFailed is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSClientTLSNegCmdFailed Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientTLSNegCmdFailed = class(EIdTLSClientException);

Internet Direct (Indy) Version 10.1.5 175


EIdTLSServerSSLIOHandlerRequired Class Classes

Description
EIdTLSClientTLSNegCmdFailed is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSClientTLSNotAvailable Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSClientTLSNotAvailable = class(EIdTLSClientException);
Description
EIdTLSClientTLSNotAvailable is a EIdTLSClientException descendant.

See Also
EIdTLSClientException

EIdTLSServerException Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
EIdTLSServerException = class(EIdException);
Description
EIdTLSServerException is a EIdException descendant.

See Also
EIdException

EIdTLSServerSSLIOHandlerRequired Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

176 Internet Direct (Indy) Version 10.1.5


Classes EIdTransparentProxyCircularLink Class

Pascal
EIdTLSServerSSLIOHandlerRequired = class(EIdTLSServerException);
Description
EIdTLSServerSSLIOHandlerRequired is a EIdTLSServerException descendant.

See Also
EIdTLSServerException

EIdTooMuchDataInBuffer Class
Exception raised when writing data to the buffer.

File
IdBuffer ( 4588)

Hierarchy

Pascal
EIdTooMuchDataInBuffer = class(EIdException);
Description
EIdTooMuchDataInBuffer is an EIdException descendant that represents the exception raised when writing data to the buffer.

EIdTooMuchDataInBuffer indicates the write operation would cause the internal storage for the buffer to exceed the maximum size
supported for the host platform or operating system.

See Also
EIdException

TIdBuffer.Bytes

TIdBuffer.Write

EIdTransparentProxyCantBind Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EIdTransparentProxyCantBind = class(EIdException);
Description
EIdTransparentProxyCantBind is a EIdException descendant

See Also
EIdException

Internet Direct (Indy) Version 10.1.5 177


EIdUDPException Class Classes

EIdTransparentProxyCircularLink Class
File
IdCustomTransparentProxy ( 4609)

Hierarchy

Pascal
EIdTransparentProxyCircularLink = class(EIdException);
Description
EIdTransparentProxyCircularLink EIdException descendant

See Also
EIdException

EIdTransparentProxyUDPNotSupported Class
File
IdCustomTransparentProxy ( 4609)

Hierarchy

Pascal
EIdTransparentProxyUDPNotSupported = class(EIdException);
Description
EIdTransparentProxyUDPNotSupported is a EIdException descendant

See Also
EIdException

EIdUDPException Class
Ancestor class for Indy UDP exceptions.

File
IdUDPBase ( 4750)

Hierarchy

Pascal
EIdUDPException = class(EIdException);
Description
EIdUDPException is an EIdException descendant that is the ancestor class for UDP exceptions raised in the Indy library.

178 Internet Direct (Indy) Version 10.1.5


Classes EIdUnknownProtocol Class

See Also
EIdUDPReceiveErrorZeroBytes

TIdUDPBase

TIdUDPClient

EIdUDPReceiveErrorZeroBytes Class
Exception raised when no data was read from the UDP connection.

File
IdUDPBase ( 4750)

Hierarchy

Pascal
EIdUDPReceiveErrorZeroBytes = class(EIdUDPException);
Description
EIdUDPReceiveErrorZeroBytes is an EIdUDPException exception descendant raised when an error occurs while reading data from
the a peer using the UDP protocol.

EIdUDPReceiveErrorZeroBytes is raised with the message identified in RSIPMCastReceiveError0 when the listener thread for
TIdIPMCastServer is unabled to read the datagram for an incoming peer connection.

See Also
EIdUDPException

EIdUDPServerException Class
Ancestor class for Indy UDP server exceptions.

File
IdUDPServer ( 4751)

Hierarchy

Pascal
EIdUDPServerException = class(EIdUDPException);
Description
EIdUDPServerException is an EIdUDPException descendant that is the ancestor class for Indy UDP server exceptions.

See Also
EIdUDPException

Internet Direct (Indy) Version 10.1.5 179


EIdURIException Class Classes

EIdUnknownProtocol Class
Exception raised for an invalid protocol in the URL for a HTTP request.

File
IdHTTP ( 4662)

Hierarchy

Pascal
EIdUnknownProtocol = class(EIdException);
Description
EIdUnknownProtocol is an EIdException decendant that represents an exception raised when an unknown error occurs during
preparation of an HTTP request.

EIdUnknownProtocol is normally raised when TIdHTTP is used to prepare a request having a protocol specifier other than 'http:' or
'https:' in the URL for the request.

See Also
EIdException

EIdUnrecognizedReply Class
File
IdPOP3 ( 4696)

Hierarchy

Pascal
EIdUnrecognizedReply = class(EIdPOP3Exception);
Description
EIdUnrecognizedReply is a EIdPOP3Exception descendant.

See Also
EIdPOP3Exception

EIdURIException Class
Exception raised when an error in encountered in URI component values.

File
IdURI ( 4753)

Hierarchy

180 Internet Direct (Indy) Version 10.1.5


Classes EInvalidSyslogMessage Class

Pascal
EIdURIException = class(EIdException);
Description
EIdURIException is a EIdException descendant that represents an exception raised when an error in encountered while building the
contents of the URI from it's components in TIdURI.GetFullURI.

See Also
EIdException TIdURI.GetFullURI

EIdUserPassProviderUnassigned Class
File
IdSASLUserPass ( 4715)

Hierarchy

Pascal
EIdUserPassProviderUnassigned = class(EIdException);
Description
EIdUserPassProviderUnassigned is a EIdException descendant.

See Also
EIdException

EIdWrapperException Class
Exception used as a wrapper for native exceptions raised on the .Net platform.

File
IdException ( 4624)

Hierarchy

Pascal
EIdWrapperException = class(EIdException);
Description
EIdWrapperException is an EIdException descendant that represents the exception type used as a wrapper for native exceptions
raised on the .Net platform.

EIdWrapperException is used in BuildException for any native exception type derived from a type other than
System.Net.Sockets.SocketException. EIdSocketError is used for exceptions derived from System.Net.Sockets.SocketException.

See Also
EIdException

Internet Direct (Indy) Version 10.1.5 181


EmUTF7Encode Class Classes

EInvalidSyslogMessage Class
File
IdExceptionCore ( 4625)

Hierarchy

Pascal
EInvalidSyslogMessage = class(EIdException);
Description
EInvalidSyslogMessage is a EIdException descendant

See Also
EIdException

EmUTF7Decode Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
EmUTF7Decode = class(EmUTF7Error);
Description
EmUTF7Decode is a EmUTF7Error descendant.

See Also
EmUTF7Error

EmUTF7Encode Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
EmUTF7Encode = class(EmUTF7Error);
Description
EmUTF7Encode is a EmUTF7Error descendant.

182 Internet Direct (Indy) Version 10.1.5


Classes EZlibError Class

See Also
EmUTF7Error

EmUTF7Error Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
EmUTF7Error = class(EIdSilentException);
Description
EmUTF7Error is a EIdSilentException descendant.

See Also
EIdSilentException

EZlibError Class
File
IdZLib ( 4757)

Hierarchy

Pascal
EZlibError = class(Exception);
Description
EZlibError is a Exception ( 4733) descendant.

See Also
Exception ( 4733)

EZlibError Members
The following tables list the members exposed by EZlibError.

Properties
Property Description
ErrorCode ( 184)

Methods
Method Description
CreateError ( 184)

Internet Direct (Indy) Version 10.1.5 183


TAAAARecord Class Classes

Legend
Constructor
Property
read only

EZlibError Methods
The Methods of the EZlibError class are listed here.

Methods
Method Description
CreateError ( 184)

Legend
Constructor

EZlibError.CreateError Constructor
Pascal
constructor CreateError(
const AError: Integer
);
Parameters
Parameters Description
AError Scope is const. Type is Integer.

Description
CreateError is a constructor for the object instance.

EZlibError Properties
The Properties of the EZlibError class are listed here.

Properties
Property Description
ErrorCode ( 184)

Legend
Property
read only

EZlibError.ErrorCode Property
Pascal
property ErrorCode: Integer;
Description
ErrorCode is a Public read-only Integer property.

TAAAARecord Class
Implements a DNS AAAA resource record type for IPv6 addresses found in an DNS query response.

184 Internet Direct (Indy) Version 10.1.5


Classes TAAAARecord Class

File
IdDNSResolver ( 4620)

Hierarchy

Pascal
TAAAARecord = class(TResultRecord);
Description
TAAAARecord is a TResultRecord ( 2682) descendant that represents the AAAA resource record type in DNS, as described in
the Internet Standards documents:

RFC 1034 - Domain Names Concepts and Facilities

RFC 1035 - Domain Names Implementation and Specification

RFC 1884 - IP Version 6 Addressing Architecture

RFC 1886 - DNS Extensions to support IP version 6

AAAA resource record types allow storage of IPv6 addresses in DNS, and allow DNS servers to perform address lookups based on
the 128-bit IP address values.

AAAA resource records are included in DNS queries for the IP6.INT Domain, and may also be included in any query that performs
additional section processing to locate IPv4 addresses. (Both IPv4 and IPv6 are now required).

The AAAA resource record type is specific to the Internet class of resource records.

TAAAARecords resource records may appear in the QueryResult for TIdDNSResolver ( 600) when the value qtAAAA is used in
its QueryType property.

The Address ( 187) property in TAAAARecord is used to store the string representation of the 128-bit IPv6 address as found in the
RDATA for the resource record.

Values in Address ( 187) are in network byte order (high-order byte first), as described in the Intenet Standards document:

RFC 1884 - IP Version 6 Addressing Architecture

The IP6.INT Domain is defined to look up a record given an address. The intent of this domain is to provide a way of mapping an
IPv6 address to a host name, although it may be used for other purposes as well. The domain is rooted at IP6.INT.

An IPv6 address is represented as a name in the IP6.INT domain by a sequence of nibbles separated by dots with the suffix
".IP6.INT". The sequence of nibbles is encoded in reverse order, i.e. the low-order nibble is encoded first, followed by the next
low-order nibble and so on. Each nibble is represented by a hexadecimal digit. For example, the inverse lookup domain name
corresponding to the address

4321:0:1:2:3:4:567:89ab
would be

b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.INT.
All existing query types that perform type A additional section processing, i.e. name server (NS), mail exchange (MX) and mailbox
(MB) query types, must be redefined to perform both type A and type AAAA additional section processing. These new definitions
mean that a name server must add any relevant IPv4 addresses and any relevant IPv6 addresses available locally to the additional
section of a response when processing any one of the above queries.

As a result, TIdDNSResolver ( 600) can include TARecord ( 189) and TAAAARecord resource record types any time a query is
issued for these query types.

See Also
TResultRecord ( 2682) TQUeryResult.Add TIdDNSResolver.QueryResult ( 607) TIdDNSResolver.QueryType ( 607)

Internet Direct (Indy) Version 10.1.5 185


TAAAARecord Class Classes

TAAAARecord Members
The following tables list the members exposed by TAAAARecord.

Properties
Property Description
Address ( 187) Respresents the 128-bit IPv6 address for the resource record.
Name ( 2686)
RData ( 2686)
RDataLength ( 2686)
RecClass ( 2686)
RecType ( 2686)
Section ( 2687)
TTL ( 2687)

Methods
Method Description
Assign ( 186)
Destroy ( 2685)
Parse ( 187) Converts and populates the value for the Address ( 187) property.

Legend
Method
virtual
Property
read only

TAAAARecord Methods
The Methods of the TAAAARecord class are listed here.

Methods
Method Description
Assign ( 186)
Parse ( 187) Converts and populates the value for the Address ( 187) property.

Legend
Method
virtual

TAAAARecord.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

186 Internet Direct (Indy) Version 10.1.5


Classes TAAAARecord Class

TAAAARecord.Parse Method
Converts and populates the value for the Address ( 187) property.

Pascal
procedure Parse(
CompleteMessage: TIdBytes;
APos: Integer
); override;
Parameters
Parameters Description
CompleteMessage
APos

Description
Parse is an overridden method in TAAAARecord ( 184) used convert and populate values found in CompleteMessage for use in
the Address ( 187) property.

Parse calls the inherited method prior to parsing values specific to the AAAA resource record type.

Parse performs no processing if the value in RData ( 2686) is less than 15 bytes long.

Parse converts the values in RData ( 2686) to an IPv6 address, an converts the 128-bit IP address from its Network byte ordering
to the Host-specific byte ordering using the global stack instance in GStack ( 3126).

The string representation for the IPv6 address is stored in the Address ( 187) property.

See Also
RData ( 2686) Address ( 187) BytesToIPv6 ( 2725) GStack ( 3126) TIdStack.NetworkToHost ( 2172)

TAAAARecord Properties
The Properties of the TAAAARecord class are listed here.

Properties
Property Description
Address ( 187) Respresents the 128-bit IPv6 address for the resource record.

Legend
Property
read only

TAAAARecord.Address Property
Respresents the 128-bit IPv6 address for the resource record.

Pascal
property Address: string;
Description
Address is a read-only String property that contains the string representation of the 128-bit IPv6 address for the resource record
type.

Values in Address are in network byte order (high-order byte first), as described in the Internet Standards document:

RFC 1884 - IP Version 6 Addressing Architecture

Values in Address are assigned when Parse ( 187) is called using the raw byte values for the resource record in
TQueryResult.Add ( 2670).

Internet Direct (Indy) Version 10.1.5 187


TAppendFileStream Class Classes

See Also
TQueryResult.Add ( 2670) TIdDNSResolver.QueryResult ( 607) TIdDNSResolver.QueryType ( 607)
TIdDNSResolver.FillResult ( 603) TIdDNSResolver.ParseAnswers ( 604)

TAppendFileStream Class
Implements a file stream used to append content to a file in the local file system.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TAppendFileStream = class(TIdFileStream);
Description
TAppendFileStream is a TIdFileStream ( 3026) descendant that implements a file stream used to append content to a file in the
local file system.

TAppendFileStream implements a constructor that accepts a file name representing the storage for the file stream.

The constructor ensures that the underlying file stream is opened or created using the correct file mode and sharing mode for the
specified file name. The constructor also positions the stream at its end when the file already exists.

Use TFileCreateStream ( 212) when a file stream is required that always recreates the underlying file storage for the stream.

Use TReadFileExclusiveStream ( 2676) or TReadFileNonExclusiveStream ( 2677) to create ( 189) file streams with the desired
file sharing modes enabled.

See Also
Create ( 189)

TIdFileStream ( 3026)

TFileCreateStream ( 212)

TReadFileExclusiveStream ( 2676)

TReadFileNonExclusiveStream ( 2677)

TAppendFileStream Members
The following tables list the members exposed by TAppendFileStream.

Methods
Method Description
Create ( 189) Constructor for the object instance.

Legend
Constructor

TAppendFileStream Methods
The Methods of the TAppendFileStream class are listed here.

188 Internet Direct (Indy) Version 10.1.5


Classes TARecord Class

Methods
Method Description
Create ( 189) Constructor for the object instance.

Legend
Constructor

TAppendFileStream.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
const AFile: String
);
Parameters
Parameters Description
AFile File name used to access and store content for the file stream.

Description
Create is the constructor for the object instance.

AFile is the file name in the local file system used to access and store the content for the file stream.

If the file specified in AFile does not already exist, it is created by calling the inherited constructor with the following File mode:

fmCreate ( 3206)

When AFile already exists on the local file system, the file stream is created by calling the inherited constructor using the following
File and Sharing modes OR'd togehter:

fmOpenReadWrite ( 3207)
fmShareDenyWrite ( 3208)

When an existing file is specified in AFile, the file stream is positioned at its' end (using the indicated Size for the stream). This
ensures that the newly created stream will append any output written to the stream after existing content.

TARecord Class
Represents a resource record returned by a DNS query that includes Host Address record types.

File
IdDNSResolver ( 4620)

Hierarchy

Pascal
TARecord = class(TRDATARecord);
Description
TARecord is a TRDATARecord ( 2673) descendant that represents a resource record returned in the results for a DNS query.
TARecord is the collection item created to represent a resource resource returned when TIDNSResolver.QueryRecords includes

Internet Direct (Indy) Version 10.1.5 189


TCNRecord Class Classes

the value qtA for Address resource records.

An Address resource record is used to provide the Internet address of a host server in dotted-decimal form. For example:
"10.2.0.52" or "192.0.5.6".

An Address resource record uses the same DNS packet layout as other TResultRecord ( 2682)-based responses, but extends the
use of RData ( 2686) to include the following definition and format:

ADDRESS - 32-bit Internet IP address


Hosts that have multiple Internet addresses will have multiple Address resource records.

See Also
TResultRecord ( 2682) TRDATARecord ( 2673) TQueryResult ( 2669) TIdDNSResolver.QueryRecords

TCNRecord Class
Represents a resource record returned from a DNS query that includes Canonical Name ( 2686) resource record types.

File
IdDNSResolver ( 4620)

Hierarchy

Pascal
TCNRecord = class(TNAMERecord);
Description
TCNRecord is a TNameRecord ( 2652) descendant that represents a resource record returned in the results for a DNS query.
TCNRecord is a collection item created to represent a resource resource returned when TIDNSResolver.QueryRecords includes
the value qtCN for Mail Exchange resource records.

Canonical Name ( 2686) resoure records are used to indicate the canonical or primary name for the owner. Canonical Name (
2686) resource records cause no additional section processing, but Canonical Names may choose to restart the query at the
Canonical Name ( 2686) in certain cases. See the Canonical Name ( 2686) resoure records uses the same DNS packet layout
as other TResultRecord ( 2682)-based responses, but extends the use of RData ( 2686) to include the following definition and
format:

CNAME - Domain name which specifies the canonical or primary name for the owner. The owner name is an alias.

TCNRecord extends TNameRecord ( 2652) to implement the specifics of accessing RData ( 2686) values as properties,

190 Internet Direct (Indy) Version 10.1.5


Classes TCompressionStream Class

including HostName ( 2654). HostName ( 2654) is used to store the CNAMe value from the resource record.

TCNRecord also overrides the Parse ( 2653) method to read the values in RData ( 2686) into their property counterparts.

See Also
TNameRecord ( 2652) TResultRecord ( 2682) TQueryResult ( 2669) TIdDNSResolver.QueryRecords

TCompressionStream Class
File
IdZLib ( 4757)

Hierarchy

Pascal
TCompressionStream = class(TCustomZlibStream);
Description
TCompressionStream is a TCustomZlibStream ( 196) descendant.

See Also
TCustomZlibStream ( 196)

TCompressionStream Members
The following tables list the members exposed by TCompressionStream.

Properties
Property Description
CompressionRate ( 193)
OnProgress ( 193)

Methods
Method Description
Create ( 192)
Destroy ( 192)
Seek ( 192)

Legend
Constructor
virtual
Property
read only

TCompressionStream Methods
The Methods of the TCompressionStream class are listed here.

Methods
Method Description
Create ( 192)
Destroy ( 192)
Seek ( 192)

Internet Direct (Indy) Version 10.1.5 191


TCompressionStream Class Classes

Legend
Constructor
virtual

TCompressionStream.Create Constructor
Pascal
constructor Create(
CompressionLevel: TCompressionLevel;
Dest: TStream
);
Parameters
Parameters Description
CompressionLevel Type is TCompressionLevel ( 2941).
Dest Type is TStream.

Description
Create is a constructor for the object instance.

TCompressionStream.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TCompressionStream.Seek Method
Pascal
function Seek(
Offset: Longint;
Origin: Word
): Longint; override;
Parameters
Parameters Description
Offset Type is Longint.
Origin Type is Word.

Returns
Longint

Description
Seek is a overridden method.

Seek returns a Longint value.

TCompressionStream Properties
The Properties of the TCompressionStream class are listed here.

Properties
Property Description
CompressionRate ( 193)
OnProgress ( 193)

192 Internet Direct (Indy) Version 10.1.5


Classes TCriticalSection Class

Legend
Property
read only

TCompressionStream.CompressionRate Property
Pascal
property CompressionRate: Single;
Description
CompressionRate is a Public read-only Single property.

TCompressionStream.OnProgress Event
Pascal
property OnProgress;
Description
OnProgress is a Public property.

TCriticalSection Class
Implements the ancestor for critical section classes in Indy.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TCriticalSection = class(TObject);
Description
TCriticalSection is a TObject descendant that implements the ancestor class for TIdCriticalSection ( 404) on the .Net platform.

TCriticalSection implements methods that emulate the behavior of Win32 Critical Sections on the .Net platform using methods from
System.Threading.Monitor in the Framework Class Library (FCL).

On the Windows and Linux platforms, TCriticalSection is declared as an alias for the TCriticalSection type in the SyncObjs.pas unit.
Indy applications, and classes, normally use TIdCriticalSection ( 404) which isolates these platform dependencies.

See Also
TIdCriticalSection ( 404)

IndySupport ( 15)

TCriticalSection Members
The following tables list the members exposed by TCriticalSection.

Methods
Method Description
Acquire ( 194) Enables resource protection in a critical section.

Internet Direct (Indy) Version 10.1.5 193


TCriticalSection Class Classes

Enter ( 194) Starts resource protection in a critical section.


Leave ( 195) Stops resource protection in a critical section.
Release ( 195) Disables resource protection in a critical section.
TryEnter ( 195) Attempts to start resource protection for the critical section.

Legend
Method
virtual

TCriticalSection Methods
The Methods of the TCriticalSection class are listed here.

Methods
Method Description
Acquire ( 194) Enables resource protection in a critical section.
Enter ( 194) Starts resource protection in a critical section.
Leave ( 195) Stops resource protection in a critical section.
Release ( 195) Disables resource protection in a critical section.
TryEnter ( 195) Attempts to start resource protection for the critical section.

Legend
Method
virtual

TCriticalSection.Acquire Method
Enables resource protection in a critical section.

Pascal
procedure Acquire; virtual;
Description
Acquire is a virtual procedure used to start resource protection for the critical section on the .Net platform.

Acquire calls the Enter ( 194) method.

Use Release ( 195) to free the resource protection for the critical section.

See Also
Enter ( 194)

Release ( 195)

Leave ( 195)

TCriticalSection.Enter Method
Starts resource protection in a critical section.

Pascal
procedure Enter;
Description
Enter is a procedure used to to start resource protection for the critical section on the .Net platform.

Enter calls System.Threading.Monitor.Enter method in the FCL using the current object instance as an argument.

Use Release ( 195) or Leave ( 195) to free the resource protection for the critical section.

194 Internet Direct (Indy) Version 10.1.5


Classes TCriticalSection Class

See Also
Release ( 195)

Leave ( 195)

TCriticalSection.Leave Method
Stops resource protection in a critical section.

Pascal
procedure Leave;
Description
Leave is a procedure used to stop resource protection for the critical section on the .Net platform.

Leave calls the System.Threading.Monitor.Exit method in the FCL using the current object instance as an argument.

Use Enter ( 194) or Acquire ( 194) to begin resource protection for the critical section.

See Also
Enter ( 194)

Acquire ( 194)

Release ( 195)

TCriticalSection.Release Method
Disables resource protection in a critical section.

Pascal
procedure Release; virtual;
Description
Release is a virtual procedure used to stop resource protection for the critical section on the .Net platform.

Release calls the Leave ( 195) method in its implementation.

Use Enter ( 194) or Acquire ( 194) to begin resource protection for the critical section.

See Also
Enter ( 194)

Acquire ( 194)

Leave ( 195)

TCriticalSection.TryEnter Method
Attempts to start resource protection for the critical section.

Pascal
function TryEnter: Boolean;
Returns
Boolean - True on success.

Description
TryEnter is a Boolean function that attempts to start resource protection for the critical section on the .Net platform.

TryEnter calls the System.Threading.Monitor.TryEnter method in the FCL using the current object instance as an argument.

Internet Direct (Indy) Version 10.1.5 195


TDecompressionStream Class Classes

TryEnter returns True if resource protection was successfully initiated for the current object instance.

Use Release ( 195) or Leave ( 195) to stop resource protection for the critical section.

See Also
Enter ( 194)

Leave ( 195)

Release ( 195)

TCustomZlibStream Class
File
IdZLib ( 4757)

Hierarchy

Pascal
TCustomZlibStream = class(TStream);
Description
TCustomZlibStream is a TStream descendant.

See Also
TStream

TDecompressionStream Class
File
IdZLib ( 4757)

Hierarchy

Pascal
TDecompressionStream = class(TCustomZlibStream);
Description
TDecompressionStream is a TCustomZlibStream ( 196) descendant.

See Also
TCustomZlibStream ( 196)

TDecompressionStream Members
The following tables list the members exposed by TDecompressionStream.

Properties
Property Description
OnProgress ( 198)

196 Internet Direct (Indy) Version 10.1.5


Classes TDecompressionStream Class

Methods
Method Description
Create ( 197)
Destroy ( 197)
Seek ( 197)

Legend
Constructor
virtual
Property

TDecompressionStream Methods
The Methods of the TDecompressionStream class are listed here.

Methods
Method Description
Create ( 197)
Destroy ( 197)
Seek ( 197)

Legend
Constructor
virtual

TDecompressionStream.Create Constructor
Pascal
constructor Create(
Source: TStream
);
Parameters
Parameters Description
Source Type is TStream.

Description
Create is a constructor for the object instance.

TDecompressionStream.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TDecompressionStream.Seek Method
Pascal
function Seek(
Offset: Longint;
Origin: Word
): Longint; override;

Internet Direct (Indy) Version 10.1.5 197


TDNSHeader Class Classes

Parameters
Parameters Description
Offset Type is Longint.
Origin Type is Word.

Returns
Longint

Description
Seek is a overridden method.

Seek returns a Longint value.

TDecompressionStream Properties
The Properties of the TDecompressionStream class are listed here.

Properties
Property Description
OnProgress ( 198)

Legend
Property

TDecompressionStream.OnProgress Event
Pascal
property OnProgress;
Description
OnProgress is a Public property.

TDNSHeader Class
Represents the Header section in a DNS message packet.

File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TDNSHeader = class;
Description
TDNSHeader is a TObject descendant that represents the Header section in a DNS message packet. A DNS message packet may
contain the following 5 sections:

198 Internet Direct (Indy) Version 10.1.5


Classes TDNSHeader Class

Section Description
Header
Question question for the name server
Answer resource records answering the question
Authority resource records pointing toward an authority
Additional resource records holding additional information

The TDNSHeader header section is always present in the message packet, and includes values that specify which of the remaining
sections are present. TDNSHeader also provides properties specific to the header section or the entire message packet, including:

Field Description
ID ( 204) Identifier assigned to a DNS query.
Qr ( Query (0) or Response (1) flag.
205)
OpCode Indicates the kind of query to be performed.
( 204)
AA ( Indicates the responsing DNS server is an authority for the domain.
202)
TC ( Indicates the message was truncated.
207)
RD ( Indicates recurive queries are desired on the DNS server.
206)
RA ( Indicates recurive queries are available on the DNS server.
205)
RCode Response code from the DNS server.
( 206)
QDCount Number of entries in the DNS Question section.
( 205)
ANCount Number of resource records in the DNS Answer section.
( 203)
NSCount Number of resource records in the DNS Authority section.
( 204)
ARCount Number of resource records in the DNS Additional section.
( 203)

Internet Direct (Indy) Version 10.1.5 199


TDNSHeader Class Classes

TDNSHeader is used in the message packet for both a DNS query and a DNS response, although some values are only
appropriate in one or the other context.

TDNSHeader Members
The following tables list the members exposed by TDNSHeader.

Properties
Property Description
AA ( 202) Indicates if the name server is an authority for the requested domain.
ANCount ( 203) Number of resource records in the Answer section of a DNS response.
ARCount ( 203) Number of resource records in the Additional section of a DNS response.
BitCode ( 203) Represents temporary storage for bit fields used in the DNS header.
ID ( 204) Identifier assigned to match DNS query and response packets.
NSCount ( 204) Number of resource records in the Authority section of a DNS response.
OpCode ( 204) Indicates the kind of query to be performed on the DNS server.
QDCount ( 205) Number of Questions in the DNS message packet.
Qr ( 205) Indicates if the DNS message packet contains a query or a response.
RA ( 205) Indicates if recursive query support is available on a name server.
RCode ( 206) Result code returned in a DNS response.
RD ( 206) Indicates if recursive query support is desired for DNS request.
TC ( 207) Indicates if a DNS response message packet has been truncated due to excessive length.

Methods
Method Description
ClearByteCode ( 200) Resets the temporary storage for bit field in the DNS header.
Create ( 201) Constructor for the object instance.
GenerateBinaryHeader ( 201) Generates the raw byte values for the DNS header section of a DNS message.
ParseQuery ( 201) Parses and updates property values found in the raw DNS header.

Legend
Method
Property

TDNSHeader Methods
The Methods of the TDNSHeader class are listed here.

Methods
Method Description
ClearByteCode ( 200) Resets the temporary storage for bit field in the DNS header.
Create ( 201) Constructor for the object instance.
GenerateBinaryHeader ( 201) Generates the raw byte values for the DNS header section of a DNS message.
ParseQuery ( 201) Parses and updates property values found in the raw DNS header.

Legend
Method

TDNSHeader.ClearByteCode Method
Resets the temporary storage for bit field in the DNS header.

Pascal
procedure ClearByteCode;
Description
ClearByteCode is a procedure that resets the temporary storage allocated for the bit fields in BitCode ( 203). ClearByteCode is

200 Internet Direct (Indy) Version 10.1.5


Classes TDNSHeader Class

used when the DNS resolver creates the DNS query used in TIdDNSResolver.Resolve ( 604).

Use BitCode ( 203) to access the value for an individual bit field in the DNS Header.

TDNSHeader.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the constructor for the object instance. Create calls the Randomize procedure to initialize the runtime random number
generator with an arbitrary random value prior to assigning the identifier used in ID ( 204).

See Also
ID ( 204)

TDNSHeader.GenerateBinaryHeader Method
Generates the raw byte values for the DNS header section of a DNS message.

Pascal
function GenerateBinaryHeader: TIdBytes;
Returns
TIdBytes ( 3007) - Raw byte values for the DNS header.

Description
GenerateBinaryHeader is a TIdBytes ( 3007) function used to create ( 201) the raw byte values that represent the contents of
the DNS header fields.

The return value for the method is the 12 byte values representing the fields as indicated in the following:

GenerateBinaryHeader converts numeric values in the header from their host-specific byte order representation to their network
byte order representation using the TIdStack.HostToNetwork ( 2165) method.

GenerateBinaryHeader also ensures that reserved values in BitCode ( 203) are cleared prior to populate the TIdBytes ( 3007)
returned from the method.

Use ParseQuery ( 201) to populate the poroperty values in the DNS using the raw byte values returned in a DNS query response.

See Also
ID ( 204) BitCode ( 203) QDCount ( 205) ANCount ( 203) NSCount ( 204) ARCount ( 203) ParseQuery ( 201)

TDNSHeader.ParseQuery Method
Parses and updates property values found in the raw DNS header.

Pascal
function ParseQuery(
Data: TIdBytes

Internet Direct (Indy) Version 10.1.5 201


TDNSHeader Class Classes

): integer;
Parameters
Parameters Description
Data Raw byte values to load into the properties for the DNS header.

Returns
Integer - 0 on success, or -1 on error.

Description
ParseQuery is an Integer function used to parse and store property values found in the raw DNS header in Data.

ParseQuery returns 0 (zero) on successful completion of the parsing operation, or -1 when Data does not contain at leasst 12 byte
values as required in a valid DNS header.

ParseQuery converts numeric values in Data from their network byte order representation to their host-specific byte order
representation prior to storing the values in the properties for the DNS header. This includes the following properties:

ID ( 204)
BitCode ( 203)
QDCount ( 205)
ANCount ( 203)
NSCount ( 204)
ARCount ( 203)

See Also
ID ( 204) BitCode ( 203) QDCount ( 205) ANCount ( 203) NSCount ( 204) ARCount ( 203)

TDNSHeader Properties
The Properties of the TDNSHeader class are listed here.

Properties
Property Description
AA ( 202) Indicates if the name server is an authority for the requested domain.
ANCount ( 203) Number of resource records in the Answer section of a DNS response.
ARCount ( 203) Number of resource records in the Additional section of a DNS response.
BitCode ( 203) Represents temporary storage for bit fields used in the DNS header.
ID ( 204) Identifier assigned to match DNS query and response packets.
NSCount ( 204) Number of resource records in the Authority section of a DNS response.
OpCode ( 204) Indicates the kind of query to be performed on the DNS server.
QDCount ( 205) Number of Questions in the DNS message packet.
Qr ( 205) Indicates if the DNS message packet contains a query or a response.
RA ( 205) Indicates if recursive query support is available on a name server.
RCode ( 206) Result code returned in a DNS response.
RD ( 206) Indicates if recursive query support is desired for DNS request.
TC ( 207) Indicates if a DNS response message packet has been truncated due to excessive length.

Legend
Property

TDNSHeader.AA Property
Indicates if the name server is an authority for the requested domain.

202 Internet Direct (Indy) Version 10.1.5


Classes TDNSHeader Class

Pascal
property AA: Word;
Description
AA is a Word property that indicates if the responding Domain Name Server is an authority for the Domain name space in the
question section of a DNS query.

AA is used in a DNS response that may contain multiple resource records in the answer section of the DNS response, and each
resource record may have a different owner. AA corresponds to the name which matches the Omain name in the query, or the
owner name for the first resource record in the answer section.

AA is represented in a DNS header as a bit flag. Changing the value of AA ensures that the appropriate bit field is updated in the
DNS header for the message packet.

TDNSHeader.ANCount Property
Number of resource records in the Answer section of a DNS response.

Pascal
property ANCount: Word;
Description
ANCount is a Word property that indicates the number of resource records found in the Answer section of a DNS response.

Use NSCount ( 204) to determine the number of name server resource records in the DNS response.

Use ARCount ( 203) to determine the number of additional resource records in in the DNS response.

TDNSHeader.ARCount Property
Number of resource records in the Additional section of a DNS response.

Pascal
property ARCount: Word;
Description
ARCount is a Word property that indicates the number of resource records found in the Additional section of a DNS response.

Use ANCount ( 203) to determine the number of Answer resource records in the DNS response.

Use NSCount ( 204) to determine the number of name server resource records in the DNS response.

TDNSHeader.BitCode Property
Represents temporary storage for bit fields used in the DNS header.

Pascal
property BitCode: Word;
Description
BitCode is a read-only Word property used to represent the individual bit fields that appear in the DNS header. BitCode acts as a
temporary storage slot for bit field values.

BitCode is used when updating values for bit fields while creating the DNS query, and when reading the values from bit fields in the
DNS response. BitCode is ANDed with the appropriate value to access a particular bit field in the DNS header.

Use ClearByteCode ( 200) to reset the value of all bit fields in BitCode.

Internet Direct (Indy) Version 10.1.5 203


TDNSHeader Class Classes

TDNSHeader.ID Property
Identifier assigned to match DNS query and response packets.

Pascal
property ID: Word;
Description
ID is a Word property that represents the 16-bit identifier assigned by the DNS Resolver to allow matching a response to the DNS
query that generates the message packet. ID is copied from the DNS request to the corresponding reply and can be used by the
requester to match up replies to outstanding queries.

The value in ID is assigned in the Create ( 201) constructor, and contains a random value in the range 0 to 65535.

ID is read from the DNS Header returned in a DNS response packet, when the results are parsed after a call to
TIdDNSResolver.Resolve ( 604).

TDNSHeader.NSCount Property
Number of resource records in the Authority section of a DNS response.

Pascal
property NSCount: Word;
Description
NSCount is a Word property that indicates the number of resource records found in the Authority section of a DNS response.

Use ARCount ( 203) to determine the number of Additional resource records in the DNS response.

Use ANCount ( 203) to determine the number of resource records in the Answer section of the DNS response.

TDNSHeader.OpCode Property
Indicates the kind of query to be performed on the DNS server.

Pascal
property OpCode: Word;
Description
OpCode is a Word property and contains an Integer value that specifies the kind of query in a DNS request packet. OpCode is
specified in the DNS query, and returned in the DNS response.

OpCode may contain one of the following values and associated meanings:

Value Meaning
0 A standard query (QUERY)
1 An inverse query (IQUERY)
2 A server status request (STATUS)
3 Reserved for future use
4 Reserved for future use
5 Reserved for future use
6 Reserved for future use
7 Reserved for future use
8 Reserved for future use

204 Internet Direct (Indy) Version 10.1.5


Classes TDNSHeader Class

9 Reserved for future use


10 Reserved for future use
11 Reserved for future use
12 Reserved for future use
13 Reserved for future use
14 Reserved for future use
15 Reserved for future use

Currently, the TIdDNSResolver ( 600) implementation does not support all aspects of the DNS protocol, and includes the following
limitations:

• The DNS query type is limited to standard queries, where the DNS Header OpCode is 0.
• Inverse queries (OpCode=1) and Status queries (OpCode=2) are not supported at this time.
OpCode is represented in a DNS header as a 4-bit field. Changing the value of OpCode ensures that the appropriate bit field is
updated in the DNS header for the message packet.

TDNSHeader.QDCount Property
Number of Questions in the DNS message packet.

Pascal
property QDCount: Word;
Description
QDCount is a Word property that indicates the number of entries in the Question section of a DNS message packet. QDCount is
calculated and included in the DNS query when the query is constructed after a call to TIdDNSResolver.Resolve ( 604). QDCount
will indicate the numer of values assigned to TIdDNSResolver.QueryRecords.

QDCount is returned in the DNS response to indicate the number of Questions handled by the DNS server.

Use ANCount ( 203) to determine the number of resource records returned in the Answer section of the DNS response.

Use NSCount ( 204) to determine the number of name server resource records returned in the Authoruty section of the DNS
response.

Use ARCount ( 203) to determine the number of resource records returned in the Additional section of the DNS response.

TDNSHeader.Qr Property
Indicates if the DNS message packet contains a query or a response.

Pascal
property Qr: Word;
Description
Qr is a Word property that specifies if the contents of the DNS message packet contains a DNS query or DNS a response. Qr will
contain the value 0 when the message is a query, and the value 1 when the message is a response.

Qr is represented in a DNS header as a bit field. Changing the value of Qr ensures that the appropriate bit field is updated in the
DNS header for the message packet.

TDNSHeader.RA Property
Indicates if recursive query support is available on a name server.

Internet Direct (Indy) Version 10.1.5 205


TDNSHeader Class Classes

Pascal
property RA: Word;
Description
RA is a Word property that indicates if recursive query support is available on the DNS server responding to the DNS query. RA will
contain the value 1 when recursive queries are availabale on the name server, or the value 0 when recursive queries are not
supported or allowed for the DNS resolver.

Use RD ( 206) to indicate if recursive query support is desired in a DNS request.

RA is represented in a DNS header as a bit field. Changing the value of RA ensures that the appropriate bit field is updated in the
DNS header for the message packet.

TDNSHeader.RCode Property
Result code returned in a DNS response.

Pascal
property RCode: Word;
Description
RCode is a Word property that represents the result code returned by a DNS server as part of a response to a DNS query. RCode
may contain one of the following values and associated meanings:

Value Meaning
0 No error condition.
1 Query Format error. The name server was unable to interpret the query.
2 Server failure. The name server was unable to process this query due to a problem with the name server.
3 Name Error. Meaningful only for responses from an authoritative name server, this code signifies that the domain name
referenced in the query does not exist.
4 Not Implemented. The name server does not support the requested kind of query.
5 Operation Refused. The name server refuses to perform the specified operation for policy reasons. For example, a name
server may not wish to provide the information to the particular requester, or a name server may not wish to perform a
particular operation (e.g., zone transfer) for particular data.
6 Reserved for future use.
7 Reserved for future use.
8 Reserved for future use.
9 Reserved for future use.
10 Reserved for future use.
11 Reserved for future use.
12 Reserved for future use.
13 Reserved for future use.
14 Reserved for future use.
15 Reserved for future use.

RCode is represented in a DNS header as a 4-bit field. Changing the value of RCode ensures that the appropriate bit field is
updated in the DNS header for the message packet.

TDNSHeader.RD Property
Indicates if recursive query support is desired for DNS request.

206 Internet Direct (Indy) Version 10.1.5


Classes TEvent Class

Pascal
property RD: Word;
Description
RD is a Word property that indicates if recursive query support is desired on the DNS server responding to a DNS query. RD will
contain the value 1 when recursive queries are desired on the name server, or the value 0 when recursive queries are not desired
by the DNS resolver.

Use RA ( 205) to detgermine if recursive query support is available on a DNS server issuing a response.

RD is represented in a DNS header as a bit field. Changing the value of RD ensures that the appropriate bit field is updated in the
DNS header for the message packet.

TDNSHeader.TC Property
Indicates if a DNS response message packet has been truncated due to excessive length.

Pascal
property TC: Word;
Description
TC is a Word property that indicates if a DNS response message packet has been truncated when the length of the message
packet exceeds the maximum permitted on the transmission channel. TC will contain the value 1 when the mesaage packet has
been truncated, or the value 0 when the packet contains the entire response issued by the name server.

Messages handled by the UDP-based DNS Resolver are restricted to 512 bytes (not counting the UDP headers). Longer messages
are truncated and TC is set to 1 in the header. For this reason, the UDP-based TIdDNSResolver ( 600) does not implement DNS
zone transfers, but is the recommended method for standard queries in the Internet.

TC is represented in a DNS header as a bit field. Changing the value of TC ensures that the appropriate bit field is updated in the
DNS header for the message packet.

TErrorRecord Class
File
IdDNSResolver ( 4620)

Hierarchy

Pascal
TErrorRecord = class(TResultRecord);
Description
TErrorRecord is a TResultRecord ( 2682) descendant.

See Also
TResultRecord ( 2682)

TEvent Class
Ancestor class for thread-based event notifications.

Internet Direct (Indy) Version 10.1.5 207


TEvent Class Classes

File
IdGlobal ( 4650)

Hierarchy

Pascal
TEvent = class(TObject);
Description
TEvent is a TObject descendant that implements the ancestor for the TIdLocalEvent ( 1449) class on the .Net platform. TEvent
provides the functionality required for thread-based event notifications using waitable event handles.

On the ,Net platform, TEvent provides a wrapper for the WaitHandle class in the FCL. WaitHandle instances are typically used
when implementing synchronized access to object instances.

TEvent defines a signaling mechanism to indicate taking or releasing exclusive access to a shared resource using WaitHandle
methods to block while waiting for access to shared resources.

TEvent also isolates differences between the implementations for the AutoResetEvent and the ManualResetEvent descendants in
the FCL.

Use the methods of this class to block a thread until one or more synchronization objects receive a signal.

See Also
TIdLocalEvent ( 1449)

TWaitResult ( 2989)

TEvent Members
The following tables list the members exposed by TEvent.

Methods
Method Description
Destroy ( 210) Frees the object instance.
ResetEvent ( 210) Clears the waitable event handler.
SetEvent ( 210) Sets the signal for the event.
Create ( 209)
WaitFor ( 211) Blocks the current thread until the current event receives a signal.

Legend
Destructor
virtual

TEvent Methods
The Methods of the TEvent class are listed here.

Methods
Method Description
Create ( 209)
Destroy ( 210) Frees the object instance.
ResetEvent ( 210) Clears the waitable event handler.
SetEvent ( 210) Sets the signal for the event.
WaitFor ( 211) Blocks the current thread until the current event receives a signal.

208 Internet Direct (Indy) Version 10.1.5


Classes TEvent Class

Legend
Constructor
virtual

TEvent.Create Constructor
Overload List

Method Description
TEvent.Create () ( 209) Constructor for the object instance.
TEvent.Create (IntPtr, Boolean, Constructor for the object instance.
Boolean, string) ( 209)

TEvent.Create Constructor ()
Constructor for the object instance.

Pascal
constructor Create; overload;
Description
Create is the overloaded constructor for the object instance.

Create calls the overloaded Create method using the value Nil for the event attributes and True for the ManualReset flag. The
InitialState flag is set to False. A name is not assigned for the event.

Use Destroy ( 210) to free the object instance.

See Also
TEvent.Create

TEvent.Destroy ( 210)

TEvent.Create Constructor (IntPtr, Boolean, Boolean, string)


Constructor for the object instance.

Pascal
constructor Create(
EventAttributes: IntPtr;
ManualReset: Boolean;
InitialState: Boolean;
const Name: string = ''
); overload;
Parameters
Parameters Description
EventAttributes Attributes for the event.
ManualReset Indicates if the event is manually reset.
InitialState Inital state values for the FCL class.
Name Name of the event. Unused.

Description
Create is the overloaded constructor for the object instance.

EventAttributes is the attributes for the event, and is provide for compatibility with the inherited constructor. They are not used in the
overloaded constructor.

ManualReset indicates the type of FCL event to create for the object instance. When ManualReset contains True, the event stores
a ManualResetEvent object instance with the values in InitialState. When ManualReset contains False, the event stores a
AutoResetEvent object instance with the values in InitialState.

Internet Direct (Indy) Version 10.1.5 209


TEvent Class Classes

InitialState represents the arguments passed to the ManualResetEvent or AutoResetEvent used in the object instance.

Name is provided for compatibility with the inherited constructor, but is not used in the overloaded constructor.

Use Destroy ( 210) to free the object instance.

See Also
TEvent.Create

TEvent.Destroy ( 210)

TEvent.ResetEvent ( 210)

TEvent.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy frees resources allocated to the internal event handle for the class instance using SetEvent ( 210).

Destroy calls the inherited Destructor prior to exiting from the method.

See Also
Create ( 209)

SetEvent ( 210)

ResetEvent ( 210)

TEvent.ResetEvent Method
Clears the waitable event handler.

Pascal
procedure ResetEvent;
Description
ResetEvent is a procedure used to ensure that signals posted to the waitable event handle in the class instance are cleared.

ResetEvent examines the internal handle to determine its' class type, and casts the handle prior to calling the Reset method from
the Framework class library.

Use SetEvent ( 210) to post a signal to the waitable event handle.

Use WaitFor ( 211) to retrieve the result from the waitable event handler.

See Also
SetEvent ( 210)

WaitFor ( 211)

TEvent.SetEvent Method
Sets the signal for the event.

Pascal
procedure SetEvent;

210 Internet Direct (Indy) Version 10.1.5


Classes TEvent Class

Description
SetEvent is a procedure used to ensure that the event handle is signalled in the class instance.

SetEvent examines the internal handle to determine its' class type, and casts the handle prior to calling the Set method from the
Framework class library.

A thread waits for a signal by calling the WaitFor ( 211) method in the class instance. If it is in the nonsignaled state, the thread
blocks, waiting for the thread that currently controls the resource to signal that the resource is available.

SetEvent uses the internal waitable handle to signal the release of a waiting thread.

You can control the initial state of the event intance using the Create ( 209) constructor by passing the value True if the initial state
is signaled and false otherwise.

Use ResetEvent ( 210) to clear a signal on the waitable event handle.

Use WaitFor ( 211) to retrieve the result from the waitable event handler.

See Also
ResetEvent ( 210)

WaitFor ( 211)

Create ( 209)

TEvent.WaitFor Method
Blocks the current thread until the current event receives a signal.

Pascal
function WaitFor(
Timeout: LongWord
): TWaitResult; virtual;
Parameters
Parameters Description
Timeout Number of milliseconds to wait for a signal on the event handle.

Returns
TWaitResult ( 2989) - Enumerated value representing the method result.

Description
WaitFor is a TWaitResult ( 2989) function used to block execution of the current thread until the current event receives a signal.
WaitFor wraps calls to the overloaded WaitHandle.WaitOne methods from the FCL, and provides an enumerated value to represent
the result of the operation.

Timeout indicates the optional number of milliseconds to wait for the signal on the waitable event handle. The value INFINITE
indicates that the value in Timeout is not used when calling the overloaded WaitHandle.WaitOne method.

The return value for the method can contain one of the enumerated values defined in TWaitResult ( 2989), with the following
values and meanings:

Value Meaning

--------- ---------------------------------------------------

wrSignaled A signal was received.


wrTimeout A signal was not received before the optional timeout period elapsed.
wrAbandoned ???
wrError An exception occurred while waiting for the signal.

Internet Direct (Indy) Version 10.1.5 211


TFileCreateStream Class Classes

See Also
TWaitResult ( 2989)

TFileCreateStream Class
Implements a file stream which recreates the file used for storing stream content.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TFileCreateStream = class(TIdFileStream);
Description
TFileCreateStream is a TIdFileStream ( 3026) descendant that implements a file stream which always recreates the file used for
storing content written to the stream.

TFileCreateStream includes a constructor which accepts a file name argument specifying the file on the local file system to create
( 213) for the stream.

Use TAppendFileStream ( 188) to create ( 213) a file stream which appends stream output to any existing content in the local file.

Use TReadFileExclusiveStream ( 2676) or TReadFileNonExclusiveStream ( 2677) to create ( 213) file streams with the desired
file sharing modes enabled.

See Also
Create ( 213)

TIdFileStream ( 3026)

TAppendFileStream ( 188)

TReadFileExclusiveStream ( 2676)

TReadFileNonExclusiveStream ( 2677)

TFileCreateStream Members
The following tables list the members exposed by TFileCreateStream.

Methods
Method Description
Create ( 213) Constructor for the object instance.

Legend
Constructor

TFileCreateStream Methods
The Methods of the TFileCreateStream class are listed here.

212 Internet Direct (Indy) Version 10.1.5


Classes THINFORecord Class

Methods
Method Description
Create ( 213) Constructor for the object instance.

Legend
Constructor

TFileCreateStream.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
const AFile: String
);
Parameters
Parameters Description
AFile File name used to store stream output.

Description
Create is the constructor for the object instance.

AFile contains the file path and/or name on the local file system to create for storing output written to the stream.

Create calls the inherited constructor using the following file mode constant for the specified file name:

fmCreate ( 3206)

THINFORecord Class
Represents a resource record returned from a DNS query that includes Host Information resource record types.

File
IdDNSResolver ( 4620)

Hierarchy

Pascal
THINFORecord = class(TTextRecord);
Description
THINFORecord is a TTextRecord ( 2702) descendant that represents a resource record returned in the results for a DNS query.
THINFORecord is a collection item created to represent a resource record returned when TIDNSResolver.QueryRecords includes
the value qtHINFO for Host Information resource records.

HINFO resource records are used to acquire general information about a host server. The main use is for protocols such as FTP
that can use special procedures when talking between machines or operating systems of the same type.

An HINFO resoure record uses the same DNS packet layout as other TResultRecord ( 2682)-based responses, but extends the
use of RData ( 2686) to include the following definition and format:

Internet Direct (Indy) Version 10.1.5 213


THINFORecord Class Classes

• CPU ( 216) - Variable length character string which specifies the CPU ( 216) type for the host server.

• OS ( 216) - Variable length character string which specifies the Operating System for the host server. Standard values for CPU
( 216) and OS ( 216) can be found in RFC 1010.
THINFORecord extends TTextRecord ( 2702) to implement the specifics of accessing RData ( 2686) values as properties,
including CPU ( 216) and OS ( 216).

THINFORecord also overrides the Parse ( 215) method to read the values in RData ( 2686) into their property counterparts.

See Also
TTextRecord ( 2702) TResultRecord ( 2682) TQueryResult ( 2669) TIdDNSResolver.QueryRecords

THINFORecord Members
The following tables list the members exposed by THINFORecord.

Properties
Property Description
CPU ( 216)
Name ( 2686)
OS ( 216)
RData ( 2686)
RDataLength ( 2686)
RecClass ( 2686)
RecType ( 2686)
Section ( 2687)
Text ( 2705)
TTL ( 2687)

Methods
Method Description
Assign ( 215)
Create ( 2704)
Destroy ( 2685)
Destroy ( 2704)
Parse ( 215)

Legend
Method
virtual
Property

214 Internet Direct (Indy) Version 10.1.5


Classes THINFORecord Class

read only

THINFORecord Methods
The Methods of the THINFORecord class are listed here.

Methods
Method Description
Assign ( 215)
Parse ( 215)

Legend
Method
virtual

THINFORecord.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

THINFORecord.Parse Method
Pascal
procedure Parse(
CompleteMessage: TIdBytes;
APos: Integer
); override;
Parameters
Parameters Description
CompleteMessage Type is TIdBytes ( 3007).
APos Type is Integer.

Description
Parse is a overridden method.

THINFORecord Properties
The Properties of the THINFORecord class are listed here.

Properties
Property Description
CPU ( 216)
OS ( 216)

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 215


TIdAEPLFFTPListItem Class Classes

THINFORecord.CPU Property
Pascal
property CPU: String;
Description
CPU is a Public read-only String property.

THINFORecord.OS Property
Pascal
property OS: String;
Description
OS is a Public read-only String property.

TIdAEPLFFTPListItem Class
File
IdFTPListParseEPLF ( 4638)

Hierarchy

Pascal
TIdAEPLFFTPListItem = class(TIdFTPListItem);
Description
TIdAEPLFFTPListItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

TIdAEPLFFTPListItem Members
The following tables list the members exposed by TIdAEPLFFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
ModifiedDateGMT ( 217)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.
UniqueID ( 217)

216 Internet Direct (Indy) Version 10.1.5


Classes TIdAntiFreezeBase Class

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdAEPLFFTPListItem Properties
The Properties of the TIdAEPLFFTPListItem class are listed here.

Properties
Property Description
ModifiedDateGMT ( 217)
UniqueID ( 217)

Legend
Property

TIdAEPLFFTPListItem.ModifiedDateGMT Property
Pascal
property ModifiedDateGMT;
Description
ModifiedDateGMT is a Public property.

TIdAEPLFFTPListItem.UniqueID Property
Pascal
property UniqueID: string;
Description
UniqueID is a Public string property. Write access for the property is implemented using FUniqueID.

TIdAntiFreezeBase Class
Ancestor for the Indy GUI-integration class.

File
IdAntiFreezeBase ( 4555)

Hierarchy

Pascal
TIdAntiFreezeBase = class(TIdBaseComponent);
Description
TIdAntiFreezeBase is a TIdBaseComponent ( 266) descendant that represents the ancestor for the Indy GUI-integration

Internet Direct (Indy) Version 10.1.5 217


TIdAntiFreezeBase Class Classes

component.

TIdAntiFreezeBase specifies abstract and virtual methods that allow descendant classes to yield to the application for message
handling and processing.

TIdAntiFreezeBase implements an overridden protected InitComponent method used to initialize property values in the new object
instance. InitComponent ensures that the GAntiFreeze ( 3123) application variable is assigned using the current
TIdAntiFreezeBase instance.

At runtime, InitComponent may raise an EIdException ( 76) exception if an existing TIdAntiFreezeBase descendant has been
created in the application.

InitComponent also ensures that the default value for the following properties:

Property Value
Active ( 221) ID_Default_TIdAntiFreezeBase_Active ( 3282)
ApplicationHasPriority ( 222) ID_Default_TIdAntiFreezeBase_ApplicationHasPriority ( 3283)
IdleTimeOut ( 222) ID_Default_TIdAntiFreezeBase_IdleTimeOut ( 3283)
OnlyWhenIdle ( 222) ID_Default_TIdAntiFreezeBase_OnlyWhenIdle ( 3283)

Do not create ( 267) instances of TIdAntiFreezeBase. Applications should create ( 267) and use instances of the TIdAntiFreeze
( 2710) component.

See Also
TIdBaseComponent ( 266)

GAntiFreeze ( 3123)

TIdAntiFreeze ( 2710)

TIdAntiFreezeBase Members
The following tables list the members exposed by TIdAntiFreezeBase.

Properties
Property Description
Active ( 221) Indicates that the component is active.
ApplicationHasPriority ( 222) Specifies that messages from the application main thread have priority.
IdleTimeOut ( 222) Identifies the idle timeout value in milliseconds.
OnlyWhenIdle ( 222) Specifies the component should yield when the main thread is idle.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Destroy ( 219) Frees an TIdAntiFreezeBase ( 217) object instance.
DoProcess ( 219) Implements basic Process ( 220) functionality for descendant classes.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Process ( 220) Specifies the method that implements the component functionality.
ShouldUse ( 220) Indicates that a TIdAntiFreezeBase ( 217) descendant is in use, and processor cycles should be yielded to
the main thread.
Sleep ( 221) Yields processor cycles and optionally processes application messages.
CType ( 267)
Create ( 1274)

Legend
Constructor
virtual

218 Internet Direct (Indy) Version 10.1.5


Classes TIdAntiFreezeBase Class

abstract
Property
read only

TIdAntiFreezeBase Methods
The Methods of the TIdAntiFreezeBase class are listed here.

Methods
Method Description
Destroy ( 219) Frees an TIdAntiFreezeBase ( 217) object instance.
DoProcess ( 219) Implements basic Process ( 220) functionality for descendant classes.
Process ( 220) Specifies the method that implements the component functionality.
ShouldUse ( 220) Indicates that a TIdAntiFreezeBase ( 217) descendant is in use, and processor cycles should be yielded to
the main thread.
Sleep ( 221) Yields processor cycles and optionally processes application messages.

Legend
Destructor
virtual
abstract

TIdAntiFreezeBase.Destroy Destructor
Frees an TIdAntiFreezeBase ( 217) object instance.

Pascal
destructor Destroy; override;
Description
Destroy frees the object instance. Destroy sets the unit global variable GAntiFreeze ( 3123) to the value nil prior to calling the
inherited Destroy method.

Notes
It is not recommended to call Destroy directly. Call Free instead. Free checks to ensure that the object reference is not nil before
calling Destroy.

See Also
GAntiFreeze ( 3123)

TIdAntiFreezeBase.DoProcess Method
Implements basic Process ( 220) functionality for descendant classes.

Pascal
class procedure DoProcess(
const AIdle: Boolean = true;
const AOverride: Boolean = false
);
Parameters
Parameters Description
AIdle True forces an Idle state. Default is True.
AOverride True overrides the current OnlyWhenIdle ( 222) property. Default is False.

Description
DoProcess is a class procedure that implements the default behavior for the abstract Process ( 220) method in
TIdAntiFreezeBase ( 217) descendants. DoProcess allows the component to force an idle state in the main thread of execution,
and to allow message processing for other threads of execution.

Internet Direct (Indy) Version 10.1.5 219


TIdAntiFreezeBase Class Classes

Set AIdle to True to force an idle state in the main thread regardless of the current OnlyWhenIdle ( 222) value. Set AIdle to False
to use the current OnlyWhenIdle ( 222) value. The default value for AIdle is True.

Set AOverride to True to force an idle state in the main thread regardless of either AIdle or OnlyWhenIdle ( 222) values. Set
AOverride to False to allow use of the current values in AIdle or OnlyWhenIdle ( 222). The default value for AOverride is False.

DoProcess calls the Process ( 220) method in the global GAntiFreeze ( 3123) application variable when the ShouldUse ( 220)
returns True.

Notes
TIdAntiFreezeBase ( 217) can only perform DoProcess when the calling client is the main application thread and the component is
Active ( 221).

See Also
Process ( 220)

ShouldUse ( 220)

OnlyWhenIdle ( 222)

TIdAntiFreezeBase.Process Method
Specifies the method that implements the component functionality.

Pascal
procedure Process; virtual; abstract;
Description
Process is an abstract virtual procedure in TIdAntiFreezeBase ( 217). Descendant classes must implement Process to enable
yielding to the application for message handling and processing.

See Also
DoProcess ( 219)

TIdAntiFreeze.Process

TIdAntiFreezeBase.ShouldUse Method
Indicates that a TIdAntiFreezeBase ( 217) descendant is in use, and processor cycles should be yielded to the main thread.

Pascal
class function ShouldUse: Boolean; virtual;
Returns
Boolean - True when the calling client is in the main thread and an active TIdAntiFreezeBase ( 217) descendant is in use.

Description
ShouldUse is a virtual Boolean class function that indicates when a TIdAntiFreezeBase ( 217) descendant is in use in an
application, and that the component should yield to the main thread of execution.

ShouldUse accesses the GAntiFreeze ( 3123) variable to determine if a TIdAntiFreeze ( 2710) instance has been assigned and
activated.

ShouldUse will return True when all of the following conditions are met:

Condition Description
GAntiFreeze ( 3123) Not nil.
GAntiFreeze ( 3123) Active ( 221) property value is True.
InMainThread ( 2841) Return value is True.

220 Internet Direct (Indy) Version 10.1.5


Classes TIdAntiFreezeBase Class

ShouldUse is called from the Sleep ( 221) method, as well as in TIdSocketHandle ( 2071) and TIdIOHandlerStack ( 1342)
methods that implement connection timeout features.

See Also
GAntiFreeze ( 3123)

Active ( 221)

InMainThread ( 2841)

TIdAntiFreezeBase.Sleep Method
Yields processor cycles and optionally processes application messages.

Pascal
class procedure Sleep(
ATimeout: Integer
);
Parameters
Parameters Description
ATimeout Total milliseconds to yiled to the application.

Description
Sleep is a class procedure that forces a TIdAntiFreezeBase ( 217) descendant to yield processor cycles for the number of
milliseconds specified in ATimeout.

Sleep calls ShouldUse ( 220) to determine if a TIdAntiFreezeBase ( 217) descendant is in use in the application. When
ShouldUse ( 220) is True, Sleep calls Sleep (in IdCoreGlobal.pas) and DoProcess ( 219) repeatedly until ATimeout milliseconds
have elapsed. Each iteration allows Sleep to pause the application for IdleTimeOut ( 222) milliseconds, and calls DoProcess (
219) to allow the main thread of excution to handle application messages.

When ShouldUse ( 220) is False, Sleep calls Sleep for ATimeout milliseconds with no additional processing.

See Also
ShouldUse ( 220)

IdleTimeOut ( 222)

TIdAntiFreezeBase Properties
The Properties of the TIdAntiFreezeBase class are listed here.

Properties
Property Description
Active ( 221) Indicates that the component is active.
ApplicationHasPriority ( 222) Specifies that messages from the application main thread have priority.
IdleTimeOut ( 222) Identifies the idle timeout value in milliseconds.
OnlyWhenIdle ( 222) Specifies the component should yield when the main thread is idle.

Legend
Property

TIdAntiFreezeBase.Active Property
Indicates that the component is active.

Pascal
property Active: boolean;

Internet Direct (Indy) Version 10.1.5 221


TIdAntiFreezeBase Class Classes

Description
Active is a Boolean property that can be used to enable or disable a TIdAntiFreezeBase ( 217) component. The default value for
Active is ID_Default_TIdAntiFreezeBase_Active ( 3282) as assigned in the Create ( 267) constructor.

Notes
TIdAntiFreezeBase ( 217) can only perform it's processing when the calling client is the main thread in the application and the
component is Active, as indicated in ShouldUse ( 220).

See Also
ID_Default_TIdAntiFreezeBase_Active ( 3282) TIdAntiFreezeBase.ShouldUse ( 220)

TIdAntiFreezeBase.ApplicationHasPriority Property
Specifies that messages from the application main thread have priority.

Pascal
property ApplicationHasPriority: Boolean;
Description
ApplicationHasPriority is a Boolean property indicating that an Application should process ( 220) any Application messages prior
to messages from other threads of execution in the Process ( 220) method. The default value for the property is
ID_Default_TIdAntiFreezeBase_ApplicationHasPriority ( 3283).

See Also
TIdAntiFreezeBase.Process ( 220)

TIdAntiFreezeBase.IdleTimeOut Property
Identifies the idle timeout value in milliseconds.

Pascal
property IdleTimeOut: integer;
Description
IdleTimeOut is an Integer property that specifies the number of milliseconds allowed to elapse in calls to Sleep ( 221).

The default value for IdleTimeout is ID_Default_TIdAntiFreezeBase_IdleTimeOut ( 3283), as used in VCL Component streaming
and the Create ( 267) constructor.

IdleTimeout is used in TIdIOHandlerStack ( 1342) when handling timeouts during a client connection.

IdleTimeout is used in TIdSocketHandle.Readable ( 2078) when checking if the connection is available for read operations.

See Also
Sleep ( 221)

TIdSocketHandle.Readable ( 2078)

TIdIOHandlerStack ( 1342)

ID_Default_TIdAntiFreezeBase_IdleTimeOut ( 3283)

TIdAntiFreezeBase.OnlyWhenIdle Property
Specifies the component should yield when the main thread is idle.

Pascal
property OnlyWhenIdle: Boolean;

222 Internet Direct (Indy) Version 10.1.5


Classes TIdARPHdr Class

Description
OnlyWhenIdle is a Boolean property that indicates when TIdAntiFreezeBase ( 217) should yield when the Application main thread
is idle. Set OnlyWhenIdle to True to prevent the component from yielding when the application main thread is not idle in DoProcess
( 219). Set OnlyWhenIdle to False to allow the component to yield when ShouldUse ( 220) is True.

The default value for OnlyWhenIdle is ID_Default_TIdAntiFreezeBase_OnlyWhenIdle ( 3283), as assigned during VCL component
streaming and in the Create ( 267) constructor.

See Also
DoProcess ( 219)

Process ( 220)

ShouldUse ( 220)

ID_Default_TIdAntiFreezeBase_OnlyWhenIdle ( 3283)

TIdARPHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdARPHdr = class(TIdStruct);
Description
TIdARPHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdARPHdr Members
The following tables list the members exposed by TIdARPHdr.

Properties
Property Description
arp_hln ( 225)
arp_hrd ( 225)
arp_op ( 226)
arp_pln ( 226)
arp_pro ( 226)
arp_sha ( 226)
arp_spa ( 226)
arp_tha ( 226)
arp_tpa ( 226)

Methods
Method Description
create ( 224)
Destroy ( 224)
ReadStruct ( 224)
WriteStruct ( 225)

Internet Direct (Indy) Version 10.1.5 223


TIdARPHdr Class Classes

Legend
Constructor
virtual
Property
read only

TIdARPHdr Methods
The Methods of the TIdARPHdr class are listed here.

Methods
Method Description
create ( 224)
Destroy ( 224)
ReadStruct ( 224)
WriteStruct ( 225)

Legend
Constructor
virtual

TIdARPHdr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdARPHdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdARPHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

224 Internet Direct (Indy) Version 10.1.5


Classes TIdARPHdr Class

TIdARPHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdARPHdr Properties
The Properties of the TIdARPHdr class are listed here.

Properties
Property Description
arp_hln ( 225)
arp_hrd ( 225)
arp_op ( 226)
arp_pln ( 226)
arp_pro ( 226)
arp_sha ( 226)
arp_spa ( 226)
arp_tha ( 226)
arp_tpa ( 226)

Legend
Property
read only

TIdARPHdr.arp_hln Property
Pascal
property arp_hln: byte;
Description
arp_hln is a Public byte property. Write access for the property is implemented using Farp_hln.

TIdARPHdr.arp_hrd Property
Pascal
property arp_hrd: word;
Description
arp_hrd is a Public word property. Write access for the property is implemented using Farp_hrd.

Internet Direct (Indy) Version 10.1.5 225


TIdARPHdr Class Classes

TIdARPHdr.arp_op Property
Pascal
property arp_op: word;
Description
arp_op is a Public word property. Write access for the property is implemented using Farp_op.

TIdARPHdr.arp_pln Property
Pascal
property arp_pln: byte;
Description
arp_pln is a Public byte property. Write access for the property is implemented using Farp_pln.

TIdARPHdr.arp_pro Property
Pascal
property arp_pro: word;
Description
arp_pro is a Public word property. Write access for the property is implemented using Farp_pro.

TIdARPHdr.arp_sha Property
Pascal
property arp_sha: TIdEtherAddr;
Description
arp_sha is a Public read-only TIdEtherAddr ( 679) property.

TIdARPHdr.arp_spa Property
Pascal
property arp_spa: TIdInAddr;
Description
arp_spa is a Public read-only TIdInAddr ( 1271) property.

TIdARPHdr.arp_tha Property
Pascal
property arp_tha: TIdEtherAddr;
Description
arp_tha is a Public read-only TIdEtherAddr ( 679) property.

TIdARPHdr.arp_tpa Property
Pascal
property arp_tpa: TIdInAddr;

226 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachment Class

Description
arp_tpa is a Public read-only TIdInAddr ( 1271) property.

TIdAS400FTPListItem Class
File
IdFTPListParseAS400 ( 4635)

Hierarchy

Pascal
TIdAS400FTPListItem = class(TIdOwnerFTPListItem);
Description
TIdAS400FTPListItem is a TIdOwnerFTPListItem ( 1765) descendant.

See Also
TIdOwnerFTPListItem ( 1765)

TIdAttachment Class
Encapsulates a MIME-encoded attachment or inline graphic.

File
IdAttachment ( 4585)

Hierarchy

Pascal
TIdAttachment = class(TIdMessagePart);
Description
TIdAttachment is a TIdMessagePart ( 1614) descendant that encapsulates a MIME-encoded attachment or inline graphic.
TIdAttachment, TIdAttachmentFile ( 236), TIdAttachmentMemory ( 244), and TIdText ( 2404) are used as collection items in
the TIdMessageParts ( 1623) collection.

TIdAttachment publishes properties that provide read and write access to additional header values common to mail message
attachments.

TIdAttachment specifies abstract virtual methods that allow the Internet Message attachment to retrieve and store the contents of its
headers and message body using a stream.

Sending a Message with Attachments


For sending a message with attachments, the following abstract virtual methods need to be overridden and reimplemented:

• Create ( 1616)
• OpenLoadStream ( 231)

Internet Direct (Indy) Version 10.1.5 227


TIdAttachment Class Classes

• CloseLoadStream ( 230)
Create ( 1616) accepts an argument that indicates the file, string, or stream containing the contents of the attachment.
TIdAttachment does not implement a constructor for the class that allows specifying the file, string, stream with the contents of the
attachment.

When a TIdMessage ( 1521) instance is transmitted using TIdMessageClient ( 1555), or a descendant class, the overridden
OpenLoadStream ( 231) and CloseLoadStream ( 230) in an attachment are called. These overridden methods open and close
the internal stream used for loading the contents of the message part during transmission.

OpenLoadStream ( 231) accesses (or creates) a stream used for loading the contents of the message part. During transmission,
values in the internal stream are encoded based on the properties specified in the message or message part in TIdMessageClient
( 1555) methods like SendHeader and SendBody.

CloseLoadStream ( 230) ensures that the internal stream for accessing data in the message part is reset when all values have
been read during transmission. If the internal stream is created in OpenLoadStream ( 231), it is freed in CloseLoadStream (
230). An existing stream is repositioned to its initial position prior to reading values for the message part.

Accessing or Receiving a message with Attachments


When loading or receiving a message with attachments, the following abstract virtual methods need to be overridden and
reimplemented:

• PrepareTempStream ( 232)
• FinishTempStream ( 231)
When a TIdMessage ( 1521) instance is received and processed using TIdMessageClient ( 1555), or a descendant class, the
overridden PrepareTempStream ( 232) and FinishTempStream ( 231) methods for the attachment are called. These methods
apply to both receiving a message from a remote mail server or accessing a message from a local mail store. Essentially, the
actions are the same - differing only in the type of stream used to read the message contents.

PrepareTempStream ( 232) ensures that the temporary stream used for processing the contents of the message part are
allocated, sized, and/or positioned prior to reading values to be stored in a TIdMessage ( 1521) instance.

FinishTempStream ( 231) ensures that the temporary stream used for processing the contents of the message part are freed,
and/or repositioned after reading values stored in a TIdMessage ( 1521) instance.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

Applications do not normally create ( 1616) instances of TIdAttachment. Use TIdAttachmentFile ( 236) or TIdAttachmentMemory
( 244), which implement the abstract virtual methods required to create ( 1616), load, or save the attachment using the desired
string, stream, or file.

See Also
TIdMessage.MessageParts ( 1548)

TIdMessagePart ( 1614)

TIdText ( 2404)

TIdAttachmentFile ( 236)

TIdAttachmentMemory ( 244)

IndySupport ( 15)

TIdAttachment Members
The following tables list the members exposed by TIdAttachment.

228 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachment Class

Properties
Property Description
Boundary ( 1618) Character sequence that delimits the message part.
BoundaryBegin ( 1618) Indicates that a boundary marker appears at the beginning of the message part.
BoundaryEnd ( 1618) Indicates that a boundary marker appears at the end of the message part.
CharSet ( 1619)
ContentDescription ( 1619) Represents descriptive information with a given message body.
ContentDisposition ( 234) Indicates presentation and storage parameters for the message part.
ContentID ( 1619) Identifier for the message part.
ContentLocation ( 1619) Specifies a URI that is the resource location for the entity in the message.
ContentTransfer ( 1620) Identifies the encoding scheme for the message part.
ContentType ( 1620) Identifies the MIME media type for the message.
ContentTypeName ( 235) Optional attribute parameter for the ContentType ( 1620) in a message part.
ExtraHeaders ( 1621) Represents message headers not used for with property storage.
FileName ( 236) File name used to the store the attachment.
Headers ( 1621) Represents message headers in native form.
IsEncoded ( 1622) Indicates that the body for the message part is MIME-encoded.
ParentPart ( 1622)

Methods
Method Description
Assign ( 230) Copies properties from a persistent object to the current object instance.
CloseLoadStream ( 230) Specifies the method used to close the internal stream needed for loading an attachment before transmission.
Create ( 1616) Constructor for the collection item.
Destroy ( 1616) Frees the object instance.
FinishTempStream ( 231) Resets the internal stream used to access the message part.
GetCharSet ( 1617)
OpenLoadStream ( 231) Specifies the method used to open and initialize the internal stream needed for loading an attachment before
transmission.
PartType ( 232) Indicates the message part type to control decoding and processing during receipt.
PrepareTempStream ( 232) Provides a stream for the contents of the message part.
ResolveContentType ( 1617)
SaveToFile ( 233) Stores the headers and message part content for the attachment into the specified file.
SaveToStream ( 233) Writes the content for an attachment onto the specified stream.

Events
Event Description
OnGetMessagePartStream ( 1622)

Legend
Method
virtual
abstract
Property
read only
Event

TIdAttachment Methods
The Methods of the TIdAttachment class are listed here.

Methods
Method Description
Assign ( 230) Copies properties from a persistent object to the current object instance.
CloseLoadStream ( 230) Specifies the method used to close the internal stream needed for loading an attachment before transmission.
FinishTempStream ( 231) Resets the internal stream used to access the message part.
OpenLoadStream ( 231) Specifies the method used to open and initialize the internal stream needed for loading an attachment before
transmission.
PartType ( 232) Indicates the message part type to control decoding and processing during receipt.

Internet Direct (Indy) Version 10.1.5 229


TIdAttachment Class Classes

PrepareTempStream ( 232) Provides a stream for the contents of the message part.
SaveToFile ( 233) Stores the headers and message part content for the attachment into the specified file.
SaveToStream ( 233) Writes the content for an attachment onto the specified stream.

Legend
Method
virtual
abstract

TIdAttachment.Assign Method
Copies properties from a persistent object to the current object instance.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Persistent object with properties to assign to the current object instance.

Description
Assign is an overridden procedure used to copy property values from the persistent object in Source to the current object instance.

Assign compares the ClassType value in the current object to the class type for the object in Source. When the values are the
same, the values in the following properties are assigned to the current object instance:

Headers ( 1621)
ExtraHeaders ( 1621)
FileName ( 236)

When the ClassType values do not match, the inherited Assign method is called.

See Also
TIdMessagePart.Headers ( 1621)

TIdMessagePart.ExtraHeaders ( 1621)

TIdAttachment.FileName ( 236)

TIdAttachment.CloseLoadStream Method
Specifies the method used to close the internal stream needed for loading an attachment before transmission.

Pascal
procedure CloseLoadStream; virtual; abstract;
Description
CloseLoadStream is an abstract virtual procedure that specifies the method used to close the internal stream needed for loading an
attachment.

CloseLoadStream is used to ensure that the internal stream for accessing data in the message part is reset when all values have
been read during transmission. If the internal stream is created in OpenLoadStream ( 231), it should be freed in
CloseLoadStream. An existing stream must be repositioned to its initial position prior to reading values for the message part.

CloseLoadStream must be overriden in an ancestor class to properly close (or free) the internal stream used for loading the
contents of an attachment prior to transmission.

Use OpenLoadStream ( 231) to initialize the stream used for loading the contents of a message attachment.

230 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachment Class

See Also
TIdAttachmentFile.CloseLoadStream ( 239)

TIdAttachmentMemory.CloseLoadStream ( 247)

TIdAttachmentFile.OpenLoadStream ( 241)

TIdAttachment.FinishTempStream Method
Resets the internal stream used to access the message part.

Pascal
procedure FinishTempStream; virtual; abstract;
Description
FinishTempStream is an abstract virtual procedure tha specifies the method used to reset the internal stream for accessing the
contents of the message part.

FinishTempStream is called when loading or receiving a message with attachments. When a TIdMessage ( 1521) instance is
received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream ( 232) and
FinishTempStream methods for the attachment are called. These methods apply to both receiving a message from a remote mail
server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are the same -
differing only in the type of stream used to read the message contents.

FinishTempStream ensures that the temporary stream used for processing the contents of the message part is freed or
repositioned after reading values in the message part.

Use PrepareTempStream ( 232) to ensure that the temporary stream used for processing the contents of the message part is
allocated or positioned prior to reading values stored in the message part.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

FinishTempStream must be overridden in a descendant class, like TIdAttachmentFile ( 236) or TIdAttachmentMemory ( 244), to
implement freeing or repositioning the stream as required for the message part.

See Also
TIdAttachmentFile.FinishTempStream ( 240)

TIdAttachmentMemory.FinishTempStream ( 250)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.ProcessMessage

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachment.OpenLoadStream Method
Specifies the method used to open and initialize the internal stream needed for loading an attachment before transmission.

Pascal
function OpenLoadStream: TIdStream; virtual; abstract;
Returns
TStream - Stream used to access the contents of the message part.

Description
OpenLoadStream is an abstract virtual TStream function that specifies the method used to open and initialize the internal stream
needed for loading an attachment before transmission.

OpenLoadStream is used to ensure that the internal stream for accessing data in the message part is created, opened, and

Internet Direct (Indy) Version 10.1.5 231


TIdAttachment Class Classes

repositioned prior to reading values during message transmission.

OpenLoadStream must be overridden in an ancestor class to properly create ( 1616), open, or position the internal stream used
for loading the contents of an attachment prior to transmission.

During transmission, values in the internal stream are encoded based on the properties specified in the message or message part
using methods in TIdMessageClient ( 1555) like SendHeader and SendBody.

CloseLoadStream ( 230) is used to ensure that the internal stream for accessing data in the message part is reset when all values
have been read during transmission.

If the internal stream is created in OpenLoadStream, it should be freed in CloseLoadStream ( 230). An existing stream should be
repositioned to its initial position prior to reading values for the message part.

See Also
TIdAttachmentFile.OpenLoadStream ( 241)

TIdAttachmentMemory.OpenLoadStream ( 250)

TIdAttachmentFile.CloseLoadStream ( 239)

TIdAttachment.PartType Method
Indicates the message part type to control decoding and processing during receipt.

Pascal
class function PartType: TIdMessagePartType; override;
Returns
TIdMessagePartType ( 2969) - Type indicator for the message part class.

Description
PartType is an overridden TIdMessagePartType ( 2969) class function used to provide the type indicator for the class instance.

PartType returns the value mptAttachment for TIdAttachment ( 227) and descendant classes.

PartType is used to differentiate message part types, and allows calling the proper methods required to decode and process
message part headers and contents in TIdMessageClient.ReceiveBody.

See Also
TIdMessageClient.ReceiveBody

TIdMessage.OnCreateAttachment ( 1554)

TIdMessage.CreateAttachmentClass

TIdAttachment.PrepareTempStream Method
Provides a stream for the contents of the message part.

Pascal
function PrepareTempStream: TIdStream; virtual; abstract;
Returns
TStream - Stream containing the contents for the message part.

Description
PrepareTempStream is an virtual abstract TStream function that specifies the method used to obtain a stream containing data for
the message part.

PrepareTempStream is called when loading or receiving a message with attachments. When a TIdMessage ( 1521) instance is
received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream and
FinishTempStream ( 231) methods for the attachment are called. These methods apply to both receiving a message from a

232 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachment Class

remote mail server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are
the same - differing only in the type of stream used to read the message contents.

PrepareTempStream ensures that the temporary stream used for processing the contents of the message part are allocated, sized,
and/or positioned prior to reading values to be stored in a TIdMessage ( 1521) instance.

Use FinishTempStream ( 231) to ensure that the temporary stream used for processing the contents of the message part is freed,
and/or repositioned after reading values stored in the message part.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

PrepareTempStream must be overridden in a descendant class, like TIdAttachmentFile ( 236) or TIdAttachmentMemory ( 244),
to implement creating or positioning the stream as required for the message part.

See Also
TIdAttachmentFile.PrepareTempStream ( 241)

TIdAttachmentMemory.PrepareTempStream ( 251)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.ProcessMessage

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachment.SaveToFile Method
Stores the headers and message part content for the attachment into the specified file.

Pascal
procedure SaveToFile(
const FileName: String
); virtual;
Parameters
Parameters Description
FileName FIle used to store the contents of the attachment.

Description
SaveToFile is a method used to store the headers and message part content for the attachment into the file specified in FileName
( 236).

SaveToFile creates a TIdFileStream ( 3026) instance that used to write the contents of the attachment by calling SaveToStream
( 233). SaveToFile frees the TIdFileStream ( 3026) instance prior to exiting form the method.

TIdAttachment.SaveToStream Method
Writes the content for an attachment onto the specified stream.

Pascal
procedure SaveToStream(
AStream: TIdStream
); virtual;
Parameters
Parameters Description
Stream Stream used to store the contents of the attachment.

Description
SaveToStream is a method used to write the content of the attachment into the TIdStream ( 3087) instance specified in AStream.

SaveToStream prepared an internal stream instance with the headers and the message part content for the attachment.

Internet Direct (Indy) Version 10.1.5 233


TIdAttachment Class Classes

SaveToStream uses the CopyFrom method in the stream instance to copy values from the load stream onto the stream specified by
AStream.

Use LoadFromStream to load the attachment stored using SaveToStream.

See Also
OpenLoadStream ( 231)

CloseLoadStream ( 230)

LoadFromStream

TIdAttachment Properties
The Properties of the TIdAttachment class are listed here.

Properties
Property Description
ContentDisposition ( 234) Indicates presentation and storage parameters for the message part.
ContentTypeName ( 235) Optional attribute parameter for the ContentType ( 1620) in a message part.
FileName ( 236) File name used to the store the attachment.

Legend
Property
read only

TIdAttachment.ContentDisposition Property
Indicates presentation and storage parameters for the message part.

Pascal
property ContentDisposition: string;
Description
ContentDisposition is a String property that represents the value for the Internet Message header "Content-Disposition", as
described in the Intenet Standards documents:

RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field

ContentDisposition indicates presentation information for the message part and can contain values and optional parameters.

ContentDisposition can include the following values and associated meanings, as described in the indicated Internet Standards
document:

Value Description RFC


inline displayed automatically RFC 2183
attachment user controlled display RFC 2183
form-data process as form response RFC 2388
signal tunneled content is processed silently RFC 3204
alert body is a ring tone to alert the user RFC 3261
icon body displayed as an icon to the user RFC 3261
render body should be displayed to the user RFC 3261
session body describes a communications session RFC 3261
signed-receipt-protocol requested signature format for receipt RFC 3335
signed-receipt-micalg requested signature algorithm for receipt RFC 3335

234 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachment Class

The values "inline" and "attachment" are the most commonly used ContentDisposition values for attachements.

"inline" indicates the message part should be display immediately, and in the order in which it occurs.

"attachment" indicates that the message part is separate from the main body of the message, and suggests a file where the
message part may be stored.

ContentDisposition may contain optional parameters in "attribute=value" form, that includes the following parameters names and
associated meanings:

Parameter Meaning RFC


filename name to be used when creating file RFC 2183
creation-date date when content was created RFC 2183
modification-date date when content was last modified RFC 2183
read-date date when content was last read RFC 2183
size approximate size of content in octets RFC 2183
name original field name in form RFC 2388
voice type or use of audio content RFC 2421
handling wheter or not processing is required RFC 3204

Some content disposition parameters have specific values which must be used, as described in the following:

Parameter Value RFC


voice Voice-Message RFC 2421
voice Voice-Message-Notification RFC 2421
voice Originator-Spoken-Name RFC 2421
voice Recipient-Spoken-Name RFC 2421
voice Spoken-Subject RFC 2421
handling required RFC 3204
handling optional RFC 3204

When ContentDisposition contains "attachment", the FileName ( 236) property reflects the file where the message part is stored.
Other parameters names and values are left in the ContentDisposition property.

For more detailed information about ContentDisposition values, please refer to the following:

RFC 2183 - Communicating Presentation Information in Internet Messages: The Content - Disposition Header Field

RFC 2388 - Returning Values from Forms: multipart/form-data

RFC 2421 - Voice Profile for Internet Mail (version 2)

RFC 3204 - MIME media types for ISUP and QSIG Objects

RFC 3261 - SIP: Session Initiation Protocol

RFC 3335 - MIME-based Secure Peer-to-Peer Business Data Interchange over the Internet

TIdAttachment.ContentTypeName Property
Optional attribute parameter for the ContentType ( 1620) in a message part.

Pascal
property ContentTypeName: String;

Internet Direct (Indy) Version 10.1.5 235


TIdAttachmentFile Class Classes

Description
ContentTypeName is a read-only String property that represents an optional attribute parameter for the ContentType ( 1620) used
in the message part.

For assitional information, please refer to the following reference documents:

RFC 1049 - Content-type header field for Internet messages.

RFC 1437 - The Extension of MIME Content-Types to a New Medium.

RFC 1896 - The text/enriched MIME Content-type.

RFC 2387 - The MIME Multipart/Related Content-type.

TIdAttachment.FileName Property
File name used to the store the attachment.

Pascal
property FileName: String;
Description
FileName is a TFileName property that represents the file name where the message part is stored.

When receiving a message, FileName contains the attribute parameter value from the Internet Message header:

"Content-Dispositon: attachment; filename=".


FileName is updated during receipt and processing of the message part in TIdMessageClient.ReceiveBody.

When creating a message for transmission, FileName indicates the local file name where the contents for the message part can be
located. FileName is used when the message part is encoded for transmission in TIdMessageClient.SendBody.

See Also
TIdAttachment.ContentDisposition ( 234)

TIdMessageClient.ReceiveBody

TIdMessageClient.SendBody

TIdAttachmentFile Class
Encapsulates a MIME-encoded attachment or inline graphic using local file storage.

File
IdAttachmentFile ( 4585)

Hierarchy

Pascal
TIdAttachmentFile = class(TIdAttachment);
Description
TIdAttachmentFile is a TIdAttachment ( 227) descendant that implements a MIME-encoded attachment or inline graphic using a
local file for storage of the contents of the message part.

TIdAttachmentFile publishes properties need to represent the file used as storage for the message part, and its longevity.
TIdAttachmentFile also implements the internal TFileStream stream used to read or write the contents of the message part during
transmission and receipt.

236 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentFile Class

TIdAttachmentFile implements abstract virtual methods from TIdAttachment ( 227) needed to retrieve and store the contents of
the message part using a stream.

Sending a Message with File Attachments


For sending a message with attachments, the following abstract virtual methods are overridden and reimplemented:

• Create ( 239)
• OpenLoadStream ( 241)
• CloseLoadStream ( 239)
Create ( 239) accepts an argument that indicates the file name containing the contents of the attachment.

When a TIdMessage ( 1521) instance is transmitted using TIdMessageClient ( 1555), or a descendant class, the overridden
OpenLoadStream ( 241) and CloseLoadStream ( 239) in the attachment are called. These overridden methods open and close
the internal stream used for loading the contents of the message part during transmission.

OpenLoadStream ( 241) creates a stream used for loading the contents of the message part. During transmission, values in the
internal stream are encoded based on the properties specified in the message or message part in TIdMessageClient ( 1555)
methods like SendHeader and SendBody.

CloseLoadStream ( 239) ensures that the internal stream for accessing data in the message part is freed when all values have
been read during transmission.

Accessing or Receiving a message with File Attachments


When loading or receiving a message with file attachments, the following abstract virtual are overridden and reimplemented:

• PrepareTempStream ( 241)
• FinishTempStream ( 240)
When a TIdMessage ( 1521) instance is received and processed using TIdMessageClient ( 1555), or a descendant class, the
overridden PrepareTempStream ( 241) and FinishTempStream ( 240) methods for the file attachment are called. These
methods apply to both receiving a message from a remote mail server or accessing a message from a local mail store. Essentially,
the actions are the same - differing only in the type of stream used to read the message contents.

PrepareTempStream ( 241) ensures that the temporary stream used for processing the contents of the message part is created
prior to reading values to be stored in a TIdMessage ( 1521) instance.

FinishTempStream ( 240) ensures that the temporary stream used for processing the contents of the message part is freed after
reading values stored in a TIdMessage ( 1521) instance.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

TIdAttachment ( 227), TIdAttachmentFile, TIdAttachmentMemory ( 244), and TIdText ( 2404) are used as collection items in
the TIdMessageParts ( 1623) collection.

See Also
TIdMessage.MessageParts ( 1548)

TIdMessagePart ( 1614)

TIdText ( 2404)

TIdAttachmentMemory ( 244)

TIdAttachment ( 227)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 237


TIdAttachmentFile Class Classes

TIdAttachmentFile Members
The following tables list the members exposed by TIdAttachmentFile.

Properties
Property Description
AttachmentBlocked ( 243) Indicates if creation of the storage for the attchment has been blocked.
Boundary ( 1618) Character sequence that delimits the message part.
BoundaryBegin ( 1618) Indicates that a boundary marker appears at the beginning of the message part.
BoundaryEnd ( 1618) Indicates that a boundary marker appears at the end of the message part.
CharSet ( 1619)
ContentDescription ( 1619) Represents descriptive information with a given message body.
ContentDisposition ( 234) Indicates presentation and storage parameters for the message part.
ContentID ( 1619) Identifier for the message part.
ContentLocation ( 1619) Specifies a URI that is the resource location for the entity in the message.
ContentTransfer ( 1620) Identifies the encoding scheme for the message part.
ContentType ( 1620) Identifies the MIME media type for the message.
ContentTypeName ( 235) Optional attribute parameter for the ContentType ( 1620) in a message part.
ExtraHeaders ( 1621) Represents message headers not used for with property storage.
FileIsTempFile ( 243) Indicates if the file for storing the message part can be deleted when freed.
FileName ( 236) File name used to the store the attachment.
Headers ( 1621) Represents message headers in native form.
IsEncoded ( 1622) Indicates that the body for the message part is MIME-encoded.
ParentPart ( 1622)
StoredPathName ( 244) Indicates the local file where the contents of the message part is stored.

Methods
Method Description
Assign ( 230) Copies properties from a persistent object to the current object instance.
Assign ( 1615)
CloseLoadStream ( 239) Frees the internal stream used in loading the contents of the message part.
Create ( 239) Constructor for the object instance.
Destroy ( 240) Frees the object instance from the message parts collection.
FinishTempStream ( 240) Resets the internal stream used to access the contents of the message part.
GetCharSet ( 1617)
OpenLoadStream ( 241) Specifies the method used to open and initialize the internal stream needed for loading an attachment before
transmission.
PartType ( 232) Indicates the message part type to control decoding and processing during receipt.
PartType ( 1617) Indicates the classification of the message part instance.
PrepareTempStream ( 241) Provides a stream for accessing the contents of the message part.
ResolveContentType ( 1617)
SaveToFile ( 242) Copies the content for a file-based message attachment to the specified file name.
SaveToStream ( 233) Writes the content for an attachment onto the specified stream.

Events
Event Description
OnGetMessagePartStream ( 1622)

Legend
Method
virtual
Property
read only
Event

TIdAttachmentFile Methods
The Methods of the TIdAttachmentFile class are listed here.

238 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentFile Class

Methods
Method Description
CloseLoadStream ( 239) Frees the internal stream used in loading the contents of the message part.
Create ( 239) Constructor for the object instance.
Destroy ( 240) Frees the object instance from the message parts collection.
FinishTempStream ( 240) Resets the internal stream used to access the contents of the message part.
OpenLoadStream ( 241) Specifies the method used to open and initialize the internal stream needed for loading an attachment before
transmission.
PrepareTempStream ( 241) Provides a stream for accessing the contents of the message part.
SaveToFile ( 242) Copies the content for a file-based message attachment to the specified file name.

Legend
Method
virtual

TIdAttachmentFile.CloseLoadStream Method
Frees the internal stream used in loading the contents of the message part.

Pascal
procedure CloseLoadStream; override;
Description
CloseLoadStream is an overridden procedure used to free the internal file stream created for loading the contents of the message
part during encoding and subsequent transmission.

CloseLoadStream is used in the implementation of TIdMessageClient.SendBody after a TIdMessageEncoder ( 1588) instance has
encoded the contents of the message part.

CloseLoadStream frees the TFileStream created in OpenLoadStream ( 241).

See Also
TIdAttachmentFile ( 236)

TIdAttachmentFile.OpenLoadStream ( 241)

TIdAttachment.CloseLoadStream ( 230)

TIdAttachmentFile.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
Collection: TIdMessageParts;
const AFileName: String = ''
); reintroduce;
Parameters
Parameters Description
Collection Collection that owns the message part.
AFileName File name for the attachment. Default value is ''.

Description
Create is the reintroduced constructor for the object instance.

Create calls the inherited constructor using Collection as the owner for the message part. Collection normally contains a reference
to the MessageParts property for the TIdMessage ( 1521) instance that contains the attachment.

FileName ( 236) indicates the file on the local system to use for storage of the attachment content in the file-based message
attachment. The file name portion of the FileName ( 236) argument is used in the corresponding property in the file-based
attachment. The complete file name (including any drive and path information) is assigned to the StoredPathName ( 244) property.

Internet Direct (Indy) Version 10.1.5 239


TIdAttachmentFile Class Classes

Create sets the FileIsTempFile ( 243) property to False to indicate that the file is not automatically deleted when the message or
attachment is freed by the application.

See Also
TIdMessage ( 1521) Filename

StoredPathName ( 244)

FileIsTempFile ( 243)

TIdAttachmentFile.Destroy Destructor
Frees the object instance from the message parts collection.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance and frees the collection item from the message parts collection.

When FileIsTempFile ( 243) contains True, Destroy will permanently delete the file indicated by the StoredPathName ( 244)
property.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdAttachmentFile.Create ( 239)

TIdAttachmentFile.FileIsTempFile ( 243)

TIdAttachmentFile.StoredPathName ( 244)

TIdAttachmentFile.FinishTempStream Method
Resets the internal stream used to access the contents of the message part.

Pascal
procedure FinishTempStream; override;
Description
FinishTempStream is an overridden procedure that implements the interface specified in the TIdAttachment ( 227) ancestor class.

FinishTempStream is called when loading or receiving a message with attachments. When a TIdMessage ( 1521) instance is
received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream ( 241) and
FinishTempStream methods for the attachment are called. These methods apply to both receiving a message from a remote mail
server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are the same -
differing only in the type of stream used to read the message contents.

FinishTempStream ensures that the temporary stream used for processing the contents of the message part is freed after reading
values in the message part.

Use PrepareTempStream ( 241) to ensure that the temporary stream used for processing the contents of the message part is
created prior to reading values stored in the message part.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

See Also
TIdAttachmentFile.PrepareTempStream ( 241)

TIdAttachment.FinishTempStream ( 231)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.ProcessMessage

240 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentFile Class

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachmentFile.OpenLoadStream Method
Specifies the method used to open and initialize the internal stream needed for loading an attachment before transmission.

Pascal
function OpenLoadStream: TIdStream; override;
Returns
TStream - Stream used to access the contents of the message part.

Description
OpenLoadStream is an overridden TStream function that implements the method used to open and initialize the internal stream
needed for loading an attachment before transmission.

OpenLoadStream is used to ensure that the internal TFileStream for accessing data in the message part is created prior to reading
values during message transmission. OpenLoadStream creates the TFileStream using the file name specified in StoredPathName
( 244) with the fmOpenRead ( 3206) and fmShareDenyWrite ( 3208) file mode constants.

During transmission, values in the internal stream are encoded based on the properties specified in the message or message part
using methods in TIdMessageClient ( 1555) like SendHeader and SendBody.

CloseLoadStream ( 239) is used to ensure that the internal stream for accessing data in the message part is freed when all values
have been read during transmission.

See Also
TIdAttachmentFile.CloseLoadStream ( 239)

TIdAttachment.OpenLoadStream ( 231)

TIdMessageClient.SendBody

TIdAttachmentFile.PrepareTempStream Method
Provides a stream for accessing the contents of the message part.

Pascal
function PrepareTempStream: TIdStream; override;
Returns
TStream - Stream containing the contents for the message part.

Description
PrepareTempStream is an overridden TStream function that implements the method used to obtain a stream containing data for the
message part.

PrepareTempStream is called when loading or receiving a message with file attachments. When a TIdMessage ( 1521) instance
is received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream and
FinishTempStream ( 240) methods for the attachment are called. These methods apply to both receiving a message from a
remote mail server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are
the same - differing only in the type of stream used to read the message contents.

FinishTempStream ( 240) is used to ensure that the temporary stream used for processing the contents of the message part is
freed after reading values stored in the message part.

PrepareTempStream ensures that the temporary stream used for processing the contents of the message part is created prior to
reading values to be stored in a TIdMessage ( 1521) instance.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

Internet Direct (Indy) Version 10.1.5 241


TIdAttachmentFile Class Classes

PrepareTempStream sets StoredPathName ( 244) to a temporary file name generated using MakeTempFilename ( 2874), and
sets FileIsTemp to True.

Warning:
PrepareLoadStream causes the value in FileIsTempFile ( 243) to be changed to True when the file stream is created for the file
name specified in StoredPathName ( 244). Setting FileIsTempFile ( 243) to True will permanently delete the attachment file
created when the message is freed. This behavior differs from previous versions of Indy, where the file was assumed to be
permanent storage for the message part.

Make sure all content in the message or message part has been saved prior to calling Destroy ( 240) for the TIdMessage (
1521) or the TIdAttachmentFile ( 236).

See Also
TIdAttachmentFile.FinishTempStream ( 240)

TIdAttachment.FinishTempStream ( 231)

TIdAttachment.PrepareTempStream ( 232)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.ProcessMessage

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachmentFile.SaveToFile Method
Copies the content for a file-based message attachment to the specified file name.

Pascal
procedure SaveToFile(
const FileName: String
); override;
Parameters
Parameters Description
FileName FIle used to store the contents of the file-based attachment.

Description
SaveToFile is an overridden method used to copy the contents of the file-based message attachment to the file name specified in
the FileName ( 236) argument.

SaveToFile calls the CopyFileTo ( 2745) function to copy the contents of the file specified in StoredPathname to the file indicated
in the FileName ( 236) argument.

SaveToFile can raise an EIdException ( 76) if the file copy cannot be performed using StoredPathName ( 244) or the FileName
( 236) argument.

Use OpenLoadStream ( 241) to access the content for a file-based attachment creasted using SaveToFile.

Exceptions
Exceptions Description
EIdException ( 76) Raised with the message RSTIdMessageErrorSavingAttachment when StorePathName or the file name
argument cannot be used to read or write the attachment content.

See Also
CopyFileTo ( 2745)

OpenLoadStream ( 241)

EIdException ( 76)

242 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentFile Class

RSTIdMessageErrorSavingAttachment

TIdAttachmentFile Properties
The Properties of the TIdAttachmentFile class are listed here.

Properties
Property Description
AttachmentBlocked ( 243) Indicates if creation of the storage for the attchment has been blocked.
FileIsTempFile ( 243) Indicates if the file for storing the message part can be deleted when freed.
StoredPathName ( 244) Indicates the local file where the contents of the message part is stored.

Legend
Property
read only

TIdAttachmentFile.AttachmentBlocked Property
Indicates if creation of the storage for the attchment has been blocked.

Pascal
property AttachmentBlocked: Boolean;
Description
AttachmentBlocked is a read-only Boolean property used to indicate if the local file storage for the attachment could not be created.
AttachmentBlocked is set to True in the FinishTempStream ( 240) method when the file indicated in StoredPathName ( 244) has
not been created.

This condition can indicate that local file creation was blocked by a virus scanner. It could also indicate any condition that prevents
creation of the local storage for the file-based attachment.

Use TIdMessage.ExceptionOnBlockedAttachments ( 1544) to indicate if an exception is raised when an attachment file has been
blocked.

See Also
FinishTempStream ( 240)

TIdMessage.ExceptionOnBlockedAttachments ( 1544)

TIdAttachmentFile.FileIsTempFile Property
Indicates if the file for storing the message part can be deleted when freed.

Pascal
property FileIsTempFile: Boolean;
Description
FileIsTempFile is a boolean property that indicates if the file in FileName ( 236) and StoredPathName ( 244) is a temporary file,
and should be deleted when the message part is freed from the message part collection.

Set FileIsTempFile to True if the mail client stores messages or attachment files for the account in another location, such as a
user-specific directory or mail store.

FileIsTempFile is used in Destroy ( 240) to determine if the local file is deleted.

Setting FileIsTempFile to True will permanently delete the attachment file created when the message is freed.

Internet Direct (Indy) Version 10.1.5 243


TIdAttachmentMemory Class Classes

Warning:
The default value for FileIsTempFile is False, as assigned in the Create ( 239) constructor. But, PrepareLoadStream causes the
value to be changed to True when the file stream is created for the file name specified in StoredPathName ( 244). This behavior
differs from previous versions of Indy, where the file was assumed to be permanent storage for the message part.

Make sure all content in the message or message part has been saved prior to calling Destroy ( 240) for the TIdMessage (
1521) or the TIdAttachmentFile ( 236).

See Also
TIdAttachmentFile.Create ( 239)

TIdAttachmentFile.Destroy ( 240)

TIdAttachmentFile.PrepareLoadStream

TIdMessage.Destroy ( 1526)

TIdMessage.OnCreateAttachment ( 1554)

TIdMessage.CreateAttachmentClass

TIdAttachmentFile.StoredPathName Property
Indicates the local file where the contents of the message part is stored.

Pascal
property StoredPathName: String;
Description
StoredPathName is a TFileName property that indicates the local file where the contents of the message part is stored.
StoredPathName may contain a fully qualified path when the file is stored in a directory other than the current directory.

StoredPathName is updated in Create ( 239) to indicate the file used in creating the file attachment for the message.

StoredPathName is also used in OpenLoadStream ( 241), and provides the file name for the internal TFileStream used to access
the contents of the message part during encoding for subsequent transmission.

StoredPathName is used in Destroy ( 240) when FileIsTempFile ( 243) contains True, and indicates the temporary file name to
be deleted.

During receipt of a file attachment message part, StoredPathName contains a temporary file name. The tempory file is deleted
when receipt of the message part is completed. The only representation of the message part is in memory, and must be stored to a
permanent location using SaveToFile ( 242) to avoid data loss when the TIdMessage ( 1521) instance containing the message
parts is freed.

See Also
TIdAttachmentFile.Create ( 239)

TIdAttachmentFile.Destroy ( 240)

TIdAttachmentFile.OpenLoadStream ( 241)

TIdAttachmentFile.FileIsTempFile ( 243)

TIdAttachmentMemory Class
Encapsulates a MIME-encoded attachment or inline graphic using in-memory storage.

File
IdAttachmentMemory ( 4586)

244 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentMemory Class

Hierarchy

Pascal
TIdAttachmentMemory = class(TIdAttachment);
Description
TIdAttachmentMemory is a TIdAttachment ( 227) descendant that implements a MIME-encoded attachment or inline graphic using
in-memory storage for the contents of the message part.

TIdAttachmentMemory publishes properties that provide access to memory used to store the message part using string- or
stream-based access methods.

TIdAttachmentMemory implements an internal TMemoryStream stream used to read or write the contents of the message part
during transmission and receipt.

TIdAttachmentMemory implements the abstract virtual methods from TIdAttachment ( 227) needed to retrieve and store the
contents of the message part using a stream.

Sending a Message with In-Memory Attachments


For sending a message with attachments, the following abstract virtual methods are overridden and reimplemented:

• Create ( 248)
• OpenLoadStream ( 250)
• CloseLoadStream ( 247)
The Create ( 248) constructor is overloaded to accept either a string or stream argument that contains the contents of the
attachment.

When a TIdMessage ( 1521) instance is transmitted using TIdMessageClient ( 1555), or a descendant class, the overridden
OpenLoadStream ( 250) and CloseLoadStream ( 247) in the attachment are called.

OpenLoadStream ( 250) creates a stream used for loading the contents of the message part. During transmission, values in the
internal stream are encoded based on the properties specified in the message or message part in TIdMessageClient ( 1555)
methods like SendHeader and SendBody.

CloseLoadStream ( 247) ensures that the internal stream for accessing data in the message part is reset to its initial position when
all values have been read during transmission.

Accessing or Receiving a message with In-Memory Attachments


When loading or receiving a message with in-memory attachments, the following abstract virtual are overridden and reimplemented:

• PrepareTempStream ( 251)
• FinishTempStream ( 250)
When a TIdMessage ( 1521) instance is received and processed using TIdMessageClient ( 1555), or a descendant class, the
overridden PrepareTempStream ( 251) and FinishTempStream ( 250) methods for the in-memory attachment are called. These
methods apply to both receiving a message from a remote mail server or accessing a message from a local mail store. Essentially,
the actions are the same - differing only in the type of stream used to read the message contents.

PrepareTempStream ( 251) ensures that the temporary stream used for processing the contents of the message part is reset to it
beginning prior to reading values to be stored in a TIdMessage ( 1521) instance.

FinishTempStream ( 250) ensures that the temporary stream used for processing the contents of the message part is reset to it
beginning after reading values stored in a TIdMessage ( 1521) instance.

Internet Direct (Indy) Version 10.1.5 245


TIdAttachmentMemory Class Classes

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

TIdAttachment ( 227), TIdAttachmentFile ( 236), TIdAttachmentMemory, and TIdText ( 2404) are used as collection items in
the TIdMessageParts ( 1623) collection.

See Also
TIdMessagePart ( 1614)

TIdMessage.MessageParts ( 1548)

TIdText ( 2404)

TIdAttachmentMemory

TIdAttachmentFile ( 236)

TIdAttachment ( 227)

IndySupport ( 15)

TIdAttachmentMemory Members
The following tables list the members exposed by TIdAttachmentMemory.

Properties
Property Description
Boundary ( 1618) Character sequence that delimits the message part.
BoundaryBegin ( 1618) Indicates that a boundary marker appears at the beginning of the message part.
BoundaryEnd ( 1618) Indicates that a boundary marker appears at the end of the message part.
CharSet ( 1619)
ContentDescription ( 1619) Represents descriptive information with a given message body.
ContentDisposition ( 234) Indicates presentation and storage parameters for the message part.
ContentID ( 1619) Identifier for the message part.
ContentLocation ( 1619) Specifies a URI that is the resource location for the entity in the message.
ContentTransfer ( 1620) Identifies the encoding scheme for the message part.
ContentType ( 1620) Identifies the MIME media type for the message.
ContentTypeName ( 235) Optional attribute parameter for the ContentType ( 1620) in a message part.
DataStream ( 252) Provides access to the contents for the in-memory message part using a stream.
DataString ( 252) Provides access to the contents for the in-memory message part as a string.
ExtraHeaders ( 1621) Represents message headers not used for with property storage.
FileName ( 236) File name used to the store the attachment.
Headers ( 1621) Represents message headers in native form.
IsEncoded ( 1622) Indicates that the body for the message part is MIME-encoded.
ParentPart ( 1622)

Methods
Method Description
Assign ( 230) Copies properties from a persistent object to the current object instance.
Assign ( 1615)
CloseLoadStream ( 247) Resets the stream used in loading the contents of the message part.
Destroy ( 249) Frees the object instance.
FinishTempStream ( 250) Resets the internal stream used to access the contents of the message part.
GetCharSet ( 1617)
OpenLoadStream ( 250) Opens and initializes the internal stream needed for loading an attachment before transmission.
PartType ( 232) Indicates the message part type to control decoding and processing during receipt.
PartType ( 1617) Indicates the classification of the message part instance.
PrepareTempStream ( 251) Provides a stream for accessing the contents of the message part.
ResolveContentType ( 1617)
SaveToFile ( 233) Stores the headers and message part content for the attachment into the specified file.
SaveToStream ( 233) Writes the content for an attachment onto the specified stream.
Create ( 247)

246 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentMemory Class

Events
Event Description
OnGetMessagePartStream ( 1622)

Legend
Method
virtual
Property
read only
Event

TIdAttachmentMemory Methods
The Methods of the TIdAttachmentMemory class are listed here.

Methods
Method Description
CloseLoadStream ( 247) Resets the stream used in loading the contents of the message part.
Create ( 247)
Destroy ( 249) Frees the object instance.
FinishTempStream ( 250) Resets the internal stream used to access the contents of the message part.
OpenLoadStream ( 250) Opens and initializes the internal stream needed for loading an attachment before transmission.
PrepareTempStream ( 251) Provides a stream for accessing the contents of the message part.

Legend
Method
virtual

TIdAttachmentMemory.CloseLoadStream Method
Resets the stream used in loading the contents of the message part.

Pascal
procedure CloseLoadStream; override;
Description
CloseLoadStream is an overridden procedure used to reset the internal stream used for loading the contents of the message part
during encoding and subsequent transmission.

CloseLoadStream is used in the implementation of TIdMessageClient.SendBody after a TIdMessageEncoder ( 1588) instance has
encoded the contents of the message part.

CloseLoadStream resets the position in DataStream ( 252) to its position prior to calling OpenLoadStream ( 250).

See Also
TIdAttachmentMemory.DataStream ( 252)

TIdAttachmentMemory.OpenLoadStream ( 250)

TIdAttachmentFile.CloseLoadStream ( 239)

TIdAttachmentMemory.Create Constructor
Overload List

Method Description
TIdAttachmentMemory.Create Constructor for the object instance.
(TIdCollection) ( 248)

Internet Direct (Indy) Version 10.1.5 247


TIdAttachmentMemory Class Classes

TIdAttachmentMemory.Create Constructor for the object instance.


(TIdMessageParts, String) ( 248)
TIdAttachmentMemory.Create Constructor for the object instance.
(TIdMessageParts, TIdStream) ( 249)

TIdAttachmentMemory.Create Constructor (TIdCollection)


Constructor for the object instance.

Pascal
constructor Create(
Collection: TIdCollection
); override; overload;
Parameters
Parameters Description
Collection Type is TIdCollection ( 3011).

Description
Create is an overloaded reintroduced constructor for the object instance.

Create calls the inherited constructor using Collection as the owner for the memory-based message attachment.

Create allocates the TIdMemoryStream ( 3058) instance used in the DataStream ( 252) property.

Use an overloaded variant of the constructor to load the contents of the memory-based attachment from a stream instance.

See Also
Create

TIdStream ( 3087)

DataSteam

TIdMemoryStream ( 3058)

TIdAttachmentMemory.Create Constructor (TIdMessageParts, String)


Constructor for the object instance.

Pascal
constructor Create(
Collection: TIdMessageParts;
const CopyFrom: String
); overload; reintroduce;
Parameters
Parameters Description
Collection Collection that owns the message part.
CopyFrom String containing the contents for the message part.

Description
Create is the constructor for the object instance.

Create is overloaded in TIdAttachmentMemory ( 244) to allow specifying the collection that owns the message part, and the string
that contains the contents for the message part.

Create calls the inherited Create method, and allocates the internal TMemoryStream used in the DataStream ( 252) property.

The value in CopyFrom is written to DataStream ( 252) to set the contents for the message part.

Use Destroy ( 249) to free the message part from the Collection.

248 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentMemory Class

See Also
TIdAttachmentMemory.Create

TIdAttachmentMemory.Destroy ( 249)

TIdAttachmentMemory.DataString ( 252)

TIdAttachmentMemory.DataStream ( 252)

TIdAttachmentMemory.Create Constructor (TIdMessageParts, TIdStream)


Constructor for the object instance.

Pascal
constructor Create(
Collection: TIdMessageParts;
const CopyFrom: TIdStream
); overload; reintroduce;
Parameters
Parameters Description
Collection Owner of the message part.
CopyFrom Stream with the content for the message part.

Description
Create is an overloaded reintroduced constructor for the object instance.

Create calls the inherited constructor using Collection as the owner for the memory-based message attachment.

CopyFrom is the TIdStream ( 3087) instance with the content for the memory-based message attachment. Values in CopyFrom
are read into the TIdMemoryStream ( 3058) instance allocated to the DataStream ( 252) property. Values in CopyFrom stream
are read into the DataStream ( 252) property until the entire contents of the CopyFrom stream has been loaded in the DataStream
( 252) property.

Use an overloaded variant of the constructor to load the contents of the memory-based attachment from a String value.

See Also
Create

TIdStream ( 3087)

DataSteam

TIdMemoryStream ( 3058)

TIdAttachmentMemory.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy frees resource allocated in Create ( 248) to the DataStream ( 252) property.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdAttachmentMemory.Create ( 248)

TIdAttachmentMemory.DataStream ( 252)

Internet Direct (Indy) Version 10.1.5 249


TIdAttachmentMemory Class Classes

TIdAttachmentMemory.FinishTempStream Method
Resets the internal stream used to access the contents of the message part.

Pascal
procedure FinishTempStream; override;
Description
FinishTempStream is an overridden procedure that implements the interface specified in the TIdAttachment ( 227) ancestor class.

FinishTempStream is called when loading or receiving a message with in-memory attachments. When a TIdMessage ( 1521)
instance is received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream
( 251) and FinishTempStream methods for the attachment are called. These methods apply to both receiving a message from a
remote mail server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are
the same - differing only in the type of stream used to read the message contents.

Use PrepareTempStream ( 251) to ensure that the temporary stream used for processing the contents of the message part is set
to its origin prior to reading values stored in the message part.

FinishTempStream ensures that the temporary stream used for processing the contents of the message part is reset to its original
stream position after reading values in the message part.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

See Also
TIdAttachmentMemory.PrepareTempStream ( 251)

TIdAttachment.FinishTempStream ( 231)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.ProcessMessage

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachmentMemory.OpenLoadStream Method
Opens and initializes the internal stream needed for loading an attachment before transmission.

Pascal
function OpenLoadStream: TIdStream; override;
Returns
TStream - Stream used to access the contents of the message part.

Description
OpenLoadStream is an overridden TIdStream ( 3087) function that implements the method used to open and initialize the internal
stream needed for loading an in-memory attachment before transmission.

OpenLoadStream is used to ensure that the internal stream for accessing data in the message part is positioned prior to reading
values during message transmission. OpenLoadStream stores the initial position in the stream, and resets the current stream
position to its beginning.

During transmission, values in the internal stream are encoded based on the properties specified in the message or message part
using methods in TIdMessageClient ( 1555) like SendHeader and SendBody.

CloseLoadStream ( 247) is used to ensure that the internal stream for accessing data in the message part is reset when all values
have been read during transmission.

The return value for the method is the stream indicated in the DataStream ( 252) property.

250 Internet Direct (Indy) Version 10.1.5


Classes TIdAttachmentMemory Class

See Also
TIdAttachmentMemory.CloseLoadStream ( 247)

TIdAttachment.OpenLoadStream ( 231)

TIdMessageClient.SendBody

TIdAttachmentMemory.PrepareTempStream Method
Provides a stream for accessing the contents of the message part.

Pascal
function PrepareTempStream: TIdStream; override;
Returns
TStream - Stream containing the contents for the message part.

Description
PrepareTempStream is an overridden TIdStream ( 3087) function that implements the method used to obtain a stream containing
data for the message part.

The return value for the method is the TIdStream ( 3087) instance in the DataStream ( 252) property.

PrepareTempStream is called when loading or receiving a message with in-memory attachments. When a TIdMessage ( 1521)
instance is received and processed using TIdMessageClient ( 1555), or a descendant class, the overridden PrepareTempStream
and FinishTempStream ( 250) methods for the attachment are called. These methods apply to both receiving a message from a
remote mail server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are
the same - differing only in the type of stream used to read the message contents.

PrepareTempStream ensures that the temporary stream used for processing the contents of the message part is set to its origin
prior to reading values to be stored in a TIdMessage ( 1521) instance.

FinishTempStream ( 250) is used to ensure that the temporary stream used for processing the contents of the message part is
reset after reading values stored in the message part.

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient ( 1555) rely on the overridden methods.

Make sure all content in the message or message part has been saved using SaveToFile ( 233) prior to calling Destroy ( 249)
for the TIdMessage ( 1521) or the TIdAttachmentMemory ( 244) message part.

See Also
TIdAttachmentMemory.PrepareTempStream

TIdAttachmentMemory.FinishTempStream ( 250)

TIdAttachment.FinishTempStream ( 231)

TIdMessage.LoadFromFile ( 1532)

TIdMessage.LoadFromStream ( 1533)

TIdMessage.ProcessMessage

TIdMessage.ReceiveHeader

TIdMessage.ReceiveBody

TIdAttachmentMemory Properties
The Properties of the TIdAttachmentMemory class are listed here.

Internet Direct (Indy) Version 10.1.5 251


TIdAttachmentMemory Class Classes

Properties
Property Description
DataStream ( 252) Provides access to the contents for the in-memory message part using a stream.
DataString ( 252) Provides access to the contents for the in-memory message part as a string.

Legend
Property

TIdAttachmentMemory.DataStream Property
Provides access to the contents for the in-memory message part using a stream.

Pascal
property DataStream: TIdStream;
Description
DataStream is a TIdStream ( 3087) property that represents the stream used to access the contents of the in-memory message
part.

DataStream is the stream returned by the OpenLoadStream ( 250) method, and used to access the contents of the in-memory
message part during encoding and subsequent transmission.

DataStream is updated in PrepareTempStream ( 251) and FinishTempStream ( 250) when loading or receiving an in-memory
message part.

DataStream is allocated in Create ( 248), and freed in Destroy ( 249).

Assigning a new TIdStream ( 3087) instance to DataStream causes the contents of the new stream to be copied to the
DataStream property.

Use DataString ( 252) to read or write the contents of the in-memory message part as a String value.

See Also
TIdAttachmentMemory.DataString ( 252)

TIdAttachmentMemory.OpenLoadStream ( 250)

TIdAttachmentMemory.CloseLoadStream ( 247)

TIdAttachmentMemory.PrepareTempStream ( 251)

TIdAttachmentMemory.FinishTempStream ( 250)

TIdAttachmentMemory.Create ( 248)

TIdAttachmentMemory.Destroy ( 249)

TIdAttachmentMemory.DataString Property
Provides access to the contents for the in-memory message part as a string.

Pascal
property DataString: string;
Description
DataString is a string property that represents the contents of the in-memory message part.

Reading or writing values in DataString causes DataStream ( 252) to be accessed for the corresponding operation.

When reading values in DataString, the entire contents of the stream are returned, but the position in DataStream ( 252) prior to
reading values is maintained.

When writing values to DataString, the contents in DataStream ( 252) are discarded and set to the new value for the property.

Use DataStream ( 252) to access the contents for the in-memory message part as a TStream instance.

252 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthentication Class

See Also
TIdAttachmentMemory.DataStream ( 252)

TIdAttachmentMemory.OpenLoadStream ( 250)

TIdAttachmentMemory.CloseLoadStream ( 247)

TIdAttachmentMemory.PrepareTempStream ( 251)

TIdAttachmentMemory.FinishTempStream ( 250)

TIdAuthentication Class
Ancestor for authentication ( 254) classes in the Indy authentication ( 254) framework.

File
IdAuthentication ( 4586)

Hierarchy

Pascal
TIdAuthentication = class(TIdPersistent);
Description
TIdAuthentication is a TIdPersistent ( 3073) descendant, and the common ancestor class that specifies the properties and
methods available in the Indy authentication ( 254) framework. TIdAuthentication represents the common functionality needed to
implement the authentication ( 254) methods described in the Internet Standards documents:

RFC 2616 - Hypertext Transfer Protocol [HTTP/1.1]

RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication

Applications should create ( 255) instances of descendant classes that implement the specifics described in the preceeding
documents, such as TIdBasicAuthentication ( 275) and TIdDigestAuthentication ( 573).

See Also
TIdPersistent ( 3073)

TIdBasicAuthentication ( 275)

TIdDigestAuthentication ( 573)

TIdAuthentication Members
The following tables list the members exposed by TIdAuthentication.

Properties
Property Description
AuthParams ( 256) Represents authentication ( 254) parameters to be used for the process.
CurrentStep ( 257) Identifies the current task number during authentication ( 254) processing.
Params ( 257) Contains authentication ( 254) parameters for the mechanism.
Password ( 257) Represents the authorization credentials for the authentication ( 254) process.
Steps ( 257) Number of tasks required for the authentication ( 254) process.
Username ( 258) Represents the authorization identity for the authentication ( 254) process.

Internet Direct (Indy) Version 10.1.5 253


TIdAuthentication Class Classes

Methods
Method Description
Authentication ( 254) Represents the authentication method name to use.
Create ( 255) Constructor for the object instance.
Destroy ( 255) Frees the object instance.
KeepAlive ( 255) Indicates that Keep-Alive signals are supported for the authentication ( 254) mechanism.
Next ( 255) Identifies the next action in the authentication ( 254) process.
Reset ( 256) Clears the number of retries for the authentication ( 254) mechanism.

Legend
Method
abstract
virtual
Property
read only

TIdAuthentication Methods
The Methods of the TIdAuthentication class are listed here.

Methods
Method Description
Authentication ( 254) Represents the authentication method name to use.
Create ( 255) Constructor for the object instance.
Destroy ( 255) Frees the object instance.
KeepAlive ( 255) Indicates that Keep-Alive signals are supported for the authentication ( 254) mechanism.
Next ( 255) Identifies the next action in the authentication ( 254) process.
Reset ( 256) Clears the number of retries for the authentication ( 254) mechanism.

Legend
Method
abstract
virtual

TIdAuthentication.Authentication Method
Represents the authentication method name to use.

Pascal
function Authentication: String; virtual; abstract;
Returns
String - Authentication method Name for the object instance.

Description
Authentication is an abstract virtual String function that provides the identity, credentials, and other authentication parameteres for
the authentication scheme.

Authentication must be overridden in a descendant class to implement the specifics for the authenticatiopn scheme, like formatting,
encoding, and/or encryption.

Use AuthParams ( 256) to access the common parameters for the authentication scheme.

See Also
AuthParams ( 256)

254 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthentication Class

TIdAuthentication.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; virtual;
Description
Create is the constructor for the object instance. Create relies on the inherited Create method. Create allocates resources required
for the Params ( 257) property, and sets the default value for CurrentStep ( 257) to 0.

See Also
TIdAuthentication.Params ( 257)

TIdAuthentication.CurrentStep ( 257)

TIdAuthentication.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy clears values in AuthParams ( 256), if values have been assigned to the
property, prior to calling the inherited Destroy method.

See Also
TIdAuthentication.AuthParams ( 256)

TIdAuthentication.KeepAlive Method
Indicates that Keep-Alive signals are supported for the authentication ( 254) mechanism.

Pascal
function KeepAlive: Boolean; virtual; abstract;
Returns
Boolean - True when the KEEP-ALIVE header is supported for the authentication ( 254) scheme.

Description
KeepAlive is an abstract virtual Boolean function that specifies the function used to indicate if the authentication ( 254) mechanism
supports use of the KEEP-ALIVE header. Descendant classes, like TIdBasicAuthentication ( 275), must implement the KeepAlive
function to indicate if the mechanism can be used to prevent loss of a connection during authentication ( 254) processing.

See Also
TIdBasicAuthentication.KeepAlive ( 277)

TIdAuthentication.Next Method
Identifies the next action in the authentication ( 254) process.

Pascal
function Next: TIdAuthWhatsNext;
Returns
TIdAuthWhatsNext ( 2945) - Next action in the authentication ( 254) process.

Internet Direct (Indy) Version 10.1.5 255


TIdAuthentication Class Classes

Description
Next is a TIdAuthWhatsNext ( 2945) function that identifies the next action that should be performed in the authentication ( 254)
process. Next will increment the the value of Retries when the return value is wnDoRequest.

Next is used in TIdHTTP.OnAuthorization ( 1050) to determine the action to be taken by the user agent.

See Also
TIdHTTP.OnAuthorization ( 1050)

TIdAuthentication.Reset Method
Clears the number of retries for the authentication ( 254) mechanism.

Pascal
procedure Reset; virtual;
Description
Reset is a virtual procedure that clears the number of retry attempts performed using the authentication ( 254) mechanism. In
TIdAuthentication ( 253), Reset sets the value of the AuthRetries property to 0. Descendant classes, like TIdBasicAuthentication
( 275) will override Reset to perform the functionality specific to the authentication ( 254) mechanism.

See Also
TIdBasicAuthentication.Reset ( 278)

TIdAuthentication Properties
The Properties of the TIdAuthentication class are listed here.

Properties
Property Description
AuthParams ( 256) Represents authentication ( 254) parameters to be used for the process.
CurrentStep ( 257) Identifies the current task number during authentication ( 254) processing.
Params ( 257) Contains authentication ( 254) parameters for the mechanism.
Password ( 257) Represents the authorization credentials for the authentication ( 254) process.
Steps ( 257) Number of tasks required for the authentication ( 254) process.
Username ( 258) Represents the authorization identity for the authentication ( 254) process.

Legend
Property
read only

TIdAuthentication.AuthParams Property
Represents authentication ( 254) parameters to be used for the process.

Pascal
property AuthParams: TIdHeaderList;
Description
AuthParams is a TIdHeaderList ( 1024) property that represents authentication ( 254)

See Also
TIdRequestHeaderInfo ( 1857)

TIdHeaderList ( 1024)

TIdHTTP.Request ( 1049)

TIdCustomHTTP.Response ( 428)

256 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthentication Class

TIdAuthentication.CurrentStep Property
Identifies the current task number during authentication ( 254) processing.

Pascal
property CurrentStep: Integer;
Description
CurrentStep is a read-only Integer property used to identify the active task during reading of authentication ( 254) information.
CurrentStep contains the value 0 (zero) when Username ( 258) and Password ( 257) values have not been examined for the
corresponding TIdAuthWhatsNext ( 2945) value. CurrentStep contains the value 1 (one) when the current authentication ( 254)
process has failed.

The default value for CurrentStep is 0 (zero) as assigned in the Create ( 255) constructor. CurrentStep is also set to the default
value in the Reset ( 256) method.

See Also
TIdAuthentication.Reset ( 256)

TIdAuthentication.Create ( 255)

TIdAuthentication.Params Property
Contains authentication ( 254) parameters for the mechanism.

Pascal
property Params: TIdHeaderList;
Description
Params is a read-only TIdHeaderList ( 1024) property used to represent common parameter values for the authentication ( 254)
mechanism. Params is used to store the Username ( 258) and Password ( 257) property values used during execution of the
authorization process. Params is also used in descendant classes for values specific to the enhanced authentication ( 254)
functionality.

See Also
Username ( 258)

Password ( 257)

TIdBasicAuthentication.Realm ( 278)

TIdAuthentication.Password Property
Represents the authorization credentials for the authentication ( 254) process.

Pascal
property Password: String;
Description
Password is a String property that represents the authorization credentials used in the authentication ( 254) process. Use
Username ( 258) to specify the identity used for the authentication ( 254) process.

See Also
Username ( 258)

TIdAuthentication.Steps Property
Number of tasks required for the authentication ( 254) process.

Internet Direct (Indy) Version 10.1.5 257


TIdAuthenticationCollection Class Classes

Pascal
property Steps: Integer;
Description
Steps is a read-only Integer property that represents the number of tasks needed to perform the authentication ( 254) process.
The default value returned for the Steps property is 0.

Steps is used when a protocol handler compares the values in Step and CurrentStep ( 257) while performing authentication (
254) for the protocol.

See Also
CurrentStep ( 257)

TIdCustomHTTP.OnDisconnected

TIdAuthentication.Username Property
Represents the authorization identity for the authentication ( 254) process.

Pascal
property Username: String;
Description
Username is a String property that represents the authorization identity used in the authentication ( 254) process.

Use Password ( 257) to specify the credentials used for the authentication ( 254) process.

See Also
Password ( 257)

TIdAuthenticationCollection Class
Implements a container for authentication mechanisms used by a HTTP client.

File
IdAuthenticationManager ( 4587)

Hierarchy

Pascal
TIdAuthenticationCollection = class(TIdOwnedCollection);
Description
TIdAuthenticationCollection is a TOwnedCollection descendant that implements a container for authentication mechanisms used by
a HTTP client.

Items ( 260) contains the TIdAuthenticationItem ( 260) authentication mechanism used for a given URL accessed by a
TIdCustomHTTP ( 404) or TIdHTTP ( 1041) client.

See Also
TIdAuthenticationItem ( 260)

TIdCustomHTTP ( 404)

TIdHTTP ( 1041)

258 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthenticationCollection Class

TIdAuthenticationCollection Members
The following tables list the members exposed by TIdAuthenticationCollection.

Properties
Property Description
Items ( 260) Provides indexes access to authentication class instances in the collection.

Methods
Method Description
Add ( 259) Adds a new authentication item to the collection.
Create ( 259) Constructor for the collection.

Legend
Method
Property

TIdAuthenticationCollection Methods
The Methods of the TIdAuthenticationCollection class are listed here.

Methods
Method Description
Add ( 259) Adds a new authentication item to the collection.
Create ( 259) Constructor for the collection.

Legend
Method

TIdAuthenticationCollection.Add Method
Adds a new authentication item to the collection.

Pascal
function Add: TIdAuthenticationItem;
Description
Add is a TIdAuthenticationItem ( 260) function used to create ( 259) new object instances in the Items ( 260) property for the
collection. Add creates a new instance of the ItemClass for the collection, TIdAuthenticationItem ( 260), with the collection as the
owner of the item.

Use Items ( 260) for read and write access to exisiting object instances in the collection.

See Also
TIdAuthenticationItem ( 260)

Items ( 260)

TIdAuthenticationCollection.Create Constructor
Constructor for the collection.

Pascal
constructor Create(
AOwner: TIdPersistent
);

Internet Direct (Indy) Version 10.1.5 259


TIdAuthenticationItem Class Classes

Parameters
Parameters Description
AOwner Owner of the collection.

Description
Create is the constructor for the collection. Create calls the inherited Create method using AOwner as the owner of the collection,
and TIdAuthenticationItem ( 260) as the ItemClass for objects added to the collection using Add ( 259).

See Also
TIdAuthenticationItem ( 260)

Add ( 259)

TIdAuthenticationCollection Properties
The Properties of the TIdAuthenticationCollection class are listed here.

Properties
Property Description
Items ( 260) Provides indexes access to authentication class instances in the collection.

Legend
Property

TIdAuthenticationCollection.Items Property
Provides indexes access to authentication class instances in the collection.

Pascal
property Items [AIndex: Integer]: TIdAuthenticationItem;
Description
Items is an indexed TIdAuthenticationItem ( 260) property that provides access to the items in the collection by the integer value in
Index.

Reading a collection item in a specified position returns the item as a TIdAuthenticationItem ( 260) object instance. Writing a
TIdAuthenticationItem ( 260) to specified position calls the Assign method for the collection item to store the new value(s).

Use Add ( 259) to create ( 259) a new TIdAuthenticationItem ( 260) collection item.

See Also
Add ( 259)

TIdAuthenticationManager ( 263)

TIdAuthenticationItem Class
Represents an authentication mechanism used in a TIdAuthenticationCollection ( 258) collection.

File
IdAuthenticationManager ( 4587)

Hierarchy

260 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthenticationItem Class

Pascal
TIdAuthenticationItem = class(TIdCollectionItem);
Description
TIdAuthenticationItem is a TCollectionItem descendant that implements items maintained in a TIdAuthenticationCollection ( 258)
collection. TIdAuthenticationItem represents the individual authentication mechanisms used for HTTP client requests, including the
URL ( 263) and identity and authorization values provoded as parameters in a client request.

See Also
TIdCustomHTTP.AuthenticationManager ( 421)

TIdAuthenticationItem Members
The following tables list the members exposed by TIdAuthenticationItem.

Properties
Property Description
Params ( 262) Represent arguments used with an authentication mechanism.
URL ( 263) Specified the resource location for the authentication item.

Methods
Method Description
Create ( 261) Constructor for the authentication object instance.
Destroy ( 262) Destructor for the object instance.

Legend
Constructor
virtual
Property

TIdAuthenticationItem Methods
The Methods of the TIdAuthenticationItem class are listed here.

Methods
Method Description
Create ( 261) Constructor for the authentication object instance.
Destroy ( 262) Destructor for the object instance.

Legend
Constructor
virtual

TIdAuthenticationItem.Create Constructor
Constructor for the authentication object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Collection that owns the object instance.

Internet Direct (Indy) Version 10.1.5 261


TIdAuthenticationItem Class Classes

Description
Create is the constructor for the authentication object instance. Create calls the inherited Create method using ACollection as the
owner of the object instance. Create also allocates resources required for the URL ( 263) and Params ( 262) properties for the
authentication mechanism.

See Also
URL ( 263)

Params ( 262)

Destroy ( 262)

TIdAuthenticationItem.Destroy Destructor
Destructor for the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees resources allocated in Create ( 261) for the URL ( 263) and
Params ( 262) properties. Destroy calls the inherited Destroy method prior to exiting.

See Also
URL ( 263)

Params ( 262)

Create ( 261)

TIdAuthenticationItem Properties
The Properties of the TIdAuthenticationItem class are listed here.

Properties
Property Description
Params ( 262) Represent arguments used with an authentication mechanism.
URL ( 263) Specified the resource location for the authentication item.

Legend
Property

TIdAuthenticationItem.Params Property
Represent arguments used with an authentication mechanism.

Pascal
property Params: TIdStringList;
Description
Params is a TStringList property that represents the arguments provided for an authentication mechanism added to the collection
maintained by TIdAuthenticationManager ( 263). Params is used with URL ( 263) to store the information required to use the
authentication mechanism.

Params is initialized in the Create ( 261) constructor, and released in the Destroy ( 262) destructor. Write access to the Params
property calls Assign to transfer the values from a TStringList to the property.

See Also
Create ( 261)

262 Internet Direct (Indy) Version 10.1.5


Classes TIdAuthenticationManager Class

Destroy ( 262)

TIdAuthenticationItem.URL Property
Specified the resource location for the authentication item.

Pascal
property URL: TIdURI;
Description
URL is a TIdURI ( 2552) property that represents the resource location for the authetication added to the colletion maintained by
TIdAuthenticationManager ( 263). URL is use with Params ( 262) to store the information required to use the authentication
mechanism.

URL is initialized in the Create ( 261) constructor, and released in the Destroy ( 262) destructor. Write access to the URL
property copies the URI for the new value to the URI for the property.

See Also
Create ( 261)

Destroy ( 262)

TIdAuthenticationManager Class
Maintains authentication mechanisms used for a HTTP client connection.

File
IdAuthenticationManager ( 4587)

Hierarchy

Pascal
TIdAuthenticationManager = class(TIdBaseComponent);
Description
TIdAuthenticationManager is a TIdBaseComponent ( 266) descendant that maintains a collection of authentication mechanisms
used by a HTTP client.

TIdAuthenticationManager is the type used to represent the TIdCustomHTTP.AuthenticationManager ( 421) property, and is used
when a HTTP request requires a specific TIdAuthentication ( 253) mechanism.

See Also
AddAuthentication ( 264)

Authentications ( 265)

TIdCustomHTTP.AuthenticationManager ( 421)

TIdAuthentication ( 253)

TIdAuthenticationManager Members
The following tables list the members exposed by TIdAuthenticationManager.

Internet Direct (Indy) Version 10.1.5 263


TIdAuthenticationManager Class Classes

Properties
Property Description
Authentications ( 265) Authentication class instances maintained by the manager component.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AddAuthentication ( 264) Adds a new authentication mechanism to the collection for the component,
Create ( 267) Constructor for the object instance.
Destroy ( 265) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdAuthenticationManager Methods
The Methods of the TIdAuthenticationManager class are listed here.

Methods
Method Description
AddAuthentication ( 264) Adds a new authentication mechanism to the collection for the component,
Destroy ( 265) Frees the object instance.

Legend
Method
virtual

TIdAuthenticationManager.AddAuthentication Method
Adds a new authentication mechanism to the collection for the component,

Pascal
procedure AddAuthentication(
AAuthtetication: TIdAuthentication;
AURL: TIdURI
);
Parameters
Parameters Description
AAuthtetication Authentication mechanism to add.
AURL Resource locator for the authentication.

Description
AddAuthentication is a convenience procedure that creates a new authentication class instance in the Authentications ( 265)
collection maintained by the component.

AddAuthentication calls the Add method for the Authentications ( 265) collection, and sets the URL and Params values
maintained in the new collection item based on values in the AAuthtetication and AURL parameters.

See Also
TIdAuthenticationCollection ( 258)

TIdAuthenticationItem ( 260)

264 Internet Direct (Indy) Version 10.1.5


Classes TIdBaseComponent Class

TIdAuthentication ( 253)

Authentications ( 265)

TIdAuthenticationManager.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy frees resource allocated in the Create ( 267) method for the Authentications ( 265) property.

Destroy calls the inherited Destroy method prior to exiting.

See Also
Create ( 267)

Authentications ( 265)

TIdAuthenticationManager Properties
The Properties of the TIdAuthenticationManager class are listed here.

Properties
Property Description
Authentications ( 265) Authentication class instances maintained by the manager component.

Legend
Property
read only

TIdAuthenticationManager.Authentications Property
Authentication class instances maintained by the manager component.

Pascal
property Authentications: TIdAuthenticationCollection;
Description
Authentications is a read-only TIdAuthenticationCollection ( 258) property that represents the TIdAuthenticationItem ( 260)
instances maintained by the authentication manager component.

Authentications is initialized in the Create ( 267) constructor, and released in the Destroy ( 265) destructor. Authentications is
updated when AddAuthentications is called.

Use methods in the TOwnedCollection ancestor class, like Clear, Delete, Items, to access members of the collection.

See Also
Create ( 267)

Destroy ( 265)

AddAuthentication ( 264)

Internet Direct (Indy) Version 10.1.5 265


TIdBaseComponent Class Classes

TIdBaseComponent Class
Ancestor class for Indy component classes.

File
IdBaseComponent ( 4588)

Hierarchy

Pascal
TIdBaseComponent = class(TIdInitializerComponent);
Description
TIdBaseComponent is a TIdInitializerComponent ( 1273) descendant that represents the class used as an ancestor for Indy
components.

TIdBaseComponent implements properties and methods that allow Indy components to access Version ( 269) number information.

TIdBaseComponent is used as the ancestor for utility and other non-socket based components. Socket-based components
generally inherit from TIdComponent ( 355) which provides OnWork and OnStatus event handlers.

See Also
TIdInitializerComponent ( 1273)

TIdComponent ( 355)

IndySupport ( 15)

TIdBaseComponent Members
The following tables list the members exposed by TIdBaseComponent.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Constructor
virtual
Property
read only

TIdBaseComponent Methods
The Methods of the TIdBaseComponent class are listed here.

266 Internet Direct (Indy) Version 10.1.5


Classes TIdBaseComponent Class

Methods
Method Description
Create ( 267) Constructor for the object instance.
CType ( 267)
GetVersion ( 269) Version ( 269) number for Indy component suite.

Legend
Constructor

TIdBaseComponent.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AOwner: TComponent
); overload; reintroduce;
Parameters
Parameters Description
AOwner Owner of the object instance.

Description
Create is an overloaded constructor reintroduced in TIdBaseComponent ( 266) for all platfoms except .Net.

Create is reintroduced to trap the condition where override constructors are used at compile time. This technique does not work in
.Net, but we always test in VCL so this will catch it.

Create calls the inherited constructor.

See Also
TIdBaseComponent.Create

TIdBaseComponent.CType Method
Overload List

Method Description
TIdBaseComponent.CType Performs type conversion for the platform-specific class instance.
(StringCollection) ( 267)
TIdBaseComponent.CType Performs type conversion for the platform-specific class instance.
(System.IO.Stream) ( 268)
TIdBaseComponent.CType (TIdStrings) Performs type conversion for the platform-specific class instance.
( 268)

TIdBaseComponent.CType Method (StringCollection)


Performs type conversion for the platform-specific class instance.

Pascal
function CType(
aStrings: StringCollection
): TIdStrings; overload;
Parameters
Parameters Description
aStrings FCL String collection to convert to a TIdStrings ( 3089) instance.

Internet Direct (Indy) Version 10.1.5 267


TIdBaseComponent Class Classes

Returns
TIdStrings ( 3089) - Native TIdStrings ( 3089) instance for the type conversion.

Description
CType is an overloaded TIdStrings ( 3089) function used to perform type conversion for the platform-specific class instance in
aStrings.

CType is available in Visual Studio builds of the Indy library (specifically for VB.Net programs) which do not have access to the
implicit conversions in the Borland RTL.

CType is used to convert the StringsCollection instance in aStrings to a native TIdStrings ( 3089) class instance.

Use overloaded variants of the method to convert an FCL System.IO.Stream class instance to a TIdStream ( 3087) class instance.

Use overloaded variants of the method to convert a native TIdStrings ( 3089) class instance to a StringCollection class instance.

See Also
TIdBaseComponent.CType

TIdBaseComponent.CType Method (System.IO.Stream)


Performs type conversion for the platform-specific class instance.

Pascal
function CType(
aStream: System.IO.Stream
): TIdStream; overload;
Parameters
Parameters Description
aStream FCL Stream class to convert to a native TStream instance.

Returns
TIdStream ( 3087) - Native stream instance for the type conversion.

Description
CType is an overloaded TIdStream ( 3087) function used to perform type conversion for the platform-specific class instance in
aStream.

CType is available in Visual Studio builds of the Indy library (specifically for VB.Net programs) which do not have access to the
implicit conversions in the Borland RTL.

CType is used to convert the System.IO.Stream instance in aStream to a TIdStream ( 3087) class instance.

Use overloaded variants of the method to convert an FCL StringCollections class instance to a TIdStrings ( 3089) class instance,
and vice-sersa.

See Also
TIdBaseComponent.CType

TIdBaseComponent.CType Method (TIdStrings)


Performs type conversion for the platform-specific class instance.

Pascal
function CType(
aStrings: TIdStrings
): StringCollection; overload;
Parameters
Parameters Description
aStrings TIdStrings ( 3089) class instance to convert to a StringCollection type.

268 Internet Direct (Indy) Version 10.1.5


Classes TIdBaseComponent Class

Returns
StringCollection - StringCollection for the type conversion.

Description
CType is an overloaded StringCollection function used to perform type conversion for the platform-specific class instance in
aStrings.

CType is available in Visual Studio builds of the Indy library (specifically for VB.Net programs) which do not have access to the
implicit conversions in the Borland RTL.

CType is used to convert the TIdStrings ( 3089) class instance in aStrings to a StringsCollection class instance.

Use overloaded variants of the method to convert an FCL System.IO.Stream class instance to a native TStream class instance.

Use overloaded variants of the method to convert a StringCollection class instance to a native TIdStrings ( 3089) class instance.

See Also
TIdBaseComponent.CType

TIdBaseComponent.GetVersion Method
Version ( 269) number for Indy component suite.

Pascal
function GetVersion: string;
Returns
String - version number for the Indy component suite.

Description
GetVersion is a String function used as the read access specifier for the Version ( 269) property and returns the Internet Direct
(Indy) version number for the components installed on your computer.

GetVersion returns the value specified in gsIdVersion as the return value.

See Also
TIdBaseComponent.Version ( 269)

TIdBaseComponent Properties
The Properties of the TIdBaseComponent class are listed here.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Legend
Property
read only

TIdBaseComponent.Version Property
Identifies the version number for the Indy component suite.

Pascal
property Version: string;
Description
Version is a read-only String property that identifies the version number for the Internet Direct (Indy) components installed on your

Internet Direct (Indy) Version 10.1.5 269


TIdBaseStream Class Classes

computer.

Version returns the value specified in gsIdVersion in the return value.

See Also
TIdBaseComponent.GetVersion ( 269)

gsIdVersion

TIdBaseStream Class
Ancestor for classes requiring a platform-specific stream implementation.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TIdBaseStream = class(TIdStream);
Description
TIdBaseStream is a TIdStream ( 3087) descendant that acts as an ancestor for classes that require a platform-specific stream
implementation. TIdBaseStream implements overridden Read ( 271), Write ( 274), and Seek ( 272) methods to isolate the
differences in parameters used as arguments to these methods.

TIdBaseStream declares virtual abstract methods that must be implemented in descendant classes to provide the functionality for
the Read ( 271), Write ( 274), and Seek ( 272) operations.

TIdBaseStream is used as the ancestor for TIdMultiPartFormDataStream ( 1657) used in POST method requests in TIdHTTP (
1041).

See Also
TStream

TIdBaseStream.Read ( 271)

TIdBaseStream.Write ( 274)

TIdBaseStream.Seek ( 272)

TIdMultiPartFormDataStream ( 1657)

TIdBaseStream Members
The following tables list the members exposed by TIdBaseStream.

Methods
Method Description
Read ( 271)
Seek ( 272)
Write ( 274)

Legend
Method
virtual

270 Internet Direct (Indy) Version 10.1.5


Classes TIdBaseStream Class

TIdBaseStream Methods
The Methods of the TIdBaseStream class are listed here.

Methods
Method Description
Read ( 271)
Seek ( 272)
Write ( 274)

Legend
Method
virtual

TIdBaseStream.Read Method
Overload List

Method Description
TIdBaseStream.Read (, Longint) ( Implements read operations using the platform-specific stream implementation.
271)
TIdBaseStream.Read (array of Byte, Implements read operations using the platform-specific stream implementation.
Longint, Longint) ( 272)

TIdBaseStream.Read Method (, Longint)


Implements read operations using the platform-specific stream implementation.

Pascal
function Read(
var VBuffer;
ACount: Longint
): Longint; override;
Parameters
Parameters Description
Buffer Destination for values from the read operation.
Count Number of bytes to be read from the stream.

Returns
Longint - Number of bytes actually read in the operation.

Description
Read is an overridden Longint method that isolates the platform-specific stream methods required to implement read operations.
Read relies on the method implementation in a descendant classes for the protected virtual abstract IdRead method.

On the .Net platform, Read uses an array of Byte to represent the Buffer for storing values read from the stream.

On all other platforms, Read uses an untyped pointer to represent the Buffer for storing values read from the stream. Read calls the
Move procedure from the Runtime library to update Buffer with the read values.

Use Write ( 274) to output values to a platform-specific stream implementation.

Use Seek ( 272) to reposition a platform-specific stream implementation.

Internet Direct (Indy) Version 10.1.5 271


TIdBaseStream Class Classes

See Also
Write ( 274)

Seek ( 272)

TIdBaseStream.Read Method (array of Byte, Longint, Longint)


Implements read operations using the platform-specific stream implementation.

Pascal
function Read(
var VBuffer: array of Byte;
AOffset: Longint;
ACount: Longint
): Longint; override;
Parameters
Parameters Description
Buffer Destination for values from the read operation.
Offset Position in the stream to begin the read operation.
Count Number of bytes to be read from the stream.

Returns
Longint - Number of bytes actually read in the operation.

Description
Read is an overridden Longint method that isolates the platform-specific stream methods required to implement read operations.
Read relies on the method implementation in a descendant classes for the protected virtual abstract IdRead method.

On the .Net platform, Read uses an array of Byte to represent the Buffer for storing values read from the stream.

On all other platforms, Read uses an untyped pointer to represent the Buffer for storing values read from the stream. Read calls the
Move procedure from the Runtime library to update Buffer with the read values.

Use Write ( 274) to output values to a platform-specific stream implementation.

Use Seek ( 272) to reposition a platform-specific stream implementation.

See Also
Write ( 274)

Seek ( 272)

TIdBaseStream.Seek Method
Overload List

Method Description
TIdBaseStream.Seek (Int64, Implements seek operations using the platform-specific stream implementation.
TIdSeekOrigin) ( 272)
TIdBaseStream.Seek (Longint, Word) Implements seek operations using the platform-specific stream implementation.
( 273)

TIdBaseStream.Seek Method (Int64, TIdSeekOrigin)


Implements seek operations using the platform-specific stream implementation.

272 Internet Direct (Indy) Version 10.1.5


Classes TIdBaseStream Class

Pascal
function Seek(
const AOffset: Int64;
AOrigin: TIdSeekOrigin
): Int64; override;
Parameters
Parameters Description
Offset Position in the stream to locate relative to the stream origin.
Origin Stream position to use as the origin for the operation.

Returns
Int64 - Position in the stream found relative to the specified stream origin.

Description
Seek is an overridden method that isolates the platform-specific stream methods required to implement seek operations. Seek
relies on the method implementation in a descendant classes for the protected virtual abstract IdSeek method.

On the .Net platform, Seek uses an offest value expresses as an Int64 data type to indicate the position in the stream to locate
relative to the stream Origin.

On all other platforms, Seeks uses a Loingint value to indicate the position in the stream to locate relative to the stream Origin.

Seek calls the IdSeek method in a descendant class to locate a postion using the mechanism required for the platform-specific
stream implementation.

Use Read ( 271) to input values using a platform-specific stream implementation.

Use Write ( 274) to output values to a platform-specific stream implementation.

See Also
Read ( 271)

Write ( 274)

TIdSeekOrigin ( 3079)

TIdBaseStream.Seek Method (Longint, Word)


Implements seek operations using the platform-specific stream implementation.

Pascal
function Seek(
AOffset: Longint;
AOrigin: Word
): Longint; override;
Parameters
Parameters Description
Offset Position in the stream to locate relative to the stream origin.
Origin Stream position to use as the origin for the operation.

Returns
Longint - Position in the stream found relative to the specified stream origin.

Description
Seek is an overridden method that isolates the platform-specific stream methods required to implement seek operations. Seek
relies on the method implementation in a descendant classes for the protected virtual abstract IdSeek method.

Internet Direct (Indy) Version 10.1.5 273


TIdBaseStream Class Classes

On the .Net platform, Seek uses an offest value expresses as an Int64 data type to indicate the position in the stream to locate
relative to the stream Origin.

On all other platforms, Seeks uses a Loingint value to indicate the position in the stream to locate relative to the stream Origin.

Seek calls the IdSeek method in a descendant class to locate a postion using the mechanism required for the platform-specific
stream implementation.

Use Read ( 271) to input values using a platform-specific stream implementation.

Use Write ( 274) to output values to a platform-specific stream implementation.

See Also
Read ( 271)

Write ( 274)

TIdBaseStream.Write Method
Overload List

Method Description
TIdBaseStream.Write (, Longint) ( Implements write operations using the platform-specific stream implementation.
274)
TIdBaseStream.Write (array of Byte, Implements write operations using the platform-specific stream implementation.
Longint, Longint) ( 275)

TIdBaseStream.Write Method (, Longint)


Implements write operations using the platform-specific stream implementation.

Pascal
function Write(
const ABuffer;
ACount: Longint
): Longint; override;
Parameters
Parameters Description
Buffer Values to be written to the stream.
Count Number of byte values to be written to the stream.

Returns
Longint - Number of bytes written in the write operation.

Description
Write is an overridden method that isolates the platform-specific stream methods required to implement write operations. Write
relies on the method implementation in a descendant classes for the protected virtual abstract IdWrite method.

On the .Net platform, Write uses an array of Byte to represent the Buffer containing values written to the stream.

On all other platforms, Write uses an untyped pointer to represent the Buffer containing values written to the stream. Write calls the
Move procedure from the Runtime library to update the stream Buffer with the output values.

274 Internet Direct (Indy) Version 10.1.5


Classes TIdBasicAuthentication Class

Use Read ( 271) to input values using a platform-specific stream implementation.

Use Seek ( 272) to reposition a platform-specific stream implementation.

See Also
Read ( 271)

Seek ( 272)

TIdBaseStream.Write Method (array of Byte, Longint, Longint)


Implements write operations using the platform-specific stream implementation.

Pascal
function Write(
const ABuffer: array of Byte;
AOffset: Longint;
ACount: Longint
): Longint; override;
Parameters
Parameters Description
Buffer Values to be written to the stream.
Offset Inital buffer position to be written to the stream.
Count Number of byte values to be written to the stream.

Returns
Longint - Number of bytes written in the write operation.

Description
Write is an overridden method that isolates the platform-specific stream methods required to implement write operations. Write
relies on the method implementation in a descendant classes for the protected virtual abstract IdWrite method.

On the .Net platform, Write uses an array of Byte to represent the Buffer containing values written to the stream.

On all other platforms, Write uses an untyped pointer to represent the Buffer containing values written to the stream. Write calls the
Move procedure from the Runtime library to update the stream Buffer with the output values.

Use Read ( 271) to input values using a platform-specific stream implementation.

Use Seek ( 272) to reposition a platform-specific stream implementation.

See Also
Read ( 271)

Seek ( 272)

TIdBasicAuthentication Class
Implements the Basic Authentication ( 277) mechanism for use in HTTP and other protocols.

File
IdAuthentication ( 4586)

Hierarchy

Internet Direct (Indy) Version 10.1.5 275


TIdBasicAuthentication Class Classes

Pascal
TIdBasicAuthentication = class(TIdAuthentication);
Description
TIdBasicAuthentication is a TIdAuthentication ( 253) descendant that implements the Basic Authentication ( 277) mechanism
described in the Internet Standards documents:

RFC 2616 - Hypertext Transfer Protocol [HTTP/1.1]

RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication

TIdBasicAuthentication provides properties and methods needed to process user authentication ( 277) in TIdHTTP ( 1041) client
for HTTP requests and response using the "Basic" Authentication ( 277) scheme. TIdBasicAuthentication implements support for
client authentication ( 277) using Username ( 258) and Password ( 257) values for the Realm ( 278) specified in the
WWW-Authenticate header of an HTTP server or proxy response.

TIdBasicAuthentication allows the client to construct the base64-encoded client credentials needed in the response to a server or
proxy authentication ( 277) challenge. The Authentication ( 277) value is used in the HTTP Authorization header expressed in
the following form:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
TIdBasicAuthentication is the default authentication ( 277) scheme registered for use with the TIdHTTP ( 1041) client using the
RegisterAuthenticationMethod ( 2893) procedure.

Use TIdDigestAuthentication ( 573) to implement support for the Digest Access Authentication ( 277) Scheme in TIdHTTP (
1041) client by calling the RegisterAuthenticationMethod ( 2893) procedure with the appropriate arguments.

See Also
TIdAuthentication ( 253)

TIdDigestAuthentication ( 573)

RegisterAuthenticationMethod ( 2893)

TIdBasicAuthentication Members
The following tables list the members exposed by TIdBasicAuthentication.

Properties
Property Description
AuthParams ( 256) Represents authentication ( 254) parameters to be used for the process.
CurrentStep ( 257) Identifies the current task number during authentication ( 254) processing.
Params ( 257) Contains authentication ( 254) parameters for the mechanism.
Password ( 257) Represents the authorization credentials for the authentication ( 254) process.
Realm ( 278) Identifies the proptection space for the authentication ( 277) scheme.
Steps ( 257) Number of tasks required for the authentication ( 254) process.
Username ( 258) Represents the authorization identity for the authentication ( 254) process.

Methods
Method Description
Authentication ( 277) Creates the authorization scheme and credentials for the authentication class.
Create ( 277) Constructor for the object instance.
Destroy ( 255) Frees the object instance.
KeepAlive ( 277) Indicates Keep-Alive signals are supported for the authentication ( 277) mechanism.
Next ( 255) Identifies the next action in the authentication ( 254) process.
Reset ( 278) Clears the number of retries and step in the authentication ( 277) mechanism.

Legend
Method
virtual
Property

276 Internet Direct (Indy) Version 10.1.5


Classes TIdBasicAuthentication Class

read only

TIdBasicAuthentication Methods
The Methods of the TIdBasicAuthentication class are listed here.

Methods
Method Description
Authentication ( 277) Creates the authorization scheme and credentials for the authentication class.
Create ( 277) Constructor for the object instance.
KeepAlive ( 277) Indicates Keep-Alive signals are supported for the authentication ( 277) mechanism.
Reset ( 278) Clears the number of retries and step in the authentication ( 277) mechanism.

Legend
Method
virtual

TIdBasicAuthentication.Authentication Method
Creates the authorization scheme and credentials for the authentication class.

Pascal
function Authentication: String; override;
Returns
String - Scheme and Base64-encoded credentials for the process.

Description
Authentication is an overriden String function that implements creation of the authorization credentials for the Basic Authentication
scheme, and returned as a Base64-encoded string. Authentication normally returns a value in the form:

Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
See Also
Realm ( 278)

TIdBasicAuthentication.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the constructor for the object instance. Create calls the inherited Create method. Create also assigns the default value for
the internal property used to maintain the current step in the authentication ( 277) process.

See Also
Reset ( 278)

Authentication ( 277)

TIdBasicAuthentication.KeepAlive Method
Indicates Keep-Alive signals are supported for the authentication ( 277) mechanism.

Pascal
function KeepAlive: Boolean; override;

Internet Direct (Indy) Version 10.1.5 277


TIdBubbleSortStringList Class Classes

Returns
Boolean - True when KEEP-ALIVE is supporeted for the authentication ( 277) scheme.

Description
KeepAlive is an Boolean function that specifies the function used to indicate if the authentication ( 277) mechanism supports use
of the KEEP-ALIVE header. When KeepAlive is True, the authentication ( 277) mechanism allows use of the header to prevent
loss of the connection during authentication ( 277) processing.

TIdBasicAuthentication.Reset Method
Clears the number of retries and step in the authentication ( 277) mechanism.

Pascal
procedure Reset; override;
Description
Reset is an overridden procedure in TIdBasicAuthentication ( 275). The inherited method is called to clear the number of retry
attempts performed using the authentication ( 277) mechanism by setting the nuimber of tries to 0.

Reset also sets the value of the CurrentStep ( 257) to 0 to indicate the next ( 255) step in the authentication ( 277) process.

See Also
CurrentStep ( 257)

TIdBasicAuthentication Properties
The Properties of the TIdBasicAuthentication class are listed here.

Properties
Property Description
Realm ( 278) Identifies the proptection space for the authentication ( 277) scheme.

Legend
Property

TIdBasicAuthentication.Realm Property
Identifies the proptection space for the authentication ( 277) scheme.

Pascal
property Realm: String;
Description
Realm is a String property that identifies the protection space being accessed that has its own authentication ( 277) scheme
and/or authorization database. Realm is assigned by the origin server as a parameter in the WWW-Authenticate challenge header
stored in authentication ( 277) parameters.

See Also
Authentication ( 277)

TIdBubbleSortStringList Class
File
IdContainers ( 4605)

278 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Hierarchy

Pascal
TIdBubbleSortStringList = class(TIdStringList);
Description
TIdBubbleSortStringList is a TIdStringList ( 3088) descendant.

See Also
TIdStringList ( 3088)

TIdBubbleSortStringList Members
The following tables list the members exposed by TIdBubbleSortStringList.

Methods
Method Description
BubbleSort ( 279)

Legend
Method
virtual

TIdBubbleSortStringList Methods
The Methods of the TIdBubbleSortStringList class are listed here.

Methods
Method Description
BubbleSort ( 279)

Legend
Method
virtual

TIdBubbleSortStringList.BubbleSort Method
Pascal
procedure BubbleSort(
ACompare: TIdStringListSortCompare
); virtual;
Parameters
Parameters Description
ACompare Type is TIdStringListSortCompare ( 3089).

Description
BubbleSort is a virtual method.

TIdBuffer Class
Implements a buffer used for input and output operations in the Indy library.

Internet Direct (Indy) Version 10.1.5 279


TIdBuffer Class Classes

File
IdBuffer ( 4588)

Hierarchy

Pascal
TIdBuffer = class(TIdBaseObject);
Description
TIdBuffer is a TObject descendant that implements a buffer used for input and output operations in the Indy library. TIdBuffer is
used as a read and/or write ( 297) buffer for the communication layer. TIdBuffer is optimized for adding data at the end of the
buffer, and extracting data from the beginning of the buffer.

TIdBuffer isolates the differences between memory allocation and pointer operations as implemented on the platforms supported by
the Indy library.

TIdBuffer implements properties that manage the size, growth, and encoding used for the buffer class instance, including:

Property Usage
Capacity ( 305) Maximum size to allocate for the buffer.
Encoding ( 305) Encoding ( 305) used for string values added to the buffer.
GrowthFactor ( Threshold for allocating additional buffer storage.
305)
Size ( 306) Number of bytes in buffer storage.
AsString ( 304) Contents of the buffer as a String data type.

By default, TIdBuffer uses ANSI-encoding for string values added to the buffer using the Write ( 297) methods. Set the value in
Encoding ( 305) to another TIdEncoding ( 2949) value to alter the encoding used in the Write ( 297) methods.

When additional internal storage is required for the buffer, the value in GrowthFactor ( 305) is used to determine the number of
additional bytes allocated. The default value for GrowthFactor ( 305) is 2048.

TIdBuffer implements methods that handle reading and writing various data types in the buffer. Extract ( 286) methods are used to
read and remove ( 296) existing byte values in the buffer, including:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

TIdBuffer maintains an internal TIdBufferBytesRemoved ( 3006) event handler that is signalled when byte values are read and
removed from the internal storage for the buffer.

Use the overloaded constructors to create ( 284) buffer instances and to perform assignment for the GrowthFactor ( 305) or the
TIdBufferBytesRemoved ( 3006) event handler used for the buffer.

280 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

TIdBuffer implements overloaded Write ( 297) methods that are used to convert various data types to an array of bytes as used in
the internal storage for the buffer. Arguments passed to the overloaded Write ( 297) methods generally indicate the value to be
stored and the zero-based position in the internal storage for the buffer where the values will be stored. Other arguments may
reflect additional information needed to convert the original data type to a sequence of byte values.

TIdBuffer implements other properties and methods that provide access to the byte values stored in the buffer, including:

AsString ( 304)
Clear ( 283)
IndexOf ( 294)
IndexOf ( 294)
PeekByte ( 295)
SaveToStream ( 296)

TIdBuffer is used extensively in TIdIOHandler ( 1284), both as a property and as an argument to methods that perform the read
and write ( 297) operation for the IO handler.

The .Net platform forces us to perform copies from strings to Bytes so that it can do the proper unicode and other conversions. The
copy is a separate issue and we considered several options. For .Net, we will always have to copy data to send or to receive to
translate it to binary.

For example if we have a string it must be converted to bytes. This conversion requires a copy. All strings are WideString and must
be converted to single bytes by a convertor. This is not limited to strings.

In VCL previously all strings were AnsiString so we used a pointer and just accessed the memory directly from the string. This
avoided the overhead of a copy.

We have come up with several ideas on how to allow the copy on .net, while avoiding the copy on VCL to keep the performance
benefit. However we must do it in a single source manner and in a manner that does not impact the code negatively.

For now for VCL we also do a copy. This has the advantage that Byte arrays are reference counted and automaticaly handled by
Delphi. For example:
WriteBytes(StringToBytes(s));
The array returned by this function will automatically be freed by Delphi.

There are other options that are nearly as transparent but have the additional overhead of requiring class creation. These classes
can be used to copy for .net and proxy on VCL. It all works very nice and has low memory overhead. The objects can then be freed
by default in methods that accept them.

However after analysis, copy on VCL may not be that bad after all. The copy only really impacts strings. The overhead to copy
strings is minimal and only used in commands etc. The big transfers come from files, streams, or other. Such transfers have to be
mapped into memory in VCL anyways, and if we map directly into the byte array instead of the previous classes peformance should
be fine.

In short - copy under VCL should be acceptable if we watch for bottlenecks and fix them appropriately without having to create (
284) proxy classes. The only problem remains for transmitting large memory blocks. But if this is done against a fixed copy buffer
the performance hit will be neglible and it is not a common task to transmit large memory blocks.

For such transfers from streams, etc the user can declare a persistent array of bytes that is not freed between each call to
WriteBytes.

• Kudzu
See Also
TIdIOHandler ( 1284)

Internet Direct (Indy) Version 10.1.5 281


TIdBuffer Class Classes

TIdBuffer Members
The following tables list the members exposed by TIdBuffer.

Properties
Property Description
AsString ( 304) Provides access to byte values stored in the buffer as a String data type.
Capacity ( 305) Indicates the maximum number of bytes allowed for the internal storage of the buffer.
Encoding ( 305) Default encoding used when writing values to the buffer.
GrowthFactor ( 305) Indicates the threshold for reallocating storage for the buffer.
Size ( 306) Indicates the number of Bytes in the Indy buffer.

Methods
Method Description
Clear ( 283) Discards all existing data in the internal storage for the buffer.
CompactHead ( 283) Removes unused storage space allocated at the head of the buffer.
Destroy ( 286) Destructor for the object instance.
Extract ( 286) Retrieves and removes data from the buffer.
ExtractToByte ( 287) Reads and optionally removes a specific byte value from the internal storage for the buffer.
ExtractToBytes ( 287) Reads and optionally removes byte values from the internal storage for the buffer.
ExtractToCardinal ( 288) Reads and optionally removes a Cardinal value from the internal storage for the buffer.
ExtractToIdBuffer ( 289) Copies and optionally removes values from the internal storage for the buffer into a TIdBuffer ( 279) data
type.
ExtractToInt64 ( 290) Reads and optionally removes a Cardinal value from the internal storage for the buffer.
ExtractToIPv6 ( 291) Reads and optionally removes a Cardinal value from the internal storage for the buffer.
ExtractToStream ( 292) Writes extracted buffer data to a stream.
ExtractToWord ( 293) Reads and optionally removes a Word value from the internal storage for the buffer.
PeekByte ( 295) Gets a byte value without removing the value from the internal storage for the buffer.
Remove ( 296) Removes data from the internal storage for the Indy buffer.
SaveToStream ( 296) Writes the contents of the buffer to a stream.
Create ( 284)
IndexOf ( 294)
Write ( 297)
WriteLen ( 302) Stores a specific number of byte values into the internal storage for the buffer at a given position.

Legend
Method
virtual
Property
read only

TIdBuffer Methods
The Methods of the TIdBuffer class are listed here.

Methods
Method Description
Clear ( 283) Discards all existing data in the internal storage for the buffer.
CompactHead ( 283) Removes unused storage space allocated at the head of the buffer.
Create ( 284)
Destroy ( 286) Destructor for the object instance.
Extract ( 286) Retrieves and removes data from the buffer.
ExtractToByte ( 287) Reads and optionally removes a specific byte value from the internal storage for the buffer.
ExtractToBytes ( 287) Reads and optionally removes byte values from the internal storage for the buffer.
ExtractToCardinal ( 288) Reads and optionally removes a Cardinal value from the internal storage for the buffer.
ExtractToIdBuffer ( 289) Copies and optionally removes values from the internal storage for the buffer into a TIdBuffer ( 279) data
type.
ExtractToInt64 ( 290) Reads and optionally removes a Cardinal value from the internal storage for the buffer.

282 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

ExtractToIPv6 ( 291) Reads and optionally removes a Cardinal value from the internal storage for the buffer.
ExtractToStream ( 292) Writes extracted buffer data to a stream.
ExtractToWord ( 293) Reads and optionally removes a Word value from the internal storage for the buffer.
IndexOf ( 294)
PeekByte ( 295) Gets a byte value without removing the value from the internal storage for the buffer.
Remove ( 296) Removes data from the internal storage for the Indy buffer.
SaveToStream ( 296) Writes the contents of the buffer to a stream.
Write ( 297)
WriteLen ( 302) Stores a specific number of byte values into the internal storage for the buffer at a given position.

Legend
Method
virtual

TIdBuffer.Clear Method
Discards all existing data in the internal storage for the buffer.

Pascal
procedure Clear;
Description
Clear is a procedure used to remove ( 296) all existing data in the internal storage for the buffer. Clear sets the length of the
internal storage for the buffer to 0 (zero).

Clear is called from both the constructor and destructor for the object instance.

Use Remove ( 296) to discard a specified number of bytes in the internal storage for the buffer.

Use Extract ( 286) to retrieve data from the buffer for subsequent use prior to removal from the internal storage.

See Also
TIdBuffer.Extract ( 286)

TIdBuffer.Remove ( 296)

TIdBuffer.Create ( 284)

TIdBuffer.Destroy ( 286)

TIdBuffer.CompactHead Method
Removes unused storage space allocated at the head of the buffer.

Pascal
procedure CompactHead(
ACanShrink: Boolean = True
);
Parameters
Parameters Description
ACanShrink Indicates unused storage space at the head of the buffer should be removed from the buffer size. Default
value is True.

Description
CompactHead is a procedure used to remove ( 296) unused storage space at the head of the buffer, and to optionally reduce the
number of bytes in the storage area for the buffer.

If there are unused bytes in the storage area for the buffer (resulting from calls to Remove ( 296), Extract ( 286), or Write (
297)), CompactHead will use the CopyTIdBytes ( 2746) procedure to reallocate storage at the head of the buffer.

ACanShrink indicates that unused storage space at the head of the buffer should be removed from the total number of bytes in the
buffer. The default value is True. If the Capacity ( 305) for the buffer is too large (in excess of Size ( 306) and the value in

Internet Direct (Indy) Version 10.1.5 283


TIdBuffer Class Classes

GrowthFactor ( 305)), the length of the storage area is adjusted to reduce memory requirements.

When ACanShrink is False, excess storage at the tail of the buffer is unaffected.

See Also
CopyTIdBytes ( 2746)

TIdBuffer.Capacity ( 305)

TIdBuffer.Size ( 306)

TIdBuffer.Write ( 297)

TIdBuffer.Remove ( 296)

TIdBuffer.Extract ( 286)

TIdBuffer.Create Constructor
Overload List

Method Description
TIdBuffer.Create () ( 284) Constructor for the object instance.
TIdBuffer.Create (Integer) ( 284) Constructor for the object instance.
TIdBuffer.Create Constructor for the object instance.
(TIdBufferBytesRemoved) ( 285)
TIdBuffer.Create (TIdBytes, Integer) ( Constructor for the object instance.
285)

TIdBuffer.Create Constructor ()
Constructor for the object instance.

Pascal
constructor Create; overload;
Description
Create is an overloaded constructor for the object instance.

Create calls the inherited constructor, and sets the default value for the GrowthFactor ( 305) property to 2048.

Create calls Clear ( 283) to ensure that the internal storage for the buffer contains no existing data.

Use Destroy ( 286) to free the object instance.

See Also
TIdBuffer.GrowthFactor ( 305)

TIdBuffer.Clear ( 283)

TIdBuffer.Destroy ( 286)

TIdBuffer.Create Constructor (Integer)


Constructor for the object instance.

Pascal
constructor Create(
AGrowthFactor: Integer
); overload;

284 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Parameters
Parameters Description
AGrowthFactor Number of bytes used as a threshold when reallocating storage for the buffer.

Description
Create is an overloaded constructor for the object instance.

Create calls the parameterless Create method to initialize the object instance.

Create sets the value for the GrowthFactor ( 305) property to the value specified in AGrowthFactor.

Use Destroy ( 286) to free the object instance.

See Also
TIdBuffer.Create

TIdBuffer.GrowthFactor ( 305)

TIdBuffer.Destroy ( 286)

TIdBuffer.Create Constructor (TIdBufferBytesRemoved)


Constructor for the object instance.

Pascal
constructor Create(
AOnBytesRemoved: TIdBufferBytesRemoved
); overload;
Parameters
Parameters Description
AOnBytesRemoved Event handler to use for notification of data removal from the buffer.

Description
Create is an overloaded constructor for the object instance.

Create calls the parameterless Create method to initialize the object instance.

Create sets the OnBytesRemoved event handler to the argument specified in AOnBytesRemoved.

Use Destroy ( 286) to free the object instance.

See Also
TIdBufferBytesRemoved ( 3006)

TIdBuffer.OnBytesRemoved

TIdBuffer.Clear ( 283)

TIdBuffer.Destroy ( 286)

TIdBuffer.Create Constructor (TIdBytes, Integer)


Constructor for the object instance.

Pascal
constructor Create(
const ABytes: TIdBytes;
const ALength: Integer = -1
); overload;
Parameters
Parameters Description
ABytes Initial values for the buffer.
ALength Size ( 306) to pre-allocate for the buffer. Default value is -1.

Internet Direct (Indy) Version 10.1.5 285


TIdBuffer Class Classes

Description
Create is an overloaded constructor for the object instance. Create calls the inherited parameter-less constructor.

ABytes indicates the initial values to use in the internal storage for the buffer.

ALength indicates teh Size ( 306) to pre-allocate for the buffer. The default value is -1, and indicates that the actual length of the
values in ABytes should be assigned as the Size ( 306) for the buffer. The values in ABytes are copied through assignment to the
buffers' internal storage. When ALength contains zero or a positive number, the value in ALength is stored as the Size ( 306) for
the buffer and CopyTIdBytes ( 2746) is called to load values in ABytes into the internal storage.

See Also
TIdBuffer.Create

TIdBuffer.Destroy Destructor
Destructor for the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy calls Clear ( 283) to discard all existing data in the internal storage for the buffer prior to calling the inherited Destroy
method.

See Also
TIdBuffer.Create ( 284)

TIdBuffer.Extract Method
Retrieves and removes data from the buffer.

Pascal
function Extract(
AByteCount: Integer = -1
): string;
Parameters
Parameters Description
AByteCount Number of bytes requested from the internal storage for the buffer. Default value is -1.

Returns
string - Data extracted from the buffer.

Description
Extract is a String function used to retrieve data from the internal storage for the buffer as a Delphi String data type.

AByteCount indicates the number of bytes requested from the internal storage for the buffer.

When AByteCount contains -1, all values in the buffer indicated by Size ( 306) are extracted from the buffer.

The return value for the method is the byte values retrieved from the internal storage for the buffer.

When AByteCount contains a positive non-zero value, Extract calls ExtractToBytes ( 287) to retrieve the data from internal
storage, and calls BytesToString ( 2728) to prepare the return value for the function. Values retrieved from the internal storage for
the buffer are also removed from the buffer.

See Also
TIdBuffer.Size ( 306)

TIdBuffer.ExtractToBytes ( 287)

286 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

BytesToString ( 2728)

TIdBuffer.ExtractToByte Method
Reads and optionally removes a specific byte value from the internal storage for the buffer.

Pascal
function ExtractToByte(
const AIndex: Integer
): Byte;
Parameters
Parameters Description
AIndex Position in the buffer of the byte value to extract ( 286).

Returns
Byte - Value extracted from the internal storage for the buffer.

Description
ExtractToByte is a Byte function used to read and remove ( 296) a specified byte value from the internal storage for the buffer.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove ( 296) to adjust the current
buffer position and the space allocated for the buffer.

ExtractToByte returns a single byte value using the Encoding ( 305) for the buffer.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

Use IndexOf ( 294) to find the position in the buffer where a specific sequence of byte values is located.

Use PeekByte ( 295) to access a specific byte value by its' position in the buffer.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

TIdBuffer.ExtractToBytes Method
Reads and optionally removes byte values from the internal storage for the buffer.

Internet Direct (Indy) Version 10.1.5 287


TIdBuffer Class Classes

Pascal
procedure ExtractToBytes(
var VBytes: TIdBytes;
AByteCount: Integer = -1;
AAppend: Boolean = True;
AIndex: Integer = -1
);
Parameters
Parameters Description
VBytes Storage for values extracted from the buffer.
AByteCount Number of bytes requested from the buffer. Default value is -1.
AAppend Causes bytes from the buffer to be appended to the byte storage. Default value is True.
AIndex Initial position where extracted bytes are stored in the data type. Default value is -1.

Description
ExtractToBytes is a procedure used to copy and optionally remove ( 296) values from the internal storage for the buffer into a
TIdBytes ( 3007) data type.

VBytes is the TIdBytes ( 3007) data type to use as storage for values extracted from the buffer.

AByteCount indicates the number of bytes requested from the buffer. The default value is -1, and causes the number of bytes in
Size ( 306) to be extracted into VBytes. When AByteCount contains a positive non-zero value, the requested number of bytes
must already exist in the buffer or an EIdNotEnoughDataInBuffer ( 125) will be raised.

AAppend indicates if bytes from the buffer should be appended to any existing values found in VBytes. The default value is True,
and causes VBytes to be resized to accomodate the additional number of bytes required in Size ( 306) or AByteCount.

AIndex marks the initial position where bytes extracted from the buffer are stored in VBytes. The default value is -1, and indicates
that byte values should be stored sequentially starting at the lowest position in the VBytes byte array. This value also causes the
requested number of bytes to be Removed from the contents of the buffer using the Remove ( 296) method. When AIndex
contains zero or a positive value, the existing content in the buffer is not removed after the copy operation.

ExtractToBytes calls the CopyTIdBytes ( 2746) routine to perform the copy operation required for the method.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised when the buffer does not contain enough data for the requested number of bytes.

See Also
TIdBytes ( 3007)

EIdNotEnoughDataInBuffer ( 125)

Size ( 306)

CopyTIdBytes ( 2746)

Remove ( 296)

TIdBuffer.ExtractToCardinal Method
Reads and optionally removes a Cardinal value from the internal storage for the buffer.

Pascal
function ExtractToCardinal(
const AIndex: Integer
): Cardinal;
Parameters
Parameters Description
AIndex Postion in the buffer where bytes for the data type are stored.

288 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Returns
Cardinal - Value read from the internal storage for the buffer.

Description
ExtractToCardinal is a Cardinal function used to read and optionally remove ( 296) a Cardinal value from the internal storage for
the buffer.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove ( 296) to adjust the current
buffer position and the space allocated for the buffer by the size for the ordinal data type.

ExtractToCardinal calls the BytesToCardinal ( 2721) routine to convert the byte values in the buffer to the ordinal data type. The
converted data type is adjusted from network byte order to host-specific byte order using the NetworkToHost method in GStack (
3126) for the operating system or platform.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

Use IndexOf ( 294) to find the position in the buffer where a specific sequence of byte values is located.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

TIdBuffer.ExtractToIdBuffer Method
Copies and optionally removes values from the internal storage for the buffer into a TIdBuffer ( 279) data type.

Pascal
procedure ExtractToIdBuffer(
ABuffer: TIdBuffer;
AByteCount: Integer = -1;
const AIndex: Integer = -1
);
Parameters
Parameters Description
ABuffer Storage for values extracted from the buffer.
AByteCount Number of bytes requested from the buffer. Default value is -1.
AIndex Initial position where extracted bytes are stored in the data type. Default value is -1.

Description
ExtractToIdBuffer is a procedure used to copy and optionally remove ( 296) values from the internal storage for the buffer into a

Internet Direct (Indy) Version 10.1.5 289


TIdBuffer Class Classes

TIdBuffer ( 279) data type.

ABuffer is the TIdBuffer ( 279) data type used as storage for values extracted from the buffer.

AByteCount is the number of bytes requested from the buffer. The default value is -1, and indicated that the number of bytes in Size
( 306) is used when performing the copy operation. When AByteCount contains a positive non-zero value, the requested number
of bytes must already exist in the buffer or an EIdNotEnoughDataInBuffer ( 125) will be raised.

AIndex marks the initial position where extracted bytes are stored in the TIdBuffer ( 279) data type. The default value is -1, and
indicates byte values should be stored sequentially starting at the lowest position in ABuffer. This value also causes the requested
number of bytes to be Removed from the contents of the buffer using the Remove ( 296) method. When AIndex contains zero or a
positive value, the existing content in the buffer is not removed after the copy operation.

ExtractToIdBuffer calls the ExtractToBytes ( 287) routine to get the byte values used in the copy operation for the method.
ExtractToIdBuffer calls the Write ( 297) method in the TIdBuffer ( 279) data type to output byte values copied from the internal
storage for the buffer.

Use the ExtractToBytes ( 287) method to copy byte values into a TIdBytes ( 3007) data type.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised when the buffer does not contain enough data for the requested number of bytes.

See Also
EIdNotEnoughDataInBuffer ( 125)

Remove ( 296)

ExtractToBytes ( 287)

TIdBuffer.ExtractToBytes ( 287)

TIdBuffer.ExtractToInt64 Method
Reads and optionally removes a Cardinal value from the internal storage for the buffer.

Pascal
function ExtractToInt64(
const AIndex: Integer
): Int64;
Parameters
Parameters Description
AIndex Postion in the buffer where bytes for the data type are stored.

Returns
Int64 - Value read from the internal storage for the buffer.

Description
ExtractToInt64 is an Int64 function used to read and optionally remove ( 296) an Int64 value from the internal storage for the
buffer.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove ( 296) to adjust the current
buffer position and the space allocated for the buffer by the size for the ordinal data type.

ExtractToInt64 calls the BytesToInt64 ( 2723) routine to convert the byte values in the buffer to the ordinal data type. The
converted data type is adjusted from network byte order to host-specific byte order using the NetworkToHost method in GStack (
3126) for the operating system or platform.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

290 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

Use IndexOf ( 294) to find the position in the buffer where a specific sequence of byte values is located.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

TIdBuffer.ExtractToIPv6 Method
Reads and optionally removes a Cardinal value from the internal storage for the buffer.

Pascal
function ExtractToIPv6(
const AIndex: Integer
): TIdIPv6Address;
Parameters
Parameters Description
AIndex Postion in the buffer where bytes for the data type are stored.

Returns
TIdIPv6Address ( 3040) - IPv6 address read from the internal storage for the buffer.

Description
ExtractToIPv6 is a TIdIPv6Address ( 3040) function used to read and optionally remove ( 296) an IPv6 address from the internal
storage for the buffer.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove ( 296) to adjust the current
buffer position and the space allocated for the buffer by the size for the ordinal data type.

ExtractToIPv6 calls the BytesToIPv6 ( 2725) routine to convert the byte values in the buffer to the data type used in the return
value for the method. The converted data type is adjusted from network byte order to host-specific byte order using the
NetworkToHost method in GStack ( 3126) for the operating system or platform.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte

Internet Direct (Indy) Version 10.1.5 291


TIdBuffer Class Classes

ExtractToBytes ( 287) TIdBytes ( 3007)


ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

Use IndexOf ( 294) to find the position in the buffer where a specific sequence of byte values is located.

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

TIdBuffer.ExtractToStream Method
Writes extracted buffer data to a stream.

Pascal
procedure ExtractToStream(
const AStream: TIdStream;
AByteCount: Integer = -1;
const AIndex: Integer = -1
);
Parameters
Parameters Description
AStream Destination for values extracted from the buffer.
AByteCount Number of bytes requested from the buffer.
AIndex Postion in the buffer where bytes for the output stream are stored.

Description
ExtractToStream is a procedure used to extract ( 286) data from the buffer into the AStream argument.

AStream is a TIdStream ( 3087) instance used to store values extracted from the current buffer.

AByteCount indicates the number of bytes requested from the internal storage for the buffer. When AByteCount contains -1 the
Size ( 306) for the buffer is used when extracting data.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially. This causes space at the beginning of the
buffer that has already been processed to be removed from the allocated internal storage for the buffer. It also causes Remove (
296) to be called to adjust the current buffer position and the space allocated for the buffer by the size for the ordinal data type.

ExtractToStream checks the Size ( 306) of Bytes to ensure that the requested number of bytes in AByteCount are available in the
buffer. When the data is available, ExtractToStream will call the Write ( 297) method in the TIdStream ( 3087) instance to
perform the copy operation.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)

292 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

ExtractToCardinal ( 288) Cardinal


ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream TIdStream ( 3087)
ExtractToWord ( 293) Word

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

See Also
EIdNotEnoughDataInBuffer ( 125)

RSNotEnoughDataInBuffer

TIdStream ( 3087)

Size ( 306)

Remove ( 296)

TIdBuffer.ExtractToWord Method
Reads and optionally removes a Word value from the internal storage for the buffer.

Pascal
function ExtractToWord(
const AIndex: Integer
): Word;
Parameters
Parameters Description
AIndex Postion in the buffer where bytes for the data type are stored.

Returns
Word - Value read from the internal storage for the buffer.

Description
ExtractToWord is a Word function used to read and optionally remove ( 296) a Word value from the internal storage for the buffer.

AIndex is the zero-based offset of the byte value to extract ( 286) from the internal storage for the buffer. AIndex normally contains
a value in the range 0 (zero) to Size ( 306)-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered
by the Extract ( 286) operation.

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove ( 296) to adjust the current
buffer position and the space allocated for the buffer by the size for the ordinal data type.

ExtractToWord calls the BytesToWord ( 2729) routine to convert the byte values in the buffer to the ordinal data type. The
converted data type is adjusted from network byte order to host-specific byte order using the NetworkToHost method in GStack (
3126) for the operating system or platform.

Use one of the other Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte

Internet Direct (Indy) Version 10.1.5 293


TIdBuffer Class Classes

ExtractToBytes ( 287) TIdBytes ( 3007)


ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord Word

Exceptions
Exceptions Description
EIdNotEnoughDataInBuffer ( 125) Raised with RSNotEnoughDataInBuffer and the requested byte count.

TIdBuffer.IndexOf Method
Overload List

Method Description
TIdBuffer.IndexOf (string, Integer) ( Determines the index position of a value in the buffer.
295)
TIdBuffer.IndexOf (TIdBytes, Integer) ( Determines the index position of a value in the buffer.
294)

TIdBuffer.IndexOf Method (TIdBytes, Integer)


Determines the index position of a value in the buffer.

Pascal
function IndexOf(
const ABytes: TIdBytes;
AStartPos: Integer = 0
): Integer; overload;
Parameters
Parameters Description
ABytes Byte values to locate in the buffer.
AStartPos Offset into the buffer to begin looking for the specified value. Default value is 0.

Returns
Integer - Zero-based offset of the desired value in the buffer, or -1 when the value is not found.

Description
IndexOf is an overloaded Integer function used to determine the index position where the value in ABytes occurs in the buffer.

ABytes represents the byte values to locate in the internal storage for the buffer.

AStartPos indicates the inital offset in the buffer to begin looking for a value that matches ABytes. AStartPos is a zero-based offset
into the byte values for the buffer.

The return value for the method will contain -1 when ABytes cannot be located in the internal storage for the buffer, or the
zero-based offset of the desired value in the buffer.

IndexOf will raise exceptions if ABytes is empty or the value in AStartPos is outside the allowable range starting at zero and ending
at the Size ( 306) of the buffer minus 1.

294 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Exceptions
Exceptions Description
EIdException ( 76) Raised with the message RSBufferMissingTerminator if the search bytes are empty.
Raised with the message RSBufferInvalidStartPos if the starting position for the search is outside the range
indicated by 0 and Size ( 306) -1.

See Also
ToBytes ( 2919)

TIdBytes ( 3007)

TIdBuffer.IndexOf Method (string, Integer)


Determines the index position of a value in the buffer.

Pascal
function IndexOf(
const AString: string;
AStartPos: Integer = 0
): Integer; overload;
Parameters
Parameters Description
AString Value to locate in the buffer.
AStartPos Offset into the buffer to begin looking for the specified value. Default value is 0.

Returns
Integer - Zero-based offset of the desired value in the buffer, or -1 when the value is not found.

Description
IndexOf is an overloaded Integer function used to determine the index position where the value in AString occurs in the buffer.

IndexOf calls the ToBytes ( 2919) function to obtain a TIdBytes ( 3007) instance representing the value in AString, and calls the
overloaded IndexOf method using the TIdBytes ( 3007) value.

The return value for the method will contain -1 when AString cannot be located in the internal storage for the buffer, or the
zero-based offset of the desired value in the buffer.

See Also
TIdBuffer.IndexOf ToBytes ( 2919)

TIdBytes ( 3007)

TIdBuffer.PeekByte Method
Gets a byte value without removing the value from the internal storage for the buffer.

Pascal
function PeekByte(
AIndex: Integer
): Byte;
Parameters
Parameters Description
AIndex Offset into the buffer storage to retreive.

Returns
Byte - Byte value found at the indicated offset into the buffer.

Description
PeekByte is a Byte function used to retrieve the value stored at the offset indicated by AIndex in the internal storage for the buffer.
PeekByte does not remove ( 296) or extract ( 286) the byte value from the buffer.

Internet Direct (Indy) Version 10.1.5 295


TIdBuffer Class Classes

Use Extract ( 286) to retrieve values from the buffer.

Exceptions
Exceptions Description
EIdException ( 76) Raised when the buffer is empty.
Raised with the offset into the buffer is less than 0 or greater than the Size ( 306) of the buffer minus 1.

See Also
Extract ( 286)

TIdBuffer.Remove Method
Removes data from the internal storage for the Indy buffer.

Pascal
procedure Remove(
AByteCount: Integer
);
Parameters
Parameters Description
AByteCount Number of bytes to remove from the buffer.

Description
Remove is a procedure used to strip the number of bytes specified in AByteCount from the beginning of the internal storage for the
Indy buffer.

When AByteCount contains the same value as Size ( 306), any existing data in the buffer is cleared. Otherwise, Remove copies
any remaining values in Bytes from the position indicated in AByteCount to the beginning of the internal storage for the buffer.

Use Clear ( 283) to discard all data in the internal storage for the Indy buffer.

See Also
TIdBuffer.Clear ( 283)

TIdBuffer.Bytes

CopyTIdBytes ( 2746)

TIdBuffer.SaveToStream Method
Writes the contents of the buffer to a stream.

Pascal
procedure SaveToStream(
const AStream: TIdStream
);
Parameters
Parameters Description
AStream Stores the contents of the buffer.

Description
SaveToStream is a procedure used to write ( 297) the byte values from the internal storage for the buffer to the stream specified
in AStream.

SaveToStream calls the CompactHead ( 283) method to move the bytes in the internal storage to beginning of the memory
allocated for the buffer. It does not resize the amount of storage allocated.

SaveToStream uses the Write ( 297) method in TIdStreamHelper ( 3088) to output the number of bytes indicated in Size ( 306)
using the stream instance in AStream.

296 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

See Also
CompactHead ( 283)

TIdBuffer.Write Method
Overload List

Method Description
TIdBuffer.Write (Byte, Integer) ( 297) Adds data to the internal storage for the Indy buffer.
TIdBuffer.Write (Cardinal, Integer) ( Adds data to the internal storage for the Indy buffer.
298)
TIdBuffer.Write (Int64, Integer) ( 298) Adds data to the internal storage for the Indy buffer.
TIdBuffer.Write (string, TIdEncoding, Adds data to the internal storage for the Indy buffer.
Integer) ( 302)
TIdBuffer.Write (TIdBytes, Integer) ( Stores a specific number of byte values into the internal storage for the buffer at a
299) given position.
TIdBuffer.Write (TIdIPv6Address, Adds data to the internal storage for the Indy buffer.
Integer) ( 300)
TIdBuffer.Write (TIdStream, Integer) ( Adds data to the internal storage for the Indy buffer.
300)
TIdBuffer.Write (Word, Integer) ( 301) Adds data to the internal storage for the Indy buffer.

TIdBuffer.Write Method (Byte, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AValue: Byte;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AValue Value to store in the buffer.
ADestIndex Initial postion in the buffer where the value is stored. Default value is -1.

Description
Write is an overloaded method used to add one or more values representing the ordinal data type in AValue to the internal storage
for the buffer.

AValue is the ordinal data type with byte values to store in the buffer.

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and
indicates that bytes should be appended to any existing content in the internal storage for the buffer. When ADestIndex contains a
zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion indicated. Please note that any
existing content in the buffer would be overwritten.

Write stores the byte value from AValue at the required position, and adjusts the Size ( 306) property to reflect the increased
storage required for the buffer.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Internet Direct (Indy) Version 10.1.5 297


TIdBuffer Class Classes

Capacity ( 305)

TIdBuffer.Write Method (Cardinal, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AValue: Cardinal;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AValue Value to store in the buffer.
ADestIndex Initial postion in the buffer where the value is stored. Default value is -1.

Description
Write is an overloaded procedure used to add byte values representing the ordinal data type in AValue to the internal storage for
the buffer.

AValue is the ordinal data type with byte values to store in the buffer.

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and
indicates that bytes should be appended to any existing content in the internal storage for the buffer. The value in the Size ( 306)
property is increased by the number of bytes required for the ordinal data type.

When ADestIndex contains zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion
indicated. Please note that any existing content in the buffer would be overwritten.

Write calls the HostToNetwork method in the TIdStack ( 2156) descendant indicated in GStack ( 3126) to convert the bytes in
AValue from their representation in host-specific byte order to network byte order. Write calls CopyTIdCardinal ( 2747) to copy the
re-ordered byte values into the internal storage for the buffer.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Capacity ( 305)

TIdBuffer.Write Method (Int64, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AValue: Int64;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AValue Value to store in the buffer.
ADestIndex Initial postion in the buffer where the value is stored. Default value is -1.

Description
Write is an overloaded procedure used to add byte values representing the ordinal data type in AValue to the internal storage for
the buffer.

AValue is the ordinal data type with byte values to store in the buffer.

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and

298 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

indicates that bytes should be appended to any existing content in the internal storage for the buffer. The value in the Size ( 306)
property is increased by the number of bytes required for the ordinal data type.

When ADestIndex contains zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion
indicated. Please note that any existing content in the buffer would be overwritten.

Write calls the HostToNetwork method in the TIdStack ( 2156) descendant indicated in GStack ( 3126) to convert the bytes in
AValue from their representation in host-specific byte order to network byte order. Write calls CopyTIdInt64 ( 2748) to copy the
re-ordered byte values into the internal storage for the buffer.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Capacity ( 305)

TIdBuffer.Write Method (TIdBytes, Integer)


Stores a specific number of byte values into the internal storage for the buffer at a given position.

Pascal
procedure Write(
ABytes: TIdBytes;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
ABytes Byte values to store in the buffer.
ADestIndex Initial position in the buffer where byte values are stored. Default value is -1.

Description
Write is a procedure used to implement storing a specific number of byte values into the internal storage for the buffer.

ABytes is the TIdBytes ( 3007) data type containing the Byte values to store in the buffer.

ADestIndex indicates the initial position in the buffer where byte values are stored. The default value is -1, and indicates that
unused storage space at the beginning of the buffer should be reclaimed prior to writing bytes from ABytes into the buffer. The
allocated size of the buffer is not affected unless the Capacity ( 305) and the Size ( 306) are not large enough for the additional
number of bytes indicated in ALength. Bytes values in ABytes are appended to any existing content in the buffer.

When ADestIndex contains zero or a positive value, existing byte values in the internal storage for the buffer are ignored. Values in
ABytes are written to the position indicated in ADestIndex. Please note that the existing buffer content could be overwritten. The
value in Size ( 306) is adjusted to reflect the new length of the internal storage for the buffer.

Write calls the WriteLen ( 302) method using the values in ABytes to update the contents of the internal storage for the buffer.

Use one of the overloaded Write methods to write a specific data type to the internal storage for the buffer.

Use one of the Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)

Internet Direct (Indy) Version 10.1.5 299


TIdBuffer Class Classes

ExtractToInt64 ( 290) Int64


ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Capacity ( 305)

TIdBuffer.Write Method (TIdIPv6Address, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AValue: TIdIPv6Address;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AValue Value to store in the buffer.
ADestIndex Initial postion in the buffer where the value is stored. Default value is -1.

Description
Write is an overloaded procedure used to add byte values representing the data type in AValue to the internal storage for the buffer.

AValue is the data type with byte values to store in the buffer.

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and
indicates that bytes should be appended to any existing content in the internal storage for the buffer. The value in the Size ( 306)
property is increased by the number of bytes required for the IPv6 address data type.

When ADestIndex contains zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion
indicated. Please note that any existing content in the buffer would be overwritten.

Write calls the HostToNetwork method in the TIdStack ( 2156) descendant indicated in GStack ( 3126) to convert the bytes in
AValue from their representation in host-specific byte order to network byte order. Write calls CopyTIdIPV6Address ( 2749) to
copy the re-ordered byte values into the internal storage for the buffer.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Capacity ( 305)

TIdBuffer.Write Method (TIdStream, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
AStream: TIdStream;
AByteCount: Integer = 0
); overload;

300 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Parameters
Parameters Description
AStream Source of values to be stored in the buffer.
AByteCount Number of bytes from the source to be added to the Indy buffer. Default value is 0.

Description
Write is an overloaded procedure used to append the specified values to the end of any existing data in the internal storage for the
Indy buffer.

AStream is the TIdStream ( 3087) containing values to be added to the buffer.

AByteCount indicates the number of bytes from AStream to be added to the Indy buffer.

When AByteCount contains -1, any data in AStream from the current stream position to the end of the stream will be added to the
buffer.

When AByteCount contains 0 (zero), all data in AStream will be added to the buffer. AStream is repositioned to its beginning prior to
reading values in the stream.

When AByteCount contains a positive non-zero value, byte values are copied from the stream using its current position. The
number of bytes is adjusted so that it does not exceed the remaining number of bytes in AStream.

Write checks the size of the internal storage for the buffer to ensure that writing the requested number of Bytes will not result in an
internal storage area too large for the host platform or operating system.

Write calls protected methods in the class to remove ( 296) dead space at the beginning of the internal storage for the buffer, and
reallocate the storage area to include the unused buffer induicated in GrowthFactor ( 305).

Write uses the TIdStream.ReadBytes method to add the indicated number of bytes in AByteCount to the internal storage for the
buffer. Size ( 306) is updated to the reflect the number of bytes added to the buffer from AStream.

Exceptions
Exceptions Description
EIdTooMuchDataInBuffer ( 177) With RSTooMuchDataInBuffer when the requested number of bytes will result in an internal storage area too
large for the host platform or operating system.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

TIdStream.ReadBytes

TIdBuffer.Write Method (Word, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AValue: Word;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AValue Value to store in the buffer.
ADestIndex Initial postion in the buffer where the value is stored. Default value is -1.

Description
Write is an overloaded procedure used to add byte values representing the ordinal data type in AValue to the internal storage for
the buffer.

AValue is the ordinal data type with byte values to store in the buffer.

Internet Direct (Indy) Version 10.1.5 301


TIdBuffer Class Classes

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and
indicates that bytes should be appended to any existing content in the internal storage for the buffer. The value in the Size ( 306)
property is increased by the number of bytes required for the ordinal data type.

When ADestIndex contains zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion
indicated. Please note that any existing content in the buffer would be overwritten.

Write calls the HostToNetwork method in the TIdStack ( 2156) descendant indicated in GStack ( 3126) to convert the bytes in
AValue from their representation in host-specific byte order to network byte order. Write calls CopyTIdWord ( 2753) to copy the
re-ordered byte values into the internal storage for the buffer.

See Also
Write

Size ( 306)

GrowthFactor ( 305)

Capacity ( 305)

TIdBuffer.Write Method (string, TIdEncoding, Integer)


Adds data to the internal storage for the Indy buffer.

Pascal
procedure Write(
const AString: string;
AEncoding: TIdEncoding = enDefault;
const ADestIndex: Integer = -1
); overload;
Parameters
Parameters Description
AString Values to be added to the Indy buffer.
AEncoding Optional encoding for values written to the buffer. Default value is enDefault.
ADestIndex Position to begin storing values in the buffer. Default value is -1.

Description
Write is an overloaded procedure used to include the values specified in AString in any existing data in the internal storage for the
Indy buffer.

AEncoding indicates the encoding to use when writing the byte values in AString to the position specified.

ADestIndex indicates the starting position where encoded bytes values will be stored in the buffer. The default value (-1) indicates
encoded byte values are appended to the end of existing data in the buffer.

Write checks the size of the internal storage for the buffer to ensure that writing the requested number of Bytes will not result in an
internal storage area too large for the host platform or operating system.

Exceptions
Exceptions Description
EIdTooMuchDataInBuffer ( 177) With RSTooMuchDataInBuffer when the requested number of bytes will result in an internal storage area too
large for the host platform or operating system.

See Also
Write

ToBytes ( 2919)

TIdEncoding ( 2949)

TIdBuffer.WriteLen Method
Stores a specific number of byte values into the internal storage for the buffer at a given position.

302 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

Pascal
procedure WriteLen(
ABytes: TIdBytes;
const ALength: Integer;
const ADestIndex: Integer = -1
);
Parameters
Parameters Description
ABytes Byte values to store in the buffer.
ALength Number of bytes to store in the buffer.
ADestIndex Initial position in the buffer where byte values are stored. Default value is -1.

Description
WriteLen is a procedure used to implement storing a specific number of byte values into the internal storage for the buffer.

ABytes is the TIdBytes ( 3007) data type containing the Byte values to store in the buffer.

ALength indicates the number of bytes to store in the buffer.

ADestIndex indicates the initial position in the buffer where byte values are stored. The default value is -1, and indicates that
unused storage space at the beginning of the buffer should be reclaimed prior to writing bytes from ABytes into the buffer. The
allocated size of the buffer is not affected unless the Capacity ( 305) and the Size ( 306) are not large enough for the additional
number of bytes indicated in ALength. Bytes values in ABytes are appended to any existing content in the buffer.

When ADestIndex contains zero or a positive value, existing byte values in the internal storage for the buffer are ignored. Values in
ABytes are written to the position indicated in ADestIndex. Please note that the existing buffer content could be overwritten. The
value in Size ( 306) is adjusted to reflect the new length of the internal storage for the buffer.

WriteLen calls the CopyTIdBytes ( 2746) routine using the values in ABytes to update the contents of the internal storage for the
buffer.

Use one of the overloaded Write ( 297) methods to write ( 297) a specific data type to the internal storage for the buffer.

Use one of the Extract ( 286) methods to read a specific data type from the internal storage for the buffer:

Method Storage Data Type


Extract ( 286) String
ExtractToByte ( 287) Byte
ExtractToBytes ( 287) TIdBytes ( 3007)
ExtractToCardinal ( 288) Cardinal
ExtractToIPv6 ( 291) TIdIPv6Address ( 3040)
ExtractToIdBuffer ( 289) TIdBuffer ( 279)
ExtractToInt64 ( 290) Int64
ExtractToStream ( 292) TIdStream ( 3087)
ExtractToWord ( 293) Word

TIdBuffer Properties
The Properties of the TIdBuffer class are listed here.

Properties
Property Description
AsString ( 304) Provides access to byte values stored in the buffer as a String data type.
Capacity ( 305) Indicates the maximum number of bytes allowed for the internal storage of the buffer.
Encoding ( 305) Default encoding used when writing values to the buffer.

Internet Direct (Indy) Version 10.1.5 303


TIdBuffer Class Classes

GrowthFactor ( 305) Indicates the threshold for reallocating storage for the buffer.
Size ( 306) Indicates the number of Bytes in the Indy buffer.

Legend
Property
read only

TIdBuffer.AsString Property
Provides access to byte values stored in the buffer as a String data type.

Pascal
property AsString: string;
Description
AsString read-only string property that provides access to byte values stored in the buffer.

AsString calls BytesToString ( 2728) using the internal TIdBytes ( 3007) storage for the buffer and the value in Size ( 306) to
convert the buffer to a string data type. Unlike the various Extract ( 286) methods, AsString does not call Remove ( 296) to
physically the byte values from its' internal storage.

AsString is useful for testing purposes, or to simple verify the contents of a buffer at any point.

Use PeekByte ( 295) to access to specific byte value in the buffer using its' zero-based index position.

Use IndexOf ( 294) to determine the position in the buffer where a specific sequence of byte values can be found.

Use one of the Extract ( 286) routines to read and remove ( 296) byte values from the buffer, including:

Extract ( 286)
ExtractToStream ( 292)
ExtractToIdBuffer ( 289)
ExtractToBytes ( 287)
ExtractToByte ( 287)
ExtractToWord ( 293)
ExtractToCardinal ( 288)
ExtractToInt64 ( 290)
ExtractToIPv6 ( 291)

See Also
PeekByte ( 295)

BytesToString ( 2728)

Extract ( 286)

ExtractToStream ( 292)

ExtractToIdBuffer ( 289)

ExtractToBytes ( 287)

ExtractToByte ( 287)

ExtractToWord ( 293)

ExtractToCardinal ( 288)

ExtractToInt64 ( 290)

ExtractToIPv6 ( 291)

304 Internet Direct (Indy) Version 10.1.5


Classes TIdBuffer Class

TIdBuffer.Capacity Property
Indicates the maximum number of bytes allowed for the internal storage of the buffer.

Pascal
property Capacity: Integer;
Description
Capacity is an Integer property used to indicate the number of bytes allowed when allocating bytes to the internal storage for the
buffer. Capacity indicates the maximum byte count permitted (but not necessarily in use) for the internal storage area.

Reading the value in Capacity returns the number of bytes currently allocated to the internal storage for the buffer.

Changing the value in Capacity causes dead space already removed from the head of the buffer using Extract ( 286) to be
compacted, and to optionally add the number of bytes in GrowthFactor ( 305) to the tail of the internal storage area.

Use Size ( 306) to determine the number of bytes currently in use in the internal storage area following Write ( 297), Extract (
286), or Remove ( 296) method calls.

Exceptions
Exceptions Description
EIdException ( 76) Raised when changing Capacity to a value smaller than Size ( 306).

See Also
TIdBuffer.Size ( 306)

Write ( 297)

Extract ( 286)

Remove ( 296)

TIdBuffer.Encoding Property
Default encoding used when writing values to the buffer.

Pascal
property Encoding: TIdEncoding;
Description
Encoding is a TIdEncoding ( 2949) property identifies the default encoding used when writing values stored in the buffer. The
default value for Encoding is enANSI, as assigned in the constructor for the buffer instance.

The value assigned to Encoding is used in an overloaded version of the Write ( 297) method that accepts an optional encoding
value. When the value is omitted (or contains enDefault), the value in the Encoding property is used encode the bytes written to the
buffer instance.

See Also
TIdEncoding ( 2949)

Create ( 284)

Write ( 297)

TIdBuffer.GrowthFactor Property
Indicates the threshold for reallocating storage for the buffer.

Pascal
property GrowthFactor: Integer;

Internet Direct (Indy) Version 10.1.5 305


TIdCardAddressItem Class Classes

Description
GrowthFactor is an Integer property that indicates the threshold to use when reallocating internal storage for the buffer.

GrowthFactor is used in Remove ( 296) to determine when unused byte values at the head of the buffer have exceeded the
desired threshold, and forces unused space to compacted.

GrowthFactor is used in Write ( 297) to indicate the number of unused bytes to allow at the tail of the buffer following removal of
unused bytes at the head of the buffer.

Use Capacity ( 305) to indicate the maximum number of bytes allowed for the internal storage of the buffer.

See Also
TIdBuffer.Capacity ( 305)

TIdBuffer.Size ( 306)

TIdBuffer.Remove ( 296)

TIdBuffer.Write ( 297)

TIdBuffer.Size Property
Indicates the number of Bytes in the Indy buffer.

Pascal
property Size: Integer;
Description
Size is a read-only Integer property that indicates the number of Bytes found in the internal storage for the Indy buffer.

Use Remove ( 296) to discard some of the data in the internal storage for the Indy buffer.

Use Clear ( 283) to discard all of the data in the internal storage for the Indy buffer.

See Also
TIdBuffer.Bytes

TIdBuffer.Clear ( 283)

TIdBuffer.Remove ( 296)

TIdCardAddressItem Class
Encapsulates a VCard address.

File
IdVCard ( 4754)

Hierarchy

Pascal
TIdCardAddressItem = class(TIdCollectionItem);
Description
The TIdCardAddressItem is a TCollectionItem descendant that encapsulates a VCard address in the TIdVCard ( 2571)
component.

See Also
TIdVCard.Addresses ( 2574)

306 Internet Direct (Indy) Version 10.1.5


Classes TIdCardAddressItem Class

TIdCardAddressItem Members
The following tables list the members exposed by TIdCardAddressItem.

Properties
Property Description
AddressAttributes ( 308) Represents type information for a VCard address item.
ExtendedAddress ( 309) Represents additional VCard address information.
Locality ( 309) Represents a VCard locality.
Nation ( 309) Represents the country or nation for a VCard adress item.
POBox ( 309) Represents a Post Office Box for a VCard address.
PostalCode ( 310) Represents a VCard postal code for the locality.
Region ( 310) Represents a VCard state, province, or county.
StreetAddress ( 310) Represents a VCard street address.

Methods
Method Description
Assign ( 307) Copy the property values of an object.

Legend
Method
virtual
Property

TIdCardAddressItem Methods
The Methods of the TIdCardAddressItem class are listed here.

Methods
Method Description
Assign ( 307) Copy the property values of an object.

Legend
Method
virtual

TIdCardAddressItem.Assign Method
Copy the property values of an object.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Object containing values to be copied.

Description
Assign is an overridden procedure used to copy the properties of the persistent object in Source to the current object instance.
When the current object and the object in Source are the same ClassType, Assign will copy the following property values:

Addr
AddressAttributes ( 308)

Internet Direct (Indy) Version 10.1.5 307


TIdCardAddressItem Class Classes

POBox ( 309)
ExtendedAddress ( 309)
StreetAddress ( 310)
Locality ( 309)
Region ( 310)
PostalCode ( 310)
Nation ( 309)

When the current object and Source do not sahre the same ClassType, Assign calls the inherited Assign method.

TIdCardAddressItem Properties
The Properties of the TIdCardAddressItem class are listed here.

Properties
Property Description
AddressAttributes ( 308) Represents type information for a VCard address item.
ExtendedAddress ( 309) Represents additional VCard address information.
Locality ( 309) Represents a VCard locality.
Nation ( 309) Represents the country or nation for a VCard adress item.
POBox ( 309) Represents a Post Office Box for a VCard address.
PostalCode ( 310) Represents a VCard postal code for the locality.
Region ( 310) Represents a VCard state, province, or county.
StreetAddress ( 310) Represents a VCard street address.

Legend
Property

TIdCardAddressItem.AddressAttributes Property
Represents type information for a VCard address item.

Pascal
property AddressAttributes: TIdCardAddressAttributes;
Description
AddressAttributes is a TIdCardAddressAttributes ( 3007) property that represents type information for a VCard address item.

AddressAttributes can include the following values and meanings:

Value Meaning
tatHome home delivery address
tatDomestic a domestic address
tatInternational an international address
tatPostal a postal delivery address
tatParcel a parcel delivery address
tatWork a work delivery address
tatPreferred preferred address

308 Internet Direct (Indy) Version 10.1.5


Classes TIdCardAddressItem Class

TIdCardAddressItem.ExtendedAddress Property
Represents additional VCard address information.

Pascal
property ExtendedAddress: String;
Description
ExtendedAddress is a String property that represents additional VCard address information. ExtendedAddress can contain
information such as an Office identifier for a building or an apartment number.

See Also
TIdCardAddressItem.StreetAddress ( 310)

TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.PostalCode ( 310)

TIdCardAddressItem.POBox ( 309)

TIdCardAddressItem.Locality Property
Represents a VCard locality.

Pascal
property Locality: String;
Description
Locality is a String property that represents a city or town (e.g. Chicago, New York City, Montreal) in a VCard address.

See Also
TIdCardAddressItem.StreetAddress ( 310)

TIdCardAddressItem.POBox ( 309)

TIdCardAddressItem.PostalCode ( 310)

TIdCardAddressItem.ExtendedAddress ( 309)

TIdCardAddressItem.Nation Property
Represents the country or nation for a VCard adress item.

Pascal
property Nation: String;
Description
Nation is a String property that represents the country or nation for a VCard adress item, and can contain data such as Canada,
U.S.A., Mexico, Russia, etc.

See Also
TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.Region ( 310)

TIdCardAddressItem.PostalCode ( 310)

TIdCardAddressItem.POBox Property
Represents a Post Office Box for a VCard address.

Internet Direct (Indy) Version 10.1.5 309


TIdCardAddressItem Class Classes

Pascal
property POBox: String;
Description
POBox is a String property that represents a Post Office Box for a VCard address.

See Also
TIdCardAddressItem.StreetAddress ( 310)

TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.Region ( 310)

TIdCardAddressItem.ExtendedAddress ( 309)

TIdCardAddressItem.PostalCode ( 310)

TIdCardAddressItem.PostalCode Property
Represents a VCard postal code for the locality.

Pascal
property PostalCode: String;
Description
PostalCode is a String property that represents the postal code for the locality, such as a ZIP Code in the US.

See Also
TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.Region ( 310)

TIdCardAddressItem.Region Property
Represents a VCard state, province, or county.

Pascal
property Region: String;
Description
Region is a String property that represents a VCard political subdivision of a nation, such as a Providence in Canada like "Quebec",
a State in US like "West Virginia", or a county in England like "Kent".

See Also
TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.PostalCode ( 310)

TIdCardAddressItem.StreetAddress Property
Represents a VCard street address.

Pascal
property StreetAddress: String;
Description
StreetAddress is a String property that represents a VCard street address such as "101 Sample Avenue".

See Also
TIdCardAddressItem.ExtendedAddress ( 309)

310 Internet Direct (Indy) Version 10.1.5


Classes TIdCardPhoneNumber Class

TIdCardAddressItem.Locality ( 309)

TIdCardAddressItem.Region ( 310)

TIdCardAddressItem.PostalCode ( 310)

TIdCardPhoneNumber Class
Encapsulates a VCard telphone number.

File
IdVCard ( 4754)

Hierarchy

Pascal
TIdCardPhoneNumber = class(TIdCollectionItem);
Description
TIdCardPhoneNumber is a TCollectionItem descendant that encapsulates a VCard telephone number in the TIdVCard ( 2571)
component.

See Also
TIdVCard ( 2571)

TIdCardPhoneNumber Members
The following tables list the members exposed by TIdCardPhoneNumber.

Properties
Property Description
Number ( 312) Respresents the contents for the VCard telephone number.
PhoneAttributes ( 312) Describes a VCard telephone number.

Methods
Method Description
Assign ( 312) Copy the property values of an object.

Legend
Method
virtual
Property

TIdCardPhoneNumber Methods
The Methods of the TIdCardPhoneNumber class are listed here.

Methods
Method Description
Assign ( 312) Copy the property values of an object.

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 311


TIdCardPhoneNumber Class Classes

TIdCardPhoneNumber.Assign Method
Copy the property values of an object.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Object containing values to be copied.

Description
Assign is an overridden procedure used to copy the properties of the persistent object in Source to the current object instance.
When the current object and the object in Source are the same ClassType, Assign will copy the following property values:

Phone
PhoneAttributes ( 312)
Number ( 312)

When the current object and Source do not sahre the same ClassType, Assign calls the inherited Assign method.

TIdCardPhoneNumber Properties
The Properties of the TIdCardPhoneNumber class are listed here.

Properties
Property Description
Number ( 312) Respresents the contents for the VCard telephone number.
PhoneAttributes ( 312) Describes a VCard telephone number.

Legend
Property

TIdCardPhoneNumber.Number Property
Respresents the contents for the VCard telephone number.

Pascal
property Number: String;
Description
Number is a String property that respresents the contents for the VCard telephone number.

TIdCardPhoneNumber.PhoneAttributes Property
Describes a VCard telephone number.

Pascal
property PhoneAttributes: TIdPhoneAttributes;
Description
PhoneAttributes is a TIdPhoneAttributes ( 3073) property that describes a VCard telephone number, and can include the following
values:

312 Internet Direct (Indy) Version 10.1.5


Classes TIdChargenServer Class

Value Meaning
tpaHome home telephone number
tpaVoiceMessaging voice messaging is available
tpaWork work telephone number
tpaPreferred preferred telephone number
tpaVoice voice telephone number
tpaFax facsimile telephone number
tpaCellular cellular telephone number
tpaVideo video-phone number
tpaBBS Bulletin Board System
tpaModem Modem telephone number
tpaCar Car telephone
tpaISDN ISDN telephone number
tpaPCS personal communication services phone number
tpaPager pager telephone number

TIdChameleonNewtFTPListItem Class
File
IdFTPListParseChameleonNewt ( 4637)

Hierarchy

Pascal
TIdChameleonNewtFTPListItem = class(TIdDOSBaseFTPListItem);
Description
TIdChameleonNewtFTPListItem is a TIdDOSBaseFTPListItem ( 627) descendant.

See Also
TIdDOSBaseFTPListItem ( 627)

TIdChargenServer Class
Implements a Character Generator server.

File
IdChargenServer ( 4589)

Hierarchy

Pascal
TIdChargenServer = class(TIdCustomTCPServer);

Internet Direct (Indy) Version 10.1.5 313


TIdChargenServer Class Classes

Description
TIdChargenServer is a TIdTCPServer ( 2375) descendant that implements a TCP-based Chargen server, as defined in the
Internet Standards document:

RFC 864 - Character Generator Protocol

Chargen (or Character Generator Protocol) is used for stress-testing a connection.

See Also
TIdChargenUDPServer ( 315)

IndySupport ( 15)

TIdChargenServer Members
The following tables list the members exposed by TIdChargenServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 315) Default port number for the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

314 Internet Direct (Indy) Version 10.1.5


Classes TIdChargenUDPServer Class

Legend
Property
read only
Method
virtual
Event

TIdChargenServer Properties
The Properties of the TIdChargenServer class are listed here.

Properties
Property Description
DefaultPort ( 315) Default port number for the server.

Legend
Property

TIdChargenServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdChargenServer ( 313) that contains the default port number used by the server, as
described in the Character Generator Protocol specification.

The default value for DefaultPort is IdPORT_CHARGEN ( 3920), as assigned during initialization of the component.

See Also
IdPORT_CHARGEN ( 3920)

TIdChargenUDPServer Class
Implements a Character Generator server.

File
IdChargenUDPServer ( 4589)

Hierarchy

Pascal
TIdChargenUDPServer = class(TIdUDPServer);
Description
TIdChargenUDPServer is a TIdUDPServer ( 2530) descendant that implements a UDP-based Chargen server, as defined in the
Internet Standards document:

RFC 864 - Character Generator Protocol

Chargen (or Character Generator Protocol) is used for stress-testing a connection.

Internet Direct (Indy) Version 10.1.5 315


TIdChargenUDPServer Class Classes

See Also
TIdChargenServer ( 313)

IndySupport ( 15)

TIdChargenUDPServer Members
The following tables list the members exposed by TIdChargenUDPServer.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 317) Default port number for the server.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Property
read only
Method
virtual
Event

TIdChargenUDPServer Properties
The Properties of the TIdChargenUDPServer class are listed here.

316 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPClient Class

Properties
Property Description
DefaultPort ( 317) Default port number for the server.

Legend
Property

TIdChargenUDPServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: integer;
Description
DefaultPort is a published property in TIdChargenServer ( 313) that contains the default port number used by the server, as
described in the Character Generator Protocol specification.

The default value for DefaultPort is IdPORT_CHARGEN ( 3920), as assigned during initialization of the component.

See Also
IdPORT_CHARGEN ( 3920)

TIdCiscoIOSFTPListItem Class
File
IdFTPListParseCiscoIOS ( 4637)

Hierarchy

Pascal
TIdCiscoIOSFTPListItem = class(TIdMinimalFTPListItem);
Description
TIdCiscoIOSFTPListItem is a TIdMinimalFTPListItem ( 1642) descendant.

See Also
TIdMinimalFTPListItem ( 1642)

TIdCmdTCPClient Class
Implements a TCP-based client using command handlers.

File
IdCmdTCPClient ( 4590)

Hierarchy

Pascal
TIdCmdTCPClient = class(TIdTCPClient);

Internet Direct (Indy) Version 10.1.5 317


TIdCmdTCPClient Class Classes

Description
TIdCmdTCPClient is a TIdTCPClient ( 2333) descendant that implements a TCP-based client using command handlers.
Command handlers allow the client to respond to data received from the peer connection by performing specific processing or
sending responses based on values in the data.

TIdCmdTCPClient also implements event handler properties to allow the client to perform operations both prior to and following
execution of a command handler.

TIdCmdTCPClient uses a listening thread as specified in TIdCmdTCPClientListeningThread ( 323) to read data from the peer
connection and to execute the command handlers in the client. TIdCmdTCPClient overrides method from the ancestor class to
create ( 267) and destroy ( 320) the listening thread when the connection for the client is opened or closed.

See Also
TIdTCPClient ( 2333)

TIdCommandHandlers ( 350)

TIdCmdTCPClientListeningThread ( 323)

TIdCmdTCPClient Members
The following tables list the members exposed by TIdCmdTCPClient.

Properties
Property Description
BoundIP ( 2335) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2336) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
CommandHandlers ( 321) Collection for TIdCommandHandler ( 341) instances implemented in the client.
ConnectTimeout ( 2336) Millseconds to wait for successful completion of a connection attempt.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ExceptionReply ( 321) Default exception message for the command handler-enabled client.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 2337) IP address or host name for the remote network connection.
IOHandler ( 2364) The input / output mechanism for the connection.
IPVersion ( 2337) Indicates the IP version used for addresses in the client.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2338) Event handler signalled after the socket handle is bound for the connection.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2338) Event handler signalled proper to binding the socket handle for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 2339) Port number for the remote network connection.
ReadTimeout ( 2339) Millseconds to wait for successful completion of a read attempt.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

318 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPClient Class

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
Connect ( 319) Opens the peer connection and starts the listening thread for the client.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 320) Frees the object instance.
Disconnect ( 320) Closes the connection to the peer.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAfterCommandHandler ( 322) Event handler triggered following execution of a TIdCommand ( 335) in the command handler-enabled client.
OnBeforeCommandHandler ( 322) Event handler triggered before execution of a TIdCommand ( 335) in the command handler-enabled client.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCmdTCPClient Methods
The Methods of the TIdCmdTCPClient class are listed here.

Methods
Method Description
Connect ( 319) Opens the peer connection and starts the listening thread for the client.
Destroy ( 320) Frees the object instance.
Disconnect ( 320) Closes the connection to the peer.

Legend
Method
virtual

TIdCmdTCPClient.Connect Method
Opens the peer connection and starts the listening thread for the client.

Internet Direct (Indy) Version 10.1.5 319


TIdCmdTCPClient Class Classes

Pascal
procedure Connect; override;
Description
Connect is an overridden procedure in TIdCmdTCPClient ( 317) used to establish the connection for the command
handler-enabled client. Connect calls the inherited Connect method and triggers the OnConnect event handler when it has been
assigned in the client.

Connect creates the TIdCmdTCPClientListeningThread ( 323) member variable that represents the listening thread for the
command handler-enabled client.

Use Disconnect ( 320) to terminate the listening thread and to close the peer connection for the client.

See Also
TIdCmdTCPClient.OnConnect

TIdCmdTCPClient.Disconnect ( 320)

TIdCmdTCPClientListeningThread ( 323)

TIdCmdTCPClient.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy frees resources allocated to the ExceptionReply ( 321) and CommandHandlers ( 321) properties when the component
was initialized.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdCmdTCPClient.ExceptionReply ( 321)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient.Disconnect Method
Closes the connection to the peer.

Pascal
procedure Disconnect(
ANotifyPeer: Boolean
); override;
Parameters
Parameters Description
ANotifyPeer Indicates the peer is immediately notified when the connection is closed.

Description
Disconnect is an overridden procedure used to close the peer connection for the command handler-enabled client. Disconnect
terminates the listening thread in the client when it has been assigned.

Disconnect calls the inherited Disconnect method using ANotifyPeer to indicate if the peer is notified of the new connection state.
The inherited method also triggers procedures assigned to the OnStatus ( 359) and OnDisconnected ( 2367) event handlers,
and closes an assigned IOHandler ( 2364) for the client.

Disconnect waits for an assigned listening thread to complete after termination. The listening thread is freed after termination.

320 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPClient Class

See Also
TIdTCPConnection.Disconnect ( 2355)

TIdCmdTCPClient.OnDisconnect

TIdCmdTCPClientListeningThread ( 323)

TIdCmdTCPClient Properties
The Properties of the TIdCmdTCPClient class are listed here.

Properties
Property Description
CommandHandlers ( 321) Collection for TIdCommandHandler ( 341) instances implemented in the client.
ExceptionReply ( 321) Default exception message for the command handler-enabled client.

Legend
Property

TIdCmdTCPClient.CommandHandlers Property
Collection for TIdCommandHandler ( 341) instances implemented in the client.

Pascal
property CommandHandlers: TIdCommandHandlers;
Description
CommandHandlers is a TIdCommandHandlers ( 350) property used to maintain a collection of TIdCommandHandler ( 341)
instances implemented in the client. CommandHandlers implements the HandleCommand method that allows execution of
recognized commands using data received in TIdCmdTCPClientListeningThread ( 323) for the client.

CommandHandlers is created when the TIdCmdTCPClient ( 317) is initialized, but applications must add TIdCommandHandler (
341) instances to the CommandHandlers collection. The CommandHandlersEnabled property must also be set to True to allow use
of the command handlers during execution of the listening thread.

Assign procedures to OnBeforeCommandHandler ( 322) and OnAfterCommandHandler ( 322) event handlers to allow the client
to perform operations before or after command handler execution.

CommandHandlers is freed when the TIdCmdTCPClient ( 317) destructor is called.

See Also
TIdCommandHandlers ( 350)

TIdCommandHandler ( 341)

TIdCmdTCPClientListeningThread ( 323)

TIdCmdTCPClient.CommandHandlersEnabled

TIdCmdTCPClient.OnBeforeCommandHandler ( 322)

TIdCmdTCPClient.OnAfterCommandHandler ( 322)

TIdCmdTCPClient.ExceptionReply Property
Default exception message for the command handler-enabled client.

Pascal
property ExceptionReply: TIdReply;

Internet Direct (Indy) Version 10.1.5 321


TIdCmdTCPClient Class Classes

Description
ExceptionReply is a TIdReply ( 1836) property that represents the default exception message for the command handler-enabled
client.

ExceptionReply is assigned when the component is initialized, and used when creating the default exception reply for the
CommandHandlers ( 321) in the client. The default message using the following numeric value and text:
500 - Unknown Internal Error
ExceptionReply is freed when the Destroy ( 320) destructor is called.

See Also
TIdReply ( 1836)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient Events
The Events of the TIdCmdTCPClient class are listed here.

Events
Event Description
OnAfterCommandHandler ( 322) Event handler triggered following execution of a TIdCommand ( 335) in the command handler-enabled client.
OnBeforeCommandHandler ( 322) Event handler triggered before execution of a TIdCommand ( 335) in the command handler-enabled client.

Legend
Event

TIdCmdTCPClient.OnAfterCommandHandler Event
Event handler triggered following execution of a TIdCommand ( 335) in the command handler-enabled client.

Pascal
property OnAfterCommandHandler: TIdCmdTCPClientAfterCommandHandlerEvent;
Description
OnAfterCommandHandler is a TIdCmdTCPClientAfterCommandHandlerEvent ( 3008) event handler property used to respond to
the notification following execution of a TIdCommand ( 335) instance the CommandHandlers ( 321) collection.

Procedures assigned to the OnBeforeCommandHandler ( 322) and OnAfterCommandHandler event handlers are in turn executed
using the corresponding methods in the CommandHandlers ( 321) collection.

Arguments provided to the event handler identify the TIdCmdTCPClient ( 317) client and the TIdContext ( 376) for the event
notification.

See Also
TIdCmdTCPClientAfterCommandHandlerEvent ( 3008)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient.OnBeforeCommandHandler ( 322)

TIdContext ( 376)

TIdCmdTCPClient.OnBeforeCommandHandler Event
Event handler triggered before execution of a TIdCommand ( 335) in the command handler-enabled client.

Pascal
property OnBeforeCommandHandler: TIdCmdTCPClientBeforeCommandHandlerEvent;

322 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPClientListeningThread Class

Description
OnBeforeCommandHandler is a TIdCmdTCPClientBeforeCommandHandlerEvent ( 3009) event handler property used to respond
to the notification ocurring prior to execution of a TIdCommand ( 335) instance the CommandHandlers ( 321) collection.

Procedures assigned to the OnBeforeCommandHandler and OnAfterCommandHandler ( 322) event handlers are in turn executed
using the corresponding methods in the CommandHandlers ( 321) collection.

Arguments provided to the event handler identify the TIdCmdTCPClient ( 317) client, the TIdContext ( 376) for the event
notification, and the data read from the peer connection and passed to the event handler.

See Also
TIdCmdTCPClientBeforeCommandHandlerEvent ( 3009)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient.OnAfterCommandHandler ( 322)

TIdContext ( 376)

TIdCmdTCPClientListeningThread Class
Implements a listening thread for TIdCmdTCPClient ( 317).

File
IdCmdTCPClient ( 4590)

Hierarchy

Pascal
TIdCmdTCPClientListeningThread = class(TIdThread);
Description
TIdCmdTCPClientListeningThread is a TIdThread ( 2415) descendant that implements a listening thread for TIdCmdTCPClient (
317).

TIdCmdTCPClientListeningThread provides properties to access both the client for the listening thread and data read from the peer
connection for use in command handler in the client.

TIdCmdTCPClientListeningThread includes an overridden Run method (protected) to read data from the peer connection, and to
dispatch the received data to command handlers in the TIdCmdTCPClient ( 317) client.

TIdCmdTCPClientListeningThread is the type used to implement the listening thread member variable in TIdCmdTCPClient (
317). TIdCmdTCPClient ( 317) creates the listening thread when the Connect method is called.

See Also
TIdThread ( 2415)

TIdCmdTCPClient ( 317)

TIdCmdTCPClient.Connect ( 319)

TIdCmdTCPClientAfterCommandHandlerEvent ( 3008)

TIdCmdTCPClientBeforeCommandHandlerEvent ( 3009)

TIdCmdTCPClientListeningThread Members
The following tables list the members exposed by TIdCmdTCPClientListeningThread.

Internet Direct (Indy) Version 10.1.5 323


TIdCmdTCPClientListeningThread Class Classes

Properties
Property Description
Client ( 325) Command handler-enabled client for the listening thread.
Data ( 2422) Storage slot for data used by a thread.
Loop ( 2422) Indicates if the thread is Run continuously until Stopped ( 2423).
Name ( 2422) Name assigned to the thread during execution.
RecvData ( 326) Data ( 2422) read from the peer connection passed to command handlers in the TIdCmdTCPClient ( 317).
ReturnValue ( 2423) Return value from execution of the thread.
StopMode ( 2423) Determines the action taken when the Stop ( 2420) method is called.
Stopped ( 2423) Indicates when a thread is terminated or suspended.
Terminated ( 2424) Indicates if the thread has been halted by calling Terminate ( 2421).
TerminatingException ( 2424) Contains the text of an Exception.Message raised within the Execute method.
TerminatingExceptionClass ( 2424) Represents the class type for an exception raised during Execute.
Yarn ( 2425) Represents the thread or fiber for the scheduler of the thread.

Methods
Method Description
Create ( 324) Constructor for the object instance.
Destroy ( 325) Frees the object instance.
Start ( 2419) Starts or resumes execution of a thread.
Stop ( 2420) Halts execution of the thread instance.
Synchronize ( 2420) Executes a thread method synchronized to the main VCL thread.
Terminate ( 2421) Forces the thread of execution to be halted.
TerminateAndWaitFor ( 2421) Signals a thread to terminate ( 2421) and waits for completion of the Execute method.

Events
Event Description
OnException ( 2425) Handles exceptions raised in the thread of execution.
OnStopped ( 2426) Represents an event handler signalled when stopping a thread of execution.

Legend
Constructor
virtual
Property
read only
Event

TIdCmdTCPClientListeningThread Methods
The Methods of the TIdCmdTCPClientListeningThread class are listed here.

Methods
Method Description
Create ( 324) Constructor for the object instance.
Destroy ( 325) Frees the object instance.

Legend
Constructor
virtual

TIdCmdTCPClientListeningThread.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AClient: TIdCmdTCPClient
); reintroduce;

324 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPClientListeningThread Class

Parameters
Parameters Description
AClient Client ( 325) for the listening thread.

Description
Create is the reintroduced constructor for the object instance.

Create calls the Create constructor indicating that the thread is not created in a suspended state and uses an inner loop during
thread execution.

Create initializes the Context member variable for the listening thread, and assigns the value in AClient to the Client ( 325)
property.

Create sets FreeOnTerminate to False prior to exiting from the method.

See Also
TIdThread.Create ( 2418)

TIdThread.Loop ( 2422)

TIdCmdTCPClientListeningThread.Client ( 325)

TIdCmdTCPClientListeningThread.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy calls the inherited destructor, and frees the TIdContext ( 376) member variable assigned to the listening thread.

The destructor for the listening thread is called when the TIdCmdTCPClient ( 317) client calls its Disconnect method to terminate
( 2421) the listening thread.

See Also
TIdContext ( 376)

TIdThread.Destroy ( 2419)

TIdCmdTCPClient.Disconnect ( 320)

TIdCmdTCPClientListeningThread Properties
The Properties of the TIdCmdTCPClientListeningThread class are listed here.

Properties
Property Description
Client ( 325) Command handler-enabled client for the listening thread.
RecvData ( 326) Data ( 2422) read from the peer connection passed to command handlers in the TIdCmdTCPClient ( 317).

Legend
Property
read only

TIdCmdTCPClientListeningThread.Client Property
Command handler-enabled client for the listening thread.

Internet Direct (Indy) Version 10.1.5 325


TIdCmdTCPServer Class Classes

Pascal
property Client: TIdCmdTCPClient;
Description
Client is a read-only TIdCmdTCPClient ( 317) property that represents the command handler-enabled client for the listening
thread.

Client is assigned the value passed as an argument to the Create ( 324) constructor. Client is also used to create ( 324) the
TIdContext ( 376) passed to command handlers in the client.

During execution of the listening thread (in the protected Run method), Client is used to access its assigned command handlers and
to access properties and methods in the IOHandler.

See Also
TIdContext ( 376)

TIdCmdTCPClient ( 317)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient.IOHandler

TIdCmdTCPClientListeningThread.Create ( 324)

TIdCmdTCPClientListeningThread.RecvData Property
Data ( 2422) read from the peer connection passed to command handlers in the TIdCmdTCPClient ( 317).

Pascal
property RecvData: String;
Description
RecvData is a String property representing data read from the peer connection and passed to command handlers in the
TIdCmdTCPClient ( 317).

RecvData is updated during execution of the listening thread (in the protected Run method) using values read from the Client (
325) on its IOHandler. The TIdContext ( 376) for the listening thread and RecvData are passed to the command handlers in the
Client ( 325) for subsequent execution.

See Also
TIdContext ( 376)

TIdCmdTCPClientListeningThread.Client ( 325)

TIdCmdTCPClient.CommandHandlers ( 321)

TIdCmdTCPClient.IOHandler

TIdCmdTCPServer Class
Implements a multi-thread TCP/IP-based server with support for command handlers.

File
IdCmdTCPServer ( 4591)

Hierarchy

326 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPServer Class

Pascal
TIdCmdTCPServer = class(TIdTCPServer);
Description
TIdCmdTCPServer is a TIdTCPServer ( 2375) descendant that implements a multi-thread TCP/IP-based server with support for
command handlers.

Command handlers provide an extensible mechanism for definition of the commands and their associated data as used in protocol
exchanges for client connections to the server. Command handlers provide access to the properties and methods in the server
and/or the client context that are affected in the processing required for the command.

Use of command handlers is an optional feature enabled when CommandHandlersEnabled is set to True. Descendant classes
must implement the InitializeCommandHandlers method that creates the default command handlers needed to support the
command, processing, and responses required for a specific protocol.

When CommandHandlersEnabled is set to False, the OnExecute ( 2379) event handler in the server is used to implement
execution of the task for a client connection.

TIdCmdTCPServer implements properties containing responses used in the server, including:

• ExceptionReply ( 331)
• HelpReply ( 332)
• Greeting ( 331)
• MaxConnectionReply ( 332)
• ReplyUnknownCommand ( 333)
• ReplyTexts ( 333)
During initialization of the server component, the standard reply classes (TIdReplyRFC ( 1851), TIdRepliesRFC ( 1832)) for the
server are used to create ( 267) default response values in properties, including:

Property Code Text


Greeting ( 331) 200 Welcome
MaxConnectionReply ( 332) 300 Too many connections. Try again later.
ReplyUnknownCommand ( 333) 400 Unknown Command
ExceptionReply ( 331) 500 Unknown Internal Error
HelpReply ( 332) 100 Help follows

During activation of the server (when Active ( 458) is set to True), command handlers are created using the
InitializeCommandHandlers method. InitializeCommandHandlers must be called only at runtime, after component streaming, and
when the command handler collection has not been previously initialized. When HelpReply ( 332) is assigned, a command
handler for the "Help" command is dynamically created for items in the command handler collection and added to the help response
for the server.

One or more listener threads are created using the definitions found in the Bindings ( 461) property for the server. Listener threads
accept new connections to the server, and create ( 267) the executable tasks used in the Scheduler ( 466).

Internet Direct (Indy) Version 10.1.5 327


TIdCmdTCPServer Class Classes

When CommandHandlersEnabled contains False, the OnExecute ( 2379) event handler is used control executiuon of the client
context for each connection. When CommandHandlersEnabled contains True, the server reads the command and data from the
client context and provides the values to the command handlers for the server.

See Also
Active ( 458)

CommandHandlers ( 330)

CommandHandlersEnabled

Contexts ( 462)

ExceptionReply ( 331)

Greeting ( 331)

HelpReply ( 332)

MaxConnectionReply ( 332)

OnAfterCommandHandler ( 334)

OnBeforeCommandHandler ( 335)

OnExecute ( 2379)

ReplyTexts ( 333)

Scheduler ( 466)

TIdTCPServer ( 2375)

TIdReplyRFC ( 1851)

TIdCmdTCPServer Members
The following tables list the members exposed by TIdCmdTCPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.

328 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPServer Class

Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 330) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCmdTCPServer Methods
The Methods of the TIdCmdTCPServer class are listed here.

Methods
Method Description
Destroy ( 330) Frees the object instance.

Internet Direct (Indy) Version 10.1.5 329


TIdCmdTCPServer Class Classes

Legend
Destructor
virtual

TIdCmdTCPServer.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy calls the inherited destructor, and frees resources allocated to the following properties:

ReplyUnknownCommand ( 333)
ReplyTexts ( 333)
MaxConnectionReply ( 332)
Greeting ( 331)
HelpReply ( 332)
ExceptionReply ( 331)
CommandHandlers ( 330)

TIdCmdTCPServer Properties
The Properties of the TIdCmdTCPServer class are listed here.

Properties
Property Description
CommandHandlers ( 330) Command handlers used in the server implementation.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.

Legend
Property

TIdCmdTCPServer.CommandHandlers Property
Command handlers used in the server implementation.

Pascal
property CommandHandlers: TIdCommandHandlers;
Description
CommandHandlers is a TIdCommandHandlers ( 350) property that represents TIdCommandHandler ( 341) instances allocated
for commands, replies, and actions implemented for the server.

CommandHandlers is used during execution of the client context to examine and respond to commands and data received from an
executing client connection. CommandHandlersEnabled must be set to True to allow use of the CommandHandlers for the server.

330 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPServer Class

CommandHandlers is initialized when the server becomes Active ( 458) if command handler instances have not already been
allocated (at designtime) for the server.

Use OnExecute ( 2379) to provide an alternate event handler for the execution of client connections when
CommandHandlersEnabled is set to False.

See Also
TIdCommandHandler ( 341)

TIdCommandHandlers ( 350)

CommandHandlersEnabled

OnExecute ( 2379)

Active ( 458)

TIdCmdTCPServer.ExceptionReply Property
Response code and text used for exceptions occurring in the server.

Pascal
property ExceptionReply: TIdReply;
Description
ExceptionReply is a TIdReply ( 1836) property that represents the response code and message text used for exceptions occurring
in the server.

ExceptionReply is assigned during initialization of the component using the following numeric code and message text:

Code Text
500 Unknown Internal Error

ExceptionReply is also assigned as the default exception message for unrecognized commands in the CommandHandlers ( 330)
collection during initialization of the component.

Resources allocated to the ExceptionReply property are freed in Destroy ( 330).

See Also
TIdReply ( 1836) CommandHandlers ( 330) TIdCommandHandlers.ExceptionReply

TIdCmdTCPServer.Greeting Property
"Welcome" message sent to new connections accepted in listener thread(s).

Pascal
property Greeting: TIdReply;
Description
Greeting is a TIdReply ( 1836) property that represents the "Welcome" message sent to new connections accepted in listener
thread(s) for the server.

The value in Greeting is written to the executing client context after the connection is accepted in the listener thread.

The default value for Greeting is assigned during initialization of the component using the following response code and text:

Code Text
200 Welcome

Internet Direct (Indy) Version 10.1.5 331


TIdCmdTCPServer Class Classes

Resource allocated to the Greeting property are freed in the Destroy ( 330) method.

See Also
TIdReply ( 1836)

TIdCmdTCPServer.HelpReply Property
Response sent when the HELP command is issued for a client connection.

Pascal
property HelpReply: TIdReply;
Description
HelpReply is a TIdReply ( 1836) property that represents the response sent when the HELP command is issued for an executing
client connection.

The default value for HelpReply is assigned during initialization of the component using the following response code and text:

Code Text
100 Help follows

Resources allocated to the HelpReply property are freed in the Destroy ( 330) method.

HelpReply is used during activation of the server (when Active ( 458) is set to True) to dynamically create ( 267) the command
handler for the HELP command. Descriptions for other TIdCommandHandler ( 341) instances in the CommandHandlers ( 330)
collection having visible help are appended to the value in HelpReply.

See Also
TIdCommandHandlers ( 350)

TIdCommandHandler ( 341)

TIdCommand ( 335)

TIdReply ( 1836)

Active ( 458)

Destroy ( 330)

TIdCmdTCPServer.MaxConnectionReply Property
Response used when the maximum number of client connections is exceeded.

Pascal
property MaxConnectionReply: TIdReply;
Description
MaxConnectionReply is a TIdReply ( 1836) property that represents the response used when the maximum number of client
connections to the server is exceeded. MaxConnections ( 465) indicates the connection limit for the server implementation.

The default value for the MaxConnectionReply property is assigned during during initialization of the component using the following
response code and text:

Code Text
300 Too many connections. Try again later.

MaxConnectionReply is used when a listener thread for the server cannot accept a new connection when the new connection would

332 Internet Direct (Indy) Version 10.1.5


Classes TIdCmdTCPServer Class

exceeed the value in MaxConnections ( 465). The generated reply from MaxConnectionReply is written using the IOHandler (
464) for the listener thread, and the client connection is Disconnected.

Resources allocated to the MaxConnectionReply property during component initialization are freed in the Destroy ( 330) method.

See Also
TIdReply ( 1836)

MaxConnections ( 465)

Destroy ( 330)

TIdListenerThread ( 1445)

TIdContext ( 376)

TIdCmdTCPServer.ReplyTexts Property
Represents protocol responses used in the server implementation.

Pascal
property ReplyTexts: TIdReplies;
Description
ReplyTexts is a TIdReplies ( 1825) property that represents a collection of response codes and messages for protocol responses
used in the server implementation.

The ReplyTexts collection is created during component initialization, and is used as the owner of the individual reply for the
following properties:

• Greeting ( 331)
• MaxConnectionReply ( 332)
• ReplyUnknownCommand ( 333)
• ExceptionReply ( 331)
• HelpReply ( 332)
ReplyTexts is assigned to the TIdCommandHandlers ( 350) for the server instance during component initialization.

ReplyTexts is used to update the Greeting ( 331) response when a new connection is accepted in a listener thread for the server.

Resources allocated to the ReplyTexts property are freed in the Destroy ( 330) method.

See Also
TIdReplies ( 1825)

Create ( 267)

Destroy ( 330)

TIdCmdTCPServer.ReplyUnknownCommand Property
Represents the response message used for an unkown command.

Pascal
property ReplyUnknownCommand: TIdReply;
Description
ReplyUnknownCommand is a TIdReply ( 1836) property that represents the response code and text used when an unknown
command is received during execution of a client connection.

ReplyUnknownCommand is used during execution of the client connection task when COmmandHandlersEnabled contains True.

Internet Direct (Indy) Version 10.1.5 333


TIdCmdTCPServer Class Classes

Methods in the server are used to read the command and optional data from the client connection context. If a valid
TIdCommandHandler ( 341) instance in CommandHandlers ( 330) cannot be located for the values read from the client
connection, values in ReplyUnknownCommand are used to generate the response written using the IOHandler ( 464) for the client
connection.

The default values in ReplyUnknownCommand are assigned during initialization of the component, and includes the following
response code and text:

Code Text
400 Unknown Command

Resources allocated to the ReplyUnknownCommand property are freed in Destroy ( 330).

See Also
TIdReply ( 1836)

TIdCommandHandler ( 341)

TIdCommandHandlers ( 350)

COmmandHandlersEnabled

Destroy ( 330)

TIdCmdTCPServer Events
The Events of the TIdCmdTCPServer class are listed here.

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.

Legend
Event

TIdCmdTCPServer.OnAfterCommandHandler Event
Represents the event handler signalled after CommandHandler usgage.

Pascal
property OnAfterCommandHandler: TIdCmdTCPServerAfterCommandHandlerEvent;
Description
OnAfterCommandHandler is a TIdCmdTCPServerAfterCommandHandlerEvent ( 3010) property that represents the event handler
signalled following execution of a command handler for a client connection.

The client connection context generating the command and/or data is passed as an argument to the event handler.

OnAfterCommandHandler is assigned to the corresponding event handler in TIdCommandHandlers ( 350) during initialization of
the component. OnAfterCommandHandler is triggered in the TIdCommandHandlers.HandleCommand ( 353) method after
checking for a valid command handler in the collection.

Use OnBeforeCommandHandler ( 335) to access the client connection context prior to checking for a valid command handler in
the collection.

See Also
TIdCmdTCPServerAfterCommandHandlerEvent ( 3010)

TIdCommandHandlers.OnAfterCommandHandler ( 354)

334 Internet Direct (Indy) Version 10.1.5


Classes TIdCommand Class

TIdCommandHandlers.HandleCommand ( 353)

TIdCommandHandler ( 341)

TIdCmdTCPServer.OnBeforeCommandHandler Event
Represents the event handler signalled after CommandHandler usgage.

Pascal
property OnBeforeCommandHandler: TIdCmdTCPServerBeforeCommandHandlerEvent;
Description
OnBeforeCommandHandler is a TIdCmdTCPServerBeforeCommandHandlerEvent ( 3010) property that represents the event
handler signalled prior to execution of a command handler for a client connection.

The client connection context generating the command and/or data is passed as an argument to the event handler.

OnBeforeCommandHandler is assigned to the corresponding event handler in TIdCommandHandlers ( 350) during initialization of
the component. OnBeforeCommandHandler is triggered in the TIdCommandHandlers.HandleCommand ( 353) method before
checking for a valid command handler in the collection.

Use OnAfterCommandHandler ( 334) to access the client connection context after checking for a valid command handler in the
collection.

See Also
TIdCmdTCPServerBeforeCommandHandlerEvent ( 3010)

TIdCommandHandlers.OnBeforeCommandHandler ( 354)

TIdCommandHandlers.HandleCommand ( 353)

TIdCommandHandler ( 341)

TIdCommand Class
Represents a command to be executed for a threaded peer connection.

File
IdCommandHandlers ( 4602)

Hierarchy

Pascal
TIdCommand = class(TIdBaseObject);
Description
TIdCommand is class used to represent information about commands received by a TCP server for an exuting peer thread, and
handled using a TIdCommandHandler ( 341). TIdCommand provides a flexible mechanism for implementing use of command
parameters and command responses using command handlers in a multi-thread environment.

TIdCommand provides properties that identify the Thread generating the command, and the CommandHandler ( 338) used to
service the command. In addition, TIdCommand also implements methods that allow assigning the response for the command, and
a mechanism for sending the command reply using the Thread connection that generated the command request.

TIdCommand instances are created in TIdCommandHandler.Check ( 342) when a given command can be handled by the
CommandHandlers for the server, using the peer thread that is executed in the Server context.

See Also
TIdCommandHandler ( 341)

Internet Direct (Indy) Version 10.1.5 335


TIdCommand Class Classes

TIdRFCReply

TIdPeerThread

TIdTCPServer.OnExecute ( 2379)

TIdCommand Members
The following tables list the members exposed by TIdCommand.

Properties
Property Description
CommandHandler ( 338) Represents the command handler that generated the object instance.
Context ( 338) Client context for the command and command handler.
Disconnect ( 338)
Params ( 339) Contains parsed parameter values for the command object.
PerformReply ( 339) Indicates that the Reply ( 340) should be sent to the peer prior to the response.
RawLine ( 339) Text data read from an executing client connection.
Reply ( 340) Contains the numeric and text content of an RFC reply .
Response ( 340) Contains the command response for the client connection.
SendEmptyResponse ( 340)
UnparsedParams ( 340) Represents the unparsed parameter values for the command object.

Methods
Method Description
Create ( 336) Constructor for the object instance.
Destroy ( 337) Frees the object instance.
SendReply ( 337) Sends the contents of the RFC reply to the peer connection.

Legend
Constructor
virtual
Property
read only

TIdCommand Methods
The Methods of the TIdCommand class are listed here.

Methods
Method Description
Create ( 336) Constructor for the object instance.
Destroy ( 337) Frees the object instance.
SendReply ( 337) Sends the contents of the RFC reply to the peer connection.

Legend
Constructor
virtual

TIdCommand.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AOwner: TIdCommandHandler
); virtual;

336 Internet Direct (Indy) Version 10.1.5


Classes TIdCommand Class

Parameters
Parameters Description
AOwner Owner of the object instance.

Description
Create is the Constructor for the object instance. Create relies on the inherited Create method to initialize properties in the object
instance. Create also initializes the object instances used in the Params ( 339), Reply ( 340), and Response ( 340) properties.

See Also
Params ( 339)

Reply ( 340)

Response ( 340)

TIdCommand.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance. Destroy frees resources allocates in the Create ( 336) constructor prior to calling
the inherited Destroy method.

See Also
Create ( 336)

Params ( 339)

Reply ( 340)

Response ( 340)

TIdCommand.SendReply Method
Sends the contents of the RFC reply to the peer connection.

Pascal
procedure SendReply;
Description
SendReply is a procedure used to send the generated content of the TIdRFCReply values in Reply ( 340) to the peer connection
using WriteRFCReply. When the command is executed, SendReply is called prior to transmitting the values in Response ( 340) to
the peer connection, but only when PerformReply ( 339) is True. SendReply sets the PeformReply property to False prior to
writing the RFC reply to the peer connection.

See Also
TIdRFCReply

Response ( 340)

PerformReply ( 339)

TIdCommand Properties
The Properties of the TIdCommand class are listed here.

Internet Direct (Indy) Version 10.1.5 337


TIdCommand Class Classes

Properties
Property Description
CommandHandler ( 338) Represents the command handler that generated the object instance.
Context ( 338) Client context for the command and command handler.
Disconnect ( 338)
Params ( 339) Contains parsed parameter values for the command object.
PerformReply ( 339) Indicates that the Reply ( 340) should be sent to the peer prior to the response.
RawLine ( 339) Text data read from an executing client connection.
Reply ( 340) Contains the numeric and text content of an RFC reply .
Response ( 340) Contains the command response for the client connection.
SendEmptyResponse ( 340)
UnparsedParams ( 340) Represents the unparsed parameter values for the command object.

Legend
Property
read only

TIdCommand.CommandHandler Property
Represents the command handler that generated the object instance.

Pascal
property CommandHandler: TIdCommandHandler;
Description
CommandHandler is a read-only TIdCommandHandler ( 341) property that represents the command handler that created the
TIdCommand ( 335) object instance. CommandHandler is assigned when the object instance is created as the peer thread is
executed in TIdCommandHandler.Check ( 342). CommandHandler provides access to the TIdCommandHandler ( 341)
properties that indicates the Command string executed by the peer thread, delimiters for both the command and optional
parameters, and reply content and exception codes.

See Also
TIdCommandHandler ( 341)

TIdCommand.Context Property
Client context for the command and command handler.

Pascal
property Context: TIdContext;
Description
Context is a read-only TIdContext ( 376) property that represents the client context for the command. Context provides acess to
properties and methods in the command handler and the client connection during execution of commands in a
TIdCommandHandler ( 341) instance.

TIdCommand.Disconnect Property
Pascal
property Disconnect: Boolean;
Description
Disconnect is a Boolean property

338 Internet Direct (Indy) Version 10.1.5


Classes TIdCommand Class

TIdCommand.Params Property
Contains parsed parameter values for the command object.

Pascal
property Params: TIdStrings;
Description
Params is a read-only TStrings property... Params is a read-only TStrings property that contains parameters parsed from
UnparsedParams ( 340) using the parameter delimiter specified by the command handler. When the command handlers indicates
that parameters should be parsed, each parameter is added to Params as an individual line. Otherwise, all parameters appear on a
single line in Params.

UnparsedParams ( 340) can be used to access the parameter values before parsing was performed.

See Also
UnparsedParams ( 340)

TIdCommandHandler.ParseParams ( 348)

TIdCommand.PerformReply Property
Indicates that the Reply ( 340) should be sent to the peer prior to the response.

Pascal
property PerformReply: Boolean;
Description
PerformReply is a Boolean property that indicates if the TIdRFCReply values in Reply ( 340) should be sent to the peer
connection using SendReply ( 337). PerformReply is examine after success completion of the command, and when an exception
is raised. Set PerformReply to False to prevent transmission of the TIdRFCReply to the peer connection prior to the values in
Response ( 340).

See Also
TIdRFCReply

SendReply ( 337)

Response ( 340)

TIdCommand.RawLine Property
Text data read from an executing client connection.

Pascal
property RawLine: string;
Description
RawLine is a read-only String property that represents the unparsed text values read from the threaded client connection, and
provided to a TIdCommandHandler ( 341) when the thread is executed. RawLine is used by a TIdCommand ( 335) that
implements the action performed by the command handler to parse values that are stored in the Command, UnparsedParams (
340), and Params ( 339) properties of the object instance.

See Also
TIdCommandHandler ( 341)

Command

UnparsedParams ( 340)

Internet Direct (Indy) Version 10.1.5 339


TIdCommand Class Classes

Params ( 339)

TIdCommand.Reply Property
Contains the numeric and text content of an RFC reply .

Pascal
property Reply: TIdReply;
Description
Reply is a TIdRFCReply property that contains the NumericCode and Text that makes up an RFC response message. Reply is
given the value in the ReplyNormal property of the command handler, when it is created by the command handler.

Reply can be altered if an exception is raised during execution of the command. After an exception is raised, Reply will contain the
ReplyExceptionCode, from either the server or the command handler that raised the exception, and the exception text.

Reply is sent to the peer connection prior to the Response ( 340) for the command handler when PerformReply ( 339) is True.

See Also
TIdRFCReply

TIdCommandHandler ( 341)

TIdCommand.Response Property
Contains the command response for the client connection.

Pascal
property Response: TIdStrings;
Description
Response is a TStrings property that contains values to send as the command response to the peer connection using
WriteRFCStrings. Response values, when present, are sent to the peer connection following any content in the Reply ( 340) for
the command. When Respond contain no values, it is ignored.

See Also
TIdPeerThread.Connection

Reply ( 340)

TIdCommand.SendEmptyResponse Property
Pascal
property SendEmptyResponse: Boolean;
Description
TIdCommand.SendEmptyResponse Public Boolean property. Write access FSendEmptyResponse.

TIdCommand.UnparsedParams Property
Represents the unparsed parameter values for the command object.

Pascal
property UnparsedParams: string;
Description
UnparsedParams is a read-only String property that represents the unparsed parameter values received by the command handler
that generated the command object. UnparsedParams is assigned when the command object is created by a command handler for
the current thread of execution.

340 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandler Class

UnparsedParams is used to determine the values added to the Params ( 339) property when the command handler creates the
object instance.

See Also
Params ( 339)

TIdCommandHandler.ParseParams ( 348)

TIdCommandHandler Class
Collection item representing command handlers for a server implementation.

File
IdCommandHandlers ( 4602)

Hierarchy

Pascal
TIdCommandHandler = class(TIdCollectionItem);
Description
TIdCommandHandler is a TCollectionItem descendant that implements a mechanism for recognizing valid commands for a Server,
and provides methods and properties needed handle parameters, perform actions, and formulate error and success responses.

TIdCommandHandler implements an OnCommand ( 350) event handler that receives a TIdCommandEvent ( 3011) event type
representing the unique command to be executed. TIdCommandHandler implements the virtual Check ( 342) method that handles
creation of TIdCommand ( 335) object instances, signalling of event notifications for the associated command object, as well as
preparation of reply and response values for the associated threaded peer connection.

TIdCommandHandler is an optional feature for use with TIdTCPServer ( 2375) and descendant classes. TIdCommandHandler
can be used when TIdTCPServer.CommandHandlersEnabled indicates that command handlers are desired, and the server has
valid TIdCommandHandler instances assigned in the CommandHandlers collection. Under any other circumstance, TIdTCPServer
( 2375) reverts to the default behavior implemented using the TIdTCPServer.OnExecute ( 2379) event handler.

See Also
Check ( 342)

OnCommand ( 350)

TIdCommandEvent ( 3011)

TIdCommand ( 335)

TIdCommandHandlers ( 350)

TIdCmdTCPServer.CommandHandlersEnabled

TIdCmdTCPServer.CommandHandlers ( 330)

TIdTCPServer.OnExecute ( 2379)

TIdCommandHandler Members
The following tables list the members exposed by TIdCommandHandler.

Properties
Property Description
CmdDelimiter ( 345) Identifies the delimiter character between the Command ( 345) and parameter values.

Internet Direct (Indy) Version 10.1.5 341


TIdCommandHandler Class Classes

Command ( 345) Text that causes the command handler to be invoked.


Data ( 346) Storage slot for TObject data used by the command handler.
Description ( 346)
Disconnect ( 346) Closes the connection to the peer after handling a command.
Enabled ( 346) Indicates if the command handler can respond to the associated Command ( 345).
ExceptionReply ( 347) Represents the numeric code returned when an exception occurs in the command handler.
HelpSuperScript ( 347)
HelpVisible ( 347)
Name ( 347) Identity for the item in the owner collection.
NormalReply ( 348) Represents the reply indicating successful completion of the command handler.
ParamDelimiter ( 348) Identifies the delimiter character between parameters.
ParseParams ( 348) Indicates if parameter values are separated into individual line in Params.
Response ( 349) Contains string values used as the response for the command handler.
Tag ( 349) Stores an Integer value.

Methods
Method Description
Check ( 342) Handles dispatching and execution of the command for the command handler.
Create ( 343) Constructor for the object instance.
Destroy ( 344) Frees the object instance.
DoCommand ( 344)
NameIs ( 344) Checks that a command handler has the specified name.

Events
Event Description
OnCommand ( 350) Event handler that performs an action associated with a command handler.

Legend
Method
virtual
Property
Event

TIdCommandHandler Methods
The Methods of the TIdCommandHandler class are listed here.

Methods
Method Description
Check ( 342) Handles dispatching and execution of the command for the command handler.
Create ( 343) Constructor for the object instance.
Destroy ( 344) Frees the object instance.
DoCommand ( 344)
NameIs ( 344) Checks that a command handler has the specified name.

Legend
Method
virtual

TIdCommandHandler.Check Method
Handles dispatching and execution of the command for the command handler.

Pascal
function Check(
AData: string;
AContext: TIdContext
): boolean; virtual;

342 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandler Class

Parameters
Parameters Description
AData Data ( 346) received from the peer connection.
AThread Thread of execution for the peer connection.

Returns
Boolean - True on success.

Description
Check is a Boolean function that is used to create ( 343), prepare, and dispatch a TIdCommand ( 335) object instance used in
association with the command handler. Check examines AData for optional CmdDelimiter ( 345) and parameter values.

Check creates a TIdCommand ( 335) object instance used to represent the command handled by the command handler, and sets
property values including the CommandHandler that created the object and the peer thread used for data and response messages.

Check parses parameter values into the TIdCOmmand object when ParseParams ( 348) is True.

Check assigns the values in ReplyNormal as the default reply for the TIdCommand ( 335) associated with the command handler.

Check signals the OnCommand ( 350) event handler to allow execution of actions for the command.

If an exception occurs, Check updates the Reply from the command object to contain the value in ReplyExceptionCode and
exception message text. Exception ( 4733) messages are then written to the peer thread connection.

When the command object completes execution, values in Reply and Response ( 349) are sent to the peer thread connection. If
Disconnect ( 346) is True, the peer thread connection is closed prior to exiting from the method.

TIdCommandHandler.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Collection that owns the command handler.

Description
Create is the constructor for the object instance, and calls the inherited Create method to initialize property values. Create initializes
the object instances used in the ReplyNormal and Response ( 349) properties, and sets the following properties to their default
values:

Property Value
CmdDelimiter ( 345) ' ' (Decimal 32)
Enabled ( 346) IdEnabledDefault ( 3833)
Name ( 347) Concatenated value of ClassName and ID
ParamDelimiter ( 348) ' ' (Decimal 32)
ParseParams ( 348) IdParseParamsDefault ( 3857)

See Also
CmdDelimiter ( 345)

Enabled ( 346)

Name ( 347)

Internet Direct (Indy) Version 10.1.5 343


TIdCommandHandler Class Classes

ParamDelimiter ( 348)

ParseParams ( 348)

ReplyNormal

Response ( 349)

TIdCommandHandler.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance. Destroy is responsible for free resources allocated in the Create ( 343)
constructor prior to calling the inherited Destroy method.

See Also
Create ( 343)

TIdCommandHandler.DoCommand Method
Pascal
procedure DoCommand(
AData: string;
AContext: TIdContext;
AUnparsedParams: string
); virtual;
Parameters
Parameters Description
AData
AContext
AUnparsedParams

Description
DoCommand is a virtual method...

TIdCommandHandler.NameIs Method
Checks that a command handler has the specified name.

Pascal
function NameIs(
ACommand: string
): Boolean;
Parameters
Parameters Description
ACommand Name ( 347) to be compared to the property value.

Returns
Boolean - True when the command handler has the specified name.

Description
NameIs is a Boolean function that allows comparison of the Name ( 347) property to the value specified in ACommand. NameIs
can be used to ensure that a TIdCommandHandler ( 341) contains the name desired before triggering a procedure used as an
action handler.

344 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandler Class

TIdCommandHandler Properties
The Properties of the TIdCommandHandler class are listed here.

Properties
Property Description
CmdDelimiter ( 345) Identifies the delimiter character between the Command ( 345) and parameter values.
Command ( 345) Text that causes the command handler to be invoked.
Data ( 346) Storage slot for TObject data used by the command handler.
Description ( 346)
Disconnect ( 346) Closes the connection to the peer after handling a command.
Enabled ( 346) Indicates if the command handler can respond to the associated Command ( 345).
ExceptionReply ( 347) Represents the numeric code returned when an exception occurs in the command handler.
HelpSuperScript ( 347)
HelpVisible ( 347)
Name ( 347) Identity for the item in the owner collection.
NormalReply ( 348) Represents the reply indicating successful completion of the command handler.
ParamDelimiter ( 348) Identifies the delimiter character between parameters.
ParseParams ( 348) Indicates if parameter values are separated into individual line in Params.
Response ( 349) Contains string values used as the response for the command handler.
Tag ( 349) Stores an Integer value.

Legend
Property

TIdCommandHandler.CmdDelimiter Property
Identifies the delimiter character between the Command ( 345) and parameter values.

Pascal
property CmdDelimiter: Char;
Description
CmdDelimiter is a Char property that identifies the delimiter character used to separate Command ( 345) from any parameter
values in data received from a peer connection. CmdDelimiter is used in Check ( 342) when parameter values are detected in the
received data. If CmdDelimiter contains any value other than CHAR0 ( 3169) (Decimal 0), both Command ( 345) and
CmdDelimiter are extracted from the received data. Any remaining data is used as parameter values for the associated
TIdCommand ( 335) object instance.

The default value for CmdDelimiter is ' ' (Decimal 32), as assigned in Create ( 343).

See Also
Check ( 342)

Command ( 345)

TIdCommand ( 335)

TIdCommandHandler.Command Property
Text that causes the command handler to be invoked.

Pascal
property Command: string;
Description
Command is a String property that represents the text received from a peer connection that will result in the command handler
being performed using optional parameter values. Command is examined in Check ( 342) to determine if the command handler

Internet Direct (Indy) Version 10.1.5 345


TIdCommandHandler Class Classes

can be used with data received from a peer thread connection. Use OnCommand ( 350) to implement the functionality needed in
response to Command.

See Also
OnCommand ( 350)

TIdCommandHandler.Data Property
Storage slot for TObject data used by the command handler.

Pascal
property Data: TObject;
Description
Data is a TObject property that can be used as a storage slot for data used by the command handler, and can contain a reference
to any TObject descendant. Data can be accessed by a command action handler or event handlers triggered through execution of
the item in TIdCommandCommandHandlers.

Please note that it is the responsibility of the application to cast Data to the class instance required, or an exception will be raised.

Data is not initialized in the Create ( 343) constructor, nor is it released in the Destroy ( 344) destructor. The application must
assume all responsibility for maintaining Data when assigned.

TIdCommandHandler.Description Property
Pascal
property Description: TIdStrings;
Description
The Description property is a TStrings property.

TIdCommandHandler.Disconnect Property
Closes the connection to the peer after handling a command.

Pascal
property Disconnect: boolean;
Description
Disconnect is a Boolean property that indicates if the command handler should close the connection to the peer after the Enabled
( 346) command handler is invoked. Disconnect is used in Check ( 342), after an associated TIdCommand ( 335) object
instance has been created, prepared, and signalled to the OnCommand ( 350) event handler. When Disconnect is True, the peer
thread connection is closed prior to exiting from the Check ( 342).

See Also
Check ( 342)

TIdCommand ( 335)

OnCommand ( 350)

Enabled ( 346)

TIdCommandHandler.Enabled Property
Indicates if the command handler can respond to the associated Command ( 345).

Pascal
property Enabled: boolean;

346 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandler Class

Description
Enabled is a Boolean property that indicates if the command handler instance can be used to execute the associated Command (
345) received from a peer connection. When Enabled is False, the command handler cannot be invoked by a thread of execution
for the peer connection.

The default value for Enabled is IdEnabledDefault ( 3833), as assigned in the Create ( 343) constructor.

See Also
Command ( 345)

OnCommand ( 350)

TIdCommandHandler.ExceptionReply Property
Represents the numeric code returned when an exception occurs in the command handler.

Pascal
property ExceptionReply: TIdReply;
Description
ExceptionReply is a Published TIdReply ( 1836) property that represents the response used when an exception occurs after
signalling the associated command object in Check ( 342). When an exception is raised, ReplyExceptionCode is used with the
message text from the exception as the new value for Reply. The peer thread connection in the associated command object is used
to send the reply using SendReply when PeformReply indicates that a reply is needed.

An exception that occurs in Check ( 342) can result in the OnException event handler for the server context being executed.
Check ( 342) examines the ReplyExceptionCode on the server to ensure that either condition is detected.

See Also
TIdRFCReply

TIdCommand ( 335)

TIdCommand.SendReply ( 337)

TIdCommand.PerformReply ( 339)

TIdTCPServer.OnException

TIdCommandHandler.HelpSuperScript Property
Pascal
property HelpSuperScript: String;
Description
HelpSuperScript is a String property...

TIdCommandHandler.HelpVisible Property
Pascal
property HelpVisible: Boolean;
Description
HelpVisible is a Boolean property... Default value is IdHelpVisibleDef ( 3850)...

TIdCommandHandler.Name Property
Identity for the item in the owner collection.

Internet Direct (Indy) Version 10.1.5 347


TIdCommandHandler Class Classes

Pascal
property Name: string;
Description
Name is a String property that represents the identity for the collection item in a TIdCommandHandlers ( 350) collection, and is
also used as the DisplayName when the collection item is viewd in the Object Inspector. The default value for Name is assigned in
the Create ( 343) constructor, and contains the concatenated values of ClassName and the string representation of the inherited
ID property.

TIdCommandHandler.NormalReply Property
Represents the reply indicating successful completion of the command handler.

Pascal
property NormalReply: TIdReply;
Description
NormalReply is a TIdReply ( 1836) property that contains the NumericCode and Text for the reply indicating successful
completion of the command handler. ReplyNormal is used as the initial value for the reply in an associated TIdCommand ( 335)
object instance in the command handler.

ReplyNormal is used in the Check ( 342) method prior to invoking execution of the command object of the command handler.

See Also
TIdRFCReply

TIdCommand ( 335)

Check ( 342)

TIdCommandHandler.ParamDelimiter Property
Identifies the delimiter character between parameters.

Pascal
property ParamDelimiter: Char;
Description
ParamDelimiter is a Char property that identifies the delimiter character expected between parameter appearing in Command (
345). ParamDelimiter is used in Check ( 342) to separated values in Command ( 345) into individual parameter values for a
TIdCommand ( 335) instance representing the command. ParamDelimiter is used when ParseParams ( 348) is True. Otherwise,
parameter parsing is not performed.

The default value for ParamDelimiter is the SPACE character (Decimal 32) as assigned in Create ( 343).

See Also
ParseParams ( 348)

Command ( 345)

Check ( 342)

TIdCommandHandler.ParseParams Property
Indicates if parameter values are separated into individual line in Params.

Pascal
property ParseParams: Boolean;

348 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandler Class

Description
ParseParams is a Boolean property that indicates if the command handler should parse any parameters that occur after the
command sent to the Check ( 342) method. When ParseParams is True, values occurring after the command and optional
CmdDelimiter ( 345) are added to the Params property in the command object as individual lines when the ParamDelimiter (
348) character is encountered.

The default value for ParseParams is IdParseParamsDefault ( 3857).

See Also
CmdDelimiter ( 345)

ParamDelimiter ( 348)

ParseParams

TIdCommandHandler.Response Property
Contains string values used as the response for the command handler.

Pascal
property Response: TIdStrings;
Description
Response is a TStrings property that contains string values to be written in an RFC-complaint format as the response for the
command. Response is used in Check ( 342) when the associated TIdCommand.Response ( 340) does not contain any values.
Note: Check ( 342) also examines the TIdCommand.Reply ( 340) property to generate any values from the command object.

Response is sent to the peer connection in the current thread of execution using the TIdTCPConnection.WriteRFCStrings ( 2363)
method.

See Also
Check ( 342)

TIdCommand.Response ( 340)

TIdCommand.Reply ( 340)

TIdRFCReply

TIdTCPConnection.WriteRFCStrings ( 2363)

TIdCommandHandler.Tag Property
Stores an Integer value.

Pascal
property Tag: Integer;
Description
Tag is an Integer property that has no predefined meaning. The Tag property is provided for the convenience of developers. It can
be used for storing an additional integer value, or it can be typecast to any value such as a component reference or a pointer.

TIdNNTPServer ( 1742) uses the Tag property to identify the index position of the NNTPCommand assigned to the
TIdCommandHandler ( 341).

TIdCommandHandler Events
The Events of the TIdCommandHandler class are listed here.

Internet Direct (Indy) Version 10.1.5 349


TIdCommandHandlers Class Classes

Events
Event Description
OnCommand ( 350) Event handler that performs an action associated with a command handler.

Legend
Event

TIdCommandHandler.OnCommand Event
Event handler that performs an action associated with a command handler.

Pascal
property OnCommand: TIdCommandEvent;
Description
OnCommand is a TIdCommandEvent ( 3011) property that represents the event handler signalled when the associated
TIdCommand ( 335) object instance is executed for the Command ( 345) Handler. Applications must a procedure to the event
handler that implements the functionality to be performed when the event handler is signalled for execution.

See Also
TIdCommandEvent ( 3011)

TIdCommand ( 335)

TIdCommandHandlers Class
Implements a collection for command handler object instances.

File
IdCommandHandlers ( 4602)

Hierarchy

Pascal
TIdCommandHandlers = class(TIdOwnedCollection);
Description
TIdCommandHandlers is a TOwnedCollection descendant that implements a collection of TIdCommandHandler ( 341) items.
TIdCommandHandlers publishes the Server property to identify the TIdTCPServer ( 2375) that owns the command handlers
collection.

TIdCommandHandlers is used to represent the CommandHandlers property in TIdTCPServer ( 2375) and descendant classes,
and is accessed when a peer thread executes and command handlers are enabled.

TIdCommandHandlers overrides methods in the ancestor class that Create ( 352) the collection and establish the Server that
owns the collection, and Add ( 351) new collection items.

See Also
TIdCommandHandler ( 341) TIdTCPServer ( 2375)

TIdCommandHandlers Members
The following tables list the members exposed by TIdCommandHandlers.

350 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandlers Class

Properties
Property Description
Base ( 353)
Items ( 353) Provide indexed access to command handlers in the collection.
ReplyClass ( 354)
ReplyTexts ( 354)

Methods
Method Description
Add ( 351) Adds a new item to the command handler collection.
Create ( 352) Constructor for the command handler collection.
HandleCommand ( 353)

Events
Event Description
OnAfterCommandHandler ( 354)
OnBeforeCommandHandler ( 354)
OnCommandHandlersException ( 354)

Legend
Method
virtual
Property
read only
Event

TIdCommandHandlers Methods
The Methods of the TIdCommandHandlers class are listed here.

Methods
Method Description
Add ( 351) Adds a new item to the command handler collection.
Create ( 352) Constructor for the command handler collection.
HandleCommand ( 353)

Legend
Method
virtual

TIdCommandHandlers.Add Method
Adds a new item to the command handler collection.

Pascal
function Add: TIdCommandHandler;
Returns
TIdCommandHandler ( 341) - Item added to the collection.

Description
Add is a TIdCommandHandler ( 341) function used to add new collection items to the owned collection. Add calls the inherited
Add method, and casts the return value to an instance of TIdCommandHandler ( 341) as required by the collection.

See Also
TIdCommandHandler ( 341)

Internet Direct (Indy) Version 10.1.5 351


TIdCommandHandlers Class Classes

TIdCommandHandlers.Create Constructor
Constructor for the command handler collection.

Pascal
constructor Create(
ABase: TIdComponent;
AReplyClass: TIdReplyClass;
AReplyTexts: TIdReplies;
AExceptionReply: TIdReply = nil;
ACommandHandlerClass: TIdCommandHandlerClass = nil
); reintroduce;
Parameters
Parameters Description
ABase Owner for items added to the collection.
AReplyClass TIdReplyClass ( 3077) used to create replies for the command handler collection.
AReplyTexts TIdReplies ( 1825) with response codes and messages for the command handlers.
AExceptionReply TIdReply ( 1836) instance containing an exception message.
ACommandHandlerClass TIdCommandHandlerClass ( 3012) class reference for creating items in the collection.

Description
Create is the constructor for the object instance.

ABase is the TIdComponent ( 355) that is the owner for items added to the collection.

AReplyClass is the TIdReplyClass ( 3077) used to create replies for the command handler collection.

AReplyTexts is the TIdReplies ( 1825) instance with response codes and messages for the command handlers used in the server.

AExceptionReply is a TIdReply ( 1836) instance containing an exception message.

ACommandHandlerClass is a TIdCommandHandlerClass ( 3012) class reference to use for creating items added to the collection.

Create calls the inherited constructor using the value in ACommandHandlerClass as the class type for the command handler, or
TIdCommandHandler ( 341) when ACommandHandlerClass contains Nil.

Create assigns values in the parameters to the following properties:

Property Value
Base ( 353) ABase
ExceptionReply AExceptionReply
ReplyClass ( 354) AReplyClass
ReplyTexts ( 354) AReplyTexts

See Also
TIdCommandHandler ( 341)

TIdComponent ( 355)

TIdReplyClass ( 3077)

TIdReplies ( 1825)

TIdReply ( 1836)

TIdCommandHandlerClass ( 3012)

352 Internet Direct (Indy) Version 10.1.5


Classes TIdCommandHandlers Class

TIdCommandHandlers.HandleCommand Method
Pascal
function HandleCommand(
AContext: TIdContext;
var VCommand: string
): Boolean; virtual;
Parameters
Parameters Description
AContext
VCommand

Returns
Boolean

Description
HandleCommand is a virtual Boolean function...

TIdCommandHandlers Properties
The Properties of the TIdCommandHandlers class are listed here.

Properties
Property Description
Base ( 353)
Items ( 353) Provide indexed access to command handlers in the collection.
ReplyClass ( 354)
ReplyTexts ( 354)

Legend
Property
read only

TIdCommandHandlers.Base Property
Pascal
property Base: TIdComponent;
Description
Base is a read-only TIdComponent ( 355) property...

TIdCommandHandlers.Items Property
Provide indexed access to command handlers in the collection.

Pascal
property Items [AIndex: Integer]: TIdCommandHandler;
Description
Items is an indexed TIdCommandHandler ( 341) property and provides access to the command handler instances assigned to the
collection using the Ordinal position specified in the Index. Index must be in the range 0 through Count - 1. Items can be used to
iterate over the contained object instances in order to locate a specific TIdCommandHandler ( 341) in the collection.

Internet Direct (Indy) Version 10.1.5 353


TIdComponent Class Classes

TIdCommandHandlers.ReplyClass Property
Pascal
property ReplyClass: TIdReplyClass;
Description
ReplyClass is a read-only TIdReplyClass ( 3077) property...

TIdCommandHandlers.ReplyTexts Property
Pascal
property ReplyTexts: TIdReplies;
Description
ReplyTexts is a read-only TIdReplies ( 1825) property...

TIdCommandHandlers Events
The Events of the TIdCommandHandlers class are listed here.

Events
Event Description
OnAfterCommandHandler ( 354)
OnBeforeCommandHandler ( 354)
OnCommandHandlersException ( 354)

Legend
Event

TIdCommandHandlers.OnAfterCommandHandler Event
Pascal
property OnAfterCommandHandler: TIdAfterCommandHandlerEvent;
Description
OnAfterCommandHandler is a TIdAfterCommandHandlerEvent ( 3003) event handler property...

TIdCommandHandlers.OnBeforeCommandHandler Event
Pascal
property OnBeforeCommandHandler: TIdBeforeCommandHandlerEvent;
Description
OnBeforeCommandHandler is a Public TIdBeforeCommandHandlerEvent ( 3006) event handler property.

TIdCommandHandlers.OnCommandHandlersException Event
Pascal
property OnCommandHandlersException: TIdCommandHandlersExceptionEvent;
Description
OnCommandHandlersException is a TIdCommandHandlersExceptionEvent ( 3012) event handler property...

354 Internet Direct (Indy) Version 10.1.5


Classes TIdComponent Class

TIdComponent Class
Ancestor of Indy components using Status or Work mode events.

File
IdComponent ( 4602)

Hierarchy

Pascal
TIdComponent = class(TIdBaseComponent);
Description
TIdComponent is a TIdBaseComponent ( 266) descendant and the ancestor class for Indy components using Status or Work
mode events.

TIdComponent implements event handlers used to signal state change, input, and output operations using the component.

TIdComponent implements an overridden protected InitComponent method used to initialize the component, including the global
stack instance count and the GStack ( 3126) variable used in the Indy library. InitComponent protects access to the stack instance
count using TIdCriticalSection ( 404).

See Also
TIdCriticalSection ( 404)

TIdBaseComponent ( 266)

IndySupport ( 15)

TIdComponent Members
The following tables list the members exposed by TIdComponent.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 355


TIdComponent Class Classes

Property
read only
Event

TIdComponent Methods
The Methods of the TIdComponent class are listed here.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

Legend
Method
virtual

TIdComponent.BeginWork Method
Triggers the OnBeginWork event.

Pascal
procedure BeginWork(
AWorkMode: TWorkMode;
const ASize: Int64 = 0
); virtual;
Parameters
Parameters Description
AWorkMode Work mode for the peer connection.
ASize Number of bytes to be read or written. Default value is 0.

Description
BeginWork is a virtual procedure used to trigger the OnBeginWork event. BeginWork maintains the number of reads and writes
pending. BeginWork also maintains the size of the initial read and/or write request when the Size is known at the beginning of the
request.

AWorkMode is a TWorkMode ( 2990) enumerated type, and can contain one of the following values:

Value Meaning
wmRead The component is reading data from the peer.
wmWrite The component is sending data to the peer.

ASize is the optional value indicating the number of bytes expected by to be received or sent by the connection. When ASize is
omitted, the default value of 0 is assigned.

Calls to the BeginWork procedure can be nested, but the OnBeginWork event handler will be invoked only for the initial call to
BeginWork.

Applications must assign a procedure to the OnBeginWork event handler in order to respond to the event notification.

Use EndWork ( 358) to close the work mode event for the current level.

Use DoWork ( 357) to signal when bytes for the current work level are handled.

When WorkTarget ( 359) is assigned, work mode events are signalled in the TIdComponent ( 355) identified by WorkTarget (
359) instead of the current object instance.

356 Internet Direct (Indy) Version 10.1.5


Classes TIdComponent Class

See Also
TWorkMode ( 2990)

TWorkBeginEvent ( 3120)

WorkTarget ( 359)

TIdComponent.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance, and calls the inherited Destroy method.

Destroy uses a TIdCriticalSection ( 404) to protect access to the global stack instance. When the Indy component instance count
is 0 (zero), the global stack instance is freed.

See Also
TIdCriticalSection ( 404)

TIdComponent.DoWork Method
Triggers the OnWork event handler.

Pascal
procedure DoWork(
AWorkMode: TWorkMode;
const ACount: Int64
); virtual;
Parameters
Parameters Description
AWorkMode Work mode for the peer connection.
ACount Number of bytes to be handled.

Description
DoWork is a virtual procedure used to trigger the OnWork event handler that perform updates required when byte values for the
operation indicated in AWorkMode and ACount have been processed using the component.

DoWork is used to signal that the work mode indicated in AWorkMode will be used to handle the number of bytes specified in
ACount.

AWorkMode is a TWorkMode ( 2990) enumerated type, and can contain the values:

Value Meaning
wmRead The component is reading data from the peer.
wmWrite The component is sending data to the peer.

ACount is the number of bytes to be affected by the AWorkMode operation.

DoWork allows the application to respond to calls to the BeginWork ( 356) method, and maintains the number of bytes available to
be process in the OnWork event handler. DoWork will not have any effect unless BeginWork ( 356) is called prior to calling
DoWork.

DoWork updates the internal TWorkInfo ( 2990) record created for the value in AWorkMode using the BeginWork ( 356) method,
and increments the number of cumulative bytes handled for the operation using the value in ACount.

Internet Direct (Indy) Version 10.1.5 357


TIdComponent Class Classes

DoWork signals the OnWork event handler when it has been assigned for the component using the cumulative number of bytes
handled for the work mode value in AWorkMode.

The Application must assign a procedure to the OnWork event handler in order to respond to the event notification.

Use BeginWork ( 356) to signal the start of a new level for a specified work mode.

Use EndWork ( 358) to close the work mode event for the current level.

When WorkTarget ( 359) is assigned, work mode events are signalled in the TIdComponent ( 355) identified by WorkTarget (
359) instead of the current object instance.

See Also
TWorkMode ( 2990)

BeginWork ( 356)

EndWork ( 358)

TIdComponent.EndWork Method
Triggers the OnEndWork event handler.

Pascal
procedure EndWork(
AWorkMode: TWorkMode
); virtual;
Parameters
Parameters Description
AWorkMode Work mode for the peer connection.

Description
EndWork is a procedure used to trigger the OnEndWork eventhandler. EndWork maintains the number of reads and/or writes
pending for the connection.

AWorkMode is a TWorkMode ( 2990) enumerated type, and can contain the values:

Value Meaning
wmRead The component is reading data from the peer.
wmWrite The component is sending data to the peer.

Calls to the EndWork procedure can be nested, but the OnEndWork event handler will be invoked only for the initial call to EndWork.

Applications must assign a procedure to the OnEndWork event handler in order to respond to the event notification.

Use BeginWork ( 356) to signal the start of a new level for a specified work mode.

Use DoWork ( 357) to signal when bytes for the current work level are handled.

When WorkTarget ( 359) is assigned, work mode events are signalled in the TIdComponent ( 355) identified by WorkTarget (
359) instead of the current object instance.

See Also
TWorkMode ( 2990)

BeginWork ( 356)

DoWork ( 357)

358 Internet Direct (Indy) Version 10.1.5


Classes TIdComponent Class

TIdComponent Properties
The Properties of the TIdComponent class are listed here.

Properties
Property Description
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Legend
Property

TIdComponent.WorkTarget Property
Indy component to receive work mode events for the current object instance.

Pascal
property WorkTarget: TIdComponent;
Description
WorkTarget is a TIdComponent ( 355) property that represents the Indy component to receive the Work mode events generated
by the current object instance. WorkTarget allows work mode events to be chained for related components.

When WorkTarget is assigned for an Indy component, work events in BeginWork ( 356), DoWork ( 357), and EndWork ( 358)
are actually performed in the component identified by WorkTarget. When WorkTarget is unassigned, the events are signalled in the
current object instance.

See Also
BeginWork ( 356)

DoWork ( 357)

EndWork ( 358)

TIdComponent Events
The Events of the TIdComponent class are listed here.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Event

TIdComponent.OnStatus Event
Represents the current connection status event handler.

Pascal
property OnStatus: TIdStatusEvent;
Description
OnStatus is a TIdStatusEvent ( 3087) property that represents the event handler triggered when the current connection state is
changed. OnStatus is triggered by the protected DoStatus method, which provides the parameters used by the event handler.

The application must assign a procedure to the event handler to allow reponding to the event notification.

Internet Direct (Indy) Version 10.1.5 359


TIdCompressionIntercept Class Classes

See Also
TIdStatusEvent ( 3087)

TIdCompressionIntercept Class
Implements an intercept that compresses a data stream using zlib.

File
IdCompressionIntercept ( 4603)

Hierarchy

Pascal
TIdCompressionIntercept = class(TIdConnectionIntercept);
Description
TIdCompressionIntercept is a TIdConnectionIntercept ( 368) descendant that implements an Indy intercept component that
compresses a data stream using the open-source zlib compression library. Set the CompressionLevel ( 364) property to a value
between 1 and 9 to enable compressing of the data stream. A setting of 0(zero) disables compression and the component is
dormant. The sender *and* received must have compression enabled in order to properly decompress the data stream. They do
*not* have to use the same CompressionLevel ( 364) as long as they are both set to a value between 1 and 9.

In order for this file to compile on Windows, the follow .obj files must be provided as delivered with this file:

• deflate.obj
• inflate.obj
• inftrees.obj
• trees.obj
• adler32.obj
• infblock.obj
• infcodes.obj
• infutil.obj
• inffast.obj
On Linux, the shared-object file libz.so.1 must be available on the system. Most modern Linux distributions include this file.

You may sometimes get the following compiler errors with this file:
IdCompressionIntercept.pas(331) Error: Incompatible types
IdCompressionIntercept.pas(152) Error: Unsatisfied forward or external declaration: '_tr_init'
IdCompressionIntercept.pas(153) Error: Unsatisfied forward or external declaration: '_tr_tally'
IdCompressionIntercept.pas(154) Error: Unsatisfied forward or external declaration:
'_tr_flush_block'
IdCompressionIntercept.pas(155) Error: Unsatisfied forward or external declaration: '_tr_align'
IdCompressionIntercept.pas(156) Error: Unsatisfied forward or external declaration:
'_tr_stored_block'
IdCompressionIntercept.pas(157) Error: Unsatisfied forward or external declaration: 'adler32'
IdCompressionIntercept.pas(158) Error: Unsatisfied forward or external declaration:
'inflate_blocks_new'
IdCompressionIntercept.pas(159) Error: Unsatisfied forward or external declaration:
'inflate_blocks'
IdCompressionIntercept.pas(160) Error: Unsatisfied forward or external declaration:
'inflate_blocks_reset'
IdCompressionIntercept.pas(161) Error: Unsatisfied forward or external declaration:
'inflate_blocks_free'

360 Internet Direct (Indy) Version 10.1.5


Classes TIdCompressionIntercept Class

IdCompressionIntercept.pas(162) Error: Unsatisfied forward or external declaration:


'inflate_set_dictionary'
IdCompressionIntercept.pas(163) Error: Unsatisfied forward or external declaration:
'inflate_trees_bits'
IdCompressionIntercept.pas(164) Error: Unsatisfied forward or external declaration:
'inflate_trees_dynamic'
IdCompressionIntercept.pas(165) Error: Unsatisfied forward or external declaration:
'inflate_trees_fixed'
IdCompressionIntercept.pas(166) Error: Unsatisfied forward or external declaration:
'inflate_trees_free'
IdCompressionIntercept.pas(167) Error: Unsatisfied forward or external declaration:
'inflate_codes_new'
IdCompressionIntercept.pas(168) Error: Unsatisfied forward or external declaration:
'inflate_codes'
IdCompressionIntercept.pas(169) Error: Unsatisfied forward or external declaration:
'inflate_codes_free'
IdCompressionIntercept.pas(170) Error: Unsatisfied forward or external declaration:
'_inflate_mask'
IdCompressionIntercept.pas(171) Error: Unsatisfied forward or external declaration:
'inflate_flush'
IdCompressionIntercept.pas(172) Error: Unsatisfied forward or external declaration:
'inflate_fast'
IdCompressionIntercept.pas(189) Error: Unsatisfied forward or external declaration:
'deflateInit_'
IdCompressionIntercept.pas(196) Error: Unsatisfied forward or external declaration: 'deflate'
IdCompressionIntercept.pas(203) Error: Unsatisfied forward or external declaration: 'deflateEnd'
IdCompressionIntercept.pas(213) Error: Unsatisfied forward or external declaration:
'inflateInit_'
IdCompressionIntercept.pas(220) Error: Unsatisfied forward or external declaration: 'inflate'
IdCompressionIntercept.pas(227) Error: Unsatisfied forward or external declaration: 'inflateEnd'
IdCompressionIntercept.pas(234) Error: Unsatisfied forward or external declaration:
'inflateReset'
Indy40.dpk(196) Fatal: Could not compile used unit 'IdCompressionIntercept.pas'
Do not be alarmed. This is due to a bug in DCC32 in Delphi 4, 5, 6, plus C++Builder, 4, 5, and 6.

There is a workaround for this issue. The workaround is to compile this unit separately from the other units and than build Indy with
a command such as DCC32 using the /M parameter. DO not use the /B parameter as that does force everything to be recompiled
triggering the DCC32 error.

The batch files FULLC4.BAT, FULLC5.BAT, FULLC6.BAT, FULLD4.BAT, FULLD5.BAT and FULLD6.BAT now have the
workaround in them so we recommend that you use those to build Indy.

Borland is aware of the issue.

Original Author: Allen Bauer

This source file is submitted to the Indy project on behalf of Borland Sofware Corporation. No warranties, express or implied are
given with this source file.

See Also
TIdConnectionIntercept ( 368)

TIdCompressionIntercept Members
The following tables list the members exposed by TIdCompressionIntercept.

Properties
Property Description
CompressionLevel ( 364) Represents the compression level applied the data stream for the intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
Version ( 269) Identifies the version number for the Indy component suite.

Internet Direct (Indy) Version 10.1.5 361


TIdCompressionIntercept Class Classes

Methods
Method Description
Connect ( 369)
Create ( 267) Constructor for the object instance.
Destroy ( 362) Frees the object instance.
Disconnect ( 362) Releases ZLib resources when disconnecting the intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Receive ( 363) Decompresses stream data for the intercept using ZLib.
Send ( 363) Compresses stream data for the intercept using ZLib.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdCompressionIntercept Methods
The Methods of the TIdCompressionIntercept class are listed here.

Methods
Method Description
Destroy ( 362) Frees the object instance.
Disconnect ( 362) Releases ZLib resources when disconnecting the intercept.
Receive ( 363) Decompresses stream data for the intercept using ZLib.
Send ( 363) Compresses stream data for the intercept using ZLib.

Legend
Destructor
virtual

TIdCompressionIntercept.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy ensures that the internal ZLib compression and decompression records
are reset and cleared. Destroy also frees Pointers allocated to the internal Send ( 363) and Receive ( 363) buffers for the
compression intercept. Destroy calls the inherited Destroy method prior to exiting.

TIdCompressionIntercept.Disconnect Method
Releases ZLib resources when disconnecting the intercept.

362 Internet Direct (Indy) Version 10.1.5


Classes TIdCompressionIntercept Class

Pascal
procedure Disconnect; override;
Description
Disconnect is an overridden procedure in TIdCompressionIntercept ( 360). Disconnect calls the inherited Disconnect method, and
executes a protected method that allows the instance to clear memory allocated in internal structures used for accessing the ZLib
libraries. The ZLib structure are allocated when using the Send ( 363) or Receive ( 363) methods.

See Also
Receive ( 363) Send ( 363)

TIdCompressionIntercept.Receive Method
Decompresses stream data for the intercept using ZLib.

Pascal
procedure Receive(
var VBuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Stream to use for input and output values for the operation.

Description
Receive is an overridden procedure in TIdCompressionIntercept ( 360) that implements ZLib decompression of data received in
ABuffer. When CompressionLevel ( 364) is 0 (zero), the compression intercept is dormant and no decompression is performed for
values in ABuffer.

Receive initializes the internal ZLib compression and decompression records when they have been assigned in the object instance.
Receive reads data from the internal receive buffer using a 2,048 byte block that expands by 1024 bytes on successive reads until
the end of the ZLib stream is reached. If a stream, data, or memory error occurs while decompressing the contents of the receive
buffer, a EIdDecompressionError ( 71) exception will be raised with the message RSZLDecompressionError.

On successful completion of receive buffer decompression, ABuffer is resized and the decompressed data is returned to the stream.

See Also
CompressionLevel ( 364) EIdDecompressionError ( 71) RSZLDecompressionError

TIdCompressionIntercept.Send Method
Compresses stream data for the intercept using ZLib.

Pascal
procedure Send(
var VBuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Stream to use for input and output values for the operation.

Description
Send is an overridden procedure in TIdCompressionIntercept ( 360) that implements ZLib compression of stream data received in
ABuffer. When CompressionLevel ( 364) is 0 (zero), the compression intercept is dormant and no compression is performed for
values in ABuffer.

Send initializes the internal ZLib compression and decompression records when they have been assigned in the object instance.
Send ensures that the internal Send buffer is large enough to hold the stream data in ABuffer. Send reads data from the internal
send buffer using a 2,048 byte block that expands by 1024 bytes on successive reads until the end of the ZLib stream is reached.

Internet Direct (Indy) Version 10.1.5 363


TIdCompressorZLibEx Class Classes

If a stream, data, or memory error occurs while compressing the contents of the send buffer, a EIdCompressionError ( 68)
exception will be raised with the message RSZLCompressionError.

On successful completion of send buffer compression, ABuffer is resized and the compressed data is returned to the stream.

See Also
CompressionLevel ( 364) EIdCompressionError ( 68) RSZLCompressionError

TIdCompressionIntercept Properties
The Properties of the TIdCompressionIntercept class are listed here.

Properties
Property Description
CompressionLevel ( 364) Represents the compression level applied the data stream for the intercept.

Legend
Property

TIdCompressionIntercept.CompressionLevel Property
Represents the compression level applied the data stream for the intercept.

Pascal
property CompressionLevel: TCompressionLevel;
Description
CompressionLevel is a TCompressionLevel ( 2941) property that represents the compression level to be applied when
transforming data using Send ( 363) or Receive ( 363). Set CompressionLevel to a value between 1 and 9 to enable
compressing of the data stream for intercept. When CompressionLevel is 0 (zero), compression is disabled and the intercept is
dormant.

Both the sender and receiver must have compression enabled in order to properly decompress the data stream for the intercept.
They do not have to use the same CompressionLevel as long as they are both set to a value between 1 and 9.

Changing the value in CompressionLevel ensures that the internal compression and decompression records are reset and cleared.
The new value for CompressionLevel will also be forced into the range allowed by the TCompressionLevel ( 2941) enumeration.

See Also
TCompressionLevel ( 2941) Send ( 363) Receive ( 363)

TIdCompressorZLibEx Class
File
IdCompressorZLibEx ( 4605)

Hierarchy

Pascal
TIdCompressorZLibEx = class(TIdZLibCompressorBase);
Description
TIdCompressorZLibEx is a TIdZLibCompressorBase ( 2634) descendant that implements compression and decompression using
64-bit stream operations.

364 Internet Direct (Indy) Version 10.1.5


Classes TIdCompressorZLibEx Class

TIdCompressorZLibEx implements the abstract virtual methods declared in the ancestor class, and uses functions in the the ZLIB
library interface specified in IdZLib.pas ( 4757).

See Also
TIdZLibCompressorBase ( 2634)

IdZLib.pas ( 4757)

TIdCompressorZLibEx Members
The following tables list the members exposed by TIdCompressorZLibEx.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
CompressFTPDeflate ( 2636)
CompressFTPToIO ( 366)
CompressHTTPDeflate ( 2636)
CompressStream ( 366)
Create ( 267) Constructor for the object instance.
DecompressDeflateStream ( 2637)
DecompressFTPDeflate ( 2637)
DecompressFTPFromIO ( 366)
DecompressGZipStream ( 2638)
DecompressHTTPDeflate ( 2638)
DecompressStream ( 367)
DeflateStream ( 367)
GetVersion ( 269) Version ( 269) number for Indy component suite.
InflateStream ( 367)
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdCompressorZLibEx Methods
The Methods of the TIdCompressorZLibEx class are listed here.

Methods
Method Description
CompressFTPToIO ( 366)
CompressStream ( 366)
DecompressFTPFromIO ( 366)
DecompressStream ( 367)
DeflateStream ( 367)
InflateStream ( 367)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 365


TIdCompressorZLibEx Class Classes

TIdCompressorZLibEx.CompressFTPToIO Method
Pascal
procedure CompressFTPToIO(
AInStream: TIdStream;
AIOHandler: TIdIOHandler;
const ALevel: Integer;
const AWindowBits: Integer;
const AMemLevel: Integer;
const AStrategy: Integer
); override;
Parameters
Parameters Description
AInStream Type is TIdStream ( 3087).
AIOHandler Type is TIdIOHandler ( 1284).
ALevel Scope is const. Type is Integer.
AWindowBits Scope is const. Type is Integer.
AMemLevel Scope is const. Type is Integer.
AStrategy Scope is const. Type is Integer.

Description
CompressFTPToIO is a overridden method.

TIdCompressorZLibEx.CompressStream Method
Pascal
procedure CompressStream(
AInStream: TIdStream;
AOutStream: TIdStream;
const ALevel: TIdCompressionLevel;
const AWindowBits: Integer;
const AMemLevel: Integer;
const AStrategy: Integer
); override;
Parameters
Parameters Description
AInStream Type is TIdStream ( 3087).
AOutStream Type is TIdStream ( 3087).
ALevel Scope is const. Type is TIdCompressionLevel ( 3013).
AWindowBits Scope is const. Type is Integer.
AMemLevel Scope is const. Type is Integer.
AStrategy Scope is const. Type is Integer.

Description
CompressStream is a overridden method.

TIdCompressorZLibEx.DecompressFTPFromIO Method
Pascal
procedure DecompressFTPFromIO(
AIOHandler: TIdIOHandler;
AOutputStream: TIdStream;
const AWindowBits: Integer
); override;
Parameters
Parameters Description
AIOHandler Type is TIdIOHandler ( 1284).

366 Internet Direct (Indy) Version 10.1.5


Classes TIdConnectionIntercept Class

AOutputStream Type is TIdStream ( 3087).


AWindowBits Scope is const. Type is Integer.

Description
DecompressFTPFromIO is a overridden method.

TIdCompressorZLibEx.DecompressStream Method
Pascal
procedure DecompressStream(
AInStream: TIdStream;
AOutStream: TIdStream;
const AWindowBits: Integer
); override;
Parameters
Parameters Description
AInStream Type is TIdStream ( 3087).
AOutStream Type is TIdStream ( 3087).
AWindowBits Scope is const. Type is Integer.

Description
DecompressStream is a overridden method.

TIdCompressorZLibEx.DeflateStream Method
Pascal
procedure DeflateStream(
AInStream: TIdStream;
AOutStream: TIdStream;
const ALevel: TIdCompressionLevel = 0
); override;
Parameters
Parameters Description
AInStream Type is TIdStream ( 3087).
AOutStream Type is TIdStream ( 3087).
ALevel Scope is const. Type is TIdCompressionLevel ( 3013). Default value is 0.

Description
DeflateStream is a overridden method.

TIdCompressorZLibEx.InflateStream Method
Pascal
procedure InflateStream(
AInStream: TIdStream;
AOutStream: TIdStream
); override;
Parameters
Parameters Description
AInStream Type is TIdStream ( 3087).
AOutStream Type is TIdStream ( 3087).

Description
InflateStream is a overridden method.

Internet Direct (Indy) Version 10.1.5 367


TIdConnectionIntercept Class Classes

TIdConnectionIntercept Class
Specifies a socket handling framework that performs state change and data transformation tasks.

File
IdIntercept ( 4669)

Hierarchy

Pascal
TIdConnectionIntercept = class(TIdBaseComponent);
Description
TIdConnectionIntercept is a TIdBaseComponent ( 266) descendant that implements a framework for servicing operations that
affect the state of the connection, or perform input and output on the transport for a connection.

TIdConnectionIntercept descendants can be used by TIdTCPConnection ( 2349) and descendants to act as an intermediary
between the socket binding for the connection and low-level operations that communicate with the protocol stack.

TIdConnectionIntercept provides methods to respond to Connect ( 369) and Disconnect ( 369) requests for a socket connection.
The intercept allows access to data before messages are sent and/or after responses are received. Developers can use
TIdConnectionIntercept descendants to encrypt and decrypt data, or to compress ( 2741) and decompress messages.

Additional methods can be used to perform the Send ( 370) or Recv operation in behalf of the original socket connection.

See Also
TIdTCPConnection ( 2349)

TIdInterceptThrottler ( 1280)

TIdInterceptSimLog ( 1275)

TIdLogBase ( 1451)

TIdLogDebug ( 1457)

TIdLogFile ( 1460)

TIdLogStream ( 1463)

TIdLogEvent ( 1457)

IndySupport ( 15)

TIdConnectionIntercept Members
The following tables list the members exposed by TIdConnectionIntercept.

Properties
Property Description
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
Version ( 269) Identifies the version number for the Indy component suite.

368 Internet Direct (Indy) Version 10.1.5


Classes TIdConnectionIntercept Class

Methods
Method Description
Connect ( 369)
Create ( 267) Constructor for the object instance.
Disconnect ( 369) Responds to socket disconnection notifications.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Receive ( 370) Receives values for the connection intercept.
Send ( 370) Sends values for the connection intercept.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdConnectionIntercept Methods
The Methods of the TIdConnectionIntercept class are listed here.

Methods
Method Description
Connect ( 369)
Disconnect ( 369) Responds to socket disconnection notifications.
Receive ( 370) Receives values for the connection intercept.
Send ( 370) Sends values for the connection intercept.

Legend
Method
virtual

TIdConnectionIntercept.Connect Method
Pascal
procedure Connect(
AConnection: TIdNativeComponent
); virtual;
Parameters
Parameters Description
AConnection Type is TIdNativeComponent ( 3061).

Description
TIdConnectionIntercept.Connect virtual method.

TIdConnectionIntercept.Disconnect Method
Responds to socket disconnection notifications.

Internet Direct (Indy) Version 10.1.5 369


TIdConnectionIntercept Class Classes

Pascal
procedure Disconnect; virtual;
Description
Disconnect is a procedure that allows TIdConnectionIntercept ( 368) to respond to notification that the Connection ( 371) is
closing.

Disconnect ensures that an assigned Intercept ( 372) will call its Disconnect method.

When a procedure has been assigned to OnDisconnect ( 373), the event handler is triggered.

Disconnect clears the Connection ( 371) for connection intercept by assigning Nil to the property.

Use Connect ( 369) respond to connection notifications.

See Also
TIdConnectionIntercept.OnDisconnect ( 373)

TIdConnectionIntercept.Connection ( 371)

TIdConnectionIntercept.Connect ( 369)

TIdConnectionIntercept.Receive Method
Receives values for the connection intercept.

Pascal
procedure Receive(
var ABuffer: TIdBytes
); virtual;
Parameters
Parameters Description
ABuffer Buffer with values for the receive notification.

Description
Receive is a procedure used to receive values for the connection intercept using the buffer specified in ABuffer.

When the TIdConnectionIntercept ( 368) component is enabled, Receive is the method used to perform read operations before
data on made available to a subsequent IOHandler or Intercept ( 372) for the Connection ( 371).

Receive uses the corresponding method in an assigned Intercept ( 372) to make the data in ABuffer available to a chained
intercept.

Receive triggers the OnReceive ( 373) event when a procedure has been assigned to the event handler.

Use Send ( 370) to write data in a buffer to the event handlers and intercepts for the connection intercept.

See Also
TIdConnectionIntercept.TIdConnectionIntercept ( 368)

TIdConnectionIntercept.OnReceived

TIdConnectionIntercept.Intercept ( 372)

TIdConnectionIntercept.Send Method
Sends values for the connection intercept.

Pascal
procedure Send(
var ABuffer: TIdBytes
); virtual;

370 Internet Direct (Indy) Version 10.1.5


Classes TIdConnectionIntercept Class

Parameters
Parameters Description
ABuffer Buffer with values for the receive ( 370) notification.

Description
Send is a procedure used to send values for the connection intercept using the buffer specified in ABuffer.

When the TIdConnectionIntercept ( 368) component is enabled, Send is the method used to perform write operations before data
on made available to a subsequent IOHandler or Intercept ( 372) for the Connection ( 371).

Send triggers the OnSend ( 374) event when a procedure has been assigned to the event handler.

Send uses the corresponding method in an assigned Intercept ( 372) to make the data in ABuffer available to a chained intercept.

Use Receive ( 370) to read data in a buffer to the event handlers and intercepts for the connection intercept.

See Also
TIdConnectionIntercept.TIdConnectionIntercept ( 368)

TIdConnectionIntercept.OnSend ( 374)

TIdConnectionIntercept.Intercept ( 372)

TIdConnectionIntercept Properties
The Properties of the TIdConnectionIntercept class are listed here.

Properties
Property Description
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.

Legend
Property
read only

TIdConnectionIntercept.Connection Property
Connection to be handled in the intercept.

Pascal
property Connection: TIdNativeComponent;
Description
Connection is a read-only TComponent property that represents the socket descriptor generating the connect ( 369), disconnect
( 369), send ( 370), and receive ( 370) actions handled by the TIdConnectionIntercept ( 368) framework.

Connection is assigned in the Connect ( 369) method, and set to Nil in the Disconnect ( 369) method.

See Also
TIdConnectionIntercept.Connect ( 369)

TIdConnectionIntercept.Disconnect ( 369)

TIdConnectionIntercept.Data Property
Provides context or other data for the connection intercept.

Internet Direct (Indy) Version 10.1.5 371


TIdConnectionIntercept Class Classes

Pascal
property Data: TObject;
Description
Data is a TObject property used to store pobject references used by the connection intercept. Data can be used to provide context
information for the intercept.

The content of the Data property is not managed by the TIdConnectionIntercept ( 368) object instance; applications must assign
the content after initializing the object, and must free the object instance prior to calling Destroy.

See Also
TIdConnectionIntercept.Destroy

TIdConnectionIntercept.Intercept Property
Pascal
property Intercept: TIdConnectionIntercept;
Description
Intercept is a Published TIdConnectionIntercept ( 368) property

TIdConnectionIntercept.IsClient Property
Indicates that the conncetion intercept is for a client connection.

Pascal
property IsClient: Boolean;
Description
IsClient is a read-only Boolean property that indicates the connection intercept is being used in a client (as opposed to server)
connection.

The default value for IsClient is True, as assigned during initialization of the object instance.

TIdConnectionIntercept Events
The Events of the TIdConnectionIntercept class are listed here.

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Event

TIdConnectionIntercept.OnConnect Event
Specifies the event handler for connection notifications.

Pascal
property OnConnect: TIdInterceptNotifyEvent;
Description
OnConnect is a TIdInterceptNotifyEvent ( 3037) property that represents the event handler for connection notifications received by

372 Internet Direct (Indy) Version 10.1.5


Classes TIdConnectionIntercept Class

the connection intercept.

Assign a procedure to OnConnect to perform special processing when a connection notification is received in the Connect ( 369)
method. Applications must assign an OnConnect event handler in order to respond to connection notifications.

Use OnDisconnect ( 373) to respond to notifications from Disconnect ( 369).

See Also
TIdInterceptNotifyEvent ( 3037)

TIdConnectionIntercept.Connect ( 369)

TIdConnectionIntercept.OnDisconnect ( 373)

TIdConnectionIntercept.OnDisconnect Event
Specifies the event handler for disconnect ( 369) notifications.

Pascal
property OnDisconnect: TIdInterceptNotifyEvent;
Description
OnDisconnect is a TIdInterceptNotifyEvent ( 3037) property that represents the event handler for disconnect ( 369) notifications
received by the connection intercept.

Assign a procedure to OnDisconnect to perform special processing when a disconnect ( 369) notification is received in the
Disconnect ( 369) method. Applications must assign an OnDisconnect event handler in order to respond to the notification.

Use OnConnect ( 372) to respond to notifications from Connect ( 369).

See Also
TIdInterceptNotifyEvent ( 3037)

TIdConnectionIntercept.Connect ( 369)

TIdConnectionIntercept.OnConnect ( 372)

TIdConnectionIntercept.Disconnect ( 369)

TIdConnectionIntercept.OnReceive Event
Allows data handling or transformation for intercepted read operations.

Pascal
property OnReceive: TIdInterceptStreamEvent;
Description
OnReceive is a TIdInterceptStreamEvent ( 3038) property that represents the event handler signalled when a read operation
needs to be performed for the Connection ( 371) in the intercept.

OnReceive is triggered in the Receive ( 370) method, and allows handling or transformation of data in the Receive ( 370) buffer.

Applications must assign a procedure to the TIdInterceptStreamEvent ( 3038) event handler to allow responding to the event
notification.

Data ( 371) can be modified in OnReceive, but it will have already been passed to an assigned Intercept ( 372).

See Also
TIdInterceptStreamEvent ( 3038)

TIdConnectionIntercept.Receive ( 370)

Internet Direct (Indy) Version 10.1.5 373


TIdConnectThroughHttpProxy Class Classes

TIdConnectionIntercept.OnSend Event
Allows data handling or transformation for intercepted write operations.

Pascal
property OnSend: TIdInterceptStreamEvent;
Description
OnSend is a TIdInterceptStreamEvent ( 3038) property that represents the event handler signalled when a write operation needs
to be performed for the Connection ( 371) in the connection intercept.

OnSend is triggered in the Send ( 370) method, and allows handling or transformation of data in the Send ( 370) buffer.

Applications must assign a procedure to the TIdInterceptStreamEvent ( 3038) event handler to allow responding to the event
notification.

Values in the Send ( 370) buffer are made available to an assigned Intercept ( 372) after OnSend has completed.

See Also
TIdInterceptStreamEvent ( 3038)

TIdConnectionIntercept.Send ( 370)

TIdConnectThroughHttpProxy Class
File
IdConnectThroughHttpProxy ( 4605)

Hierarchy

Pascal
TIdConnectThroughHttpProxy = class(TIdCustomTransparentProxy);
Description
TIdConnectThroughHttpProxy is a TIdCustomTransparentProxy ( 477) descendant.

See Also
TIdCustomTransparentProxy ( 477)

TIdConnectThroughHttpProxy Members
The following tables list the members exposed by TIdConnectThroughHttpProxy.

Properties
Property Description
ChainedProxy ( 375)
Enabled ( 375)
Host ( 376)
IPVersion ( 482)
Password ( 376)
Port ( 376)
Username ( 376)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

374 Internet Direct (Indy) Version 10.1.5


Classes TIdConnectThroughHttpProxy Class

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CloseUDP ( 479)
Connect ( 479)
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Listen ( 480)
OpenUDP ( 480)
RecvFromUDP ( 480)
SendToUDP ( 481)
CType ( 267)
Bind ( 478)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdConnectThroughHttpProxy Properties
The Properties of the TIdConnectThroughHttpProxy class are listed here.

Properties
Property Description
ChainedProxy ( 375)
Enabled ( 375)
Host ( 376)
Password ( 376)
Port ( 376)
Username ( 376)

Legend
Property

TIdConnectThroughHttpProxy.ChainedProxy Property
Pascal
property ChainedProxy: TIdCustomTransparentProxy;
Description
ChainedProxy is a Published property.

TIdConnectThroughHttpProxy.Enabled Property
Pascal
property Enabled: Boolean;

Internet Direct (Indy) Version 10.1.5 375


TIdContext Class Classes

Description
Enabled is a Published property.

TIdConnectThroughHttpProxy.Host Property
Pascal
property Host: String;
Description
Host is a Published property.

TIdConnectThroughHttpProxy.Password Property
Pascal
property Password: String;
Description
Password is a Published property.

TIdConnectThroughHttpProxy.Port Property
Pascal
property Port: Integer;
Description
Port is a Published property.

TIdConnectThroughHttpProxy.Username Property
Pascal
property Username: String;
Description
Username is a Published property.

TIdContext Class
Implements a session context representing client connections to a multi-threaded TCP server.

File
IdContext ( 4606)

Hierarchy

Pascal
TIdContext = class(TIdTask);
Description
TIdContext is a TIdTask ( 2329) descendant that implements a session context representing client connections to a multi-threaded
TCP server.

TIdContext instances are used in TIdTCPServer ( 2375), and descendant classes, in the Contexts property. Session contexts are

376 Internet Direct (Indy) Version 10.1.5


Classes TIdContext Class

created by the listener thread(s) for the server when a connection request is accepted by the listener thread.

TIdContext maintains an association between the peer connection for the session, the thread or fiber used to execute the tasks for
the client session, and the list of TIdContext instances active in the server.

TIdContext also provides event handlers that allow execution of the task for the client connection using the OnConnect, OnExecute,
and OnDisconnect event handlers in the TIdTCPServer ( 2375) instance.

See Also
TIdTask ( 2329)

TIdTCPServer.Contexts

TIdTCPServer.OnExecute ( 2379)

TIdTCPServer.OnConnect

TIdTCPServer.OnDisconnect

TIdContext Members
The following tables list the members exposed by TIdContext.

Properties
Property Description
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
Data ( 2332) A user-specified object with values used during execution of the task.
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 378)
Destroy ( 378) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

TIdContext Methods
The Methods of the TIdContext class are listed here.

Methods
Method Description
Binding ( 378)

Internet Direct (Indy) Version 10.1.5 377


TIdContext Class Classes

Create ( 378)
Destroy ( 378) Frees the object instance.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Legend
Method
virtual

TIdContext.Binding Method
Pascal
function Binding: TIdSocketHandle;
Returns
TIdSocketHandle ( 2071)

Description
Binding returns TIdSocketHandle ( 2071)

TIdContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); virtual; reintroduce;
Parameters
Parameters Description
AConnection Peer connection for the client.
AYarn Thread or fiber for execution the client connections task.
AList List of session contexts that owns the new session context.

Description
Create is the reintroduced constructor for the client session context.

AConnection is the peer connection for the client session created in a listener thread for the server.

AYarn is the thread or fiber to use when executing the task for the client connection created in a listener thread for the server.

AList is the list of session contexts that exist in the server, and owns the new session context.

Create calls the inherited constructor using AYarn as the owner of the task. Create stores the value in AConnection in the
Connection ( 379) property. The value in AList is stored in a private member used for the other session contexts that exist in the
server. When AList contains a valid non-null instance, the new session context from the constructor is added to the internal list of
session contexts.

Use Destroy ( 378) to free the session context.

See Also
Connection ( 379)

Destroy ( 378)

TIdContext.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;

378 Internet Direct (Indy) Version 10.1.5


Classes TIdContext Class

Description
Destroy is the overridden destructor for the object instance.

Destroy removes the session context from the internally maintained list of session contexts. Destroy also frees resources allocated
for the peer connection in the Connection ( 379) property in Create ( 378).

Destroy calls the inherited destructor prior to exiting from the method.

See Also
Create ( 378)

Connection ( 379)

TIdTCPServer.Contexts

TIdContext.RemoveFromList Method
Removes the session context from the list of session contexts in a TCP server.

Pascal
procedure RemoveFromList;
Description
RemoveFromList is a procedure used to remove the current session context from the list of session contexts used in a TCP server.
RemoveFromList breaks the association between the session context and list maintained for the server by setting the internal list of
session contexts to Nil.

TIdContext Properties
The Properties of the TIdContext class are listed here.

Properties
Property Description
Connection ( 379) Represents the peer connection for a client session on the TCP server.

Legend
Property
read only

TIdContext.Connection Property
Represents the peer connection for a client session on the TCP server.

Pascal
property Connection: TIdTCPConnection;
Description
Connection is a read-only TIdTCPConnection ( 2349) property that represents the peer connection for a client session running on
the TCP server.

Connection is initialized in Create ( 378) using the argument value passed to the constructor.

Connection is freed in the Destroy ( 378) method.

Connection can be used in the OnBeforeRun ( 380), OnRun ( 381), and OnAfterRun ( 380) event handler procedures to
access properties and methods for the TIdTCPConnection ( 2349) instance. Of special importance are the IOHandler property
and the Disconnect method for the connection.

The TIdTCPConnection ( 2349) instance passed to the constructor is created by a listener thread that detect connection requests
for the server.

Internet Direct (Indy) Version 10.1.5 379


TIdContext Class Classes

See Also
TIdTCPConnection ( 2349)

TIdTCPServer.OnConnect

TIdTCPServer.OnDisconnect

TIdTCPServer.OnExecute ( 2379)

TIdContext Events
The Events of the TIdContext class are listed here.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Event

TIdContext.OnAfterRun Event
Event handler signalled after execution of the client connection context.

Pascal
property OnAfterRun: TIdContextAfterRun;
Description
OnAfterRun is a TIdContextAfterRun ( 3014) event handler property signalled when the executable task for the client connection
context has completed execution.

The session context is passed as an argument to the event handler procedure.

TIdContext.OnAfterRun is used when execution of the task in OnRun ( 381) has been completed, and prior to removing the task
for the session contexts in the TCP server.

TIdContext.OnBeforeRun Event
Event handler signalled before execution of the client connection context.

Pascal
property OnBeforeRun: TIdContextBeforeRun;
Description
OnBeforeRun is a TIdContextBeforeRun ( 3014) event handler property used following creation of a session context by a listener
thread for the TCP server.

The session context that represents the executable for a client connection is passed as an argument to the event handler procedure.

OnBeforeRun is normally assigned a procedure runs the OnConnect event handler in TIdTCPServer ( 2375). OnBeforeRun is
signalled once before execution of the OnRun ( 381) loop for the session context.

See Also
TIdContextBeforeRun ( 3014)

TIdTCPServer.OnConnect

380 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieList Class

TIdContext.OnRun Event
Event handler signalled to execute the task for the client session context.

Pascal
property OnRun: TIdContextRun;
Description
OnRun is a TIdContextRun ( 3015) event handler property that represents the event handler signalled to execute the task for the
client session context.

The session context is passed as an argument to the event handler during execution. OnRun is normally assigned a procedure in
the server that triggers the OnExecute loop for the TCP server. Listener threads in TIdTCPServer ( 2375) assign procedures for
the OnBefore, OnRun, and OnAfterRun ( 380) event handlers that trigger the OnConnect, OnExecute, and OnDisconnect event
handlers (respectively).

See Also
TIdContextRun ( 3015)

TIdListenerThread ( 1445)

TIdTCPServer.OnConnect

TIdTCPServer.OnExecute ( 2379)

TIdTCPServer.OnDisconnect

TIdCookieList Class
Provides access to Cookies ( 382) by name or index position.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdCookieList = class(TIdStringList);
Description
TIdCookieList is a TStringList descendant that provides access to Cookie class instances using common TStringList methods and
properties. TIdCookieList extends the ancestor class to include accessing TIdNetscapeCookie ( 1679) Objects using an Integer
index.

TIdCookieList is the type used to represent the TIdCookies.CookieListByDomain property.

TIdCookieList also used by TIdCookieManager ( 382) in the GenerateCookieList method.

See Also
TIdCookies.CookieListByDomain

TIdCookieManager.GenerateCookieList ( 385)

TIdCookieList Members
The following tables list the members exposed by TIdCookieList.

Internet Direct (Indy) Version 10.1.5 381


TIdCookieManager Class Classes

Properties
Property Description
Cookies ( 382) Provides access to a list of Cookies.

Legend
Property
read only

TIdCookieList Properties
The Properties of the TIdCookieList class are listed here.

Properties
Property Description
Cookies ( 382) Provides access to a list of Cookies.

Legend
Property
read only

TIdCookieList.Cookies Property
Provides access to a list of Cookies.

Pascal
property Cookies [Index: Integer]: TIdNetscapeCookie;
Description
Cookies is a read-only TIdNetscapeCookie ( 1679) property that provides access to a list of Cookie class instances using an
Integer index or position.

Cookies ensures that an Object in the TStringList descendant is cast to a TIdNetscapeCookie ( 1679) instance before use.

See Also
TIdNetscapeCookie ( 1679)

TIdCookieManager Class
Implements a HTTP client Cookie manager.

File
IdCookieManager ( 4607)

Hierarchy

Pascal
TIdCookieManager = class(TIdBaseComponent);
Description
TIdCookieManager is a TIdBaseComponent ( 266) descendant that implements a management facility for persistent HTTP state
information, as described in the Internet Standards and reference documents:

RFC 2109 - HTTP State Management Mechanism

RFC 2965 - HTTP State Management Mechanism

382 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieManager Class

Netscape Persistent Client State - HTTP Cookies

The TIdCookieManager component provides the Add and Add2 methods that enable maintenance of Cookie class instances added
to the CookieCollection ( 386) in an HTTP Client connection. The GenerateCookieList ( 385) method is provided to create (
267) a textual representation of Cookies maintained for a specific URI.

In addition, TIdCookieManager implements event handlers that allow event notifications during creation or destruction of the
TIdCookieManager class instance, and when Cookies are added using the Cookie manager.

TIdCookieManager is used by a TIdHTTP ( 1041) client in the CookieMananger property when AllowCookies is True. The HTTP
client uses CookieManager to maintain a Cookie collection when 'Set-cookie' or 'Set-cookie2' headers are detected in a response
from an HTTP server.

See Also
TIdHTTP ( 1041)

TIdHTTPServer ( 1102)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

IndySupport ( 15)

TIdCookieManager Members
The following tables list the members exposed by TIdCookieManager.

Properties
Property Description
CookieCollection ( 386) Represents a container for Cookies managed by TIdCookieManager ( 382).
OnCreate ( 387) Event handler signalled during the Create ( 267) method.
OnDestroy ( 387) Event handler signalled during the Create ( 267) method.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AddCookie ( 384) Adds a cookie to the collection managed by IdCookieManager.
AddCookie2 ( 384) Adds a cookie to the collection managed by IdCookieManager.
Create ( 267) Constructor for the object instance.
Destroy ( 385) Frees the object instance.
GenerateCookieList ( 385) Generates Cookie text for the specified host and path.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnNewCookie ( 388) Event handler signalled when Cookies are added to the collection.

Legend
Method
virtual
Property
read only
Event

TIdCookieManager Methods
The Methods of the TIdCookieManager class are listed here.

Internet Direct (Indy) Version 10.1.5 383


TIdCookieManager Class Classes

Methods
Method Description
AddCookie ( 384) Adds a cookie to the collection managed by IdCookieManager.
AddCookie2 ( 384) Adds a cookie to the collection managed by IdCookieManager.
Destroy ( 385) Frees the object instance.
GenerateCookieList ( 385) Generates Cookie text for the specified host and path.

Legend
Method
virtual

TIdCookieManager.AddCookie Method
Adds a cookie to the collection managed by IdCookieManager.

Pascal
procedure AddCookie(
ACookie: String;
AHost: String
);
Parameters
Parameters Description
ACookie Textual Cookie values as described in RFC 2109.
AHost Host name or address from the URI for the HTTP request.

Description
AddCookie is a procedure that creates a new TIdCookieRFC2109 ( 388) Cookie class instance for the Cookie values specified in
ACookie and the Domain specified in AHost. The internal implementation of AddCookie ensures that the Cookie is updated to
reflect the values in ACookie, and sets the Domain attribute of the Cookie to AHost when no specific Domain is found in the Cookie
contents.

AddCookie checks that the Cookie is valid for the Domain specified in AHost prior to signalling the OnNewCookie ( 388) event
handler. When AHost is not a valid Domain, or the OnNewCookie ( 388) event handler indicates that the Cookie has been
rejected, the Cookie class instance is removed from the CookieCollection ( 386) and freed.

Example
// add a cookie to the collection for this domain
IdHttpClient1.CookieManager.AddCookie('MyCookie=MyCookieValue','www.mydomain.com');
See Also
TIdCookieManager.CookieCollection ( 386)

TIdCookieManager.OnNewCookie ( 388)

TIdNetscapeCookie.Domain ( 1683)

TIdNetscapeCookie.IsValidCookie ( 1681)

TIdCookieRFC2109 ( 388)

TIdCookieManager.AddCookie2 Method
Adds a cookie to the collection managed by IdCookieManager.

Pascal
procedure AddCookie2(
ACookie: String;
AHost: String
);

384 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieManager Class

Parameters
Parameters Description
ACookie Textual Cookie values as described in RFC 2965.
AHost Host name or address from the URI for the HTTP request.

Description
AddCookie2 is a procedure that creates a new TIdCookieRFC2965 ( 391) Cookie class instance for the Cookie values specified in
ACookie and the Domain specified in AHost. The internal implementation of AddCookie2 ensures that the Cookie is updated to
reflect the values in ACookie, and sets the Domain attribute of the Cookie to AHost when no specific Domain is found in the Cookie
contents.

AddCookie2 checks that the Cookie is valid for the Domain specified in AHost prior to signalling the OnNewCookie ( 388) event
handler. When AHost is not a valid Domain, or the OnNewCookie ( 388) event handler indicates that the Cookie has been
rejected, the Cookie class instance is removed from the CookieCollection ( 386) and freed.

Example
// add a cookie to the collection for this domain
IdHttpClient1.CookieManager.AddCookie2('MyCookie=MyCookieValue','www.mydomain.com');
See Also
TIdCookieRFC2965 ( 391)

TIdCookieManager.CookieCollection ( 386)

TIdCookieManager.OnNewCookie ( 388)

TIdNetscapeCookie.Domain ( 1683)

TIdNetscapeCookie.IsValidCookie ( 1681)

TIdCookieManager.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy will signal a TNotifyEvent event type whan a procedure has been assigned
to the OnDestroy ( 387) event handler.

Use OnDestroy ( 387) to handle management of the CookieCollection ( 386) during destruction of the TIdCookieManager (
382) object instance.

Destroy frees resources allocated to the cookie manager, including the CookieCollection ( 386) property, prior to calling the
inherited Destroy method.

See Also
TIdCookieManager.OnDestroy ( 387)

TIdCookieManager.CookieCollection ( 386)

TIdCookieManager.GenerateCookieList Method
Generates Cookie text for the specified host and path.

Pascal
function GenerateCookieList(
URL: TIdURI;
SecureConnection: Boolean = false
): String;

Internet Direct (Indy) Version 10.1.5 385


TIdCookieManager Class Classes

Parameters
Parameters Description
URL URI specifying the Host and Path for valid Cookie content.
SecureConnection Indicates if a Secure connection is required. Default value is False.

Returns
String - Textual representation of the matching Cookies.

Description
GenerateCookieList is a String function that generates the textual content for Cookies in the CookieCollection ( 386) that match
the Domain and Path for the location specified in URL in the HTTP server request.

SecureConnection indicates whether Cookies must contain a Secure attribute value before they are included in the generated
Cookie content for the HTTP client.

Cookies in the CookieCollection ( 386) will not be used in the generated content when Domain, Path, or Secure Cookie attributes
do not match the required values. Cookies can also be ignored when they have Expired.

GenerateCookieList creates and populates a TIdCookieList ( 381) with Cookie class instances matching the specifieed Host and
Path values, and fills the return value with the CookieName and Value for corresponding Cookies in the list. GenerateCookieList
frees the TIdCookieList ( 381) prior to exiting from the method.

GenerateCookieList is called when an HTTP request is prepared and executed using the Post or Put methods of an HTTP client.

See Also
CookieCollection ( 386)

TIdCookieRFC2109 ( 388)

TIdNetscapeCookie.Secure ( 1684)

TIdNetscapeCookie.Domain ( 1683)

TIdNetscapeCookie.Path ( 1684)

TIdCookieList ( 381)

TIdCookieManager Properties
The Properties of the TIdCookieManager class are listed here.

Properties
Property Description
CookieCollection ( 386) Represents a container for Cookies managed by TIdCookieManager ( 382).
OnCreate ( 387) Event handler signalled during the Create ( 267) method.
OnDestroy ( 387) Event handler signalled during the Create ( 267) method.

Legend
Property
read only

TIdCookieManager.CookieCollection Property
Represents a container for Cookies managed by TIdCookieManager ( 382).

Pascal
property CookieCollection: TIdCookies;
Description
CookieCollection is a read-only TIdCookies ( 394) property that represents the Cookie class instances maintained by the
TIdCookieManager ( 382) for the HTTP client.

386 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieManager Class

CookieCollection is accessed when TIdCookieManager ( 382) creates new Cookie class instances in calls to AddCookie ( 384)
or AddCookie2 ( 384), and when the textual Cookie content is prepared using GenerateCookieList ( 385).

Use the OnNewCookie ( 388) event handler to manage the CookieCollection when new Cookie class instances are created in
AddCookie ( 384) or AddCookie2 ( 384).

Use the OnCreate ( 387) and OnDestroy ( 387) event handlers to manage the CookieCollection during creation or destruction of
the TIdCookieManager ( 382) class instance.

See Also
TIdCookies ( 394)

TIdCookieManager.AddCookie ( 384)

TIdCookieManager.AddCookie2 ( 384)

TIdCookieManager.GenerateCookieList ( 385)

TIdCookieManager.OnNewCookie ( 388)

TIdCookieManager.OnCreate ( 387)

TIdCookieManager.OnDestroy ( 387)

TIdCookieManager.OnCreate Property
Event handler signalled during the Create ( 267) method.

Pascal
property OnCreate: TOnCreateEvent;
Description
OnCreate is a TOnCreateEvent ( 3103) property that represents the event handler signalled during creation of the
TIdCookieManager ( 382) object instance. Applications must assign a procedure to the event handler to allow responding to the
event notification.

OnCreate can be used to handle management of the CookieCollection ( 386) when the TIdCookieManager ( 382) calls the
Create ( 267) method.

Use OnDestroy ( 387) to handle management of the CookieCollection ( 386) when the object instance is freed.

See Also
TIdCookieManager.Destroy ( 385)

TIdCookieManager.OnDestroy ( 387)

TIdCookieManager.OnDestroy Property
Event handler signalled during the Create ( 267) method.

Pascal
property OnDestroy: TOnDestroyEvent;
Description
OnDestroy is a TOnDestroyEvent ( 3105) property that represents the event handler signalled during destruction of the
TIdCookieManager ( 382) object instance.

OnDestroy can be used to handle management of the CookieCollection ( 386) when the TIdCookieManager ( 382) calls the
Destroy ( 385) method. Applications must assign a procedure to the event handler to allow responding to the event notification.

Use OnCreate ( 387) to handle management of the CookieCollection ( 386) when the object instance is created.

See Also
TIdCookieManager.Destroy ( 385)

Internet Direct (Indy) Version 10.1.5 387


TIdCookieRFC2109 Class Classes

TIdCookieManager.OnCreate ( 387)

TIdCookieManager Events
The Events of the TIdCookieManager class are listed here.

Events
Event Description
OnNewCookie ( 388) Event handler signalled when Cookies are added to the collection.

Legend
Event

TIdCookieManager.OnNewCookie Event
Event handler signalled when Cookies are added to the collection.

Pascal
property OnNewCookie: TOnNewCookieEvent;
Description
OnNewCookie is a TOnNewCookieEvent ( 3109) property that represents the event handler signalled when Cookie class
instances are added to the CookieCollection ( 386).

OnNewCookie is signalled when AddCookie ( 384) or AddCookie2 ( 384) is used to create ( 267) the corresponding Cookie
class instance used to represent the text for the Cookie.

OnNewCookie can indicate if the Cookie is accepted or rejected based on values detected in the Cookie content.

Use OnNewCookie to override the default logic used in management of the CookieCollection ( 386) when Cookies are added to
the collection.

Applications must assign a procedure to the event handler to allow responding to the event notification.

See Also
TOnNewCookieEvent ( 3109)

AddCookie ( 384)

AddCookie2 ( 384)

CookieCollection ( 386)

TIdCookieRFC2109 Class
Implements a persistent session mechanism using Cookies with extended headers.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdCookieRFC2109 = class(TIdNetscapeCookie);
Description
TIdCookieRFC2109 is a TIdNetscapeCookie ( 1679) descendant that implements a persistent session mechanism using Cookies

388 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieRFC2109 Class

in HTTP requests and responses, as described in the Internet Standards document:

RFC 2109 - HTTP State Management Mechanism

TIdCookieRFC2109 extends TIdNetscapeCookie ( 1679) by adding extended Cookie headers, and allows additional Cookie
attributes to be indicated in the MaxAge ( 390), Comment ( 390), and Version ( 391) properties.

TIdCookieRFC2109 differs from the original Netscape Cookie proposal, and uses MaxAge ( 390) to represent the longevity of
Cookie data.

See Also
TIdCookieRFC2965 ( 391)

TIdNetscapeCookie ( 1679)

TIdCookieRFC2109 Members
The following tables list the members exposed by TIdCookieRFC2109.

Properties
Property Description
ClientCookie ( 1682) Represents the Cookie name and value.
Comment ( 390) Represents private data or documentation in a Cookie.
CookieName ( 1682) Represents the identity for a Cookie header.
CookieText ( 1683) Represents the textual representation for a Cookie including attribute parameters.
Domain ( 1683) Indicates the host system where a Cookie is valid.
Expires ( 1683) Indicates the life time of the Cookie.
MaxAge ( 390) Represents the longevity of the Cookie.
Path ( 1684) Specifies the subset of URLs valid for the Cookie.
Secure ( 1684) Indicates the Cookie requires a secure communications channel.
ServerCookie ( 1684) Represents the Cookie contents in a Server response.
Value ( 1684) Represents persistent state data associated with a Cookie name.
Version ( 391) Version of the Cookie specification supported.

Methods
Method Description
Assign ( 1680) Copies property values to the current object instance.
Create ( 390) Constructor for the object instance.
Destroy ( 1681) Frees the collection item.
IsValidCookie ( 1681) Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Legend
Method
virtual
Property
read only

TIdCookieRFC2109 Methods
The Methods of the TIdCookieRFC2109 class are listed here.

Methods
Method Description
Create ( 390) Constructor for the object instance.

Legend
Constructor
virtual

Internet Direct (Indy) Version 10.1.5 389


TIdCookieRFC2109 Class Classes

TIdCookieRFC2109.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Collection that owns the collection item.

Description
Create is the constructor for the object instance, and calls the inherited Create method using the collection that owns the Cookie
specified in ACollection.

Create also sets the MaxAge ( 390) property to the default value GFMaxAge ( 3211), indicating that no MaxAge ( 390) value
has determined.

See Also
MaxAge ( 390)

TIdCookieRFC2109 Properties
The Properties of the TIdCookieRFC2109 class are listed here.

Properties
Property Description
Comment ( 390) Represents private data or documentation in a Cookie.
MaxAge ( 390) Represents the longevity of the Cookie.
Version ( 391) Version of the Cookie specification supported.

Legend
Property

TIdCookieRFC2109.Comment Property
Represents private data or documentation in a Cookie.

Pascal
property Comment: String;
Description
Comment is a String property that represents an optional Cookie attribute that can contain private information about the user, or
document the intended use of the Cookie.

An HTTP Client can inspect values in Comment to decide whether to initiate or continue a session with this Cookie.

TIdCookieRFC2109.MaxAge Property
Represents the longevity of the Cookie.

Pascal
property MaxAge: Int64;
Description
MaxAge is a Int64 property that represents the optional Cookie attibute that defines the lifetime of the Cookie in seconds. MaxAge

390 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieRFC2965 Class

contains a positive integer value or 0 (zero).

When the number of seconds in MaxAge has elapsed, the client should discard the Cookie. A value of 0 (zero) means the cookie
should be discarded immediately.

When MaxAge contains the value GFMaxAge ( 3211), a value has not been determined or assigned to the MaxAge property.

Changing the value of the inherited Expires ( 1683) property will result in the MaxAge property being recalculated using the date
value in Expires ( 1683).

See Also
TIdNetscapeCookie.Expires ( 1683)

TIdCookieRFC2109.Version Property
Version of the Cookie specification supported.

Pascal
property Version: String;
Description
Version is a String property that represents the Cookie attribute that specifies the version number of the state management
specification supported by the Cookie.

Version is required in TIdCookieRFC2109 ( 388), and assumes the Version value is "1" when no explicit value is supplied in the
property.

TIdCookieRFC2965 Class
Implements a persistent session mechanism using Cookies with extend headers.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdCookieRFC2965 = class(TIdCookieRFC2109);
Description
TIdCookieRFC2965 is a TIdCookieRFC2109 ( 388) descendant that implements a persistent session mechanism using Cookies
in HTTP requests and responses, as described in the Internet Standards document:

RFC 2965 - HTTP State Management Mechanism

TIdCookieRFC2965 extends TIdCookieRFC2109 ( 388) by adding additional extended Cookie headers, and allows additional
Cookie attributes to be indicated in the CommentURL ( 393), Discard ( 393), and PortList ( 393) properties.

TIdCookieRFC2965 differs from the original Netscape Cookie proposal, but can interoperate with HTTP/1.0 clients that use the
Netscape Cookie mechanism. The significant differences in TIdCookieRFC2965 are the ability to formulate extended Cookie
headers that contain MaxAge ( 390), Discard ( 393), and PortList ( 393) attribute values.

See Also
TIdNetscapeCookie ( 1679)

TIdCookieRFC2109 ( 388)

Internet Direct (Indy) Version 10.1.5 391


TIdCookieRFC2965 Class Classes

TIdCookieRFC2965 Members
The following tables list the members exposed by TIdCookieRFC2965.

Properties
Property Description
ClientCookie ( 1682) Represents the Cookie name and value.
Comment ( 390) Represents private data or documentation in a Cookie.
CommentURL ( 393) Version ( 391) of the Cookie specification supported.
CookieName ( 1682) Represents the identity for a Cookie header.
CookieText ( 1683) Represents the textual representation for a Cookie including attribute parameters.
Discard ( 393) Indicates that a Cookie should be discarded after use.
Domain ( 1683) Indicates the host system where a Cookie is valid.
Expires ( 1683) Indicates the life time of the Cookie.
MaxAge ( 390) Represents the longevity of the Cookie.
Path ( 1684) Specifies the subset of URLs valid for the Cookie.
PortList ( 393) Represents port numbers allowed for HTTP requests.
Secure ( 1684) Indicates the Cookie requires a secure communications channel.
ServerCookie ( 1684) Represents the Cookie contents in a Server response.
Value ( 1684) Represents persistent state data associated with a Cookie name.
Version ( 391) Version of the Cookie specification supported.

Methods
Method Description
Assign ( 1680) Copies property values to the current object instance.
Create ( 392) Constructor for the object instance.
Destroy ( 1681) Frees the collection item.
IsValidCookie ( 1681) Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Legend
Method
virtual
Property
read only

TIdCookieRFC2965 Methods
The Methods of the TIdCookieRFC2965 class are listed here.

Methods
Method Description
Create ( 392) Constructor for the object instance.

Legend
Constructor
virtual

TIdCookieRFC2965.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;

392 Internet Direct (Indy) Version 10.1.5


Classes TIdCookieRFC2965 Class

Parameters
Parameters Description
ACollection Collection that owns the collection item.

Description
Create is the constructor for the object instance, and calls the inherited Create method using the collection that owns the Cookie
specified in ACollection.

Use Destroy ( 1681) to free the object instance.

TIdCookieRFC2965 Properties
The Properties of the TIdCookieRFC2965 class are listed here.

Properties
Property Description
CommentURL ( 393) Version ( 391) of the Cookie specification supported.
Discard ( 393) Indicates that a Cookie should be discarded after use.
PortList ( 393) Represents port numbers allowed for HTTP requests.

Legend
Property

TIdCookieRFC2965.CommentURL Property
Version ( 391) of the Cookie specification supported.

Pascal
property CommentURL: String;
Description
Version ( 391) is a String property that represents the Cookie attribute that specifies the version number of the state management
specification supported by the Cookie.

Version ( 391) is required in TIdCookieRFC2109 ( 388), and assumes the Version ( 391) value is "1" when no explicit value is
supplied in the property.

TIdCookieRFC2965.Discard Property
Indicates that a Cookie should be discarded after use.

Pascal
property Discard: Boolean;
Description
Discard is a Boolean property that represents an optional Cookie attribute that indicates how the Cookie is handled during Cookie
management. When Discard is True, the HTTP client should unconditionally discard the Cookie when the user agent terminates.

Use MaxAge ( 390) or Expires ( 1683) to control Cookie longevity based on dates or duration.

See Also
TIdNetscapeCookie.Expires ( 1683)

TIdCookieRFC2109.MaxAge ( 390)

TIdCookieRFC2965.PortList Property
Represents port numbers allowed for HTTP requests.

Internet Direct (Indy) Version 10.1.5 393


TIdCookies Class Classes

Pascal
property PortList [AIndex: Integer]: Integer;
Description
PortList is an Array property that contains optional Integer values representing port numbers where a Cookie may be returned in an
HTTP request.

PortList is accessed using the zero-based Integer index value specified in AIndex.

A Cookie can be rejected in an HTTP request when the port number for the request does not match a value specified in PortList.

The default HTTP port (80) is added to PortList when no explicit values are specified.

TIdCookies Class
Implements a container for Cookie ( 401) class instances.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdCookies = class(TIdOwnedCollection);
Description
TIdCookies is a TOwnedCollection descendant that implements a container for Cookie ( 401) class instances.

TIdCookies provides methods that allow creation of both TIdCookieRFC2109 ( 388) and TIdCookieRFC2965 ( 391) Cookie (
401) class instances. TIdCookies also provides methods that provide access to Cookie ( 401) class instances using Cookie (
401) name, Cookie ( 401) name and Domain, and an integer position in the Cookie ( 401) collection.

TIdCookies is the type used by TIdCookieManager ( 382) to represent the Cookie ( 401) collection maintained by a TIdHTTP (
1041) client.

See Also
TIdHTTP ( 1041)

TIdCustomHTTP.CookieManager ( 422)

TIdCookieManager ( 382)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

TIdCookies Members
The following tables list the members exposed by TIdCookies.

Properties
Property Description
Cookie ( 401) Provides access to Cookie collection items using name and domain values.
Items ( 401) Provides access to Cookie ( 401) collection items by position in the container.

394 Internet Direct (Indy) Version 10.1.5


Classes TIdCookies Class

Methods
Method Description
Add ( 395) Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.
Add2 ( 396) Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.
AddCookie ( 396) Adds or updates a Cookie ( 401) instance in the collection.
AddSrcCookie ( 397) Creates a new Cookie ( 401) collection item using the textual Cookie ( 401) data.
Create ( 397) Constructor for the object instance.
Delete ( 397) Removes a Cookie ( 401) from the collection.
Destroy ( 398) Frees the object instance.
LockCookieListByDomain ( 399) Provides resource protection for write access to Cookies in the Cookie ( 401) collection.
GetCookieIndex ( 398)
UnlockCookieListByDomain ( 400) Releases resource protection for accessing Cookies in the Cookie ( 401) collection.

Legend
Method
virtual
Property
read only

TIdCookies Methods
The Methods of the TIdCookies class are listed here.

Methods
Method Description
Add ( 395) Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.
Add2 ( 396) Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.
AddCookie ( 396) Adds or updates a Cookie ( 401) instance in the collection.
AddSrcCookie ( 397) Creates a new Cookie ( 401) collection item using the textual Cookie ( 401) data.
Create ( 397) Constructor for the object instance.
Delete ( 397) Removes a Cookie ( 401) from the collection.
Destroy ( 398) Frees the object instance.
GetCookieIndex ( 398)
LockCookieListByDomain ( 399) Provides resource protection for write access to Cookies in the Cookie ( 401) collection.
UnlockCookieListByDomain ( 400) Releases resource protection for accessing Cookies in the Cookie ( 401) collection.

Legend
Method
virtual

TIdCookies.Add Method
Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.

Pascal
function Add: TIdCookieRFC2109;
Returns
TIdCookieRFC2109 ( 388) - Cookie ( 401) class instance added to the collection.

Description
Add is a TIdCookieRFC2109 ( 388) function that creates a new instance of TIdCookieRFC2109 ( 388) to be added to the Cookie
( 401) collection. Add creates the Cookie ( 401) class instance using the TIdCookies ( 394) object instance as the owner of the
collection item.

Add is called from the TIdCookieManager.AddCookie ( 384) method when a CookieName and Domain are added to an HTTP
client as an TIdCookieRFC2109 ( 388) class instance.

Internet Direct (Indy) Version 10.1.5 395


TIdCookies Class Classes

See Also
TIdCookieManager.AddCookie ( 384)

TIdCookieRFC2109 ( 388)

TIdCookies.Add2 Method
Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.

Pascal
function Add2: TIdCookieRFC2965;
Returns
TIdCookieRFC2965 ( 391) - Cookie ( 401) class instance added to the collection.

Description
Add2 is a TIdCookieRFC2965 ( 391) function that creates a new instance of TIdCookieRFC2965 ( 391) to be added to the
Cookie ( 401) collection. Add ( 395) creates the Cookie ( 401) class instance using the TIdCookies ( 394) object instance as
the owner of the collection item.

Add2 is called from the TIdCookieManager.AddCookie2 ( 384) method when a CookieName and Domain are added to an HTTP
client as an TIdCookieRFC2965 ( 391) class instance.

See Also
TIdCookieManager.AddCookie2 ( 384)

TIdCookieRFC2965 ( 391)

TIdCookies.AddCookie Method
Adds or updates a Cookie ( 401) instance in the collection.

Pascal
procedure AddCookie(
ACookie: TIdCookieRFC2109
);
Parameters
Parameters Description
ACookie Cookie ( 401) class instance to be added or updated in the collection.

Description
AddCookie is a procedure that adds a TIdCookieRFC2109 ( 388) class instance specified in ACookie to the Cookie ( 401)
collection. AddCookie uses an instance of TIdCookieList ( 381) to maintain a list of Cookies for the Domain specified in ACookie.

AddCookie uses LockCookieListByDomain ( 399) to create ( 397) or maintain Cookie ( 401) class instances using the value of
CookieName specified in ACookie.

If a Cookie ( 401) having the Domain and CookieName specified in ACookie already exists in the collection, the Cookie ( 401)
value is assigned to the existing TIdCookieRFC2109 ( 388) object instance and ACookie is freed. Otherwise, ACookie is added to
the Cookie ( 401) list for the specified Domain and CookieName.

AddCookie is called by TIdCookieManager ( 382) when a Cookie ( 401) is added to the collection maintained by an HTTP client.

See Also
TIdCookieManager.AddCookie ( 384)

TIdCookieRFC2109 ( 388)

TIdCookieList ( 381)

TIdCookies.CookieListByDomain

396 Internet Direct (Indy) Version 10.1.5


Classes TIdCookies Class

TIdCookies.AddSrcCookie Method
Creates a new Cookie ( 401) collection item using the textual Cookie ( 401) data.

Pascal
procedure AddSrcCookie(
const sCookie: string
);
Parameters
Parameters Description
sCookie Textual representation of the Cookie ( 401).

Description
AddSrcCookie is a procedure used to create ( 397) a new Cookie ( 401) class instance in the collection using the textual
representation of Cookie ( 401) specified in sCookie.

AddSrcCookie calls Add ( 395) to create ( 397) the Cookie ( 401) class instance added to the collection. AddSrcCookie sets
the name, value, and attributes for the new Cookie ( 401) by updating CookieText to reflect the data specified in sCookie.

See Also
TIdCookies.Add ( 395)

TIdNetscapeCookie.CookieText ( 1683)

TIdCookies.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AOwner: TIdPersistent
);
Parameters
Parameters Description
AOwner Owner of the collection.

Description
Create is the constructor for the object instance. Create calls the inherited Create method using AOwner as the owner of the
collection, and TIdCookieRFC2109 ( 388) as the ItemClass maintained in the collection.

Create allocates an internal TMultiReadExclusiveWriteSynchronizer instance that is used to protect access to the collection in a
multi-threaded application.

Create initializes the internal TIdCookieList ( 381), and sets the Sorted property to False for the member.

Use Destroy ( 398) to free the object instance.

See Also
TIdCookies.Destroy ( 398)

TIdCookies.LockCookieListByDomain ( 399)

TIdCookieList ( 381)

TIdCookies.Delete Method
Removes a Cookie ( 401) from the collection.

Pascal
procedure Delete(

Internet Direct (Indy) Version 10.1.5 397


TIdCookies Class Classes

Index: Integer
);
Parameters
Parameters Description
Index Position of the Cookie ( 401) in the container.

Description
Delete is a procedure that allows freeing a Cookie ( 401) class instance in the collection by its Integer position specified in Index.

Delete accesses the collection using the Items ( 401) property and the specified Index position to call the Free method for the
collection item.

See Also
TIdCookies.Items ( 401)

TIdCookies.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy calls Clear to ensure that Cookies are removed from the collection.

Destroy frees resources allocated in the Create ( 397) constructor, including the internal TIdCookieList ( 381) and the internal
protection mechanism used to access the collection.

Destroy calls the inherited Destroy method prior to exiting.

See Also
Create ( 397)

LockCookieListByDomain ( 399)

TIdCookieList ( 381)

TIdCookies.GetCookieIndex Method
Overload List

Method Description
TIdCookies.GetCookieIndex (integer,
string) ( 398)
TIdCookies.GetCookieIndex (integer, Indicates the index position of a Cookie ( 401) containing specified values.
string, string) ( 399)

TIdCookies.GetCookieIndex Method (integer, string)


Pascal
function GetCookieIndex(
FirstIndex: integer;
const AName: string
): Integer; overload;
Parameters
Parameters Description
FirstIndex
AName

398 Internet Direct (Indy) Version 10.1.5


Classes TIdCookies Class

Returns
Integer

Description
GetCookieIndex is an overloaded method.

See Also
TIdCookies.GetCookieIndex

TIdCookies.GetCookieIndex Method (integer, string, string)


Indicates the index position of a Cookie ( 401) containing specified values.

Pascal
function GetCookieIndex(
FirstIndex: integer;
const AName: string;
const ADomain: string
): Integer; overload;
Parameters
Parameters Description
FirstIndex Initial position to be examined in the collection.
AName Cookie ( 401) name to be matched.
ADomain Domain attribute to be matched.

Returns
Integer - Position of the matched Cookie ( 401) in the collection, or -1 when not found.

Description
GetCookieIndex is an overloaded Integer function that accesses Cookie ( 401) class instances in the collection to determine the
position of the collection item matching the specified search criteria. GetCookieIndex will return the value -1 when a Cookie ( 401)
cannot be located in the collection that matches the specified search criteria.

FirstIndex specifies the initial position in the container to be used when comparing the values in the AName and ADomain
parameters to the CookieName and Domain in Items ( 401).

AName is the CookieName value desired in a Cookie ( 401) collection item.

ADomain is the Domain value desired in a Cookie ( 401) collection item.

GetCookieIndex is called from the GetCookie method to locate one of the Items ( 401) in the collection that match a specified
Name and Domain.

See Also
Items ( 401)

TIdNetscapeCookie.CookieName ( 1682)

TIdNetscapeCookie.Domain ( 1683)

TIdCookies.GetCookieIndex

TIdCookies.LockCookieListByDomain Method
Provides resource protection for write access to Cookies in the Cookie ( 401) collection.

Pascal
function LockCookieListByDomain(
AAccessType: TIdCookieAccess
): TIdCookieList;

Internet Direct (Indy) Version 10.1.5 399


TIdCookies Class Classes

Parameters
Parameters Description
AAccessType Access requested for the resource protection block.

Returns
TIdCookieList ( 381) - List of Cookies for the specified Domain.

Description
LockCookieListByDomain is a TIdCookieList ( 381) function that protects write access to resources in the Cookie ( 401)
collection for the using a TMultiReadExclusiveWriteSynchronizer.

AAccessType is a TIdCookieAccess ( 2946) value that indicates the access type that should be recorded using the resource
protection lock.

The return value for LockCookieListByDomain is the values returned by the CookieListByDomain method call.

LockCookieListByDomain is used by method that create ( 397) or free items in the Cookie ( 401) collection, like Add ( 395) and
Delete ( 397).

See Also
TIdCookieList ( 381)

TIdCookieAccess ( 2946)

TIdCookies.Add ( 395)

TIdCookies.Delete ( 397)

TIdCookies.UnlockCookieListByDomain Method
Releases resource protection for accessing Cookies in the Cookie ( 401) collection.

Pascal
procedure UnlockCookieListByDomain(
AAccessType: TIdCookieAccess
);
Parameters
Parameters Description
AAccessType Access requested for the resource protection block.

Description
UnlockCookieListByDomain is a procedure used to release the resource protection block for the Cookie ( 401) collection created
using LockCookieListByDomain ( 399).

AAccessType is a TIdCookieAccess ( 2946) value that indicates the access type that should be released for the resource
protection block.

UnlockCookieListByDomain is used by methods that create ( 397) or free items in the Cookie ( 401) collection, like Add ( 395)
and Delete ( 397).

See Also
TIdCookies.LockCookieListByDomain ( 399)

TIdCookies.Add ( 395)

TIdCookies.Delete ( 397)

TIdCookies Properties
The Properties of the TIdCookies class are listed here.

400 Internet Direct (Indy) Version 10.1.5


Classes TIdCookies Class

Properties
Property Description
Cookie ( 401) Provides access to Cookie collection items using name and domain values.
Items ( 401) Provides access to Cookie ( 401) collection items by position in the container.

Legend
Property
read only

TIdCookies.Cookie Property
Provides access to Cookie collection items using name and domain values.

Pascal
property Cookie [const AName, ADomain: string]: TIdCookieRFC2109;
Returns
TIdCookieRFC2109 ( 388) - Cookie with the specified name and domain, or Nil.

Description
Cookie is a read-only TIdCookieRFC2109 ( 388) property that provides indexed access to Cookies in the collection using the
name and domain specified in AName and ADomain.

TIdCookies ( 394) calls GetCookieIndex ( 398), when using the read access specifier for Cookie, to determine the position of the
Cookie having the specified CookieName and Domain. Cookie can return Nil when a Cookie cannot be located in the collection
having the specified name and domain values.

Use LockCookieListByDomain ( 399) to limit access to Cookie collection items having a specified Domain value.

Use Items ( 401) to access Cookie collection items by their integer position in the container.

See Also
TIdCookieRFC2109 ( 388)

TIdCookies.GetCookieIndex ( 398)

TIdCookies.LockCookieListByDomain ( 399)

TIdCookies.Items ( 401)

TIdCookies.Items Property
Provides access to Cookie ( 401) collection items by position in the container.

Pascal
property Items [Index: Integer]: TIdCookieRFC2109;
Parameters
Parameters Description
Index Position in the container to be accessed.

Returns
TIdCookieRFC2109 ( 388) - Cookie ( 401) at the specified position in the collection.

Description
Items is an indexed TIdCookieRFC2109 ( 388) property that provides access to Cookie ( 401) class instances in the collection
using the Integer position specified in Index. Items is the default property used when accessing the collection.

Items is used when accessing or updating Cookie ( 401) collection items in the GetCookie, GetCookieIndex ( 398), and Delete
( 397) methods.

Internet Direct (Indy) Version 10.1.5 401


TIdCreationDateFTPListItem Class Classes

See Also
TIdCookies.GetCookieIndex ( 398)

TIdCookies.Delete ( 397)

TIdCookieRFC2109 ( 388)

TIdCreationDateFTPListItem Class
Represents items in a structured directory listing that includes a CreationDate ( 403) attribute.

File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdCreationDateFTPListItem = class(TIdFTPListItem);
Description
TIdCreationDateFTPListItem is a TIdFTPListItem ( 851) descendant that represents entries including a CreationDate ( 403)
attribute in the structured directory listing for TIdFTP ( 759). TIdCreationDateFTPListItem implements the CreationDate ( 403)
property used to store the TIdDateTime ( 4733) value for the file or directory entry.

TIdCreationDateFTPListItem is used as an ancestor class in more specialized directory listing formats that implement the
CreationDate ( 403) and other attributes.

See Also
TIdFTPListItem ( 851)

TIdMLSTFTPListItem ( 1644)

TIdCreationDateFTPListItem Members
The following tables list the members exposed by TIdCreationDateFTPListItem.

Properties
Property Description
CreationDate ( 403) Represents the date and time that the file or directory was created on the FTP server remote file system.
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 403)
Destroy ( 854) Frees the collection item.

402 Internet Direct (Indy) Version 10.1.5


Classes TIdCreationDateFTPListItem Class

Legend
Method
virtual
Property

TIdCreationDateFTPListItem Methods
The Methods of the TIdCreationDateFTPListItem class are listed here.

Methods
Method Description
Create ( 403)

Legend
Constructor
virtual

TIdCreationDateFTPListItem.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is the overridden constructor for the object instance.

AOwner is the collection that owns the collection item. Create calls the inherited constructor using AOwner as an argument.

Create assigns the default values for the following inherited properties:

Property Value
SizeAvail ( 857) False
ModifiedAvail ( 856) False

The default value for the CreationDate ( 403) property is an empty TIdDateTime ( 4733) value.

TIdCreationDateFTPListItem Properties
The Properties of the TIdCreationDateFTPListItem class are listed here.

Properties
Property Description
CreationDate ( 403) Represents the date and time that the file or directory was created on the FTP server remote file system.

Legend
Property

TIdCreationDateFTPListItem.CreationDate Property
Represents the date and time that the file or directory was created on the FTP server remote file system.

Internet Direct (Indy) Version 10.1.5 403


TIdCustomHTTP Class Classes

Pascal
property CreationDate: TIdDateTime;
Description
CreationDate is a TIdDateTime ( 4733) property that represents the date and time that the file or directory was created on the
remote file system for an FTP server. CreationDate is returned in some structured directory listings in the Indy FTP client.

The date and time value in CreationDate is intended to represent the property value expressed in the local timezone, but is entirely
dependent on the values provided by remote FTP server.

TIdCriticalSection Class
Represent critical sections used in the Indy library.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TIdCriticalSection = class(TCriticalSection);
Description
TIdCriticalSection is a TCriticalSection ( 193) descendant that represent critical sections used in the Indy library.

TIdCriticalSection allows a thread in a multi-threaded application to temporarily block other threads from accessing a block of code.
Use TIdCriticalSection to safeguard operations that may be disrupted if another thread executes certain sections of code before the
operation is completed.

TIdCriticalSection allows only a single thread to enter ( 194) a block of code at any given time. Because they block the execution
of other threads, overusing critical sections can seriously interfere with overall application performance.

Critical sections must be global in scope so that they are available to all threads. In every thread, any action that could interfere with
the operations safeguarded by the critical section should only take place after calling the Acquire ( 194) or Enter ( 194) method.
Threads that do not use the critical section for relevant operations can introduce bugs.

TIdCriticalSection is defined to eliminate warnings about imports in the Indy library.

TIdCustomHTTP Class
Specifies an HTTP client implementation.

File
IdHTTP ( 4662)

Hierarchy

Pascal
TIdCustomHTTP = class(TIdTCPClientCustom);
Description
TIdCustomHTTP is a TIdTCPClientCustom ( 2340) descendant that specifies a client implementation of the Hypertext Transfer
Protocol (HTTP) as described in the Internet Standards documents:

404 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

RFC 1945 - Hypertext Transfer Protocol version 1.0 [HTTP/1.0]

RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1]

TIdCustomHTTP provides support for both HTTP 1.0 and HTTP 1.1 protocols. Note: Post ( 412) is restricted to support for the
HTTP 1.0 protocol due to limited and/or improper HTTP server support for the HTTP 1.1 specification.

TIdCustomHTTP provides a CookieManager ( 422) that implements an HTTP State Management mechanism as specified in the
Internet Standards documents, and reference materials:

RFC 2109 - HTTP State Management Mechanism

RFC 2965 - HTTP State Management Mechanism

Netscape Persistent Client State - HTTP Cookies

TIdCustomHTTP also supports the Secure Hypertext Transport protocol (HTTPS) as described in the Internet Standards document:

RFC 2660 - The Secure HyperText Transfer Protocol

You must install the Indy OpenSSL support .DLL's available at the Intelicom web site , or a third party SSL library to enable Secure
Socket ( 2369) Layer support.

Assign an instance of TIdSSLIOHandlerSocketBase ( 2134) (or a descendant class) to the IOHandler ( 2364) property to allow
use of the HTTPS protocol in HTTP requests.

During initialization of the component, resource are allocated for the following properties:

URL ( 431)
ProxyParams ( 426)

During initialization of the component, the default values are assigned for the following properties:

Property Value
AllowCookies ( 420) True
AuthProxyRetries ( 421) 0
AuthRetries ( 422) 0
HandleRedirects ( 423) Id_TIdHTTP_HandleRedirects ( 3821)
MaxAuthRetries ( 424) Id_TIdHTTP_MaxAuthRetries ( 3822)
MaxHeaderLines ( 425) Id_TIdHTTP_MaxHeaderLines ( 3822)
Options ( 411) hoForceEncodeParams
ProtocolVersion ( 425) Id_TIdHTTP_ProtocolVersion ( 3822)
RedirectMax Id_TIdHTTP_RedirectMax ( 3823)

Application do not normally create ( 267) instances of TIdCustomHTTP. Use TIdHTTP ( 1041) which publishes propeties and
event handlers used in client applications.

See Also
TIdTCPClientCustom ( 2340)

TIdHTTP ( 1041)

TIdCookieManager ( 382)

TIdSSLIOHandlerSocketBase ( 2134)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 405


TIdCustomHTTP Class Classes

TIdCustomHTTP Members
The following tables list the members exposed by TIdCustomHTTP.

Properties
Property Description
AllowCookies ( 420) Indicates if the HTTP client accepts Cookies in response headers.
AuthenticationManager ( 421) Maintains authentication mechanisms, parameters, and URL ( 431) for HTTP client requests.
AuthProxyRetries ( 421) Number of proxy authentication requests attempted for the client connection.
AuthRetries ( 422) Current number of authentication requests attempted for the client connection.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Compressor ( 422) Handles ZLIB and GZIP content transfer encodings.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
CookieManager ( 422) Maintains client persistent state information using Cookies.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
HandleRedirects ( 423) Indicates if the HTTP client can handle redirections to an alternate resource location.
HTTPOptions ( 424) Indicates the HTTP protocol options ( 411) applied to the client connection.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
MaxAuthRetries ( 424) Maximum number of authentication requests allowed for the client connection.
MaxHeaderLines ( 425) Maximum number of header lines allowed in an HTTP response.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ProtocolVersion ( 425) Specifies the HTTP version.
ProxyParams ( 426) Represents connection and user authorization values used for a Proxied client connection.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
RedirectCount ( 426) Indicates the number of redirects encountered in the last request for the HTTP client.
RedirectMaximum ( 427) Specifies the maximum number of redirects for the HTTP client.
Request ( 427) Specifies the header values to send to the HTTP server.
Response ( 428) Specifies the header values received from the HTTP server.
ResponseCode ( 428) Specifies the response code received from a HTTP server.
ResponseText ( 429) Specifies the text for a response received from a HTTP server.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
URL ( 431) Represents the attributes of a resource accessed by an HTTP request.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 407) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

406 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

GetInternalResponse ( 2356) Reads response detail lines from a peer connection.


GetVersion ( 269) Version ( 269) number for Indy component suite.
Head ( 410) Requests header values for a resource.
Options ( 411) Retrieves options and capabilities for a server resource.
CType ( 267)
Get ( 408)
Post ( 411)
Put ( 417)
Trace ( 419)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAuthorization ( 431) Event handler for authentication of an HTTP connection.
OnHeadersAvailable ( 432) Allows the client to decide if response processing should be continued based on headers returned in the
HTTP response.
OnProxyAuthorization ( 432) Event handler for selecting the HTTP client authentication mechanism for a proxy connection.
OnRedirect ( 432) Event handler triggered for redirect requests.
OnSelectAuthorization ( 433) Event handler triggered when the client selects an authentication mechanism for the connection.
OnSelectProxyAuthorization ( 433) Event handler triggered when the client selects an authentication mechanism for the Proxied connection.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomHTTP Methods
The Methods of the TIdCustomHTTP class are listed here.

Methods
Method Description
Destroy ( 407) Frees the object instance.
Get ( 408)
Head ( 410) Requests header values for a resource.
Options ( 411) Retrieves options and capabilities for a server resource.
Post ( 411)
Put ( 417)
Trace ( 419)

Legend
Destructor
virtual

TIdCustomHTTP.Destroy Destructor
Frees the object instance.

Internet Direct (Indy) Version 10.1.5 407


TIdCustomHTTP Class Classes

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance.

Destroy is responsible for freeing resources allocated in the Create ( 267) constructor and during use of HTTP client methods,
including:

ProtocolVersion ( 425)
ProxyParams ( 426)
URL ( 431)

Destroy calls the inherited Destroy method prior to exiting the deconstructor.

See Also
ProtocolVersion ( 425)

ProxyParams ( 426)

URL ( 431)

TIdCustomHTTP.Get Method
Overload List

Method Description
TIdCustomHTTP.Get (string) ( 408) Retrieves an HTTP resource.
TIdCustomHTTP.Get (string, array of Retrieves the content for an HTTP resource.
SmallInt) ( 410)
TIdCustomHTTP.Get (string, Retrieves the content for an HTTP resource.
TIdStream) ( 409)
TIdCustomHTTP.Get (string, Retrieves the content for an HTTP resource.
TIdStream, array of SmallInt) ( 409)

TIdCustomHTTP.Get Method (string)


Retrieves an HTTP resource.

Pascal
function Get(
AURL: string
): string; overload;
Parameters
Parameters Description
AURL The universal resource locator to be retrieved.

Returns
String - Contents of the URL ( 431).

Description
Get is an overloaded method used to retrieve the file or data for the resource specified in AURL.

AURL is the fully-qualified location of the resource including the HTTP URL ( 431) scheme identifier. For example:

sContent := AHttp.Get('http://www.somedomain.org/resource.html');

408 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

Get calls an oveloaded variant of the method to retrieve the content of the specified URL ( 431).

See Also
TIdCustomHTTP.Get

TIdCustomHTTP.Get Method (string, TIdStream)


Retrieves the content for an HTTP resource.

Pascal
procedure Get(
AURL: string;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
AURL The universal resource locator to be retrieved.
AResponseContent Destination for the data retrieved from the URL ( 431).

Description
Get is an overloaded method used to retrieve the file or data for the resource specified in AURL.

AURL is the fully-qualified location of the resource including the HTTP URL ( 431) scheme identifier. For example:

sContent := AHttp.Get('http://www.somedomain.org/resource.html');
AResponseContent is the Stream that is the destination for data retrieved from the specified URL ( 431). For example:

AHttp.Get(AUrl, AResponseContent)
Get calls an overloaded variant of the method to perform the HTTP transfer. Get will raise an EAssertionFailed exception if the
stream in AResponseContent is unassigned.

Exceptions
Exceptions Description
EAssertionFailed Raised when the stream for the content of the response is unassigned.

See Also
TIdCustomHTTP.Get

TIdStream ( 3087)

TIdCustomHTTP.Get Method (string, TIdStream, array of SmallInt)


Retrieves the content for an HTTP resource.

Pascal
procedure Get(
AURL: string;
AResponseContent: TIdStream;
AIgnoreReplies: array of SmallInt
); overload;
Parameters
Parameters Description
AURL The universal resource locator to be retrieved.
AResponseContent Destination for the data retrieved from the URL ( 431).
AIgnoreReplies Numeric response codes to ignore as errors.

Description
Get is an overloaded method used to retrieve the file or data for the resource specified in AURL.

AURL is the fully-qualified location of the resource including the HTTP URL ( 431) scheme identifier. For example:

Internet Direct (Indy) Version 10.1.5 409


TIdCustomHTTP Class Classes

sContent := AHttp.Get('http://www.somedomain.org/resource.html');
AResponseContent is the Stream that is the destination for data retrieved from the specified URL ( 431). For example:

sContent := AHttp.Get(AUrl, AResponseContent, []);


AIgnoreReplies is an array with numeric response codes to ignore as errors when handling the HTTP response.

Get calls an overloaded variant of the method to perform the HTTP transfer using a TIdMemoryStream ( 3058) instance to capture
the response content. The return value for the method is the String data read from the internal TIdMemoryStream ( 3058) instance.

See Also
TIdCustomHTTP.Get

TIdMemoryStream ( 3058)

TIdCustomHTTP.Get Method (string, array of SmallInt)


Retrieves the content for an HTTP resource.

Pascal
function Get(
AURL: string;
AIgnoreReplies: array of SmallInt
): string; overload;
Parameters
Parameters Description
AURL The universal resource locator to be retrieved.
AIgnoreReplies Response ( 428) code to ignore as error when processing the HTTP response.

Returns
string - Content for the requested resource.

Description
Get is an overloaded method used to retrieve the file or data for the resource specified in AURL.

AURL is the fully-qualified location of the resource including the HTTP URL ( 431) scheme identifier. For example:

sContent := AHttp.Get('http://www.somedomain.org/resource.html');
AIgnoreReplies is an array with numeric response codes to ignore as errors when handling the HTTP response.

Get calls an overloaded variant of the method to perform the HTTP transfer using a TIdMemoryStream ( 3058) instance to capture
the response content. The return value for the method is the String data read from the internal TIdMemoryStream ( 3058) instance.

See Also
TIdCustomHTTP.Get

TIdMemoryStream ( 3058)

TIdCustomHTTP.Head Method
Requests header values for a resource.

Pascal
procedure Head(
AURL: string
);
Parameters
Parameters Description
URL Universal resource locator for the resource.

410 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

Description
Head is a procedure used to request the header values for the resource specified in URL ( 431). Head is identical to Get ( 408),
except that the server does not return a message body in the Response ( 428).

The header values returned for the Request ( 427) can be found in Response ( 428).

Head can be used to obtain metainformation about the entity implied by the request without transferring the full content of the
resource. Head is often used for testing the value in URL ( 431) for validity, accessibility, and recent modification.

See Also
TIdCustomHTTP.Get ( 408)

TIdCustomHTTP.Response ( 428)

TIdHTTPResponse ( 1085)

TIdCustomHTTP.Options Method
Retrieves options and capabilities for a server resource.

Pascal
procedure Options(
AURL: string
); overload;
Parameters
Parameters Description
AURL Identifies the resource location for options and capabilities.

Description
Options is a procedure that implements the HTTP 1.1 command verb used to retrieve information about the communication options
available for Request ( 427) and Response ( 428) resulting from the URI specified in AURL. Options allows the HTTP client to
determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource
action or initiating a resource retrieval.

When AURL contains the value '*' (Asterisk), the Options Request ( 427) applies to all resources on the HTTP server. Since
server communication options typically depend on the resource, the "*" request is only useful as a "ping" or "no-op" type of Request
( 427). For example, this can be used to test a proxy for HTTP/1.1 compliance. When AURL contains a valid server resource, the
Request ( 427) applies only to that target.

Response ( 428) will contain the ResponseCode ( 428) 200, and header information that indicates optional features
implemented by the server and applicable to the resource.

Options calls the DoRequest method to perform the HTTP transfer for the Request ( 427).

See Also
TIdCustomHTTP.Options

TIdCustomHTTP.Post Method
Overload List

Method Description
TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.
TIdMultiPartFormDataStream) ( 412)
TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.
TIdMultiPartFormDataStream, TIdStream)
( 413)
TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.
TIdStream) ( 414)

Internet Direct (Indy) Version 10.1.5 411


TIdCustomHTTP Class Classes

TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.


TIdStream, TIdStream) ( 414)
TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.
TIdStrings) ( 415)
TIdCustomHTTP.Post (string, Send HTTP data to a web server or CGI program.
TIdStrings, TIdStream) ( 416)

TIdCustomHTTP.Post Method (string, TIdMultiPartFormDataStream)


Send HTTP data to a web server or CGI program.

Pascal
function Post(
AURL: string;
ASource: TIdMultiPartFormDataStream
): string; overload;
Parameters
Parameters Description
ASource TStrings or stream containing the request data.
URL Location of the host or CGI application.

Returns
String - Values received in a Response ( 428) for the HTTP POST method.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. This variant of the
Post method is designed is used in the overloaded for an HTTP Request ( 427) with a content type value of "multipart/form-data".

Post is overloaded to allow use of a TIdMultiPartFormDataStream ( 1657) object instance in ASource.


TIdMultiPartFormDataStream ( 1657) allows preparing a request that adheres to the rules for multipart MIME data streams, where
data items are represented as a series of message parts with a content-disposition header value of "form-data". The
content-disposition header contains an (additional) parameter of "name", where the value of that parameter is the original field
name in the form.

As with all multipart MIME types, each part in the data stream has an optional "Content-Type" header, which defaults to the value
"text/plain". If the contents of a file are returned using the form, then the file input is identified as the appropriate media type, if
known, or the value "application/octet-stream". If multiple files are to be returned as the result of a single form entry, they should be
represented as a "multipart/mixed" part embedded within the "multipart/form-data".

Each part in the data stream may be encoded and the "content-transfer-encoding" header supplied when the value of that part does
not conform to the default encoding.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections
established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

Post calls an overloaded variant of the method to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the multipart data stream is unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

412 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

TIdCustomHTTP.Request ( 427)

TIdMultiPartFormDataStream ( 1657)

TIdCustomHTTP.Post Method (string, TIdMultiPartFormDataStream, TIdStream)


Send HTTP data to a web server or CGI program.

Pascal
procedure Post(
AURL: string;
ASource: TIdMultiPartFormDataStream;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
ASource Multipart data stream containing the request data.
AResponseContent Destination for response data.
URL Location of the host or CGI application.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. This variant of the
Post method is designed is used in the overloaded for an HTTP Request ( 427) with a content type value of "multipart/form-data".

Post is overloaded to allow use of a TIdMultiPartFormDataStream ( 1657) object instance in ASource.


TIdMultiPartFormDataStream ( 1657) allows preparing a request that adheres to the rules for multipart MIME data streams, where
data items are represented as a series of message parts with a content-disposition header value of "form-data". The
content-disposition header contains an (additional) parameter of "name", where the value of that parameter is the original field
name in the form.

As with all multipart MIME types, each part in the data stream has an optional "Content-Type" header, which defaults to the value
"text/plain". If the contents of a file are returned using the form, then the file input is identified as the appropriate media type, if
known, or the value "application/octet-stream". If multiple files are to be returned as the result of a single form entry, they should be
represented as a "multipart/mixed" part embedded within the "multipart/form-data".

Each part in the data stream may be encoded and the "content-transfer-encoding" header supplied when the value of that part does
not conform to the default encoding.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections
established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

Post calls an overloaded variant of the method to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the multipart data stream or the stream for the response content are unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

TIdCustomHTTP.Request ( 427)

TIdMultiPartFormDataStream ( 1657)

Internet Direct (Indy) Version 10.1.5 413


TIdCustomHTTP Class Classes

TIdCustomHTTP.Post Method (string, TIdStream)


Send HTTP data to a web server or CGI program.

Pascal
function Post(
AURL: string;
ASource: TIdStream
): string; overload;
Parameters
Parameters Description
ASource Stream containing the request data.
URL Location of the host or CGI application.

Returns
String - Values received in a Response ( 428) for the HTTP POST method.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. Post is overloaded
to allow use of either TIdStrings ( 3089) or TIdStream ( 3087) object instances in ASource, and also provides procedure- and
function-based variants of the method to allow String return values or storage of return values in AResponseContent.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections
established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

This variant of the Post method prepares an HTTP request from the values in ASource, but does not perform any preprocessing for
the content type of the request or values in the ASource stream. Set the ContentType property in the Reqest to indicate if ASource
contains form-url encoded or multipart data.

Post calls a protected method in the HTTP client to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the source stream for the request is unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

TIdCustomHTTP.Request ( 427)

TIdCustomHTTP.Post Method (string, TIdStream, TIdStream)


Send HTTP data to a web server or CGI program.

Pascal
procedure Post(
AURL: string;
ASource: TIdStream;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
ASource TStrings or stream containing the request data.
AResponseContent Destination for response data.

414 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

URL Location of the host or CGI application.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. Post is overloaded
to allow use of either TIdStrings ( 3089) or TIdStream ( 3087) object instances in ASource, and also provides procedure- and
function-based variants of the method to allow String return values or storage of return values in AResponseContent.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections
established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

This variant of the Post method prepares an HTTP request from the values in ASource, but does not perform any preprocessing for
the content type of the request or values in the ASource stream. Set the ContentType property in the Reqest to indicate if ASource
contains form-url encoded or multipart data.

Post calls a protected method in the HTTP client to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the source stream or the stream for the response content are unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

TIdCustomHTTP.Request ( 427)

TIdCustomHTTP.Response ( 428)

TIdCustomHTTP.Post Method (string, TIdStrings)


Send HTTP data to a web server or CGI program.

Pascal
function Post(
AURL: string;
ASource: TIdStrings
): string; overload;
Parameters
Parameters Description
ASource String list or stream containing the request data.
URL Location of the host or CGI application.

Returns
String - Values received in a Response ( 428) for the HTTP POST method.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. Post is overloaded
to allow use of either TIdStrings ( 3089) or TIdStream ( 3087) object instances in ASource, and also provides procedure- and
function-based variants of the method to allow String return values or storage of return values in AResponseContent.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections

Internet Direct (Indy) Version 10.1.5 415


TIdCustomHTTP Class Classes

established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

This variant of the Post method prepares an HTTP request from the values in ASource, and ensures that the content conforms to
the default encoding used for HTML forms. This includes setting the content type in the Request ( 427) to the value
'application/x-www-form-urlencoded' when it has been omitted or contains the value 'text/html'. Form field names and values in
ASource should appear in the order used in the original HTML document with the field name separated from the field value by the
'=' character.

Field values in ASource will be encoded when the HTTPOptions ( 424) property contains the value hoForceEncodeParams.
Space characters (Decimal 32) are replaced with the character '+'. Other Reserved characters are scaped using the same notation
that applies to URLs; that is, non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits
representing the ASCII code of the character. Line breaks in multi-line text field values are represented as CRLF pairs, i.e.
`%0D%0A'. Field value encoding is performed by calling the TIdURI.ParamsEncode ( 2555) method for each line in ASource in
NAME=VALUE format.

Form field name and value pairs should be separated from each other using the '&' character. Any remaining CRLF line-end
sequences found in ASource are replaced with the '&' character.

Post calls an overloaded variant of the method to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the source string list for the request is unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

TIdURI.ParamsEncode ( 2555)

TIdCustomHTTP.Post Method (string, TIdStrings, TIdStream)


Send HTTP data to a web server or CGI program.

Pascal
procedure Post(
AURL: string;
ASource: TIdStrings;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
ASource String list or stream containing the request data.
AResponseContent Destination for response data.
URL Location of the host or CGI application.

Returns
String - Values received in a Response ( 428) for the HTTP POST method.

Description
Post is an overloaded method that is used to send data specified in ASource to the resource location in AURL. Post is overloaded
to allow use of either TIdStrings ( 3089) or TIdStream ( 3087) object instances in ASource, and also provides procedure- and
function-based variants of the method to allow String return values or storage of return values in AResponseContent.

By default, Indy will restrict all POST requests to the use of HTTP version 1.0 in the headers for the request. This occurs because
some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not
send or expect to receive the 100-Continue HTTP header.

To use HTTP version 1.1 requests when calling the Post method, include the value hoKeepOrigProtocol in the HTTPOptions (
424) property. Please note that this does not include retaining a HTTP persistent connection for the session; persistent connections
established using the HTTP 'Keep-Alive' header are always closed prior to performing an HTTP Post operation.

416 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

This variant of the Post method prepares an HTTP request from the values in ASource, and ensures that the content conforms to
the default encoding used for HTML forms. This includes setting the content type in the Request ( 427) to the value
'application/x-www-form-urlencoded' when it has been omitted or contains the value 'text/html'. Form field names and values in
ASource should appear in the order used in the original HTML document with the field name separated from the field value by the
'=' character.

Field values in ASource will be encoded when the HTTPOptions ( 424) property contains the value hoForceEncodeParams.
Space characters (Decimal 32) are replaced with the character '+'. Other Reserved characters are scaped using the same notation
that applies to URLs; that is, non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits
representing the ASCII code of the character. Line breaks in multi-line text field values are represented as CRLF pairs, i.e.
`%0D%0A'. Field value encoding is performed by calling the TIdURI.ParamsEncode ( 2555) method for each line in ASource in
NAME=VALUE format.

Form field name and value pairs should be separated from each other using the '&' character. Any remaining CRLF line-end
sequences found in ASource are replaced with the '&' character.

Post calls an overloaded variant of the method to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised if the source string list or the stream for the response content are unassigned.

See Also
TIdCustomHTTP.Post

TIdCustomHTTP.HTTPOptions ( 424)

TIdURI.ParamsEncode ( 2555)

TIdCustomHTTP.Put Method
Overload List

Method Description
TIdCustomHTTP.Put (string, Implements the HTTP PUT command verb.
TIdStream) ( 417)
TIdCustomHTTP.Put (string, Implements the HTTP PUT command verb.
TIdStream, TIdStream) ( 418)

TIdCustomHTTP.Put Method (string, TIdStream)


Implements the HTTP PUT command verb.

Pascal
function Put(
AURL: string;
ASource: TIdStream
): string; overload;
Parameters
Parameters Description
AURL Location to store the resource on the server.
ASource Values to be stored at the specified location.

Returns
string - Response ( 428) from the HTTP server.

Description
Put is an overloaded method in TIdHTTP ( 1041), that implements the HTTP PUT command verb used to store the entity
contained in ASource at the URI specified in AURL.

Internet Direct (Indy) Version 10.1.5 417


TIdCustomHTTP Class Classes

If AURL refers to an existing server resource, the values in ASource are considered to be a modified version of the server resource.
When AURL does not exist on the server, a new server resource is created for the values in ASource.

Put is overloaded to provide a String function that returns the Response ( 428) from the HTTP Request ( 427), or a procedure
that stores Response ( 428) values in the stream specified by AResponseContent.

Put differs from Post ( 412) through its use of the values in AURL. For a Put operation, the value in AURL always refers to the
values included in the Response ( 428) content.

Put calls the protected method used to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised when the stream in ASource is unassigned.

See Also
TIdCustomHTTP.Put

TIdCustomHTTP.Put Method (string, TIdStream, TIdStream)


Implements the HTTP PUT command verb.

Pascal
procedure Put(
AURL: string;
ASource: TIdStream;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
AURL Location to store the resource on the server.
ASource Values tyo be stored at the specified location.
AResponseContent Destination for response values from the operation.

Description
Put is an overloaded method in TIdHTTP ( 1041), that implements the HTTP PUT command verb used to store the entity
contained in ASource at the URI specified in AURL.

If AURL refers to an existing server resource, the values in ASource are considered to be a modified version of the server resource.
When AURL does not exist on the server, a new server resource is created for the values in ASource.

Put is overloaded to provide a String function that returns the Response ( 428) from the HTTP Request ( 427), or a procedure
that stores Response ( 428) values in the stream specified by AResponseContent.

Put differs from Post ( 412) through its use of the values in AURL. For a Put operation, the valuein AURL always refers to the
values included in the Response ( 428) content.

Post ( 412) calls the protected method used to perform the HTTP transfer.

Exceptions
Exceptions Description
EAssertionFailed Raised when one of the streams in ASource or AResponseContent is unassigned.

See Also
TIdCustomHTTP.Put

418 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

TIdCustomHTTP.Trace Method
Overload List

Method Description
TIdCustomHTTP.Trace (string) ( 419) Implements the HTTP TRACE command verb for diagnostics.
TIdCustomHTTP.Trace (string, Implements the HTTP TRACE command verb for diagnostics.
TIdStream) ( 419)

TIdCustomHTTP.Trace Method (string)


Implements the HTTP TRACE command verb for diagnostics.

Pascal
function Trace(
AURL: string
): string; overload;
Parameters
Parameters Description
AURL Resource to be examined in Trace.

Returns
String - Test or diagnostic messages for the resource.

Description
Trace is an overloaded method in TIdHTTP ( 1041) that implements the HTTP TRACE command verb. Trace is used to a remote
application-layer loop- back for the Request ( 427) message, and allows the HTTP client to see the data received at the host or
proxy server that is the target for the Request ( 427). Trace will return information that can be used for testing and diagnostic
purposes.

If the Request ( 427) is valid, the Response ( 428) to a Trace Request ( 427) will contain the entire Request ( 427) message
with a Content-Type of "message/http".

Trace is overloade to allow the response content to be returned a String, using the function-based variant of the method, or in the
stream specified in AResponseContent.

See Also
TIdCustomHTTP.Trace

TIdCustomHTTP.Trace Method (string, TIdStream)


Implements the HTTP TRACE command verb for diagnostics.

Pascal
procedure Trace(
AURL: string;
AResponseContent: TIdStream
); overload;
Parameters
Parameters Description
AURL Resource to be examined in Trace.
AResponseContent Destination for the test or diagnostic messages.

Description
Trace is an overloaded method in TIdHTTP ( 1041) that implements the HTTP TRACE command verb. Trace is used to a remote
application-layer loop- back for the Request ( 427) message, and allows the HTTP client to see the data received at the host or
proxy server that is the target for the Request ( 427). Trace information is normally used for testing and diagnostic purposes.

Internet Direct (Indy) Version 10.1.5 419


TIdCustomHTTP Class Classes

If the Request ( 427) is valid, the Response ( 428) to a Trace Request ( 427) will contain the entire Request ( 427) message
with a Content-Type of "message/http".

Trace is overloaded to allow the response content to be returned a String, using the function-based variant of the method, or in the
stream specified in AResponseContent.

Exceptions
Exceptions Description
EAssertionFailed Raised when the stream for the response content is unassigned.

See Also
TIdCustomHTTP.Trace

TIdCustomHTTP Properties
The Properties of the TIdCustomHTTP class are listed here.

Properties
Property Description
AllowCookies ( 420) Indicates if the HTTP client accepts Cookies in response headers.
AuthenticationManager ( 421) Maintains authentication mechanisms, parameters, and URL ( 431) for HTTP client requests.
AuthProxyRetries ( 421) Number of proxy authentication requests attempted for the client connection.
AuthRetries ( 422) Current number of authentication requests attempted for the client connection.
Compressor ( 422) Handles ZLIB and GZIP content transfer encodings.
CookieManager ( 422) Maintains client persistent state information using Cookies.
HandleRedirects ( 423) Indicates if the HTTP client can handle redirections to an alternate resource location.
HTTPOptions ( 424) Indicates the HTTP protocol options ( 411) applied to the client connection.
MaxAuthRetries ( 424) Maximum number of authentication requests allowed for the client connection.
MaxHeaderLines ( 425) Maximum number of header lines allowed in an HTTP response.
ProtocolVersion ( 425) Specifies the HTTP version.
ProxyParams ( 426) Represents connection and user authorization values used for a Proxied client connection.
RedirectCount ( 426) Indicates the number of redirects encountered in the last request for the HTTP client.
RedirectMaximum ( 427) Specifies the maximum number of redirects for the HTTP client.
Request ( 427) Specifies the header values to send to the HTTP server.
Response ( 428) Specifies the header values received from the HTTP server.
ResponseCode ( 428) Specifies the response code received from a HTTP server.
ResponseText ( 429) Specifies the text for a response received from a HTTP server.
URL ( 431) Represents the attributes of a resource accessed by an HTTP request.

Legend
Property
read only

TIdCustomHTTP.AllowCookies Property
Indicates if the HTTP client accepts Cookies in response headers.

Pascal
property AllowCookies: Boolean;
Description
AllowCookies is a Boolean property that indicates if the HTTP client allows use of persistent state information using TIdCookie
instances handled by CookieManager ( 422).

AllowCookies is used when an HTTP client retrieves headers for an HTTP Response ( 428), and processes Response ( 428)
headers and cookie values. When AllowCookies is True, the HTTP client will ensure that CookieManager ( 422) is instantiated
prior to adding any TIdCookieRFC2109 ( 388) or TIdCookieRFC2965 ( 391) cookie instances detected in Response ( 428)
headers.

420 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

The default value for AllowCookies is True, as assigned during initialization of the component.

See Also
TIdHTTP.CookieManager ( 1045)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

TIdCustomHTTP.AuthenticationManager Property
Maintains authentication mechanisms, parameters, and URL ( 431) for HTTP client requests.

Pascal
property AuthenticationManager: TIdAuthenticationManager;
Description
AuthenticationManager is a TIdAuthenticationManager ( 263) property used to maintain authentication mechanisms used for a
HTTP Request ( 427).

AuthenticationManager captures the authentication mechanism used in the HTTP session, and adds the object instance and the
associated URL ( 431) for the request to the collection maintained in the property.

Proxy authentication mechanisms in the ProxyParams ( 426) are simply reset and not captured in the AuthenticationManager.

Applications must assign an object instance to the AuthenticationManager property. Assigning a new object instance forces an
existing AuthenticationManager to be freed.

See Also
TIdAuthenticationManager ( 263)

TIdAuthentication ( 253)

TIdAuthenticationBasic

TIdAuthenticationDigest

TIdCustomHTTP.AuthProxyRetries Property
Number of proxy authentication requests attempted for the client connection.

Pascal
property AuthProxyRetries: Integer;
Description
AuthProxyRetries is an Integer property that represents the number of retries attempted when performing proxy authentication for
the TIdHTTP ( 1041) client connection.

AuthProxyRetries is used when an HTTP protocol handler for the client connection attempts to process a protocol response code
that indicates authentication or proxy authentication is required (401 or 407).

AuthProxyRetries is compared to the current maximum number of authentication requests allowed in MaxAuthRetries ( 424) to
determine if additional proxy authentication requests are allowed. When permitted, the request is performed using the
OnAuthorization ( 431) event handler.

See Also
TIdCustomHTTP.AuthRetries ( 422)

TIdCustomHTTP.MaxAuthRetries ( 424)

TIdCustomHTTP.OnAuthorization ( 431)

TIdHTTPProtocol ( 1064)

Internet Direct (Indy) Version 10.1.5 421


TIdCustomHTTP Class Classes

TIdCustomHTTP.AuthRetries Property
Current number of authentication requests attempted for the client connection.

Pascal
property AuthRetries: Integer;
Description
AuthRetries is a published Integer property in TIdHTTP ( 1041), and represents the number of retries attempted when performing
authentication for the TIdHTTP ( 1041) client connection.

AuthRetries is used when an HTTP protocol handler for the client connection attempts to process a protocol response code that
indicates authentication or proxy authentication is required (401 or 407).

AuthRetries is incremented on each attempt to authenticate. AuthRetries is compared to the value in the MaxAuthRetries ( 424)
property that indicates the maximum number of authentication requests allowed to determine if additional authentication requests
are allowed.

When permitted, the request is performed using the OnAuthorization ( 431) event handler.

Use AuthProxyRetries ( 421) to determine the current number of authentication attempts issued for the proxy server identified in
ProxyParams ( 426).

See Also
AuthProxyRetries ( 421)

MaxAuthRetries ( 424)

OnAuthorization ( 431)

TIdHTTPProtocol ( 1064) ProxyParams ( 426)

TIdCustomHTTP.Compressor Property
Handles ZLIB and GZIP content transfer encodings.

Pascal
property Compressor: TIdZLibCompressorBase;
Description
Compressor is a TIdZLibCompressorBase ( 2634) property that represents the object used to perform ZLIB and GZIP
compression and decompression for responses using these content transfer encodings.

Compressor allows the "deflate ( 2765)" or "gzip" content transfer encodings to be handled when creating a connection to the
HTTP server, or when reading an HTTP response from the remote server.

Applications must assign an object instance derived from TIdZLibCompressorBase ( 2634) to the property in order to allow
handling of the response content stream. Assigning a value to Compressor causes the value in the request to include either "gzip"
or "deflate ( 2765)" as acceptable encodings in the response.

Use the ContentStream in the Response ( 428) to access the decompressed data in the HTTP response.

See Also
TIdZLibCompressorBase ( 2634)

Response ( 428)

Request ( 427)

TIdCustomHTTP.CookieManager Property
Maintains client persistent state information using Cookies.

422 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

Pascal
property CookieManager: TIdCookieManager;
Description
CookieManager is a TIdCookieManager ( 382) property that enables maintenance of persistent state information using Cookies
for the HTTP Client connection.

CookieManager is accessed when Cookies are detected during processing of headers in an HTTP response, or when preparing
headers for an HTTP request.

CookieManager is used by the HTTP client when AllowCookies ( 420) contains True.

The HTTP client ensures that CookieManager is instantiated prior to adding TIdCookieRFC2109 ( 388) or TIdCookieRFC2965 (
391) class instances to the collection maintained in CookieManager.

CookieManager is freed in the Destroy ( 407) method.

See Also
TIdCookieManager ( 382)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

TIdCustomHTTP.Destroy ( 407)

TIdCustomHTTP.AllowCookies ( 420)

TIdCustomHTTP.HandleRedirects Property
Indicates if the HTTP client can handle redirections to an alternate resource location.

Pascal
property HandleRedirects: Boolean;
Description
HandleRedirects is a Boolean property that indicates if the HTTP client should handle redirects in a response from the HTTP
server. Redirects are indicated by the HTTP Response ( 428) having a response code in the range 300 to 307, and requires
further action by the HTTP Client to fulfill the request.

Redirection Response ( 428) codes include the following:

Code Meaning
300 Multiple Choices. The request can be fulfilled with one of a set of resources, each with its own specific location. The HTTP
client can select a preferred representation and redirect its request to that location.
301 Moved Permanently. The requested resource has been assigned a new permanent URI and any future references to this
resource should use the new location specified in the Response ( 428).
302 Found. The requested resource resides temporarily under a different URI. Since the redirection might be altered on
occasion, the client should continue to use the URI in the Request ( 427) for future requests.
304 Not Modified. If the client has performed a conditional GET request and access is allowed, but the document has not been
modified, the server should respond with this status code. The 304 response should not contain a message body, and is
always terminated by the first empty line after the header fields, and must include a Date header.
305 Use Proxy. The requested resource must be accessed through the proxy given by the Location header in the HTTP
Response ( 428) containing the URI of the Proxy.
307 Temporary Redirect. The requested resource resides temporarily under a different URI. Since the redirection may be
altered on occasion, the HTTP client should continue to use the URI in the RequestI for future requests.

HandleRedirects is used with RedirectMaximum ( 427) when performing the request to detect and prevent infinite redirection
loops. HandleRedirects limits the number of active redirections for the client to the value specified in RedirectMaximum ( 427).

Internet Direct (Indy) Version 10.1.5 423


TIdCustomHTTP Class Classes

When HandleRedirects is True, the HTTP Client will trigger the OnRedirect ( 432) event handler to determine if the client can
accept the redirection location found in an HTTP response. When accepted, the redirect causes a new HTTP request with the new
location to be issued to fulfill the original request.

When HandleRedirects is False, the OnRedirect ( 432) event handler will be triggered, and an EIdProtocolReplyError exception
will be raised when the redirect cannot be handled by the HTTP client.

The default value for HandleRedirects is Id_TIdHTTP_HandleRedirects ( 3821), as assigned during initialization of the component.

See Also
TIdCustomHTTP.ResponseCode ( 428)

TIdCustomHTTP.ResponseText ( 429)

TIdCustomHTTP.RedirectMaximum ( 427)

TIdCustomHTTP.OnRedirect ( 432)

EIdProtocolReplyError

TIdCustomHTTP.HTTPOptions Property
Indicates the HTTP protocol options ( 411) applied to the client connection.

Pascal
property HTTPOptions: TIdHTTPOptions;
Description
HTTPOptions is a TIdHTTPOptions ( 3031) property that represents the TIdHTTPOption ( 2954) protocol options ( 411) in use
for an HTTP client.

HTTPOptions is used at various times when the client or the HTTP protocol handler needs to perform some action, including
processing HTTP responses, preparing request parameters, and authentication of the client connection to a server or proxy.

HTTPOptions can contain 0 (zero), 1, or more of the options ( 411) values defined by TIdHTTPOption ( 2954).

See Also
TIdCustomHTTP.DoRequest

TIdCustomHTTP.ProtocolVersion ( 425)

TIdCustomHTTP.Request ( 427)

TIdHTTPOptions ( 3031)

TIdHTTPOption ( 2954)

TIdHTTPProtocol ( 1064)

TIdCustomHTTP.MaxAuthRetries Property
Maximum number of authentication requests allowed for the client connection.

Pascal
property MaxAuthRetries: Integer;
Description
MaxAuthRetries is an Integer property that represents the maximum number of retries permitted when performing authentication for
the TIdHTTP ( 1041) client connection.

MaxAuthRetries is used when an HTTP protocol handler for the client connection attempts to process a protocol response code that
indicates authentication or proxy authentication is required (401 or 407).

MaxAuthRetries is compared to the current number of authentication requests issued in AuthRetries ( 422) (or AuthProxyRetries
( 421)) to determine if additional authentication requests are allowed. When permitted, the request is performed using the

424 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

OnAuthorization ( 431) event handler.

The default value for MaxAuthRetries is Id_TIdHTTP_MaxAuthRetries ( 3822) as assigned during initialization of the component
instance.

See Also
TIdCustomHTTP.AuthRetries ( 422)

TIdCustomHTTP.AuthProxyRetries ( 421)

TIdCustomHTTP.OnAuthorization ( 431)

TIdHTTPProtocol ( 1064)

TIdCustomHTTP.MaxHeaderLines Property
Maximum number of header lines allowed in an HTTP response.

Pascal
property MaxHeaderLines: integer;
Description
MaxHeaderLines is an Integer property that indicates the maximum number of header lines allowed when retrieving headers in an
HTTP response. MaxHeaderLines is used to ignore server responses containing an inordinately large number of header lines
(commonly referred to as "header bombing").

The default value for MaxHeaderLines is Id_TIdHTTP_MaxHeaderLines ( 3822). The value in MaxHeaderLines can altered if you
are experiencing header truncation with chatty servers.

MaxHeaderLines is used as an argument when retrieving headers with the TIdHTTPProtocol ( 1064) instance used during HTTP
protocol exchanges.

See Also
Id_TIdHTTP_MaxHeaderLines ( 3822) TIdHTTPProtocol.RetrieveHeaders ( 1068)

TIdCustomHTTP.ProtocolVersion Property
Specifies the HTTP version.

Pascal
property ProtocolVersion: TIdHTTPProtocolVersion;
Description
ProtocolVersion is a TIdHTTPProtocolVersion ( 2955) property that specifies the HTTP version used for Get ( 408), Head (
410), and Post ( 412) methods for the HTTP client.

ProtocolVersion allows the following values and associated meanings:

Value Meaning
pv1_0 HTTP 1.0
pv1_1 HTTP 1.1

The default value for ProtocolVersion is Id_TIdHTTP_ProtocolVersion ( 3822).

See Also
TIdCustomHTTP.Create ( 267)

TIdCustomHTTP.Get ( 408)

TIdCustomHTTP.Head ( 410)

Internet Direct (Indy) Version 10.1.5 425


TIdCustomHTTP Class Classes

TIdCustomHTTP.Post ( 412)

TIdCustomHTTP.Options ( 411)

TIdCustomHTTP.Trace ( 419)

TIdCustomHTTP.Put ( 417)

TIdCustomHTTP.ProxyParams Property
Represents connection and user authorization values used for a Proxied client connection.

Pascal
property ProxyParams: TIdProxyConnectionInfo;
Description
ProxyParams is a read-only TIdProxyConnectionInfo ( 1795) property that represents values used in an HTTP request that
requires a Proxy connection.

ProxyParams contains properties that select the Server, Port, Username, and Password used to open and authorize a connection
to a Proxy server. ProxyParams also indicates if authentication uses the Basic Authentication algorithm.

ProxyParams is used when TIdHTTP ( 1041) attempts to set the Host and Port number for the client connection, and when
OnProxyAuthorization ( 432) is triggered for the client connection. The Header representation for ProxyParams is used when the
HTTP Protocol handler builds the HTTP request packet and tranmits its content to the host server.

The Authetication mechanism in ProxyParams is reset when the OnDisconnected ( 2367) event handler is triggered for the HTTP
client connection.

See Also
TIdProxyConnectionInfo ( 1795)

TIdHTTPProtocol ( 1064)

TIdAuthentication ( 253)

TIdCustomHTTP.OnProxyAuthorization ( 432)

TIdCustomHTTP.RedirectCount Property
Indicates the number of redirects encountered in the last request for the HTTP client.

Pascal
property RedirectCount: Integer;
Description
RedirectCount is a read-only Integer property that indicates the number of redirects encountered in the last request for the HTTP
client.

The value in RedirectCount is always set to 0 (zero) prior to handling a new HTTP request in methods like Get ( 408) and Post (
412). RedirectCount is maintained in the ProcessResponse method for the HTTP protocol handler when an HTTP redirect response
code is encountered.

Redirects are indicated by the HTTP Response ( 428) having a response code in the range 300 to 307, and requires further action
by the HTTP Client to fulfill the request.

Redirection Response ( 428) codes include the following:

Code Meaning
300 Multiple Choices. The request can be fulfilled with one of a set of resources, each with its own specific location. The HTTP
client can select a preferred representation and redirect its request to that location.

426 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

301 Moved Permanently. The requested resource has been assigned a new permanent URI and any future references to this
resource should use the new location specified in the Response ( 428).
302 Found. The requested resource resides temporarily under a different URI. Since the redirection might be altered on
occasion, the client should continue to use the URI in the Request ( 427) for future requests.
304 Not Modified. If the client has performed a conditional GET request and access is allowed, but the document has not been
modified, the server should respond with this status code. The 304 response should not contain a message body, and is
always terminated by the first empty line after the header fields, and must include a Date header.
305 Use Proxy. The requested resource must be accessed through the proxy given by the Location header in the HTTP
Response ( 428) containing the URI of the Proxy.
307 Temporary Redirect. The requested resource resides temporarily under a different URI. Since the redirection may be
altered on occasion, the HTTP client should continue to use the URI in the RequestI for future requests.

Use HandleRedirects ( 423) and RedirectMaximum ( 427) to limit the number of active redirections for the client to the values
specified.

When HandleRedirects ( 423) is True, the HTTP Client will trigger the OnRedirect ( 432) event handler to determine if the client
can accept the redirection location found in an HTTP response. When accepted, the redirect causes a new HTTP request with the
new location to be issued to fulfill the original request.

See Also
RedirectMaximum ( 427)

OnRedirect ( 432)

TIdHTTPProtocol ( 1064)

TIdCustomHTTP.RedirectMaximum Property
Specifies the maximum number of redirects for the HTTP client.

Pascal
property RedirectMaximum: Integer;
Description
RedirectMaximum is an Integer property that specifies the maximum number of redirects that should be handled by the HTTP client.
The default value for RedirectMaximum is Id_TIdHTTP_RedirectMax ( 3823).

RedirectMaximum is provided to limit the effect of web-sites that perform numerous redirects, and to prevent stack overflow due to
recursion. RedirectMaximum is used when HandleRedirects ( 423) is True, otherwise it has no effect.

RedirectMaximum is used with the internally maintained redirect count to determine when redirect handling is deferred to the
application. When the redirect count exceeds the value of RedirectMaximum, the OnRedirect ( 432) event handler is signalled to
allow the application to respond to the redirect request. If the redirect is not handled by the application, an EIdProtocolReplyError
exception will be raised.

See Also
TIdCustomHTTP.HandleRedirects ( 423)

TIdCustomHTTP.DoRequest

EIdProtocolReplyError

TIdCustomHTTP.Request Property
Specifies the header values to send to the HTTP server.

Pascal
property Request: TIdHTTPRequest;

Internet Direct (Indy) Version 10.1.5 427


TIdCustomHTTP Class Classes

Description
Request is a TIdHTTPRequest ( 1072) property used to specify the header values to send to the HTTP server. Request headers
allow the HTTP client to pass additional information about the request, or the request client, to the HTTP server.

Request may contain the textual representation of Cookie values from the HTTP client, Host and Port information for a proxied
connection, as well as values from TIdHTTP ( 1041) properties transmitted as message headers.

Request is used in the protected method that performs the HTTP transfer.

Use Response ( 428) to examine header values received in an HTTP protocol response from the server.

See Also
TIdCustomHTTP.Response ( 428)

TIdCustomHTTP.DoRequest

TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

TIdCustomHTTP.Response Property
Specifies the header values received from the HTTP server.

Pascal
property Response: TIdHTTPResponse;
Description
Response is a TIdHTTPResponse ( 1085) property used to specify the header values and optional content received in a message
from the HTTP server. Response headers allow the server to pass additional information about the values returned for an HTTP
Request ( 427).

Response is used in the protected method that performs the HTTP transfer, or in Head ( 410) when retrieving only the header
values for the resource identified in URL ( 431).

Response contains the raw data for headers received in the HTTP response, and also copies header values into propeties for the
object instance. Response may also contain the raw data for Cookies maintained by CookieManager ( 422) in the HTTP client.

Response is used when capturing the headers, cookies, and contents for an HTTP response after a Request ( 427).

Use Request ( 427) to examine header values to be sent in a request to the HTTP server.

See Also
Request ( 427)

DoRequest

TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

TIdCustomHTTP.ResponseCode Property
Specifies the response code received from a HTTP server.

Pascal
property ResponseCode: Integer;
Description
ResponseCode is a read-only Integer property that specifies the numeric response code received from a HTTP server.

ResponseCode normally contains one of the following values and associated meanings:

428 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

Code Meaning
200 OK ( 4359)
201 Created
202 Accepted
203 Non-authoritative Information
204 No Content
205 Reset Content
206 Partial Content
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request ( 427)
401 Unauthorized
403 Forbidden
404 Not Found
405 Method not allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request ( 427) Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request ( 427) Entity To Long
414 Request ( 427)-URI Too Long. 256 Chars max
415 Unsupported Media Type
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway timeout
505 HTTP version not supported

ResponseCode is updated in the DoRequest method when a HTTP server response is retrieved.

Use ResponseText ( 429) to access the textual description of the numeric response code.

See Also
TIdCustomHTTP.ResponseText ( 429)

TIdCustomHTTP.ResponseText Property
Specifies the text for a response received from a HTTP server.

Internet Direct (Indy) Version 10.1.5 429


TIdCustomHTTP Class Classes

Pascal
property ResponseText: string;
Description
ResponseText is a read-only String property that specifies the textual message for a response received from a HTTP server.

ResponseText normally contains one of the following values messages for the associated ResponseCode ( 428):

Code Message
200 OK ( 4359)
201 Created
202 Accepted
203 Non-authoritative Information
204 No Content
205 Reset Content
206 Partial Content
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request ( 427)
401 Unauthorized
403 Forbidden
404 Not Found
405 Method not allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request ( 427) Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request ( 427) Entity To Long
414 Request ( 427)-URI Too Long. 256 Chars max
415 Unsupported Media Type
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway timeout
505 HTTP version not supported

ResponseText is updated in the DoRequest method when a HTTP server response is retrieved.

Use ResponseCode ( 428) to access the numeric value for the HTTP server response.

430 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

See Also
TIdCustomHTTP.ResponseCode ( 428)

TIdCustomHTTP.URL Property
Represents the attributes of a resource accessed by an HTTP request.

Pascal
property URL: TIdURI;
Description
URL is a read-only TIdURI ( 2552) property that represents the attributes of a server resource in an HTTP Request ( 427),
including the Protocol, Host, Port, Path, Document, and Bookmark for a resource.

URL is used in DoRequest and when preparing the request for the HTTP command verb. URL may also be used, when
CookieManager ( 422) has been assigned for the HTTP client, to set the realm or domain for cookie values found in an HTTP
response.

See Also
TIdURI ( 2552)

TIdCustomHTTP.CookieManager ( 422)

TIdCustomHTTP.Request ( 427)

TIdCustomHTTP.Response ( 428)

TIdCustomHTTP Events
The Events of the TIdCustomHTTP class are listed here.

Events
Event Description
OnAuthorization ( 431) Event handler for authentication of an HTTP connection.
OnHeadersAvailable ( 432) Allows the client to decide if response processing should be continued based on headers returned in the
HTTP response.
OnProxyAuthorization ( 432) Event handler for selecting the HTTP client authentication mechanism for a proxy connection.
OnRedirect ( 432) Event handler triggered for redirect requests.
OnSelectAuthorization ( 433) Event handler triggered when the client selects an authentication mechanism for the connection.
OnSelectProxyAuthorization ( 433) Event handler triggered when the client selects an authentication mechanism for the Proxied connection.

Legend
Event

TIdCustomHTTP.OnAuthorization Event
Event handler for authentication of an HTTP connection.

Pascal
property OnAuthorization: TIdOnAuthorization;
Parameters
Parameters Description
Sender HTTP Client generating the event notification.
VUserName User identity for the HTTP request.
VPassword User authorization for the HTTP request.
Handled Indicatesd if the authentication was successful.

Internet Direct (Indy) Version 10.1.5 431


TIdCustomHTTP Class Classes

Description
OnAuthorization is a TIdOnAuthorization ( 3067) property that represents the event handler signalled when an HTTP client
connection needs to provide authentication data as part of an HTTP request.

VUserName and VPassword are the authentication credentials found in the HTTP Request ( 427), and can be updated in the
event handler. Handled indicates if the event handler has successfully authenticated using the client account credentials and
authentication method. Set Handled to False if any condition in the authentication process is not satisfied.

Applications must assign a procedure to the event handler to allow responding to the event notification, or to allow the in-process
authentication permitted using TIdHTTP.HTTPOptions ( 1047).

TIdCustomHTTP.OnHeadersAvailable Event
Allows the client to decide if response processing should be continued based on headers returned in the HTTP response.

Pascal
property OnHeadersAvailable: TIdHTTPOnHeadersAvailable;
Description
OnHeadersAvailable is a TIdHTTPOnHeadersAvailable ( 3031) property that represents the event handler signalled when
processing a response received by the HTTP client. OnHeadersAvailable allows the client to decide if response processing should
be continued based on headers returned in the HTTP response.

Applications must assign a procedure to the event handler to allow responding to the event notification. Set the value in the
VContinue argument to False if the response should not be accepted and processed. This also causes a persistent connection
(indicated in the KeepALive property in the Response ( 428)) to be closed. Use the values in the TIdHeaderList ( 1024)
argument to the event handler to examine header values received for in the Response ( 428).

TIdCustomHTTP.OnProxyAuthorization Event
Event handler for selecting the HTTP client authentication mechanism for a proxy connection.

Pascal
property OnProxyAuthorization: TIdOnAuthorization;
Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnProxyAuthorization is a TIdProxyOnAuthorization property that represents the event handler signalled when an HTTP client
selects an authentication class to be used when session or proxy authentication is required for a connection. OnProxyAuthorization
is signalled prior to triggering the OnAuthorization ( 431) event handler.

AuthenticationClass is the class instance to be used to perform authentication for the mechanisms required in an HTTP request.

AuthInfo is the header values to be be used in the HTTP response that includes the authentication results.

Applications must assign a procedure to the event handler to allow responding to the event notification, or to allow the in-process
authentication permitted using TIdHTTP.HTTPOptions ( 1047).

TIdCustomHTTP.OnRedirect Event
Event handler triggered for redirect requests.

Pascal
property OnRedirect: TIdHTTPOnRedirectEvent;

432 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTP Class

Parameters
Parameters Description
Sender Client triggering the event.
Dest URL ( 431) for the new resource location.
NumRedirect An accumulator for the number of redirection requests.
Handled Indicated that redirects should be handled.
VMethod HTTP method to be used to fulfill the redirect.

Description
OnRedirect is a TIdHTTPOnRedirectEvent ( 3031) property that represents the event handler used when the HTTP client receives
a redirection ResponseCode ( 428) in the Response ( 428) for an HTTP Request ( 427).

OnRedirect is signalled during handling of an HTTP Response ( 428) in the DoRequest method when the ResponseCode ( 428)
contains a value in the range 300-307, and the Response ( 428) contains a Location header.

When HandleRedirects ( 423) is True, and the number of active redirects does not exceed RedirectMaximum ( 427), the event
handler is signalled to allow the HTTP client to handle any processing required for the Location, Method, or current number of
redirection requests. If the client is not Disconnected, the pending redirection request is automatically executed using a nested call
to DoRequest.

When HandleRedirects ( 423) is False, the event handler is signalled to allow the HTTP client to handle all aspects of the
redirection request. If the redirection request is not handled, an EIdProtocolReplyError exception will be raised.

An Application must assign a procedure to the event handler in order to respond to the event notification. The event handler
procedure can used to alter the redirection location specified in Dest, or to change the HTTP method for a pending redirection
request. The event handler procedure should also set Handled to True to indicate that the redirection request can/should be
allowed for the client.

TIdCustomHTTP.OnSelectAuthorization Event
Event handler triggered when the client selects an authentication mechanism for the connection.

Pascal
property OnSelectAuthorization: TIdOnSelectAuthorization;
Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnSelectAuthorization is a TIdOnSelectAuthorization ( 3071) property that represents the event handler triggered when the HTTP
client chooses an Authentication method and class for authorizing a connection.

OnSelectAuthorization is triggered when a Request ( 427) needs Authentication using a supported Authentication method for the
WWWAuthenticate headers found in Response ( 428). OnSelectAuthorization can be used to set the class instance in Auth used
for authenticating the client Request ( 427) based on header values found in AuthInfo.

OnSelectAuthorization is used prior to triggering the OnAuthorization ( 431) event handler for the client connection.

TIdCustomHTTP.OnSelectProxyAuthorization Event
Event handler triggered when the client selects an authentication mechanism for the Proxied connection.

Pascal
property OnSelectProxyAuthorization: TIdOnSelectAuthorization;

Internet Direct (Indy) Version 10.1.5 433


TIdCustomHTTPServer Class Classes

Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnSelectProxyAuthorization is a TIdOnSelectAuthorization ( 3071) property that represents the event handler triggered when the
HTTP client chooses an Authentication method and class for authorizing a Proxied connection.

OnSelectProxyAuthorization is triggered when a Request ( 427) needs Authentication using a supported Authentication method
for the Proxy headers found in Response ( 428). OnSelectProxyAuthorization can be used to set the class instance in Auth used
for authenticating the client Request ( 427) based on header values found in AuthInfo.

OnSelectProxyAuthorization is used prior to triggering the OnProxyAuthorization ( 432) event handler for the client connection.

TIdCustomHTTPServer Class
Specifies properties, methods, and events for the base HTTP Server implementation in Indy.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdCustomHTTPServer = class(TIdCustomTCPServer);
Description
TIdCustomHTTPServer is a TIdTCPServer ( 2375) descendant that specifies properties, methods, and events for an
implementation of the Hypertext Transfer Protocol (HTTP) as described in the Internet Standards document:

RFC 1945 - Hypertext Transfer Protocol [HTTP] version 1.0

RFC 2616 - Hypertext Transfer Protocol [HTTP] version 1.1

TIdCustomHTTPServer also supports the Secure Hypertext Transport protocol (HTTPS) as described in the Internet Standards
document:

RFC 2660 - The Secure HyperText Transfer Protocol

Assign an instance of TIdServerInterceptOpenSSL to the Intercept ( 464) property to allow use of the HTTPS protocol. For the
Windows platform, you must install the Indy OpenSSL support .DLL's available at the Intelicom website to enable Secure Socket
Layer support.

Application do not normally create ( 267) instances of TIdCustomHTTPServer. Most properties, methods, and events in
TIdCustomHTTPServer are protected to allow descendant classes to override their implementation. Use TIdHTTPServer ( 1102)
to access published properties, method, and events.

TIdCustomHTTPServer implements an overridden protected method that defines the behavior during execution of threaded client
connections. The method (DoExecute) performs processing required to read and process an HTTP request from the client
connection, as well as prepare and send an HTTP response.

DoExecute reads the raw HTTP command, HTTP header values including Cookies, and any optional content stream from the client
connection. HTTP request data is parsed into an TIdHTTPRequestInfo ( 1077) class instance used during execution of the client
thread.

DoExecute handles retrieving or creating persistent Sessions for threaded client connections. This is done using the IP for the client
connection and the IDSESSIONID Cookie value included in the HTTP request.

434 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTPServer Class

DoExecute constructs an HTTP response for the client request using an TIdHTTPResponseInfo ( 1089) instance. It initializes
server and Session properties in the response, and relies on the OnCommandGet or OnCommandOther ( 443) event handlers to
complete the content of the HTTP response. The HTTP response, and any optional content stream, are written to the client
connection.

DoExecute will close the client connection prior to exiting when KeepAlive ( 439) is not supported on the server, or if the client
omits the HTTP "Keep-Alive" header in the HTTP request.

During execution of a threaded client connection, the following

Exceptions
Exceptions Description
EIdHTTPErrorParsingCommand ( 99) Malformed command in the HTTP request.
EIdHTTPUnsupportedAuthorisationScheme ( 103) Invalid or unsupported authorization scheme in the HTTP request.
EIdSocketError ( 152) Raised when a connection is closed by the peer prior to writing the HTTP response. All Other Exceptions
should be handled and included in the HTTP response using the HTTP response number and response
message as defined in the HTTP protocol.

See Also
TIdHTTPServer ( 1102)

TIdTCPServer ( 2375)

IndySupport ( 15)

TIdCustomHTTPServer Members
The following tables list the members exposed by TIdCustomHTTPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AutoStartSession ( 438) Requests a new session when an existing session is not found.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 439) Default port number for the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
KeepAlive ( 439) Indicates if a client connection should remain open for subsequent use in an HTTP session.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
MaximumHeaderLineCount ( 439) Maximum number of header lines allowed in an HTTP request.
MIMETable ( 440) Represents the MIME type table for the HTTP server implementation.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ParseParams ( 440) Requests parsing of query parameters in client requests.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
ServerSoftware ( 441) Indicates the server software used to generate the HTTP response.
SessionList ( 441) Container for HTTP sessions for the server.
SessionState ( 442) Indicates that the server uses persistent HTTP sessions.
SessionTimeOut ( 442) specifies the default time-to-live for persistent HTTP sessions.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.

Internet Direct (Indy) Version 10.1.5 435


TIdCustomHTTPServer Class Classes

Create ( 267) Constructor for the object instance.


CreateSession ( 436) Creates a new HTTP session.
Destroy ( 437) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndSession ( 437) Frees the named HTTP session.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandOther ( 443) Represents the event handler for unknown HTTP commands.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnCreateSession ( 443) Event signalled when a session is needed a client connection.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnInvalidSession ( 443) Event handler signalled when a session cannot be restored for a specific SessionID.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnSessionEnd ( 444) Specifies the event handler for terminating HTTP sessions.
OnSessionStart ( 444) Specifies the event handler for creating a new HTTP session.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomHTTPServer Methods
The Methods of the TIdCustomHTTPServer class are listed here.

Methods
Method Description
CreateSession ( 436) Creates a new HTTP session.
Destroy ( 437) Frees the object instance.
EndSession ( 437) Frees the named HTTP session.

Legend
Method
virtual

TIdCustomHTTPServer.CreateSession Method
Creates a new HTTP session.

Pascal
function CreateSession(
AContext: TIdContext;
HTTPResponse: TIdHTTPResponseInfo;
HTTPRequest: TIdHTTPRequestInfo
): TIdHTTPSession;

436 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTPServer Class

Parameters
Parameters Description
AContext Client connection for the session.
HTTPResponse The response to use for the session.
HTTPRequest The request to use for the session.

Returns
TIdHTTPSession ( 1105) - The session created for the HTTP request and response.

Description
CreateSession is a TIdHTTPSession ( 1105) function used to get a new persistent HTTP session for the server implementation.
CreateSession creates a new HTTP session with a unique SessionID for the IP address specified in the HTTPRequest parameter.

SessionID is added to the HTTPResponse as the GSessionIDCookie ( 3215) cookie. The new session is assigned to both the
HTTP Request and the HTTP Response for the executing client thread, and added to the SessionList ( 441) for the server.

If SessionState ( 442) is False, CreateSession will perform no action and return the value Nil.

See Also
TIdHTTPSession ( 1105)

GSessionIDCookie ( 3215)

TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

TIdCustomHTTPServer.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy ensures that the server is not Active ( 458), or listening for new
connections.

Destroy frees resources allocated to the MIMETable ( 440) and SessionList ( 441) properties. Destroy calls the inherited method
to complete destruction of the object instance.

See Also
MIMETable ( 440)

SessionList ( 441)

TIdCustomHTTPServer.EndSession Method
Frees the named HTTP session.

Pascal
function EndSession(
const SessionName: string
): boolean;
Parameters
Parameters Description
SessionName Identifier of the session to be freed.

Returns
Boolean - True when the named session is found and freed.

Internet Direct (Indy) Version 10.1.5 437


TIdCustomHTTPServer Class Classes

Description
EndSession is a Boolean function that allows the HTTP server to free the TIdHTTPSession ( 1105) using the name specified in
SessionName.

EndSession attempts to locate the TIdHTTPSession ( 1105) in SessionList ( 441) that has a SessionID matching SessionName.
When a session is found that matches SessionName, it is freed from the SessionList ( 441) and the return value for the method is
set to True.

EndSession uses the SessionList.GetSession method to find the named session. If a valid session reference is retrieved, the
session is freed.

See Also
TIdHTTPSession ( 1105)

SessionList ( 441)

TIdCustomHTTPServer Properties
The Properties of the TIdCustomHTTPServer class are listed here.

Properties
Property Description
AutoStartSession ( 438) Requests a new session when an existing session is not found.
DefaultPort ( 439) Default port number for the server.
KeepAlive ( 439) Indicates if a client connection should remain open for subsequent use in an HTTP session.
MaximumHeaderLineCount ( 439) Maximum number of header lines allowed in an HTTP request.
MIMETable ( 440) Represents the MIME type table for the HTTP server implementation.
ParseParams ( 440) Requests parsing of query parameters in client requests.
ServerSoftware ( 441) Indicates the server software used to generate the HTTP response.
SessionList ( 441) Container for HTTP sessions for the server.
SessionState ( 442) Indicates that the server uses persistent HTTP sessions.
SessionTimeOut ( 442) specifies the default time-to-live for persistent HTTP sessions.

Legend
Property
read only

TIdCustomHTTPServer.AutoStartSession Property
Requests a new session when an existing session is not found.

Pascal
property AutoStartSession: boolean;
Description
AutoStartSession is a Boolean property that indicates a new HTTP session should be created when a persistent HTTP session
does not exist in SessionList ( 441).

AutoStartSession is used when a session for the HTTP client connection is executed, and SessionState ( 442) indicates that
persistent sessions are maintained on the HTTP server.

AutoStartSession allows CreateSession ( 436) to be called when an HTTP session cannot be found in SessionList ( 441)
containing the GSessionIDCookie ( 3215) for the client IP address.

Even when AutoStartSession is True, CreateSession ( 436) will not be called when OnInvalidSession ( 443) indicates that the
session should not be allowed to continue execution.

The default value for AutoStartSession is Id_TId_HTTPAutoStartSession ( 3818) as assigned in the Create ( 267) constructor.

438 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTPServer Class

See Also
CreateSession ( 436)

GSessionIDCookie ( 3215)

OnInvalidSession ( 443)

SessionList ( 441)

SessionState ( 442)

Id_TId_HTTPAutoStartSession ( 3818)

TIdCustomHTTPServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdCustomHTTPServer ( 434) that identifies the default port number for listener threads in
the server, as described in the Hypertext Transfer Protocol specification.

The default value for DefaultPort is IdPORT_HTTP ( 4022).

See Also
TIdListenerThread ( 1445)

IdPORT_HTTP ( 4022)

TIdCustomHTTPServer.KeepAlive Property
Indicates if a client connection should remain open for subsequent use in an HTTP session.

Pascal
property KeepAlive: Boolean;
Description
KeepAlive is a Boolean property that indicates if the HTTP server should keep the connection open for the session established in
an executing client thread. When KeepAlive is True, the connection used for the HTTP response is give a 'keep-alive' header in the
response content. When KeepAlive is False, the connection header 'close' is used in the HTTP response.

The default value for KeepAlive is Id_TId_HTTPServer_KeepAlive ( 3818), as assigned during initialization of the component.

See Also
TIdHTTPRequestInfo ( 1077)

TIdHTTPResponseInfo ( 1089)

TIdPeerThread

TIdTCPServer.OnExecute ( 2379)

TIdCustomHTTPServer.MaximumHeaderLineCount Property
Maximum number of header lines allowed in an HTTP request.

Pascal
property MaximumHeaderLineCount: Integer;

Internet Direct (Indy) Version 10.1.5 439


TIdCustomHTTPServer Class Classes

Description
MaximumHeaderLineCount is an Integer property that indicates the maximum number of headers lines allowed when processing
requests for connections the server. MaximumHeaderLineCount is used to avoid the situation (commonly referred to as "header
bombing") where an excess number of header lines are written in HTTP requests in an attempt to invoke a DOS (Denial of Service)
attack.

The default value for MaximumHeaderLineCount is Id_TId_HTTPMaximumHeaderLineCount ( 3818), as assigned during


initialization of the component.

See Also
Id_TId_HTTPMaximumHeaderLineCount ( 3818)

TIdCustomHTTPServer.MIMETable Property
Represents the MIME type table for the HTTP server implementation.

Pascal
property MIMETable: TIdMimeTable;
Description
MIMETable is a read-only TIdMimeTable ( 1636) property that is used to retrieve the registered MIME type for a file requested in
the ServeFile method.

Values in MIMETable may be assigned to the ContentType property in the TIdHTTPResponseInfo ( 1089) containing headers
written in the HTTP response.

MIMETable is initialized in the Create ( 267) constructor, and loaded with default values using TIdMimeTable.BuildCache (
1638). MIMETable is freed in the Destroy ( 437) method.

See Also
TIdMimeTable ( 1636)

TIdMimeTable.BuildCache ( 1638)

TIdHTTPResponseInfo ( 1089)

Create ( 267)

Destroy ( 437)

ServeFile

SmartServeFile

TIdCustomHTTPServer.ParseParams Property
Requests parsing of query parameters in client requests.

Pascal
property ParseParams: boolean;
Description
ParseParams is a Boolean property that indicates the string list should be populated with the query values from the client request
query string (GET method) or form values (POST method).

For a client request in the form:

http://www.mydomain.com/test.htm?color=blue&size=10&style=44
The Params property would contain:

color=blue size=10 style=44


The developer has easy access to the value of named parameters using the RequestInfo.Params.Values property:

440 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTPServer Class

Color := RequestInfo.Params.Values['Color'];
To parse non-standard request query or form data, the ParseParams property should be set to false, and the developer will need to
build a parser to extract the parameters from the UnparsedParams property.

The default value for ParseParams is Id_TId_HTTPServer_ParseParams ( 3819), as assigned during initialization of the
component.

TIdCustomHTTPServer.ServerSoftware Property
Indicates the server software used to generate the HTTP response.

Pascal
property ServerSoftware: string;
Description
ServerSoftware is a String property that contains the textual values that identifies the server software used to generate the values in
an HTTP response. ServerSoftware is used when an executing connection thread prepares the headers for it's HTTP response in
OnExecute.

Assign the value to use for identifying your server implementation to ServerSoftware prior to listening for or accepting client
connections. ServerSoftware, by convention, is expressed as a product name and version number in the form:

productname "/" versionno

When ServerSoftware contains a non-blank value, it is used in the TIdHTTPResponseInfo.ServerSoftware ( 1101) property for
each client request. If ServerSoftware contains a blank string (''), the value in the GServerSoftware ( 3214) constant is assigned to
TIdHTTPResponseInfo.ServerSoftware ( 1101).

Example
IdHTTP1.ServerSoftware := 'MyCustomHTTPServer/1.0';
IdHTTP1.Active := True;
IdHTTP1->ServerSoftware = "MyCustomHTTPServer/1.0";
IdHTTP1->Active = True;
See Also
OnExecute

TIdHTTPResponseInfo ( 1089)

TIdHTTPResponseInfo.ServerSoftware ( 1101)

TIdCustomHTTPServer.SessionList Property
Container for HTTP sessions for the server.

Pascal
property SessionList: TIdHTTPCustomSessionList;
Description
SessionList is a read-only TIdHTTPCustomSessionList ( 1052) property used as a container for TIdHTTPSession ( 1105)
instances created for the HTTP server.

SessionList is maintained in CreateSession ( 436) and EndSession ( 437), as well as by


TIdHTTPDefaultSessionList.PurgeStaleSessions ( 1063).

See Also
TIdHTTPCustomSessionList ( 1052)

TIdHTTPSession ( 1105)

CreateSession ( 436)

EndSession ( 437)

Internet Direct (Indy) Version 10.1.5 441


TIdCustomHTTPServer Class Classes

TIdHTTPDefaultSessionList.PurgeStaleSessions ( 1063)

TIdCustomHTTPServer.SessionState Property
Indicates that the server uses persistent HTTP sessions.

Pascal
property SessionState: Boolean;
Description
SessionState is a Boolean property that indicates persistent sessions are used by the HTTP server to service requests from peer
threads. SessionState is used by CreateSession ( 436) to determine if a new persistent session is created and added to the
session list.

SessionState is used to get the cookie value for a session, and to determine if a persistent session matching the
'IDHTTPSESSIONID' cookie and Remote IP address should be retrieved from the session list.

The default value for SessionState is Id_TId_HTTPServer_SessionState ( 3819), as assigned during initialization of the
component.

See Also
CreateSession ( 436)

GSessionIDCookie ( 3215)

TIdCustomHTTPServer.SessionTimeOut Property
specifies the default time-to-live for persistent HTTP sessions.

Pascal
property SessionTimeOut: Integer;
Description
SessionTimeOut is an Integer property that specifies the default time-to-live for persistent HTTP sessions created by the HTTP
server. SessionTimeOut is assigned as the default SessionTimeOut for the server session list when the HTTP server becomes
active.

SessionTimeOut is used determine when a persistent HTTP session has expired, or become stale. Stale persistent sessions are
removed from the HTTP session list.

The default value for SessionTimeout is Id_TId_HTTPSessionTimeOut ( 3819), as assigned during initialization of the component.

See Also
TIdHTTPDefaultSessionList ( 1059)

TIdCustomHTTPServer Events
The Events of the TIdCustomHTTPServer class are listed here.

Events
Event Description
OnCommandOther ( 443) Represents the event handler for unknown HTTP commands.
OnCreateSession ( 443) Event signalled when a session is needed a client connection.
OnInvalidSession ( 443) Event handler signalled when a session cannot be restored for a specific SessionID.
OnSessionEnd ( 444) Specifies the event handler for terminating HTTP sessions.
OnSessionStart ( 444) Specifies the event handler for creating a new HTTP session.

Legend
Event

442 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomHTTPServer Class

TIdCustomHTTPServer.OnCommandOther Event
Represents the event handler for unknown HTTP commands.

Pascal
property OnCommandOther: TIdHTTPCommandEvent;
Parameters
Parameters Description
Thread The peer thread generating the event.
asCommand The command from the HTTP request.
asData The data from the HTTP request.
asVersion The version number from the HTTP request.

Description
OnCommandOther is the TIdHTTPOtherEvent event handler used to respond to unknown HTTP commands. OnCommandOther is
used during execution of the threaded client connection when a command other than GET, POST, or HEAD is received in the HTTP
request.

The application must assign a procedure to the OnCommandOther event handler to allow the server to respond to the unknown
HTTP command. Use OnCommandOther to generate custom Response or Error messages, handle non-standard HTTP
commands, or perform processing specific to the HTTP server implementation when an error occurs.

See Also
TIdHTTPOtherEvent

OnExecute

TIdCustomHTTPServer.OnCreateSession Event
Event signalled when a session is needed a client connection.

Pascal
property OnCreateSession: TOnCreateSession;
Parameters
Parameters Description
ASender THread of execution for the threaded client connection.
VHTTPSession HTTP session for the event notification.

Description
OnCreateSession is a TOnCreateSession ( 3104) property that represents the event handler signalled when an HTTP session is
needed for a threaded client connection. OnCreateSession is signalled when TIdCustomHTTPServer.CreateSession ( 436) is
used and TIdCustomHTTPServer.SessionState ( 442) is True, and allows the server implementation to retrieve or create ( 267)
an HTTP session using the requirements or logic desired.

Applications must assign a procedure to the OnCreateSession event handler to allow responding to the event notification. When
OnCreateSession is unassigned, the HTTP server will use the TIdHTTPDefaultSessionList.CreateUniqueSession ( 1062) method
to initialize an HTTP session.

See Also
TOnCreateSession ( 3104)

TIdCustomHTTPServer.SessionState ( 442)

TIdHTTPDefaultSessionList.CreateUniqueSession ( 1062)

TIdCustomHTTPServer.OnInvalidSession Event
Event handler signalled when a session cannot be restored for a specific SessionID.

Internet Direct (Indy) Version 10.1.5 443


TIdCustomHTTPServer Class Classes

Pascal
property OnInvalidSession: TIdHTTPInvalidSessionEvent;
Parameters
Parameters Description
AContext Client connection generating the event notification.
RequestInfo Header sent in the client request.
ResponseInfo Header to include in a response.
ContinueProcessing Indicates that a new session can be created.
InvalidSessionID Session ID found in a Request Cookie.

Description
OnInvalidSession is a TIdHTTPInvalidSessionEvent ( 3029) property that represents the event handler signalled when a
persistent session with the specified SessionID cannot be restored from SessionList ( 441).

OnInvalidSession is signalled when the threaded client connection in Thread is executed. InvalidSessionID is the
GSessionIDCookie ( 3215) value that identifies the session to be restored. The event handler can set the value of
ContinueProcessing to indicate if the server can create ( 267) a new session for the threaded client connection.

Applications must assign a procedure to the event handler to allow responding to the event notification.

See Also
TIdHTTPInvalidSessionEvent ( 3029)

SessionList ( 441)

GSessionIDCookie ( 3215)

TIdCustomHTTPServer.OnSessionEnd Event
Specifies the event handler for terminating HTTP sessions.

Pascal
property OnSessionEnd: TOnSessionEndEvent;
Description
OnSessionEnd is the TOnSessionEndEvent ( 3111) event handler used to respond to the event notification for termination of a
HTTP session.

OnSessionEnd is assigned to the OnSessionEnd event handler for the HTTP session list used by server. The event handler is
assigned when the server becomes active.

See Also
TOnSessionEndEvent ( 3111)

TIdHTTPDefaultSessionList ( 1059)

TIdHTTPCustomSessionList ( 1052)

TIdHTTPSession ( 1105)

OnSessionStart ( 444)

TIdCustomHTTPServer.OnSessionStart Event
Specifies the event handler for creating a new HTTP session.

Pascal
property OnSessionStart: TOnSessionStartEvent;
Description
OnSessionStart is the TOnSessionStartEvent ( 3112) event handler used to respond to the event notification for creation of a new

444 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomIcmpClient Class

HTTP session.

OnSessionStart is assigned to the OnSessionStart event handler for the HTTP session list used by server. The event handler is
assigned when the server becomes active.

See Also
TOnSessionStartEvent ( 3112)

TIdHTTPDefaultSessionList ( 1059)

TIdHTTPCustomSessionList ( 1052)

TIdHTTPSession ( 1105)

OnSessionEnd ( 444)

TIdCustomIcmpClient Class
File
IdIcmpClient ( 4665)

Hierarchy

Pascal
TIdCustomIcmpClient = class(TIdRawClient);
Description
TIdCustomIcmpClient is a TIdRawClient ( 1814) descendant.

See Also
TIdRawClient ( 1814)

TIdCustomIcmpClient Members
The following tables list the members exposed by TIdCustomIcmpClient.

Properties
Property Description
Binding ( 1813) Represents the socket handle for the connection.
Host ( 1814) Specifies the endpoint for the socket connection.
Host ( 1816) Specifies the endpoint for the socket connection.
IPVersion ( 1816)
Port ( 1816) Identifies the port number for the socket connection.
Protocol ( 1816) Identifies the protocol option for the socket connection.
ProtocolIPv6 ( 1817)
ReceiveTimeout ( 1814) Identifies the timeout for receive operations.
ReceiveTimeout ( 1817) Identifies the timeout for receive operations.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 446)
DoWork ( 357) Triggers the OnWork event handler.

Internet Direct (Indy) Version 10.1.5 445


TIdCustomIcmpClient Class Classes

EndWork ( 358) Triggers the OnEndWork event handler.


GetVersion ( 269) Version ( 269) number for Indy component suite.
Receive ( 446)
ReceiveBuffer ( 1811)
CType ( 267)
Send ( 447)
Create ( 1274)
Send ( 1811)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomIcmpClient Methods
The Methods of the TIdCustomIcmpClient class are listed here.

Methods
Method Description
Destroy ( 446)
Receive ( 446)
Send ( 447)

Legend
Destructor
virtual

TIdCustomIcmpClient.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdCustomIcmpClient.Receive Method
Pascal
function Receive(
ATimeOut: Integer
): TReplyStatus;
Parameters
Parameters Description
ATimeOut Type is Integer.

Returns
TReplyStatus ( 2679)

Description
Receive is a method.

446 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomMappedTelnet Class

Receive returns a TReplyStatus ( 2679) value.

TIdCustomIcmpClient.Send Method
Overload List

Method Description
TIdCustomIcmpClient.Send (string,
integer, TIdBytes) ( 447)
TIdCustomIcmpClient.Send
(TIdBytes) ( 447)

TIdCustomIcmpClient.Send Method (TIdBytes)


Pascal
procedure Send(
const ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Scope is const. Type is TIdBytes ( 3007).

Description
Send is a overridden method.

TIdCustomIcmpClient.Send Method (string, integer, TIdBytes)


Pascal
procedure Send(
const AHost: string;
const APort: integer;
const ABuffer: TIdBytes
); override;
Parameters
Parameters Description
AHost Scope is const. Type is string.
APort Scope is const. Type is integer.
ABuffer Scope is const. Type is TIdBytes ( 3007).

Description
Send is a overridden method.

TIdCustomMappedTelnet Class
File
IdMappedTelnet ( 4682)

Hierarchy

Pascal
TIdCustomMappedTelnet = class(TIdMappedPortTCP);

Internet Direct (Indy) Version 10.1.5 447


TIdCustomMappedTelnet Class Classes

Description
TIdCustomMappedTelnet is a TIdMappedPortTCP ( 1505) descendant.

See Also
TIdMappedPortTCP ( 1505)

TIdCustomMappedTelnet Members
The following tables list the members exposed by TIdCustomMappedTelnet.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowedConnectAttempts ( 449)
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 449)
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 449)
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCheckHostPort ( 450)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnListenException ( 470) Event handler for an exception in a listener thread.

448 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomMappedTelnet Class

OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.
OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdCustomMappedTelnet Properties
The Properties of the TIdCustomMappedTelnet class are listed here.

Properties
Property Description
AllowedConnectAttempts ( 449)
DefaultPort ( 449)
MappedPort ( 449)

Legend
Property

TIdCustomMappedTelnet.AllowedConnectAttempts Property
Pascal
property AllowedConnectAttempts: Integer;
Description
AllowedConnectAttempts is a Public Integer property. Write access for the property is implemented using
SetAllowedConnectAttempts. The default value for the property is -1.

TIdCustomMappedTelnet.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_TELNET ( 4267).

TIdCustomMappedTelnet.MappedPort Property
Pascal
property MappedPort: Integer;
Description
MappedPort is a Published property. The default value for the property is IdPORT_TELNET ( 4267).

TIdCustomMappedTelnet Events
The Events of the TIdCustomMappedTelnet class are listed here.

Internet Direct (Indy) Version 10.1.5 449


TIdCustomSocksServer Class Classes

Events
Event Description
OnCheckHostPort ( 450)

Legend
Event

TIdCustomMappedTelnet.OnCheckHostPort Event
Pascal
property OnCheckHostPort: TIdMappedTelnetCheckHostPort;
Description
OnCheckHostPort is a Public TIdMappedTelnetCheckHostPort ( 3057) event handler property. Write access for the property is
implemented using FOnCheckHostPort.

TIdCustomSocksServer Class
File
IdSocksServer ( 4725)

Hierarchy

Pascal
TIdCustomSocksServer = class(TIdCustomTCPServer);
Description
TIdCustomSocksServer is a TIdCustomTCPServer ( 453) descendant.

See Also
TIdCustomTCPServer ( 453)

TIdCustomSocksServer Members
The following tables list the members exposed by TIdCustomSocksServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowSocks4 ( 452)
AllowSocks5 ( 452)
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 452)
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.

450 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomSocksServer Class

Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
Socks5NeedsAuthentication ( 452)
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 451)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAuthenticate ( 453)
OnBeforeBind ( 453)
OnBeforeConnect ( 453)
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomSocksServer Methods
The Methods of the TIdCustomSocksServer class are listed here.

Methods
Method Description
Destroy ( 451)

Legend
Destructor
virtual

TIdCustomSocksServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

Internet Direct (Indy) Version 10.1.5 451


TIdCustomSocksServer Class Classes

TIdCustomSocksServer Properties
The Properties of the TIdCustomSocksServer class are listed here.

Properties
Property Description
AllowSocks4 ( 452)
AllowSocks5 ( 452)
DefaultPort ( 452)
Socks5NeedsAuthentication ( 452)

Legend
Property

TIdCustomSocksServer.AllowSocks4 Property
Pascal
property AllowSocks4: boolean;
Description
AllowSocks4 is a Published boolean property. Write access for the property is implemented using fAllowSocks4.

TIdCustomSocksServer.AllowSocks5 Property
Pascal
property AllowSocks5: boolean;
Description
AllowSocks5 is a Published boolean property. Write access for the property is implemented using fAllowSocks5.

TIdCustomSocksServer.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_SOCKS ( 4232).

TIdCustomSocksServer.Socks5NeedsAuthentication Property
Pascal
property Socks5NeedsAuthentication: boolean;
Description
Socks5NeedsAuthentication is a Published boolean property. Write access for the property is implemented using
fSocks5NeedsAuthentication.

TIdCustomSocksServer Events
The Events of the TIdCustomSocksServer class are listed here.

452 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

Events
Event Description
OnAuthenticate ( 453)
OnBeforeBind ( 453)
OnBeforeConnect ( 453)

Legend
Event

TIdCustomSocksServer.OnAuthenticate Event
Pascal
property OnAuthenticate: TIdOnAuthenticate;
Description
OnAuthenticate is a Published TIdOnAuthenticate ( 3067) event handler property. Write access for the property is implemented
using fOnAuthenticate.

TIdCustomSocksServer.OnBeforeBind Event
Pascal
property OnBeforeBind: TIdOnBeforeBind;
Description
OnBeforeBind is a Published TIdOnBeforeBind ( 3068) event handler property. Write access for the property is implemented using
fOnBeforeBind.

TIdCustomSocksServer.OnBeforeConnect Event
Pascal
property OnBeforeConnect: TIdOnBeforeConnect;
Description
OnBeforeConnect is a Published TIdOnBeforeConnect ( 3068) event handler property. Write access for the property is
implemented using fOnBeforeConnect.

TIdCustomTCPServer Class
Specifies the interface for a multi-threaded TCP Server.

File
IdCustomTCPServer ( 4609)

Hierarchy

Pascal
TIdCustomTCPServer = class(TIdComponent);
Description
TIdCustomTCPServer is a TIdComponent ( 355) descendant that encapsulates a complete, multi-threaded TCP (Transmission
Control Protocol) server.

TIdCustomTCPServer allows multiple listener threads which listen for client connections to the server, accept new client

Internet Direct (Indy) Version 10.1.5 453


TIdCustomTCPServer Class Classes

connections, and hand-off execution of the client task to the server. By default, at least one listener thread is created for the server.
For servers with multiple network adapters, additional socket Bindings ( 461) can be created that allow the server to listen for
connection requests using the IP address for the selected network adapter(s).

When IP version 6 addresses are enabled for the server, an additional listener thread is created for each adapter specifically for
connections using the IPv6 address family.

TIdCustomTCPServer allows multiple simultaneous client connections, and allocates a separate unit of execution for each client
connecting to the server. Each client connection represents a task that is managed by the Scheduler ( 466) for the server. Listener
threads use the Scheduler ( 466) for the server to create ( 267) an executable task for each client connection.

The Scheduler ( 466) handles creation, execution, and termination of tasks for client connections found in Contexts ( 462). The
ContextClass ( 461) property indicates the type of executable task created for client connections and added to Contexts ( 462).

There are basically two types of Schedulers available for TIdCustomTCPServer: Thread-based and Fiber-based. Each is designed
to work with a specific type of executable task that represents client connections to the server. There are further Scheduler ( 466)
refinements that allow a pool of pre-allocated Threads, or Threads which perform scheduling for dependent Fibers.

The default Scheduler ( 466) implementation in TIdCustomTCPServer uses a Thread to represent each client connection.
Threads are a common feature found on all platforms and Operating Systems hosting the Indy library.

Each platform and/or Operating System imposes certain performance and resource limitations on the number of threads that can be
created for the server.

On Windows, for example, the number of threads is limited by the available virtual memory. By default, every thread gets one
megabyte of stack space and implies a theoretical limit of 2028 threads. Reducing the default stack size will allow more threads to
be created, but will adversely impact system performance. In addition, threads are pre-emptively scheduled by the host operating
system and allow no control over execution of the thread process.

Windows addresses these issues by providing the Fibers API. Essentially, Fibers are a light-weight thread. Fibers require fewer
resources that threads. Fibers can be manually scheduled in the server, and run in the context of the thread that schedules them. In
other words, Fibers are not pre-emptively scheduled by the Operating System. The Fiber runs when its thread runs. As a result,
servers using the Fiber API can be more scalable than contemporary thread-based implementations.

The Fiber API is very different from the Thread API (even on the Windows platform). To hide these API differences, and to preserve
code portability to non-Windows platforms, the Scheduler ( 466) in TIdCustomTCPServer provides an abstraction that masks the
differences: the Yarn.

Q: What do you get when you weave threads and fibers together?
A: Yarn.
While TIdCustomTCPServer does not use Fibers unless a Scheduler ( 466) supporting Fibers is assigned (TIdSchedulerOfFiber),
the Yarn abstraction is an important one that is central to the use of the Scheduler ( 466). When the Scheduler ( 466) supports
Threads, it deals only with a Yarn at the Thread level. When the Scheduler ( 466) supports Fibers, it deals with a Yarn at the Fiber
level.

The ContextClass ( 461) property for the server is used to create ( 267) the unit of execution for the client connection, and also
uses the Yarn abstraction.

TIdCustomTCPServer provides properties and methods that allow configuration of the server and listener threads, including:

Active ( 458)
DefaultPort ( 462)
Bindings ( 461)
ListenQueue ( 465)
MaxConnections ( 465)
IOHandler ( 464)
Intercept ( 464)
ReuseSocket ( 466)

454 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

TerminateWaitTime ( 468)
OnAfterBind ( 466)
OnBeforeListenerRun ( 468)
OnListenException ( 470)

The TIdCustomTCPServer architecture provides properties and methods that allow controlling execution of the client connection
tasks for the server, including:

ContextClass ( 461)
Scheduler ( 466)
OnBeforeConnect ( 468)
OnConnect ( 469)
OnDisconnect ( 469)
OnException ( 470)

During initialization of the TIdCustomTCPServer component, the following resources are allocated for properties in the server:

Bindings ( 461)
Contexts ( 462)

During initialization of the TIdCustomTCPServer component, the following properties are set to their default values:

Property Value
ContextClass ( 461) TIdContext ( 376) class reference
TerminateWaitTime ( 468) 5000 (5 seconds)
ListenQueue ( 465) IdListenQueueDefault ( 3853)

At run-time, TIdCustomTCPServer is controlled by changing the value in its Active ( 458) property. When Active ( 458) is set to
True, the following actions are performed as required to start the server including:

Startup Actions
Bindings ( 461) are created and / or initialized for IPv4 and IPv6 addresses.
Ensures that an IOHandler ( 464) is assigned for the server.
Ensures that a Scheduler ( 466) is assigned for the server.
Creates and starts listener threads for Bindings ( 461) using the thread priority tpHighest ( 4413).

When Active ( 458) is set to False, the following actions are performed as required to stop the server including:

Shutdown Actions
Terminates and closes the socket handle for the any listener threads.
Terminates and disconnects any client connections in Contexts ( 462), and Yarns in Scheduler ( 466).
Frees an implicitly created Scheduler ( 466) for the server.

Changing the value in Active ( 458) in the IDE (design-time) has no effect other than storing the property value that is used at

Internet Direct (Indy) Version 10.1.5 455


TIdCustomTCPServer Class Classes

run-time and during component streaming.

While the server is Active ( 458), listener thread(s) are used to detect and accept client connection requests. When a connection
request is detected, the Scheduler ( 466) in the server instance is used to acquire the thread or fiber that controls execution of the
task for the client connection. The IOHandler ( 464) in the server is used to get an IOHandler ( 464) for the client connection.

A client connection request can be refused for any number of reasons. The listener thread may get stopped during processing of
the request, or the attempt to create ( 267) an IOHandler ( 464) for the client might fail because of an invalid socket handle.

The most common error occurs when the number of client connections in Contexts ( 462) exceeds the number allowed in
MaxConnections ( 465). In this situation, an message is written to the client connection that indicates the condition and the client
connection is disconnected.

If the connection is refused due to any other exception, the OnListenException ( 470) (when assigned) is triggered.

If no error or exception is detected for the connection request, a TIdContext ( 376) instance is created for each executable task for
the client connection. Procedures that trigger the OnConnect ( 469), OnDisconnect ( 469), and OnExecute event handlers are
assigned to the corresponding event handlers in the client connection context. The context is then given to the Scheduler ( 466)
for execution using its native thread or fiber support.

At this point, the executable task for the client connection is fully self-contained and controlled using the OnConnect ( 469),
OnDisconnect ( 469), and OnExecute (for TIdTCPServer ( 2375)) event handlers. OnConnect ( 469) and OnDisconnect (
469) are optional, and should be used only to perform simple tasks that are not time consuming. Using Synchronized method calls
that access the main VCL thread are highly discouraged. Use OnExecute to control the interaction between the client and the
server during the lifetime of the client connection.

TIdCustomTCPServer provides support for the TCP transport, and does not implement support for any given protocol used for
communication exchanges between clients and the server. TIdCustomTCPServer can be used as a base class to create ( 267)
custom TCP server descendants that support specific protocols.

Use TIdCmdTCPServer ( 326) for a TCP server that includes TIdCommandHandler ( 341) and TIdCommand ( 335) support.

See Also
TIdComponent ( 355)

TIdTCPServer ( 2375)

TIdCmdTCPServer ( 326)

TIdListenerThread ( 1445)

TIdScheduler ( 1955)

TIdContext ( 376)

IndySupport ( 15)

TIdCustomTCPServer Members
The following tables list the members exposed by TIdCustomTCPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.

456 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomTCPServer Methods
The Methods of the TIdCustomTCPServer class are listed here.

Methods
Method Description
Destroy ( 457) Frees the object instance.

Legend
Destructor
virtual

TIdCustomTCPServer.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the TIdCustomTCPServer ( 453) instance.

Destroy sets the Active ( 458) property to False, which forces the server to terminate the listener threads and the executable tasks

Internet Direct (Indy) Version 10.1.5 457


TIdCustomTCPServer Class Classes

for client connections to the server.

Destroy frees resources allocated to the IOHandler ( 464) property when ImplicitIOHandler ( 463) contains True.

Destroy frees any Bindings ( 461) allocated for listener threads in the server.

Destroy frees any entries in Contexts ( 462) allocated to executable tasks for client connections to the server.

Destroy calls the inherited Destroy method.

See Also
Active ( 458)

Bindings ( 461)

Contexts ( 462)

IOHandler ( 464)

ImplicitIOHandler ( 463)

TIdCustomTCPServer Properties
The Properties of the TIdCustomTCPServer class are listed here.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.

Legend
Property
read only

TIdCustomTCPServer.Active Property
Indicates if the server is running and listening for client connections.

Pascal
property Active: Boolean;
Description
Active is a Boolean property that indicates the current state of the TIdCustomTCPServer ( 453) for accepting and servicing client
connections.

When it is Active, the server will listen for client connections requests, allocate socket handles and executable tasks for client
connections, and respond to execution of client connection tasks in Contexts ( 462) in the manner prescribed by the
TIdCustomTCPServer ( 453).

458 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

Server StartUp
When Active is set to True, a number of actions required to start the TCP server are performed.

The Bindings ( 461) collection is examined to determine if at least one IP address and port number has been configured for the
listener thread in the TCP server. If no items exist in Bindings ( 461), a binding is configured that will be used to listen for
connection requests using IPv4 addresses. If the protocol stack hosting the Indy library supports IPv6 addresses, an additional
binding will be configured that will be used to listen for connection requests using IPv6 addresses.

TIdCustomTCPServer ( 453) requires that a server IOHandler ( 464) be assigned for proper operation of the TCP server. If a
TIdServerIOHandlerStack ( 2005) instance has not been assigned for the IOHandler ( 464) property, an instance is created and
initialized using the TCP server as the owner of the object instance. In addition, the ImplicitIOHandler ( 463) property is set to True
to indicate that the IOHandler ( 464) is managed by the TIdCustomTCPServer ( 453) instance.

TIdCustomTCPServer ( 453) requires that a Scheduler ( 466) be assigned to allow creating and managing the executable tasks
for client connections to the server. If a TIdScheduler ( 1955) (or descendant class) instance has not been assigned to the
Scheduler ( 466) property, an instance of TIdSchedulerOfThreadDefault ( 1967) is created and assigned to the property. The
ImplicitScheduler ( 463) property is set to True to indicate that the Scheduler ( 466) is managed by the TIdCustomTCPServer (
453) instance. The default Scheduler ( 466) (TIdSchedulerOfThreadDefault ( 1967)) allows creating and executing
Thread-based tasks for client connections to the Server.

Finally, the listener thread(s) used for accepting connection requests for the server instance are initialized and started.

Initializing listener threads requires that each item in Bindings ( 461) have a valid socket handle allocated, that socket options for
the socket handle be set, and that the IP address and port number for the socket descriptor be bound to the socket handle.

If an exception occurs during initialization of any socket handle in Bindings ( 461), all socket handles for the server instance are
closed and the exception is re-raised. The value in Active will continue to contain False.

On successful initialization of the socket handles for the listener threads, the OnAfterBind ( 466) event handler is signalled.

Each socket handle in Bindings ( 461) is then instructed to listen for connection requests using the backlog specified in
ListenQueue ( 465). A TIdListenerThread ( 1445) instance is created that uses the socket handle in the Binding. The priority for
listener thread instances is set to tpHighest ( 4413) to give preference to responding to connection requests over execution of
tasks for client connections. The OnBeforeListenerRun ( 468) event handler in the server is assigned to the OnBeforeRun event
handler in each of the listener threads. The listener threads are then added to the internal TIdThreadList ( 3093) for the server,
and each listener thread is started.

The value in the Active property is updated as the final step in server startup. At this point, connection requests on listener threads
should be handled normally using values specified in Scheduler ( 466), ContextClass ( 461), Contexts ( 462), and OnExecute
(in TIdTCPServer ( 2375)).

Before Starting the Server


All configuration options for the server instance (other than the defaults values and actions as described above) should be
performed before starting the server (by setting the Active property to True). Changed properties values are often ignored after
setting Active to True, while other property value changes may result in Exceptions being raised. Explicit assignments to the
following properties should be performed before server startup:

ContextClass ( 461)
IOHandler ( 464)
Scheduler ( 466)
Intercept ( 464)
DefaultPort ( 462)
ListenQueue ( 465)
MaxConnections ( 465)

Internet Direct (Indy) Version 10.1.5 459


TIdCustomTCPServer Class Classes

OnExecute

During Server Execution


While Active remains set to True, TIdCustomTCPServer ( 453) uses listener thread(s) to detect and accept client connection
requests. When a connection request is detected, the Scheduler ( 466) in the server instance is used to acquire the thread or fiber
that controls execution of the task for the client connection. The IOHandler ( 464) in the server is used to get an IOHandler (
464) for the client connection.

A client connection request can be refused for a number of reasons. The listener thread may get stopped during processing of the
request, or the attempt to create ( 267) a client IOHandler ( 464) fails because of an invalid socket handle.

The most common error occurs when the number of client connections in Contexts ( 462) exceeds the number allowed in
MaxConnections ( 465). In this situation, an message is written to the client connection that indicates the condition and the client
connection is disconnected.

If the connection is refused due to any other exception, the OnListenException ( 470) is triggered.

If no error or exception is detected for the connection request, a TIdContext ( 376) is created for the client connections executable
task. Procedures that trigger the OnConnect ( 469), OnDisconnect ( 469), and OnExecute event handlers are assigned to the
context. The context is then given to the Scheduler ( 466) for execution using its native thread or fiber support.

At this point, the client connections executable task is fully self-contained and controlled using the OnConnect ( 469),
OnDisconnect ( 469), and OnExecute event handlers. OnConnect ( 469) and OnDisconnect ( 469) are optional, and should be
used only to perform simple tasks that are not time consuming. Using Synchronized method calls that access the main VCL thread
are highly discouraged. Use OnExecute to control the interaction between the client and the server during the lifetime of the client
connection.

Server ShutDown
A Number of actions required to stop the server are performed when the Active property is set to False. These actions include steps
needed to stop all listener threads for the server instance, and to terminate all executable tasks for client connections to the server.

Listener threads are terminated and removed from the internal thread list to prevent any additional connection requests from being
accepted during the ShutDown process. Each TIdListenerThread ( 1445) instance in the internal TIdThreadList ( 3093) is halted,
and the socket handle for the listener thread is closed and invalidated. When the thread has completed execution, it is freed. The
internal TIdThreadList ( 3093) for a TIdListenerThread ( 1445) instance is freed.

Any existing executable tasks for client connections found in Contexts ( 462) are terminated by Disconnecting the Connection for
the TIdContext ( 376) instances, and by terminating all threads or fibers under control of the Scheduler ( 466) for the server
instance. If the Scheduler ( 466) is managed by the server instance (Implicit Scheduler ( 466) contains True), it is freed and
released.

Changing the value in Active using the IDE (design-time) has no effect other than storing the property value that is used at runtime
and during component streaming.

See Also
TIdListenerThread ( 1445)

TIdScheduler ( 1955)

TIdSchedulerOfThreadDefault ( 1967)

TIdContext ( 376)

TIdServerIOHandlerStack ( 2005)

TIdSocketHandles ( 2090)

460 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

TIdCustomTCPServer.Bindings Property
Container for socket handles allocated by the server.

Pascal
property Bindings: TIdSocketHandles;
Description
Bindings is a TIdSocketHandles ( 2090) property that represents a collection of TIdSocketHandle ( 2071) instances used in the
server. Items in the Bindings collection are used in listener thread(s) (TIdListenerThread ( 1445) instances) to access the socket
handle for listening for and accepting new connection requests, as well as establishing the IOHandler ( 464) for client connections
accepted by the server.

Resources for the Bindings property are allocated during initialization of the component instance, and freed in the Destroy ( 457)
method.

Bindings is used when reading and writing the value for the DefaultPort ( 462) property. Reading the value in the DefaultPort (
462) property retrieves the property value stored in the Bindings collection. Changing the value in the DefaultPort ( 462) property
causes the property value in Bindings to be updated.

Change the value in DefaultPort ( 462) or Bindings.DefaultPort ( 462) prior to creating TIdSocketHandle ( 2071) instances in
the collection or setting Active ( 458) to True. Changes to the property value are not automatically assigned to existing
TIdSocketHandle ( 2071) instances.

Bindings is used during startup of the server (when Active ( 458) is set to True). TIdSocketHandle ( 2071) instances are added
to Bindings when no existing socket handles are defined. A TIdSocketHandle ( 2071) instance is created for each Internet address
family (IPv4, IPv6) supported on the protocol stack for the platform hosting the Indy library.

Multiple listener threads can be defined in Bindings for multi-homed servers, or servers that listen on multiple ports.
TIdSocketHandle ( 2071) instances can be added to Bindings (either in code, or using the IDE) for each network adapter IP
address, IP address family, and port combination to use in detecting connection requests.

During startup, TIdSocketHandle ( 2071) instances in Bindings are allocated socket handles with the socket options specified in
the ReuseSocket ( 466) property. The socket handles are then bound using the the IP address, IP address family, and port
number for the TIdSocketHandle ( 2071) instances.

When all socket handles in Bindings are successfully bound, each TIdSocketHandle ( 2071) instance is instructed to listen for
client connection request using the backlog indicated in ListenQueue ( 465). A TIdListenerThread ( 1445) instance is created for
each of the TIdSocketHandle ( 2071) instances in Bindings. Listener threads are added to the internal list maintained by the
server, and execution of each listener thread is started.

See Also
Active ( 458)

DefaultPort ( 462)

TIdSocketHandles ( 2090)

TIdSocketHandle ( 2071)

TIdListenerThread ( 1445)

TIdCustomTCPServer.ContextClass Property
Class reference used to create ( 267) new executable tasks for client connections to the server.

Pascal
property ContextClass: TIdContextClass;
Description
ContextClass is a TIdContextClass ( 3015) property that represents the class reference used to create ( 267) new executable
tasks for client connections to the server. ContextClass is a assigned a TIdContext ( 376) class reference during initialization of

Internet Direct (Indy) Version 10.1.5 461


TIdCustomTCPServer Class Classes

the component.

ContextClass is used during execution of the listener thread(s) (TIdListenerThread ( 1445)) for the server to create ( 267) the
TIdContext ( 376) instances stored in the Contexts ( 462) property.

The context provides the client connection and IOHandler ( 464) for the accepted connection request, the list of Contexts ( 462)
for the server, and the thread or fiber (Yarn) acquired from the Scheduler ( 466) for controlling execution the task for the client
connection.

The TIdContext ( 376) uses protected procedures from the server in its OnBeforeRun, OnRun, and OnAfterRun event handlers.
The Scheduler ( 466) is used to start execution of the task using the Yarn (thread or fiber) acquired for the TIdContext ( 376).

See Also
TIdContextClass ( 3015)

TIdContext ( 376)

TIdListenerThread ( 1445)

TIdScheduler ( 1955)

TIdSchedulerOfThreadDefault ( 1967)

TIdCustomTCPServer.Contexts Property
Executable tasks for client connections to the server.

Pascal
property Contexts: TIdThreadList;
Description
Contexts is a read-only TIdThreadList ( 3093) property that represents the list containing TIdContext ( 376) instances for client
connections to the server. TIdContexts instances are created and stored in Contexts when the new executable task for the client
connection is created in a listener thread.

ContextClass ( 461) provides the class reference used to create ( 267) new TIdContexts instances .

The context provides the client connection and IOHandler ( 464) for the accepted connection request, the list of Contexts for the
server, and the thread or fiber (Yarn) acquired from the Scheduler ( 466) for controlling execution the task for the client connection.

The TIdContext ( 376) instance uses protected procedures from the server in its OnBeforeRun, OnRun, and OnAfterRun event
handlers. The Scheduler ( 466) is used to start execution of the task using the Yarn (thread or fiber) acquired for the TIdContext
( 376).

Contexts is also used during ShutDown for the server (setting Active ( 458) to False). Contexts is used to access and terminate all
executing tasks for client connections to the server.

Resources for the Contexts property are allocated during initialization of the component at runtime, and freed in Destroy ( 457).

See Also
TIdContextClass ( 3015)

TIdContext ( 376)

TIdListenerThread ( 1445)

TIdScheduler ( 1955)

TIdSchedulerOfThreadDefault ( 1967)

TIdThreadList ( 3093)

TIdCustomTCPServer.DefaultPort Property
Identifies the default port number used to listen for new connections.

462 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a TIdPort ( 3076) property that identifies the default port number used to listen for new client connections to the
server.

Reading or writing the value in DefaultPort causes the corresponding value in the Bindings ( 461) collection to be accessed or
updated. DefaultPort is the port number to use when a port number has not been assigned for a TIdSocketHandle ( 2071)
instance in the Bindings ( 461) collection. The port number is used when the socket handle for the TIdSocketHandle ( 2071)
instance is allocated and bound during startup for the server.

Change the value in DefaultPort prior to creating Bindings ( 461) or setting Active ( 458) to True to startup the server. Changes
to the property value are ignored after Bindings ( 461) are bound and the server becomes Active ( 458).

See Also
Active ( 458)

Bindings ( 461)

TIdPort ( 3076)

TIdSocketHandle ( 2071)

TIdSocketHandles ( 2090)

TIdCustomTCPServer.ImplicitIOHandler Property
Indicates if resources in the IOHandler ( 464) are managed by the server.

Pascal
property ImplicitIOHandler: Boolean;
Description
ImplicitIOHandler is a read-only Boolean property that indicates if the IOHandler ( 464) for the server was created as as result of
the server becoming Active ( 458). ImplicitIOHandler will contain True when an object instance is assigned during activation of the
server. ImplicitIOHandler will contain False when the server IOHandler ( 464) has been expressedly assigned by the application.

ImplicitIOHandler is used in the Destroy ( 457) destructor to determine if the object instance must free the resources allocated in
server IOHandler ( 464) prior to destruction.

See Also
Active ( 458)

Destroy ( 457)

IOHandler ( 464)

TIdCustomTCPServer.ImplicitScheduler Property
Indicates if resources in the Scheduler ( 466) are managed by the server.

Pascal
property ImplicitScheduler: Boolean;
Description
ImplicitScheduler is a read-only Boolean property that indicates if the Scheduler ( 466) was created as a result of the server
becoming Active ( 458).

ImplicitScheduler will contain True when an object instance is assigned to Scheduler ( 466) during activation of the the server
(setting Active ( 458) to True). ImplicitScheduler will contain False when Scheduler ( 466) has been explicitly assigned in the
application.

Internet Direct (Indy) Version 10.1.5 463


TIdCustomTCPServer Class Classes

ImplicitScheduler is also used when the server becomes inactive (the Active ( 458) property is set to False). When
ImplicitScheduler contains True, resources allocated to the Scheduler ( 466) property at run-time will be freed during server shut
down.

See Also
Scheduler ( 466)

Active ( 458)

TIdCustomTCPServer.Intercept Property
Identifies a data handler for server socket connections.

Pascal
property Intercept: TIdServerIntercept;
Description
Intercept is a TIdServerIntercept ( 1983) property that allows a developer to create ( 267) TIdIntercept descendants to encrypt
and decrypt data, or to compress ( 2741) and decompress messages handled by the server.

When a value has been assigned to Intercept, it is used in the Listener thread to accept a new connection and allocate the
matching Intercept required in the OnBeforeRun event handler of the client context.

One common use of TIdIntercept is to provide support for the Secure Socket Layer (SSL) protocol, using a
TIdServerInterceptOpenSSL instance, in TIdCustomTCPServer ( 453) and descendants.

See Also
TIdServerIntercept ( 1983)

TIdConnectionIntercept ( 368)

TIdContext.OnBeforeRun ( 380)

TIdServerInterceptOpenSSL

TIdConnectionInterceptOpenSSL

TIdCustomTCPServer.IOHandler Property
Represents the IOHandler used by listener threads for the server.

Pascal
property IOHandler: TIdServerIOHandler;
Description
IOHandler is a TIdServerIOHandler ( 1993) property that represents the input / output handler used by listener threads that accept
client connections for the server. IOHandler is used to get the TIdServerIOHandlerSocket ( 1996) instance assigned to the
property when the server becomes Active ( 458).

Applications can assign another TIdServerIOHandler ( 1993) descendant to the property prior to setting Active ( 458) to True.
Assigning a value to IOHandler cause an existing IOHandler instance to be freed prior to updating the property value. The
IOHandler is also updated to reflect the current Scheduler ( 466) for the server.

TIdListenerThread ( 1445) uses the IOHandler for the server when the listener thread is executed. The IOHandler is used to
accept the client connection and to create ( 267) a TIdIOHandler ( 1284) instance used in the TIdTCPConnection ( 2349) that
represents the client connection.

IOHandler is freed in Destroy ( 457) when an instance has been assigned and ImplicitIOHandler ( 463) contains True.

See Also
TIdServerIOHandler ( 1993)

TIdServerIOHandlerSocket ( 1996)

464 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

TIdListenerThread ( 1445)

Active ( 458)

TIdCustomTCPServer.ListenQueue Property
Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.

Pascal
property ListenQueue: integer;
Description
ListenQueue is an Integer property that indicates the maximum number of unresolved connection attempts allowed for each listener
thread. When a listener thread has more pending connection requests than the value in ListenQueue, the MaxConnectionReply
response is sent to the client and the new connection is closed.

The default value for ListenQueue is IdListenQueueDefault ( 3853) as assigned during initialization of the component.
ListenQueue is used as an argument when socket descriptors for listener threads are created during server activation. Any change
to the value in ListenQueue must be made prior to setting Active ( 458) to True.

On the Windows platform, the default listen queue size can be determined by the Operating System.

Non-server versions of Windows 95, Windows NT, Windows 2000, and Windows XP are internally limited to a maximum of 5
queued connection requests per listening socket. Server versions of Windows NT, Windows 2000, and Windows XP are internally
limited to a maximum of 200 queued connection requests per listening socket.

Setting ListenQueue to a larger value will not override any internal limitation of the Operating System.

See Also
TIdListenerThread ( 1445)

IdListenQueueDefault ( 3853)

MaxConnections ( 465)

MaxConnectionReply

Active ( 458)

TIdCustomTCPServer.MaxConnections Property
Indicates the maximum numer of client connections allowed for the server.

Pascal
property MaxConnections: Integer;
Description
MaxConnections is an Integer property that indicates the maximum number of simultaneous client connections allowed for the
server. MaxConnections can be used to ensure that a pre-determined memory or bandwidth threshold is not exceeded. When
MaxConnection is 0 (zero), the server does not impose a limit on the maximum number of client connections.

MaxConnections is used when a TIdListenerThread ( 1445) for the server detects a new connection request. If the
MaxConnections limit has been exceeed, the server performs its protected DoMaxConnections method, and the client connection is
closed. The Abort method is called to halt execution of the listener thread.

See Also
TIdListenerThread ( 1445)

MaxConnectionReply

Internet Direct (Indy) Version 10.1.5 465


TIdCustomTCPServer Class Classes

TIdCustomTCPServer.OnAfterBind Property
Event handler signalled after binding socket handles for listener threads.

Pascal
property OnAfterBind: TIdNotifyEvent;
Description
OnAfterBind is a TNotifyEvent property that represents the event handler signalled during server statup after binding socket handles
for listener thread(s).

During server startup, the definitions in Bindings ( 461) are used to create ( 267) one or more listener threads. The
TIdSocketHandle ( 2071) instances in Bindings ( 461) are used to allocate a socket handle, set socket options for the socket
handle, and bind the IP address, IP address family, and port number used for the socket handle.

OnAfterBind is triggered when all of the socket handles have successfully completed these steps. OnAfterBind can be used to
perform logging or housekeeping tasks related to the completion of the previous tasks.

Applications must assign a procedure to the event handler to allow responding to the event notification.

The listener thread(s) for the server have not started to listen for connection requests when OnAfterBind is signalled. The IOHandler
( 464) and Scheduler ( 466) for the server have already been initialized, however.

See Also
TIdSocketHandle ( 2071)

TIdSocketHandles ( 2090)

Active ( 458)

Bindings ( 461)

IOHandler ( 464)

Scheduler ( 466)

TIdCustomTCPServer.ReuseSocket Property
Indicates reuse of local addresses for listener threads.

Pascal
property ReuseSocket: TIdReuseSocket;
Description
ReuseSocket is a TIdReuseSocket ( 2973) property that indicates if socket IP addresses and port numbers can be reused for
TIdListenerThread ( 1445) instances used in the server. ReuseSocket is used when setting the socket options for an allocated
socket handle in a listener thread during server startup.

The default value for ReuseSocket is rsOSDependent as assigned during component streaming, and indicates that socket handle
reuse is dependent on the platform or Operating System hosting the Indy library.

See Also
TIdListenerThread ( 1445)

TIdCustomTCPServer.Scheduler Property
Identifies the thread-based or fiber-based scheduler used in the server.

Pascal
property Scheduler: TIdScheduler;

466 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

Description
Scheduler is a TIdScheduler ( 1955) property that provides the mechanism used for thread or fiber management for client
connections to the server. The Scheduler handles creation, execution, and termination of tasks for client connections found in
Contexts ( 462).

There are two basic types of Schedulers available for TIdCustomTCPServer ( 453): Thread-based and Fiber-based. Each is
designed to work with a specific type of executable task that represents the client connections.

The default Scheduler implementation in TIdCustomTCPServer ( 453) uses a Thread to represent each client connection
(TIdSchedulerOfThread ( 1961)). The default Scheduler (TIdSchedulerOfThreadDefault ( 1967)) allows creating and executing
Thread-based tasks for client connections to the Server.

There are further Scheduler refinements (in descendant classes) that allow a pool of pre-allocated Threads, or Threads which
perform scheduling for dependent Fibers. Use TIdSchedulerOfThreadPool ( 1970) or TIdSchedulerOfFiber to access one of the
alternative scheduler implementation.

TIdCustomTCPServer ( 453) requires that a Scheduler be assigned to allow creating and managing the executable tasks for client
connections to the server. If a TIdScheduler ( 1955) (or descendant class) instance has not been assigned to the Scheduler
property at startup, an instance of TIdSchedulerOfThreadDefault ( 1967) is created and assigned to the property. The
ImplicitScheduler ( 463) property is set to True to indicate that the Scheduler is managed by the TIdCustomTCPServer ( 453)
instance.

Assigning a new value to Scheduler causes an implicitly created Scheduler to be freed. A reference to the new Scheduler instance
is also maintained an existing IOHandler ( 464).

While the server is running (Active ( 458) contain True), Scheduler is used in the listener threads for the server acquire a new
Yarn (thread or fiber) for client connection requests. If the connection request is accepted in IOHandler ( 464) and
MaxConnections ( 465) has not been exceeded, a new ContextClass ( 461) instance is created and added to Contexts ( 462)
using the TIdTCPConnecion, TIdYarn ( 2632), and Contexts ( 462) values for the clients executable task. The Scheduler is used
to start execution of the task using its TIdYarn ( 2632) and TIdContext ( 376) values. If an exception occurs in the listener thread,
the Scheduler is used to terminate the TIdYarn ( 2632) for the client connection.

During shutdown of the server (when Active ( 458) is set to False), all active Yarns (threads or fibers) for the client connections
are terminated using the TerminateAllYarns method in the Scheduler. When ImplicitScheduler ( 463) contains True, the Scheduler
is set to Nil to prevent any further access to its scheduling capabilities.

See Also
Active ( 458)

Contexts ( 462)

ImplicitScheduler ( 463)

IOHandler ( 464)

MaxConnections ( 465)

TIdListenerThread ( 1445)

TIdScheduler ( 1955)

TIdSchedulerOfThread ( 1961)

TIdSchedulerOfThreadPool ( 1970)

TIdSchedulerOfFiber

TIdYarn ( 2632)

TIdYarnOfThread ( 2632)

TIdYarnOfFiber

Internet Direct (Indy) Version 10.1.5 467


TIdCustomTCPServer Class Classes

TIdCustomTCPServer.TerminateWaitTime Property
Specifies the time a server should wait while terminating executable tasks for client connections.

Pascal
property TerminateWaitTime: Integer;
Description
TerminateWaitTime is an Integer property that identifies the total number of milliseconds that the server should wait while
terminating the executable tasks for client connections.

TerminateWaitTime is an aggregate delay time used while monitoring the thread list in Contexts ( 462) during server shutdown.
The length of the Contexts ( 462) thread list is checked every 250ms until TerminateWaitTime has elapsed, or the length of the list
is 0 (zero). If the value in TerminateWaitTime is exceeded before the length of Contexts ( 462) reaches 0 (zero), an exception is
raised.

The default value for TerminateWaitTime is 5000 (5 seconds). Use a larger value in TerminateWaitTime when the server allows a
large number of client connections in MaxConnections ( 465), or when OnDisconnected event handling for the client connection
involves time intensive operations.

See Also
TIdTCPConnection.OnDisconnected ( 2367)

TIdCustomTCPServer Events
The Events of the TIdCustomTCPServer class are listed here.

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.

Legend
Event

TIdCustomTCPServer.OnBeforeConnect Event
Event handler signalled proper to establishing a client connection to the server.

Pascal
property OnBeforeConnect: TIdServerThreadEvent;
Description
OnBeforeConnect is a TIdServerThreadEvent ( 3080) property that represents an event handler signalled before establishing a
client connection.

TIdCustomTCPServer.OnBeforeListenerRun Event
Event handler signalled prior to executing a listener thread.

Pascal
property OnBeforeListenerRun: TIdNotifyThreadEvent;

468 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTCPServer Class

Description
OnBeforeListenerRun is a TIdNotifyThreadEvent ( 3066) property that represents the event handler signalled prior to executing a
listener thread for the server. OnBeforeListenerRun is assigned during server startup (when setting Active ( 458) to True) in the
TIdListenerThread.OnBeforeRun ( 1449) property for each listener thread defined in Bindings ( 461).

OnBeforeListenerRun allows the listener thread to perform operations required prior to accepting new connections requests for the
server.

See Also
TIdNotifyThreadEvent ( 3066)

TIdListenerThread.OnBeforeRun ( 1449)

Active ( 458)

TIdCustomTCPServer.OnConnect Event
Event handler signalled for establishing new client connections.

Pascal
property OnConnect: TIdServerThreadEvent;
Description
OnConnect is a TIdServerThreadEvent ( 3080) property that represents the event handler signalled when a new client connection
is connected to the server.

OnConnect receives the TIdContext ( 376) that represents the executable task for the client connection. OnConnect allows
processing that occurs after the client connection has been accepted by a listener thread, and before execution of the TIdContext
( 376) instance.

Applications must assign a TIdServerThreadEvent ( 3080) event handler procedure to OnConnect to allow responding to the
event notification. OnConnect is triggered by the protected procedure in the server assigned to the TIdContext.OnBeforeRun (
380) event handler.

See Also
TIdContext ( 376)

TIdContext.OnBeforeRun ( 380)

TIdServerThreadEvent ( 3080)

TIdCustomTCPServer.OnDisconnect Event
Event handler signalled when disconnecting the client connection.

Pascal
property OnDisconnect: TIdServerThreadEvent;
Description
OnDisconnect is an event handler for a TIdServerThreadEvent ( 3080) event, and occurs when the after execution and during
disconnection of the client from the TCP server.

OnDisconnect receives a TIdContext ( 376) instance that represents the executing client task being disconnected. OnDisconnect
is triggered when the TIdContext ( 376) instance in Contexts ( 462) has finished executing, and just prior to closing the socket
connection for the client.

Assign a TIdServerThreadEvent ( 3080) event handler procedure to OnDisconnect to allow responding to the event notification.

Do not call Synchronized methods in the OnDisconnect event handler. This is important because OnDisconnect is called when
active client tasks are terminated when the server sets Active ( 458) to False. Using synchronized methods in OnDisconnect can
result in a deadlock condition, caused when the thread is suspended while the method is executing in the main VCL thread.

Internet Direct (Indy) Version 10.1.5 469


TIdCustomTime Class Classes

TIdCustomTCPServer ( 453) will detect the deadlock condition, but a timeout error will be raised while trying to terminate the
active tasks for client connections.

Use Thread.Notification to act on the notification that a component is being inserted or removed. For example, if a component has
object fields or properties that contain references to other components, it can check the notifications of component removals and
invalidate those references as needed.

See Also
TIdServerThreadEvent ( 3080)

TIdContext ( 376)

Contexts ( 462)

TIdCustomTCPServer.OnException Event
Event handler for exceptions raised in a peer thread.

Pascal
property OnException: TIdServerThreadExceptionEvent;
Description
OnException is a TIdServerThreadExceptionEvent ( 3081) property that represents the event handler signalled when an
Exception ( 4733) is raised during execution of a task for a client connection.

Applications must assign a procedure to the event handler to allow a response to the event notification.

TIdCustomTCPServer.OnListenException Event
Event handler for an exception in a listener thread.

Pascal
property OnListenException: TIdListenExceptionEvent;
Description
OnListenException is a TIdListenExceptionEvent ( 3056) property that represents the event handler signalled when an exception
is raised during execution of one of the TIdListenerThread ( 1445) instances for the server.

OnListenException is signalled with the server context in the listener thread when an exception other than EAbort ( 4733) occurs
during execution of the specific listener thread.

Applications must assign a procedure to the event handler to allow a response to the event notification after setting the Active (
458) property in the Server to True.

See Also
TIdListenExceptionEvent ( 3056)

TIdListenerThread ( 1445)

Active ( 458)

TIdCustomTime Class
File
IdTime ( 4746)

Hierarchy

470 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTime Class

Pascal
TIdCustomTime = class(TIdTCPClientCustom);
Description
TIdCustomTime is a TIdTCPClientCustom ( 2340) descendant

See Also
TIdTCPClientCustom ( 2340)

TIdCustomTime Members
The following tables list the members exposed by TIdCustomTime.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
DateTime ( 473)
DateTimeCard ( 473)
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 473)
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
RoundTripDelay ( 473)
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Timeout ( 473)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
SyncTime ( 472)
CType ( 267)

Internet Direct (Indy) Version 10.1.5 471


TIdCustomTime Class Classes

Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomTime Methods
The Methods of the TIdCustomTime class are listed here.

Methods
Method Description
SyncTime ( 472)

Legend
Method

TIdCustomTime.SyncTime Method
Pascal
function SyncTime: Boolean;
Returns
Boolean

Description
SyncTime is a method Boolean function

TIdCustomTime Properties
The Properties of the TIdCustomTime class are listed here.

Properties
Property Description
DateTime ( 473)
DateTimeCard ( 473)
Host ( 473)
RoundTripDelay ( 473)
Timeout ( 473)

472 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTimeServer Class

Legend
Property
read only

TIdCustomTime.DateTime Property
Pascal
property DateTime: TDateTime;
Description
DateTime is a Public read-only TDateTime property

TIdCustomTime.DateTimeCard Property
Pascal
property DateTimeCard: Cardinal;
Description
DateTimeCard is a Public read-only Cardinal property

TIdCustomTime.Host Property
Pascal
property Host;
Description
Host is a Published property

TIdCustomTime.RoundTripDelay Property
Pascal
property RoundTripDelay: Cardinal;
Description
RoundTripDelay is a Public read-only Cardinal property

TIdCustomTime.Timeout Property
Pascal
property Timeout: Integer;
Description
Timeout is a Published Integer property default value is TIME_TIMEOUT ( 4396)

TIdCustomTimeServer Class
File
IdTimeServer ( 4746)

Hierarchy

Internet Direct (Indy) Version 10.1.5 473


TIdCustomTimeUDP Class Classes

Pascal
TIdCustomTimeServer = class(TIdCustomTCPServer);
Description
TIdCustomTimeServer is a TIdCustomTCPServer ( 453) descendant

See Also
TIdCustomTCPServer ( 453)

TIdCustomTimeUDP Class
File
IdTimeUDP ( 4747)

Hierarchy

Pascal
TIdCustomTimeUDP = class(TIdUDPClient);
Description
TIdCustomTimeUDP is a TIdUDPClient ( 2509) descendant

See Also
TIdUDPClient ( 2509)

TIdCustomTimeUDP Members
The following tables list the members exposed by TIdCustomTimeUDP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DateTime ( 476)
DateTimeCard ( 476)
Host ( 2520) Identifies the address of the remote computer system.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
IPVersion ( 2521) Identifies the IP address family supported for the UDP protocol client.
OnConnected ( 2521) Event handler signalled when establishing the UDP client session.
OnDisconnected ( 2521) Event handler signalled when closing the UDP client session.
Port ( 2522) Identifies the port number on the remote system.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ReceiveTimeout ( 2522) Indicates the timeout while waiting for a readable socket handle.
RoundTripDelay ( 476)
TransparentProxy ( 2522) Implements a transparent proxy connection for the UDP client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.

474 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTimeUDP Class

CloseProxy ( 2511) Closes the socket handle for a proxied connection for the client.
Connect ( 2512) Initializes the client for sending and receiving datagrams.
Connected ( 2512) Indicates if the socket handle for the UDP client has been allocated.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2513) Frees the object instance.
Disconnect ( 2513) Closes the socket handle and transparent proxy for the client.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
OpenProxy ( 2514) Ensures the optional transparent proxy is enabled for the client.
Send ( 2505) Transmits a datagram to a specified host and port number.
Send ( 2517) Transmits a datagram to the host and port number for the client.
SyncTime ( 475)
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)
ReceiveBuffer ( 2514)
SendBuffer ( 2518)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomTimeUDP Methods
The Methods of the TIdCustomTimeUDP class are listed here.

Methods
Method Description
SyncTime ( 475)

Legend
Method

TIdCustomTimeUDP.SyncTime Method
Pascal
function SyncTime: Boolean;
Returns
Boolean

Description
SyncTime is a method Boolean function

Internet Direct (Indy) Version 10.1.5 475


TIdCustomTimeUDPServer Class Classes

TIdCustomTimeUDP Properties
The Properties of the TIdCustomTimeUDP class are listed here.

Properties
Property Description
DateTime ( 476)
DateTimeCard ( 476)
RoundTripDelay ( 476)

Legend
Property
read only

TIdCustomTimeUDP.DateTime Property
Pascal
property DateTime: TDateTime;
Description
DateTime is a Public read-only TDateTime property

TIdCustomTimeUDP.DateTimeCard Property
Pascal
property DateTimeCard: Cardinal;
Description
DateTimeCard is a Public read-only Cardinal property

TIdCustomTimeUDP.RoundTripDelay Property
Pascal
property RoundTripDelay: Cardinal;
Description
RoundTripDelay is a Public read-only Cardinal property

TIdCustomTimeUDPServer Class
File
IdTimeUDPServer ( 4747)

Hierarchy

Pascal
TIdCustomTimeUDPServer = class(TIdUDPServer);
Description
TIdCustomTimeUDPServer is a TIdUDPServer ( 2530) descendant

476 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTransparentProxy Class

See Also
TIdUDPServer ( 2530)

TIdCustomTransparentProxy Class
Implements a tranparent proxy or gateway mechanism based on SOCKv5.

File
IdCustomTransparentProxy ( 4609)

Hierarchy

Pascal
TIdCustomTransparentProxy = class(TIdComponent);
Description
TIdCustomTransparentProxy is a TIdComponent ( 355) descendant that implements a tranparent proxy or gateway mechanism as
described in the Internet Standards document:

RFC 3089 - A SOCKS-based IPv6/IPv4 Gateway Mechanism

TIdCustomTransparentProxy is based on the SOCKS version 5 protocol, and applies the SOCKS mechanism to the heterogeneous
communications and relaying between peer connections at the "application layer" (the SOCKS server).

Since it is accomplished without introducing new protocols, it provides the same communication environment that is provided by the
SOCKS mechanism. The same appearance is provided to the heterogeneous communications. No conveniences or functionalities
of current communications are sacrificed.

See Also
TIdComponent ( 355)

TIdCustomTransparentProxy Members
The following tables list the members exposed by TIdCustomTransparentProxy.

Properties
Property Description
ChainedProxy ( 481)
Enabled ( 482)
Host ( 482)
IPVersion ( 482)
Password ( 482)
Port ( 482)
Username ( 482)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CloseUDP ( 479)
Connect ( 479)
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.

Internet Direct (Indy) Version 10.1.5 477


TIdCustomTransparentProxy Class Classes

EndWork ( 358) Triggers the OnEndWork event handler.


GetVersion ( 269) Version ( 269) number for Indy component suite.
Listen ( 480)
OpenUDP ( 480)
RecvFromUDP ( 480)
SendToUDP ( 481)
CType ( 267)
Bind ( 478)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdCustomTransparentProxy Methods
The Methods of the TIdCustomTransparentProxy class are listed here.

Methods
Method Description
Bind ( 478)
CloseUDP ( 479)
Connect ( 479)
Listen ( 480)
OpenUDP ( 480)
RecvFromUDP ( 480)
SendToUDP ( 481)

Legend
Method
virtual

TIdCustomTransparentProxy.Bind Method
Overload List

Method Description
TIdCustomTransparentProxy.Bind
(TIdIOHandler, Integer) ( 478)
TIdCustomTransparentProxy.Bind
(TIdIOHandler, string, Integer,
TIdIPVersion) ( 479)

TIdCustomTransparentProxy.Bind Method (TIdIOHandler, Integer)


Pascal
procedure Bind(
AIOHandler: TIdIOHandler;
const APort: Integer
); overload;

478 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTransparentProxy Class

Parameters
Parameters Description
AIOHandler
APort

Description
overloaded

See Also
Bind

TIdCustomTransparentProxy.Bind Method (TIdIOHandler, string, Integer, TIdIPVersion)


Pascal
procedure Bind(
AIOHandler: TIdIOHandler;
const AHost: string;
const APort: Integer;
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
); virtual; overload;
Parameters
Parameters Description
AIOHandler
AHost
APort
AIPVersion Default value is ID_DEFAULT_IP_VERSION ( 3282).

Description
Bind is an overloaded method

See Also
Bind

TIdCustomTransparentProxy.CloseUDP Method
Pascal
procedure CloseUDP(
AHandle: TIdSocketHandle
); virtual;
Parameters
Parameters Description
AHandle

Description
CloseUDP is a virtual procedure

TIdCustomTransparentProxy.Connect Method
Pascal
procedure Connect(
AIOHandler: TIdIOHandler;
const AHost: string;
const APort: Integer;
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
);

Internet Direct (Indy) Version 10.1.5 479


TIdCustomTransparentProxy Class Classes

Parameters
Parameters Description
AIOHandler
AHost
APort
AIPVersion Default value is ID_DEFAULT_IP_VERSION ( 3282).

TIdCustomTransparentProxy.Listen Method
Pascal
function Listen(
AIOHandler: TIdIOHandler;
const ATimeOut: integer
): boolean; virtual;
Parameters
Parameters Description
AIOHandler
ATimeOut

Returns
boolean

TIdCustomTransparentProxy.OpenUDP Method
Pascal
procedure OpenUDP(
AHandle: TIdSocketHandle;
const AHost: string = '';
const APort: Integer = 0;
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
); virtual;
Parameters
Parameters Description
AHandle
AHost Default value is ''.
APort Default value is 0.
AIPVersion Default value is ID_DEFAULT_IP_VERSION ( 3282).

Description
OpenUDP is a procedure

TIdCustomTransparentProxy.RecvFromUDP Method
Pascal
function RecvFromUDP(
AHandle: TIdSocketHandle;
var ABuffer: TIdBytes;
var VPeerIP: string;
var VPeerPort: integer;
const AIPVersion: TIdIPVersion;
AMSec: Integer = IdTimeoutDefault
): integer; virtual;
Parameters
Parameters Description
AHandle
ABuffer

480 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomTransparentProxy Class

VPeerIP
VPeerPort
AIPVersion
AMSec Default value is IdTimeoutDefault ( 4331).

Returns
integer

Description
RecvFromUDP is an Integer function.

TIdCustomTransparentProxy.SendToUDP Method
Pascal
procedure SendToUDP(
AHandle: TIdSocketHandle;
AHost: string;
const APort: Integer;
const AIPVersion: TIdIPVersion;
const ABuffer: TIdBytes
); virtual;
Parameters
Parameters Description
AHandle Type is TIdSocketHandle ( 2071).
AHost
APort
AIPVersion
ABuffer

Description
SendToUDP is a procedure

TIdCustomTransparentProxy Properties
The Properties of the TIdCustomTransparentProxy class are listed here.

Properties
Property Description
ChainedProxy ( 481)
Enabled ( 482)
Host ( 482)
IPVersion ( 482)
Password ( 482)
Port ( 482)
Username ( 482)

Legend
Property

TIdCustomTransparentProxy.ChainedProxy Property
Pascal
property ChainedProxy: TIdCustomTransparentProxy;

Internet Direct (Indy) Version 10.1.5 481


TIdCustomUserManager Class Classes

TIdCustomTransparentProxy.Enabled Property
Pascal
property Enabled: Boolean;

TIdCustomTransparentProxy.Host Property
Pascal
property Host: String;

TIdCustomTransparentProxy.IPVersion Property
Pascal
property IPVersion: TIdIPVersion;
Description
Default value is ID_DEFAULT_IP_VERSION ( 3282).

TIdCustomTransparentProxy.Password Property
Pascal
property Password: String;
Description
Password is a String property.

TIdCustomTransparentProxy.Port Property
Pascal
property Port: Integer;
Description
Port is an Integer property

TIdCustomTransparentProxy.Username Property
Pascal
property Username: String;
Description
Username is a String property

TIdCustomUserManager Class
File
IdUserAccounts ( 4753)

Hierarchy

Pascal
TIdCustomUserManager = class(TIdBaseComponent);

482 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomUserManager Class

Description
TIdCustomUserManager is a TIdBaseComponent ( 266) descendant.

See Also
TIdBaseComponent ( 266)

TIdCustomUserManager Members
The following tables list the members exposed by TIdCustomUserManager.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ChallengeUser ( 484)
Create ( 267) Constructor for the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsRegisteredUser ( 485)
LogoffUser ( 485)
CType ( 267)
AuthenticateUser ( 483)
Create ( 1274)
UserDisconnected ( 485)

Legend
Method
virtual
Property
read only

TIdCustomUserManager Methods
The Methods of the TIdCustomUserManager class are listed here.

Methods
Method Description
AuthenticateUser ( 483)
ChallengeUser ( 484)
IsRegisteredUser ( 485)
LogoffUser ( 485)
UserDisconnected ( 485)

Legend
Method
virtual

TIdCustomUserManager.AuthenticateUser Method
Overload List

Method Description

TIdCustomUserManager.AuthenticateUser
(String, String) ( 484)

Internet Direct (Indy) Version 10.1.5 483


TIdCustomUserManager Class Classes

TIdCustomUserManager.AuthenticateUser
(String, String, TIdUserHandle) ( 484)

TIdCustomUserManager.AuthenticateUser Method (String, String)


Pascal
function AuthenticateUser(
const AUsername: String;
const APassword: String
): Boolean; overload;
Parameters
Parameters Description
AUsername Scope is const. Type is String.
APassword Scope is const. Type is String.

Returns
Boolean

Description
AuthenticateUser is a overloaded method.

AuthenticateUser returns a Boolean value.

See Also
TIdCustomUserManager.AuthenticateUser

TIdCustomUserManager.AuthenticateUser Method (String, String, TIdUserHandle)


Pascal
function AuthenticateUser(
const AUsername: String;
const APassword: String;
var VUserHandle: TIdUserHandle
): TIdUserAccess; overload;
Parameters
Parameters Description
AUsername Scope is const. Type is String.
APassword Scope is const. Type is String.
VUserHandle Scope is var. Type is TIdUserHandle ( 3097).

Returns
TIdUserAccess ( 3097)

Description
AuthenticateUser is a overloaded method.

AuthenticateUser returns a TIdUserAccess ( 3097) value.

See Also
TIdCustomUserManager.AuthenticateUser

TIdCustomUserManager.ChallengeUser Method
Pascal
function ChallengeUser(
var VIsSafe: Boolean;
const AUserName: String

484 Internet Direct (Indy) Version 10.1.5


Classes TIdCustomUserManager Class

): String; virtual;
Parameters
Parameters Description
VIsSafe Scope is var. Type is Boolean.
AUserName Scope is const. Type is String.

Returns
String

Description
ChallengeUser is a virtual method.

ChallengeUser returns a String value.

TIdCustomUserManager.IsRegisteredUser Method
Pascal
class function IsRegisteredUser(
AUserAccess: TIdUserAccess
): Boolean;
Parameters
Parameters Description
AUserAccess Type is TIdUserAccess ( 3097).

Returns
Boolean

Description
IsRegisteredUser is a class method.

IsRegisteredUser returns a Boolean value.

TIdCustomUserManager.LogoffUser Method
Pascal
procedure LogoffUser(
AUserHandle: TIdUserHandle
); virtual;
Parameters
Parameters Description
AUserHandle Type is TIdUserHandle ( 3097).

Description
LogoffUser is a virtual method.

TIdCustomUserManager.UserDisconnected Method
Pascal
procedure UserDisconnected(
const AUser: String
); virtual;
Parameters
Parameters Description
AUser Scope is const. Type is String.

Internet Direct (Indy) Version 10.1.5 485


TIdDataChannel Class Classes

Description
UserDisconnected is a virtual method.

TIdDataChannel Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
TIdDataChannel = class(TIdBaseObject);
Description
TIdDataChannel is a TIdBaseObject ( 3005) descendant.

See Also
TIdBaseObject ( 3005)

TIdDataChannel Members
The following tables list the members exposed by TIdDataChannel.

Properties
Property Description
Data ( 488)
ErrorReply ( 488)
OKReply ( 488)
PeerIP ( 489)
PeerPort ( 489)
Server ( 489)
Stopped ( 489)

Methods
Method Description
Create ( 487)
Destroy ( 487)
InitOperation ( 487)
SetPortParameters ( 487)

Legend
Constructor
virtual
Property
read only

TIdDataChannel Methods
The Methods of the TIdDataChannel class are listed here.

486 Internet Direct (Indy) Version 10.1.5


Classes TIdDataChannel Class

Methods
Method Description
Create ( 487)
Destroy ( 487)
InitOperation ( 487)
SetPortParameters ( 487)

Legend
Constructor
virtual

TIdDataChannel.Create Constructor
Pascal
constructor Create(
APASV: Boolean;
AControlContext: TIdFTPServerContext;
const ARequirePASVFromSameIP: Boolean;
AServer: TIdFTPServer
); reintroduce;
Parameters
Parameters Description
APASV Type is Boolean.
AControlContext Type is TIdFTPServerContext ( 970).
ARequirePASVFromSameIP Scope is const. Type is Boolean.
AServer Type is TIdFTPServer ( 956).

Description
Create is a reintroduced constructor for the object instance.

TIdDataChannel.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDataChannel.InitOperation Method
Pascal
procedure InitOperation(
const AConnectMode: Boolean = False
);
Parameters
Parameters Description
AConnectMode Scope is const. Type is Boolean. Default value is False.

Description
InitOperation is a method.

TIdDataChannel.SetPortParameters Method
Pascal
procedure SetPortParameters(

Internet Direct (Indy) Version 10.1.5 487


TIdDataChannel Class Classes

const AIP: string;


const APort: Integer;
const AIPVersion: TIdIPVersion
);
Parameters
Parameters Description
AIP Scope is const. Type is string.
APort Scope is const. Type is Integer.
AIPVersion Scope is const. Type is TIdIPVersion ( 2962).

Description
SetPortParameters is a method.

TIdDataChannel Properties
The Properties of the TIdDataChannel class are listed here.

Properties
Property Description
Data ( 488)
ErrorReply ( 488)
OKReply ( 488)
PeerIP ( 489)
PeerPort ( 489)
Server ( 489)
Stopped ( 489)

Legend
Property
read only

TIdDataChannel.Data Property
Pascal
property Data: TIdBaseObject;
Description
Data is a Public TIdBaseObject ( 3005) property. Write access for the property is implemented using FData.

TIdDataChannel.ErrorReply Property
Pascal
property ErrorReply: TIdReplyRFC;
Description
ErrorReply is a Public TIdReplyRFC ( 1851) property. Write access for the property is implemented using SetErrorReply.

TIdDataChannel.OKReply Property
Pascal
property OKReply: TIdReplyRFC;
Description
OKReply is a Public TIdReplyRFC ( 1851) property. Write access for the property is implemented using SetOKReply.

488 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

TIdDataChannel.PeerIP Property
Pascal
property PeerIP: String;
Description
PeerIP is a Public read-only String property.

TIdDataChannel.PeerPort Property
Pascal
property PeerPort: Integer;
Description
PeerPort is a Public read-only Integer property.

TIdDataChannel.Server Property
Pascal
property Server: TIdFTPServer;
Description
Server is a Public read-only TIdFTPServer ( 956) property.

TIdDataChannel.Stopped Property
Pascal
property Stopped: Boolean;
Description
Stopped is a Public Boolean property. Write access for the property is implemented using FStopped.

TIdDateTimeStamp Class
Handles Date and Time values in various formats.

File
IdDateTimeStamp ( 4610)

Hierarchy

Pascal
TIdDateTimeStamp = class(TIdBaseComponent);
Description
TIdDateTimeStamp is a TIdBaseComponent ( 266) descendant that processes date and time values using the various formats
required by some Internet Protocols.

TIdDateTimeStamp methods performs operations based on units of Milliseconds, Seconds, Days, and Years with smaller time units
affecting larger time units where necessary. All other common time units are converted to these base units before processing.

Internet Direct (Indy) Version 10.1.5 489


TIdDateTimeStamp Class Classes

See Also
TIdBaseComponent ( 266) IndySupport ( 15)

TIdDateTimeStamp Members
The following tables list the members exposed by TIdDateTimeStamp.

Properties
Property Description
AsISO8601Calendar ( 509) The Indy timestamp as an ISO 8601 Calendar Date string.
AsISO8601Ordinal ( 509) The Indy timestamp as an ISO 8601 Ordinal Date string.
AsISO8601Week ( 509) The Indy timestamp as an ISO 8601 Week Date string.
AsRFC822 ( 509) The Indy timestamp as an RFC 822 Date string,
AsTDateTime ( 509) The Indy timestamp as a native Delphi TDateTime value.
AsTimeOfDay ( 510) The Time of Day ( 511) in 24-hour format.
AsTTimeStamp ( 510) The Indy timestamp as a TTimeStamp value.
BeatOfDay ( 510) The Indy timestamp as a Swatch "Beat" time value.
Day ( 511) The Day of Year ( 516) for the timestamp.
DayOfMonth ( 511) Day ( 511) of Month for the Indy timestamp.
DayOfWeek ( 511) The Day ( 511) of Week for the Indy timestamp.
DayOfWeekName ( 511) The Day ( 511) of Week Name for the Indy timestamp.
DayOfWeekShortName ( 512) The Short ( 2995) Day ( 511) of Week Name for the Indy timestamp.
DaysInYear ( 512) Number of days in the year for the Indy timestamp.
HourOf12Day ( 512) Indicates the numeric hour of day in 12-hour format.
HourOf24Day ( 512) Indicates the numeric hour of day in 24-hour format.
IsLeapYear ( 513) Indicates that the year for the Indy timestamp is a Leap year.
IsMorning ( 513) Indicates that the time portion of the Indy timestamp is before noon.
Millisecond ( 513) Number of milliseconds elapsed for the current second of the Indy timestamp.
MinuteOfDay ( 513) Number of minutes elapsed in the day of the Indy timestamp.
MinuteOfHour ( 514) Number of minutes elapsed in the hour of the Indy timestamp.
MonthName ( 514) The long name for the month in the Indy timestamp.
MonthOfYear ( 514) Numeric month number for the Indy timestamp.
MonthShortName ( 514) The short name for the month in the Indy timestamp.
Second ( 515) Second of the day.
SecondOfMinute ( 515) Numeric seconds elapsed in the current minute of the Indy timestamp.
SecondsInYear ( 515) Total number of seconds in the year for the Indy timestamp.
TimeZone ( 515) Identifies the Time Zone for the Indy timestamp.
TimeZoneAsString ( 515)
TimeZoneHour ( 516) Number of hours offset from GMT.
TimeZoneMinutes ( 516) Number of minutes as an offset from GMT.
Version ( 269) Identifies the version number for the Indy component suite.
WeekOfYear ( 516) Identifies the week number for the Indy timestamp.
Year ( 516) Numeric year for the Indy timestamp.

Methods
Method Description
AddDays ( 493) Adds a number of days to the timestamp.
AddHours ( 493) Adds a number of hours to the timestamp.
AddMilliseconds ( 493) Adds a number of milliseconds to the timestamp.
AddMinutes ( 494) Adds a number of minutes to the timestamp.
AddMonths ( 494) Adds a number of months to the timestamp.
AddSeconds ( 495) Adds a number of seconds to the timestamp.
AddTDateTime ( 495) Adds a native Delphi date/time to the timestamp.
AddTIdDateTimeStamp ( 495)
AddTTimeStamp ( 496)
AddWeeks ( 496)
AddYears ( 496)
Create ( 267) Constructor for the object instance.

490 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Destroy ( 496) Frees the object instance.


GetAsISO8601Calendar ( 496) Provides access to the Indy timestamp in ISO 8601 Calendar format.
GetAsISO8601Ordinal ( 497) Provides access to the Indy timestamp in ISO 8601 Ordinal format.
GetAsISO8601Week ( 497) Provides access to the Indy timestamp in ISO 8601 Week format.
GetAsRFC822 ( 497) Provides access to the Indy timestamp in RFC 822 format.
GetAsTDateTime ( 497) Provides access to the Indy timestamp as a TDateTime value.
GetAsTimeOfDay ( 498) Provides access to the Indy timestamp as a 24-hour time string.
GetAsTTimeStamp ( 498) Provides access to the Indy timestamp as a TTimeStamp value.
GetBeatOfDay ( 498) Provides access to the Indy timestamp as a Swatch "Beat Time" value.
GetDayOfMonth ( 498) Provides access to the Day ( 511) of Month for the Indy timestamp.
GetDayOfWeek ( 499) Provides access to the Day ( 511) of Week for the Indy timestamp.
GetDayOfWeekName ( 499) Provides access to the long Day ( 511) of Week name for the Indy timestamp.
GetDayOfWeekShortName ( 499) Provides access to the short Day ( 511) of Week name for the Indy timestamp.
GetDaysInYear ( 499) Provides access to the number of days in the year of the Indy timestamp.
GetHourOf12Day ( 500) Provides access to the AM/PM hour of Day ( 511) for the Indy timestamp.
GetHourOf24Day ( 500) Provides access to the Military hour of Day ( 511) for the timestamp value.
GetIsMorning ( 500) Indicates that the timestamp value contains a time before noon.
GetMinuteOfDay ( 500) Provides access to the minute of the Day ( 511) for the timestamp value.
GetMinuteOfHour ( 501) Provides access to the minute of the hour for the timestamp value.
GetMonthName ( 501) Provides access to the long month name for the timestamp value.
GetMonthOfYear ( 501) Provides access to the numeric month of year for the Indy timestamp.
GetMonthShortName ( 501) Provides access to the short month name for the Indy timestamp.
GetSecondOfMinute ( 501) Provides access to the seconds of the current minute for the Indy timestamp.
GetSecondsInYear ( 502) Indicates the total number of seconds in the Indy timestamp year.
GetTimeZoneAsString ( 502) Offset of the local timezone from GMT.
GetTimeZoneHour ( 502) Number of hours between the local timezone and GMT time.
GetTimeZoneMinutes ( 502) Number of minutes between the local timezone and GMT time.
GetVersion ( 269) Version ( 269) number for Indy component suite.
GetWeekOfYear ( 503) Provides access to the week number for the Indy timestamp year.
SetDay ( 503)
SetFromDOSDateTime ( 503)
SetFromISO8601 ( 503)
SetFromRFC822 ( 504)
SetFromTDateTime ( 504)
SetFromTTimeStamp ( 504)
SetMillisecond ( 504)
SetSecond ( 504)
SetTimeZone ( 505)
SetYear ( 505)
SubtractDays ( 505)
SubtractHours ( 505)
SubtractMilliseconds ( 505)
SubtractMinutes ( 506)
SubtractMonths ( 506)
SubtractSeconds ( 506)
SubtractTIdDateTimeStamp ( 506) Subtracts a native date/time value from an Indy timestamp.
SubtractTTimeStamp ( 506)
SubtractWeeks ( 507)
SubtractYears ( 507)
CType ( 267)
Create ( 1274)
Zero ( 507) Resets the date and time values.
ZeroDate ( 507) Resets the date value to its default representation.
ZeroTime ( 508) Resets the time value to its default representation.

Legend
Method
virtual
Property
read only

Internet Direct (Indy) Version 10.1.5 491


TIdDateTimeStamp Class Classes

TIdDateTimeStamp Methods
The Methods of the TIdDateTimeStamp class are listed here.

Methods
Method Description
AddDays ( 493) Adds a number of days to the timestamp.
AddHours ( 493) Adds a number of hours to the timestamp.
AddMilliseconds ( 493) Adds a number of milliseconds to the timestamp.
AddMinutes ( 494) Adds a number of minutes to the timestamp.
AddMonths ( 494) Adds a number of months to the timestamp.
AddSeconds ( 495) Adds a number of seconds to the timestamp.
AddTDateTime ( 495) Adds a native Delphi date/time to the timestamp.
AddTIdDateTimeStamp ( 495)
AddTTimeStamp ( 496)
AddWeeks ( 496)
AddYears ( 496)
Destroy ( 496) Frees the object instance.
GetAsISO8601Calendar ( 496) Provides access to the Indy timestamp in ISO 8601 Calendar format.
GetAsISO8601Ordinal ( 497) Provides access to the Indy timestamp in ISO 8601 Ordinal format.
GetAsISO8601Week ( 497) Provides access to the Indy timestamp in ISO 8601 Week format.
GetAsRFC822 ( 497) Provides access to the Indy timestamp in RFC 822 format.
GetAsTDateTime ( 497) Provides access to the Indy timestamp as a TDateTime value.
GetAsTimeOfDay ( 498) Provides access to the Indy timestamp as a 24-hour time string.
GetAsTTimeStamp ( 498) Provides access to the Indy timestamp as a TTimeStamp value.
GetBeatOfDay ( 498) Provides access to the Indy timestamp as a Swatch "Beat Time" value.
GetDayOfMonth ( 498) Provides access to the Day ( 511) of Month for the Indy timestamp.
GetDayOfWeek ( 499) Provides access to the Day ( 511) of Week for the Indy timestamp.
GetDayOfWeekName ( 499) Provides access to the long Day ( 511) of Week name for the Indy timestamp.
GetDayOfWeekShortName ( 499) Provides access to the short Day ( 511) of Week name for the Indy timestamp.
GetDaysInYear ( 499) Provides access to the number of days in the year of the Indy timestamp.
GetHourOf12Day ( 500) Provides access to the AM/PM hour of Day ( 511) for the Indy timestamp.
GetHourOf24Day ( 500) Provides access to the Military hour of Day ( 511) for the timestamp value.
GetIsMorning ( 500) Indicates that the timestamp value contains a time before noon.
GetMinuteOfDay ( 500) Provides access to the minute of the Day ( 511) for the timestamp value.
GetMinuteOfHour ( 501) Provides access to the minute of the hour for the timestamp value.
GetMonthName ( 501) Provides access to the long month name for the timestamp value.
GetMonthOfYear ( 501) Provides access to the numeric month of year for the Indy timestamp.
GetMonthShortName ( 501) Provides access to the short month name for the Indy timestamp.
GetSecondOfMinute ( 501) Provides access to the seconds of the current minute for the Indy timestamp.
GetSecondsInYear ( 502) Indicates the total number of seconds in the Indy timestamp year.
GetTimeZoneAsString ( 502) Offset of the local timezone from GMT.
GetTimeZoneHour ( 502) Number of hours between the local timezone and GMT time.
GetTimeZoneMinutes ( 502) Number of minutes between the local timezone and GMT time.
GetWeekOfYear ( 503) Provides access to the week number for the Indy timestamp year.
SetDay ( 503)
SetFromDOSDateTime ( 503)
SetFromISO8601 ( 503)
SetFromRFC822 ( 504)
SetFromTDateTime ( 504)
SetFromTTimeStamp ( 504)
SetMillisecond ( 504)
SetSecond ( 504)
SetTimeZone ( 505)
SetYear ( 505)
SubtractDays ( 505)
SubtractHours ( 505)
SubtractMilliseconds ( 505)

492 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

SubtractMinutes ( 506)
SubtractMonths ( 506)
SubtractSeconds ( 506)
SubtractTIdDateTimeStamp ( 506) Subtracts a native date/time value from an Indy timestamp.
SubtractTTimeStamp ( 506)
SubtractWeeks ( 507)
SubtractYears ( 507)
Zero ( 507) Resets the date and time values.
ZeroDate ( 507) Resets the date value to its default representation.
ZeroTime ( 508) Resets the time value to its default representation.

Legend
Method
virtual

TIdDateTimeStamp.AddDays Method
Adds a number of days to the timestamp.

Pascal
procedure AddDays(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of days to be added.

Description
AddDays is a procedure that adds the number of days specified in ANumber to the current date and time value for the timestamp.
Year ( 516) will be adjusted accordingly.

TIdDateTimeStamp.AddHours Method
Adds a number of hours to the timestamp.

Pascal
procedure AddHours(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of hours to add.

Description
AddHours is a procedure that adds the number of hours in ANumber to the current date and time value for the timestamp. Second
( 515), Day ( 511) and Year ( 516) will be adjusted accordingly.

See Also
Second ( 515)

Day ( 511)

Year ( 516)

TIdDateTimeStamp.AddMilliseconds Method
Adds a number of milliseconds to the timestamp.

Internet Direct (Indy) Version 10.1.5 493


TIdDateTimeStamp Class Classes

Pascal
procedure AddMilliseconds(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of milliseconds to be added.

Description
AddMilliseconds is a procedure that adds the number of milliseconds to the date and time value in the timestamp. Second ( 515),
Day ( 511) and Year ( 516) will be adjusted accordingly.

See Also
Second ( 515)

Day ( 511)

Year ( 516)

TIdDateTimeStamp.AddMinutes Method
Adds a number of minutes to the timestamp.

Pascal
procedure AddMinutes(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of minutes to add.

Description
AddMinutes is a procedure that adds the number of minutes in ANumber to the date and time value in the timestamp. Second (
515), Day ( 511) and Year ( 516) will be adjusted accordingly.

See Also
Second ( 515)

Day ( 511)

Year ( 516)

TIdDateTimeStamp.AddMonths Method
Adds a number of months to the timestamp.

Pascal
procedure AddMonths(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of months to be added.

Description
AddMonths is a procedure that adds the number of months in ANumber to the date and time value in the timestamp. Day ( 511)
and Year ( 516) will be adjusted accordingly.

494 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

See Also
Day ( 511)

Year ( 516)

TIdDateTimeStamp.AddSeconds Method
Adds a number of seconds to the timestamp.

Pascal
procedure AddSeconds(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Number of seconds to be added.

Description
AddSeconds is a procedure that adds the number of seconds in ANumber to the date and time value in the timestamp. Second (
515), Day ( 511) and Year ( 516) will be adjusted accordingly.

See Also
Second ( 515)

Day ( 511)

Year ( 516)

TIdDateTimeStamp.AddTDateTime Method
Adds a native Delphi date/time to the timestamp.

Pascal
procedure AddTDateTime(
ADateTime: TIdDateTime
);
Parameters
Parameters Description
ADateTime Number of days, hours, and seconds to be added in native Delphi format.

Description
AddTDateTime is a procedure that adds the date/time pair specified in ADateTime to the timestamp. ADateTime is converted to a
TTimeStamp and it's component parts are added. Milliseconds, Seconds, Day ( 511) and Year ( 516) are adjusted accordingly.

TIdDateTimeStamp.AddTIdDateTimeStamp Method
Pascal
procedure AddTIdDateTimeStamp(
AIdDateTime: TIdDateTimeStamp
);
Parameters
Parameters Description
AIdDateTime Type is TIdDateTimeStamp ( 489).

Internet Direct (Indy) Version 10.1.5 495


TIdDateTimeStamp Class Classes

TIdDateTimeStamp.AddTTimeStamp Method
Pascal
procedure AddTTimeStamp(
ATimeStamp: TIdDateTimeStamp
);
Parameters
Parameters Description
ATimeStamp Type is TIdDateTimeStamp ( 489).

Description
TIdDateTimeStamp.AddTTimeStamp Method

TIdDateTimeStamp.AddWeeks Method
Pascal
procedure AddWeeks(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.AddYears Method
Pascal
procedure AddYears(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy calls the inherited Destroy method to free the object instance.

See Also
Create ( 267)

TIdDateTimeStamp.GetAsISO8601Calendar Method
Provides access to the Indy timestamp in ISO 8601 Calendar format.

Pascal
function GetAsISO8601Calendar: String;
Description
GetAsISO8601Calendar is a String function that acts as the read access specifier for the AsISO8601Calendar ( 509) property.

496 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

See Also
AsISO8601Calendar ( 509)

AsISO8601Week ( 509)

AsISO8601Ordinal ( 509)

TIdDateTimeStamp.GetAsISO8601Ordinal Method
Provides access to the Indy timestamp in ISO 8601 Ordinal format.

Pascal
function GetAsISO8601Ordinal: String;
Description
GetAsISO8601Ordinal is a String function that acts as the read access specifier for the AsISO8601Ordinal ( 509) property.

See Also
AsISO8601Calendar ( 509)

AsISO8601Ordinal ( 509)

AsISO8601Week ( 509)

TIdDateTimeStamp.GetAsISO8601Week Method
Provides access to the Indy timestamp in ISO 8601 Week format.

Pascal
function GetAsISO8601Week: String;
Description
GetAsISO8601Week is a String function that acts as the read access specifier for the AsISO8601Week ( 509) property.

See Also
AsISO8601Week ( 509)

AsISO8601Calendar ( 509)

AsISO8601Ordinal ( 509)

TIdDateTimeStamp.GetAsRFC822 Method
Provides access to the Indy timestamp in RFC 822 format.

Pascal
function GetAsRFC822: String;
Description
GetAsRFC822 is a String function that acts as the read access specifier for the AsRFC822 ( 509) property. The time value is
returned in RFC 822-compliant format. For example:

See Also
AsRFC822 ( 509)

TIdDateTimeStamp.GetAsTDateTime Method
Provides access to the Indy timestamp as a TDateTime value.

Internet Direct (Indy) Version 10.1.5 497


TIdDateTimeStamp Class Classes

Pascal
function GetAsTDateTime: TIdDateTime;
Description
GetAsTDateTime is a TDateTime function that acts as the read access specifier for the AsTDateTime ( 509) property.

See Also
AsTDateTime ( 509)

TIdDateTimeStamp.GetAsTimeOfDay Method
Provides access to the Indy timestamp as a 24-hour time string.

Pascal
function GetAsTimeOfDay: String;
Description
GetAsTimeOFDay is a String function that acts as the read access specifier for the AsTimeOfDay ( 510) property.

See Also
AsTimeOfDay ( 510)

TIdDateTimeStamp.GetAsTTimeStamp Method
Provides access to the Indy timestamp as a TTimeStamp value.

Pascal
function GetAsTTimeStamp: TIdDateTimeStamp;
Description
GetAsTTimeStamp is a TTimeStamp function that acts as the read access specifier for the AsTTimeStamp ( 510) property.
GetAsTTimeStamp adjusts the date in the TTimestamp return value to account for the presence of Leap Year ( 516) and Leap
Day ( 511). GetAsTTimeStamp also adjusts the time in the TTimestamp return value to set both the number of seconds and
milliseconds for the time value.

See Also
AsTTimeStamp ( 510)

AsTDateTime ( 509)

TIdDateTimeStamp.GetBeatOfDay Method
Provides access to the Indy timestamp as a Swatch "Beat Time" value.

Pascal
function GetBeatOfDay: Integer;
Description
GetBeatOFDay is an Integer function that acts as the read access specifier for the BeatOfDay ( 510) property.

See Also
BeatOfDay ( 510)

TIdDateTimeStamp.GetDayOfMonth Method
Provides access to the Day ( 511) of Month for the Indy timestamp.

498 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Pascal
function GetDayOfMonth: Integer;
Description
GetDayOfMonth is an Integer function that acts as the read access specifier for the DayOfMonth ( 511) property.

See Also
DayOfMonth ( 511)

TIdDateTimeStamp.GetDayOfWeek Method
Provides access to the Day ( 511) of Week for the Indy timestamp.

Pascal
function GetDayOfWeek: Integer;
Description
GetDayOfWeek is an Integer function that acts as the read access specifier for the DayOfWeek ( 511) property.

See Also
DayOfWeek ( 511)

TIdDateTimeStamp.GetDayOfWeekName Method
Provides access to the long Day ( 511) of Week name for the Indy timestamp.

Pascal
function GetDayOfWeekName: String;
Description
GetDayOfWeekName is a String function that acts as the read access specifier for the DayOfWeekName ( 511) property.

See Also
DayOfWeekName ( 511)

TIdDateTimeStamp.GetDayOfWeekShortName Method
Provides access to the short Day ( 511) of Week name for the Indy timestamp.

Pascal
function GetDayOfWeekShortName: String;
Description
GetDayOfWeekShortName is a String function that acts as the read access specifier for the DayOfWeekShortName ( 512)
property.

See Also
DayOfWeekShortName ( 512)

TIdDateTimeStamp.GetDaysInYear Method
Provides access to the number of days in the year of the Indy timestamp.

Pascal
function GetDaysInYear: Integer;

Internet Direct (Indy) Version 10.1.5 499


TIdDateTimeStamp Class Classes

Description
GetDaysInYear is an Integer function to acts as the read access specifier for the DaysInYear ( 512) property.

See Also
DaysInYear ( 512)

TIdDateTimeStamp.GetHourOf12Day Method
Provides access to the AM/PM hour of Day ( 511) for the Indy timestamp.

Pascal
function GetHourOf12Day: Integer;
Description
GetHourOf12Day is an Integer function that acts as the read access specifier for the HourOf12Day ( 512) property.

See Also
HourOf12Day ( 512)

TIdDateTimeStamp.GetHourOf24Day Method
Provides access to the Military hour of Day ( 511) for the timestamp value.

Pascal
function GetHourOf24Day: Integer;
Description
GetHourOf24Day is an Integer function that acts as the read access specifier for the HourOf24Day ( 512) property.

See Also
HourOf24Day ( 512)

TIdDateTimeStamp.GetIsMorning Method
Indicates that the timestamp value contains a time before noon.

Pascal
function GetIsMorning: Boolean;
Description
GetIsMorning is a Boolean function that acts as the read access specifier for the IsMorning ( 513) property.

See Also
IsMorning ( 513)

TIdDateTimeStamp.GetMinuteOfDay Method
Provides access to the minute of the Day ( 511) for the timestamp value.

Pascal
function GetMinuteOfDay: Integer;
Description
GetMinuteOfDay is an Integer function that acts as the read access specifier for the MinuteOfDay ( 513) property.

See Also
MinuteOfDay ( 513)

500 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

TIdDateTimeStamp.GetMinuteOfHour Method
Provides access to the minute of the hour for the timestamp value.

Pascal
function GetMinuteOfHour: Integer;
Description
GetMinuteOfHour is an Integer function that acts as the read access specifier for the MinuteOfHour ( 514) property.

See Also
MinuteOfHour ( 514)

TIdDateTimeStamp.GetMonthName Method
Provides access to the long month name for the timestamp value.

Pascal
function GetMonthName: String;
Description
GetMonthName is a String function that acts as the read access specifier for the MonthName ( 514) property.

See Also
MonthName ( 514)

TIdDateTimeStamp.GetMonthOfYear Method
Provides access to the numeric month of year for the Indy timestamp.

Pascal
function GetMonthOfYear: Integer;
Description
GetMonthOfYear is an Integer function that acts as the read access specifier for the MonthOfYear ( 514) property.

See Also
MonthOfYear ( 514)

TIdDateTimeStamp.GetMonthShortName Method
Provides access to the short month name for the Indy timestamp.

Pascal
function GetMonthShortName: String;
Description
GetMonthShortName is a String function that acts as the read access specifier for the MonthShortName ( 514) property.

See Also
MonthShortName ( 514)

TIdDateTimeStamp.GetSecondOfMinute Method
Provides access to the seconds of the current minute for the Indy timestamp.

Internet Direct (Indy) Version 10.1.5 501


TIdDateTimeStamp Class Classes

Pascal
function GetSecondOfMinute: Integer;
Description
GetSecondOfMinute is an Integer function that acts as the read access specifier for the SecondOfMinute ( 515) property.

See Also
SecondOfMinute ( 515)

TIdDateTimeStamp.GetSecondsInYear Method
Indicates the total number of seconds in the Indy timestamp year.

Pascal
function GetSecondsInYear: Integer;
Description
GetSecondsInYear is an Integer function that acts as the read access specifier for the SecondsInYear ( 515) property.

See Also
SecondsInYear ( 515)

TIdDateTimeStamp.GetTimeZoneAsString Method
Offset of the local timezone from GMT.

Pascal
function GetTimeZoneAsString: String;
Returns
String - Offest hours and minutes from GMT.

Description
GetTimeZoneAsString is a String function that returns a value that indicates the offset of the local time zone from GMT (Greenwich
Mean Time). THe value is expressed as a positive or negative number of hours and minutes from UTC. For example:

GetTimeZoneAsString calls GetTimeZoneHour ( 502) and GetTimeZoneMinutes ( 502) to calculate the offset from UTC.
GetTimeZoneAsString is used as the read access specifier for the TimeZoneAsString ( 515) property.

TIdDateTimeStamp.GetTimeZoneHour Method
Number of hours between the local timezone and GMT time.

Pascal
function GetTimeZoneHour: Integer;
Returns
Integer - Number of hours between the local timezone and GMT time.

Description
GetTimeZoneHour is an Integer function that returns the number of hours between the local timezone and GMT time.
GetTimeZoneHour is the read access specifier for the TimeZoneHour ( 516) property, and is calculated using TimeZone ( 515).

TIdDateTimeStamp.GetTimeZoneMinutes Method
Number of minutes between the local timezone and GMT time.

502 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Pascal
function GetTimeZoneMinutes: Integer;
Returns
Integer - Number of minutes as an offset between the local timezone and GMT time.

Description
GetTimeZoneMinutes is an Integer function that returns the number of minutes as an offset between the local timezone and GMT
time. GetTimeZoneMinutes is the read access specifier for the TimeZoneMinutes ( 516) property, and is calculated using the
value in TimeZone ( 515).

TIdDateTimeStamp.GetWeekOfYear Method
Provides access to the week number for the Indy timestamp year.

Pascal
function GetWeekOfYear: Integer;
Description
GetWeekOfYear is an Integer function that acts as the read access specifier for the WeekOfYear ( 516) property.

See Also
WeekOfYear ( 516)

TIdDateTimeStamp.SetDay Method
Pascal
procedure SetDay(
ANumber: Integer
);
Parameters
Parameters Description
ANumber Type is Integer.

TIdDateTimeStamp.SetFromDOSDateTime Method
Pascal
procedure SetFromDOSDateTime(
ADate: Word;
ATime: Word
);
Parameters
Parameters Description
ADate Type is Word.
ATime Type is Word.

TIdDateTimeStamp.SetFromISO8601 Method
Pascal
procedure SetFromISO8601(
AString: String
);
Parameters
Parameters Description
AString Type is String.

Internet Direct (Indy) Version 10.1.5 503


TIdDateTimeStamp Class Classes

TIdDateTimeStamp.SetFromRFC822 Method
Pascal
procedure SetFromRFC822(
AString: String
);
Parameters
Parameters Description
AString Type is String.

TIdDateTimeStamp.SetFromTDateTime Method
Pascal
procedure SetFromTDateTime(
ADateTime: TIdDateTime
);
Parameters
Parameters Description
ADateTime Type is TIdDateTime ( 4733).

Description
TIdDateTimeStamp.SetFromTDateTime Method

TIdDateTimeStamp.SetFromTTimeStamp Method
Pascal
procedure SetFromTTimeStamp(
ATimeStamp: TIdDateTimeStamp
);
Parameters
Parameters Description
ATimeStamp Type is TIdDateTimeStamp ( 489).

Description
TIdDateTimeStamp.SetFromTTimeStamp Method

TIdDateTimeStamp.SetMillisecond Method
Pascal
procedure SetMillisecond(
ANumber: Integer
);
Parameters
Parameters Description
ANumber Type is Integer.

TIdDateTimeStamp.SetSecond Method
Pascal
procedure SetSecond(
ANumber: Integer
);

504 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Parameters
Parameters Description
ANumber Type is Integer.

TIdDateTimeStamp.SetTimeZone Method
Pascal
procedure SetTimeZone(
const Value: Integer
);
Parameters
Parameters Description
Value Scope is const. Type is Integer.

TIdDateTimeStamp.SetYear Method
Pascal
procedure SetYear(
ANumber: Integer
);
Parameters
Parameters Description
ANumber Type is Integer.

TIdDateTimeStamp.SubtractDays Method
Pascal
procedure SubtractDays(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractHours Method
Pascal
procedure SubtractHours(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractMilliseconds Method
Pascal
procedure SubtractMilliseconds(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

Internet Direct (Indy) Version 10.1.5 505


TIdDateTimeStamp Class Classes

TIdDateTimeStamp.SubtractMinutes Method
Pascal
procedure SubtractMinutes(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractMonths Method
Pascal
procedure SubtractMonths(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractSeconds Method
Pascal
procedure SubtractSeconds(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractTIdDateTimeStamp Method
Subtracts a native date/time value from an Indy timestamp.

Pascal
procedure SubtractTIdDateTimeStamp(
AIdDateTime: TIdDateTimeStamp
);
Parameters
Parameters Description
AIdDateTime The date and time value to be subtracted from the Indy timestamp.

Description
SubtractTDateTime is a procedure used to subtract the TIdDateTime ( 4733) value specified in ADateTime from the Indy
timestamp. SubtractTDateTime will adjust Milliseconds, Seconds, Day ( 511), and Year ( 516) accordingly. SubtractTDateTime
calls SubtractTTimeStamp ( 506) to implement its operation.

TIdDateTimeStamp.SubtractTTimeStamp Method
Pascal
procedure SubtractTTimeStamp(
ATimeStamp: TIdDateTimeStamp
);

506 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Parameters
Parameters Description
ATimeStamp Type is TIdDateTimeStamp ( 489).

Description
TIdDateTimeStamp.SubtractTTimeStamp Method

TIdDateTimeStamp.SubtractWeeks Method
Pascal
procedure SubtractWeeks(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.SubtractYears Method
Pascal
procedure SubtractYears(
ANumber: Cardinal
);
Parameters
Parameters Description
ANumber Type is Cardinal.

TIdDateTimeStamp.Zero Method
Resets the date and time values.

Pascal
procedure Zero;
Description
Zero is a procedure that resets the date, time, and timezone values in TIdDateTimeStamp ( 489) to their default values. Zero calls
ZeroDate ( 507) to reset the date component of the date time value. Zero calls ZeroTime ( 508) to reset the time component of
the date time value. Zero also sets TimeZone ( 515) to 0 prior to exiting from the method.

See Also
ZeroDate ( 507) ZeroTime ( 508) TimeZone ( 515)

TIdDateTimeStamp.ZeroDate Method
Resets the date value to its default representation.

Pascal
procedure ZeroDate;
Description
ZeroDate is a procedure that resets the value of the date component in TIdDateTimeStamp ( 489). ZeroDate calls SetYear (
505) to set the year to 1, and calls SetDay ( 503) to set the day number to 1.

See Also
SetYear ( 505)

Internet Direct (Indy) Version 10.1.5 507


TIdDateTimeStamp Class Classes

SetDay ( 503)

TIdDateTimeStamp.ZeroTime Method
Resets the time value to its default representation.

Pascal
procedure ZeroTime;
Description
ZeroTime is a procedure that resets the value of the time component in TIdDateTimeStamp ( 489). ZeroTime calls SetSecond (
504) and SetMillisecond ( 504) to set the time to 00:00:00.000.

See Also
SetSecond ( 504)

SetMillisecond ( 504)

TIdDateTimeStamp Properties
The Properties of the TIdDateTimeStamp class are listed here.

Properties
Property Description
AsISO8601Calendar ( 509) The Indy timestamp as an ISO 8601 Calendar Date string.
AsISO8601Ordinal ( 509) The Indy timestamp as an ISO 8601 Ordinal Date string.
AsISO8601Week ( 509) The Indy timestamp as an ISO 8601 Week Date string.
AsRFC822 ( 509) The Indy timestamp as an RFC 822 Date string,
AsTDateTime ( 509) The Indy timestamp as a native Delphi TDateTime value.
AsTimeOfDay ( 510) The Time of Day ( 511) in 24-hour format.
AsTTimeStamp ( 510) The Indy timestamp as a TTimeStamp value.
BeatOfDay ( 510) The Indy timestamp as a Swatch "Beat" time value.
Day ( 511) The Day of Year ( 516) for the timestamp.
DayOfMonth ( 511) Day ( 511) of Month for the Indy timestamp.
DayOfWeek ( 511) The Day ( 511) of Week for the Indy timestamp.
DayOfWeekName ( 511) The Day ( 511) of Week Name for the Indy timestamp.
DayOfWeekShortName ( 512) The Short ( 2995) Day ( 511) of Week Name for the Indy timestamp.
DaysInYear ( 512) Number of days in the year for the Indy timestamp.
HourOf12Day ( 512) Indicates the numeric hour of day in 12-hour format.
HourOf24Day ( 512) Indicates the numeric hour of day in 24-hour format.
IsLeapYear ( 513) Indicates that the year for the Indy timestamp is a Leap year.
IsMorning ( 513) Indicates that the time portion of the Indy timestamp is before noon.
Millisecond ( 513) Number of milliseconds elapsed for the current second of the Indy timestamp.
MinuteOfDay ( 513) Number of minutes elapsed in the day of the Indy timestamp.
MinuteOfHour ( 514) Number of minutes elapsed in the hour of the Indy timestamp.
MonthName ( 514) The long name for the month in the Indy timestamp.
MonthOfYear ( 514) Numeric month number for the Indy timestamp.
MonthShortName ( 514) The short name for the month in the Indy timestamp.
Second ( 515) Second of the day.
SecondOfMinute ( 515) Numeric seconds elapsed in the current minute of the Indy timestamp.
SecondsInYear ( 515) Total number of seconds in the year for the Indy timestamp.
TimeZone ( 515) Identifies the Time Zone for the Indy timestamp.
TimeZoneAsString ( 515)
TimeZoneHour ( 516) Number of hours offset from GMT.
TimeZoneMinutes ( 516) Number of minutes as an offset from GMT.
WeekOfYear ( 516) Identifies the week number for the Indy timestamp.
Year ( 516) Numeric year for the Indy timestamp.

508 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

Legend
Property
read only

TIdDateTimeStamp.AsISO8601Calendar Property
The Indy timestamp as an ISO 8601 Calendar Date string.

Pascal
property AsISO8601Calendar: String;
Description
AsISO8601Calendar is a read-only String property that returns the date/time in ISO 8601 Calendar Date format. For example:

TIdDateTimeStamp.AsISO8601Ordinal Property
The Indy timestamp as an ISO 8601 Ordinal Date string.

Pascal
property AsISO8601Ordinal: String;
Description
AsISO8601Ordinal is a read-only String property that returns the date/time as an ISO 8601 Ordinal Date string. For example:

TIdDateTimeStamp.AsISO8601Week Property
The Indy timestamp as an ISO 8601 Week Date string.

Pascal
property AsISO8601Week: String;
Description
AsISO8601Week is a read-only String property that returns the date and time value for the timestanmp as an ISO 8601 Week Date
string. For

See Also
AsISO8601Calendar ( 509)

AsISO8601Ordinal ( 509)

TIdDateTimeStamp.AsRFC822 Property
The Indy timestamp as an RFC 822 Date string,

Pascal
property AsRFC822: String;
Description
AsRFC822 is a read-only String property that returns the date/time in the date format specified in RFC 822. For example:

TIdDateTimeStamp.AsTDateTime Property
The Indy timestamp as a native Delphi TDateTime value.

Pascal
property AsTDateTime: TIdDateTime;

Internet Direct (Indy) Version 10.1.5 509


TIdDateTimeStamp Class Classes

Description
AsTDateTime is a read-only TDateTime property that returns the timestamp as a native Delphi TDateTime value.

See Also
AsTTimeStamp ( 510)

TIdDateTimeStamp.AsTimeOfDay Property
The Time of Day ( 511) in 24-hour format.

Pascal
property AsTimeOfDay: String;
Description
AsTimeOFDay is a read-only String property that returns the time portion of the timestamp in the 24-hour format HH:MM:SS.

See Also
AsTTimeStamp ( 510)

AsTimeOfDay

TIdDateTimeStamp.AsTTimeStamp Property
The Indy timestamp as a TTimeStamp value.

Pascal
property AsTTimeStamp: TIdDateTimeStamp;
Description
AsTTimeStamp is a read-only TTimestamp property that returns the date and time value for the timestamp as a TTimeStamp value.
AsTTimeStamp calculates the date value using Year ( 516) and Day ( 511), and adjusts the TTimestamp to account for Leap
years. AsTTimeStamp calculates the time value using Second ( 515) and Millisecond ( 513).

See Also
AsTDateTime ( 509)

Year ( 516)

Day ( 511)

Second ( 515)

Millisecond ( 513)

TIdDateTimeStamp.BeatOfDay Property
The Indy timestamp as a Swatch "Beat" time value.

Pascal
property BeatOfDay: Integer;
Description
BeatOFDay is a read-only Integer property that returns the Indy timestamp as a Beat time value. Beat time (often called 'Internet
Time') is defined by Swatch at:

http://www.swatch.com

510 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

TIdDateTimeStamp.Day Property
The Day of Year ( 516) for the timestamp.

Pascal
property Day: Integer;
Description
Day is an Integer property that represents the day of the Year ( 516) for the timestamp value. Use AddDays ( 493) to increment
the current day of the Year ( 516) by a specified value.

See Also
Year ( 516)

MonthOfYear ( 514)

AddDays ( 493)

TIdDateTimeStamp.DayOfMonth Property
Day ( 511) of Month for the Indy timestamp.

Pascal
property DayOfMonth: Integer;
Description
DayOfMonth is a read-only Integer property that contains the Day ( 511) of the Month for the timestamp value. DayOfMonth
calculates the return value using the values from Day ( 511) and MonthOfYear ( 514).

See Also
Day ( 511)

MonthOfYear ( 514)

TIdDateTimeStamp.DayOfWeek Property
The Day ( 511) of Week for the Indy timestamp.

Pascal
property DayOfWeek: Integer;
Description
DayOfWeek is a read-only Integer property that contains the Day ( 511) of the Week for the Indy timestamp. DayOfWeek will
contain a value in the range 1..7.

See Also
DayOfWeekName ( 511)

DayOfWeekShortName ( 512)

TIdDateTimeStamp.DayOfWeekName Property
The Day ( 511) of Week Name for the Indy timestamp.

Pascal
property DayOfWeekName: String;
Description
DayOfWeekName is a read-only String property that contains the long name for the day of the week represented by the Indy

Internet Direct (Indy) Version 10.1.5 511


TIdDateTimeStamp Class Classes

timestamp. DayOfWeekName relies on the DayOfWeek ( 511) property to access the correct Day ( 511) name.
DayOfWeekName can return one of the following values:

See Also
DayOfWeek ( 511)

DayOfWeekShortName ( 512)

TIdDateTimeStamp.DayOfWeekShortName Property
The Short ( 2995) Day ( 511) of Week Name for the Indy timestamp.

Pascal
property DayOfWeekShortName: String;
Description
DayOfWeekShortName is a read-only String property that contains the first three characters of DayOfWeekname for the Indy
timestamp. DayOfWeekShortName relies on the DayOfWeek ( 511) property to access the correct Day ( 511) name.

DayOfWeekShortName can return one of the following values:

TIdDateTimeStamp.DaysInYear Property
Number of days in the year for the Indy timestamp.

Pascal
property DaysInYear: Integer;
Description
DaysInYear is a read-only Integer property that contains the number of days in the year represented by the Indy timestamp.
DaysInYear is calculated and accounts for Leap Day ( 511) in its operation.

See Also
IsLeapYear ( 513)

TIdDateTimeStamp.HourOf12Day Property
Indicates the numeric hour of day in 12-hour format.

Pascal
property HourOf12Day: Integer;
Description
HourOf12Day is a read-only Integer property that indicates the hour of the day in 12-hour format for the Indy timestamp. Only the
hour in numeric format is presented. For example, the HourOf12Day value for 1:00 AM and 1:00 PM are both 1.

See Also
HourOf24Day ( 512)

TIdDateTimeStamp.HourOf24Day Property
Indicates the numeric hour of day in 24-hour format.

Pascal
property HourOf24Day: Integer;
Description
HourOf24Day is a read-only Integer property that indicates the hour of the day in 24-hour format for the Indy timestamp. Only the
hour in numeric format is presented. For example, the HourOf24Day value for 1:00 AM is 1, and the HourOf24Day value for 1:00

512 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

PM is 13.

See Also
HourOf12Day ( 512)

TIdDateTimeStamp.IsLeapYear Property
Indicates that the year for the Indy timestamp is a Leap year.

Pascal
property IsLeapYear: Boolean;
Description
IsLeapYear is a read-only Boolean property that indicates if the value in Year ( 516) for the timestamp is a Leap year.

See Also
Year ( 516)

TIdDateTimeStamp.IsMorning Property
Indicates that the time portion of the Indy timestamp is before noon.

Pascal
property IsMorning: Boolean;
Description
IsMorning is a read-only Boolean property that indicates the time portion of the Indy timestamp is before noon. IsMorning is False if
the time is after noon. Noon is considered to be morning, and Midnight is considered to be afternoon.

TIdDateTimeStamp.Millisecond Property
Number of milliseconds elapsed for the current second of the Indy timestamp.

Pascal
property Millisecond: Integer;
Description
Millisecond is an Integer property that contains the number of milliseconds elapsed for the current Second ( 515) in the timestamp
value.

See Also
Second ( 515)

TIdDateTimeStamp.MinuteOfDay Property
Number of minutes elapsed in the day of the Indy timestamp.

Pascal
property MinuteOfDay: Integer;
Description
MinuteOfDay is a read-only integer property that indicates the number of Minutes elapsed in the Day ( 511) for the timestamp
value.

See Also
Day ( 511)

MinuteOfHour ( 514)

Internet Direct (Indy) Version 10.1.5 513


TIdDateTimeStamp Class Classes

TIdDateTimeStamp.MinuteOfHour Property
Number of minutes elapsed in the hour of the Indy timestamp.

Pascal
property MinuteOfHour: Integer;
Description
MinuteOfHour is a read-only Integer property that indicates the number of minutes elapsed in the current Hour for the timestamp
value.

See Also
HourOf24Day ( 512)

HourOf12Day ( 512)

TIdDateTimeStamp.MonthName Property
The long name for the month in the Indy timestamp.

Pascal
property MonthName: String;
Description
MonthName is a read-only String property that represents the long name for the current month in the timestamp value. MonthName
will contain one of the values defined in IdMonthNames ( 3856).

See Also
IdMonthNames ( 3856)

TIdDateTimeStamp.MonthOfYear Property
Numeric month number for the Indy timestamp.

Pascal
property MonthOfYear: Integer;
Description
MonthOfYear is a read-only Integer property that represents the numeric month number for the timestamp value. MonthOfYear is
calculated using the value in Day ( 511), and accounts for Leap years in the returned value.

See Also
TMonths ( 2985)

TIdDateTimeStamp.MonthShortName Property
The short name for the month in the Indy timestamp.

Pascal
property MonthShortName: String;
Description
MonthShortName is a read-only String property that represents the short name for the month in the Indy timestamp.
MonthShortName returns the first three characters of the month name represented in the Indy timestamp.

See Also
MonthName ( 514)

514 Internet Direct (Indy) Version 10.1.5


Classes TIdDateTimeStamp Class

TIdDateTimeStamp.Second Property
Second of the day.

Pascal
property Second: Integer;
Description
Second is an Integer property that indicates the current second of the day for the object. Second should always contain a value in
the range 0..IdSecondsInDay ( 4326).

See Also
IdSecondsInDay ( 4326)

TIdDateTimeStamp.SecondOfMinute Property
Numeric seconds elapsed in the current minute of the Indy timestamp.

Pascal
property SecondOfMinute: Integer;
Description
SecondOfMinute is a read-only Integer property that represents the numeric seconds elapsed in the current minute for the
timestamp value.

See Also
MinuteOfHour ( 514)

TIdDateTimeStamp.SecondsInYear Property
Total number of seconds in the year for the Indy timestamp.

Pascal
property SecondsInYear: Integer;
Description
SecondsInYear is a read-only Integer property that represents the total number of seconds in the year for the Indy timestamp. If the
current year is a Leap year, SecondsInYear will contain the value from IdSecondsInLeapYear ( 4327). Otherwise, SecondsInYear
will contain the value from IdSecondsInYear ( 4327).

TIdDateTimeStamp.TimeZone Property
Identifies the Time Zone for the Indy timestamp.

Pascal
property TimeZone: Integer;
Description
TimeZone is an Integer property that Identifies the Time Zone for the Indy timestamp. TimeZone contains a value that reflects the
number of hours offset from GMT or UTC. TimeZone is not used when the Indy timestamp is updated, and is generally used in
construction of the AsRFC822 ( 509) timestamp format.

TIdDateTimeStamp.TimeZoneAsString Property
Pascal
property TimeZoneAsString: String;

Internet Direct (Indy) Version 10.1.5 515


TIdDateTimeStamp Class Classes

Description
TimeZoneAsString is a read-only String property that indicates the positive or negative offset hours and minutes for the local
timezone from GMT (Greenwich Mean Time). TimeZoneAsString is expressed in a format like '+HHMM' or '-HHMM'.

TimeZoneAsString is used when constructing an RFC-complaint date time value using GetAsRFC882.

TimeZoneAsString implements GetTimeZoneAsString ( 502) as the read access specifier for the property value.

TIdDateTimeStamp.TimeZoneHour Property
Number of hours offset from GMT.

Pascal
property TimeZoneHour: Integer;
Description
TimeZoneHour is a read-only Integer property that represents the positive or negative number of hours the local timezone is offset
from GMT (Greenwich Mean Time). TimeZoneHour is used in constructing the value for TimeZoneAsString ( 515). TimeZoneHour
implements GetTimeZoneHour ( 502) as the read access specifier for the property value.

TIdDateTimeStamp.TimeZoneMinutes Property
Number of minutes as an offset from GMT.

Pascal
property TimeZoneMinutes: Integer;
Description
TimeZoneMinutes is an read-only Integer property that represents the positive or negative offset minutes of the local timezone from
GMT (Greenwich Mean Time). TimeZoneMinutes is used with TimeZoneHour ( 516) in constructing the value in
TimeZoneAsString ( 515). TimeZoneMinutes implements GetTimeZoneMinutes ( 502) as the read access specifier for the
property value.

See Also
TimeZoneHour ( 516) TimeZoneAsString ( 515)

TIdDateTimeStamp.WeekOfYear Property
Identifies the week number for the Indy timestamp.

Pascal
property WeekOfYear: Integer;
Description
WeekOFYear is a read-only Integer property that Indicates the week number for the current year of the Indy timestamp. A week is
considered to begin with Sunday and may overlap a Year ( 516) boundary. It is possible to have 53 weeks in a Year ( 516), with
the 53rd week of a given year also being the 1st week of the following year.

TIdDateTimeStamp.Year Property
Numeric year for the Indy timestamp.

Pascal
property Year: Integer;
Description
Year is an Integer property that contains the numeric year number for the date in the timestamp value. Changing the value in Year

516 Internet Direct (Indy) Version 10.1.5


Classes TIdDayTime Class

forces the property to contain a value no less than 1, and updates IsLeapYear ( 513) to reflect if the new property value is a Leap
year.

See Also
Day ( 511) MonthOfYear ( 514) IsLeapYear ( 513)

TIdDayTime Class
Implements a TCP-based DayTime protocol client.

File
IdDayTime ( 4613)

Hierarchy

Pascal
TIdDayTime = class(TIdTCPClientCustom);
Description
TIdDayTime is a TIdTCPClientCustom ( 2340) descendant that implements a DayTime protocol client, as described in the Internet
Standards document:

RFC 867 - Daytime Protocol

The DayTime protocol allows a server to send the current date and time in a human readable format, and is sometimes used for
debugging.

If you need a time-synchronization solution, we recommend that you use the Time protocol encapsulated by TIdSNTP ( 2067),
TIdTime ( 2475), TIdTimeUDP ( 2481), TIdTimeServer ( 2478), and TIdTimeUDPServer ( 2483).

See Also
TIdTCPClientCustom ( 2340)

TIdDayTimeUDP ( 522)

TIdTime ( 2475)

TIdSNTP ( 2067)

TIdTimeUDP ( 2481)

TIdTimeServer ( 2478)

TIdTimeUDPServer ( 2483)

TIdDayTime Members
The following tables list the members exposed by TIdDayTime.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
DayTimeStr ( 519) Retrieves the Date and Time from a server.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.

Internet Direct (Indy) Version 10.1.5 517


TIdDayTime Class Classes

Host ( 519) Host name or IP address for the remote server.


IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 519) Represents the port number used by the DayTime protocol.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdDayTime Properties
The Properties of the TIdDayTime class are listed here.

518 Internet Direct (Indy) Version 10.1.5


Classes TIdDayTimeServer Class

Properties
Property Description
DayTimeStr ( 519) Retrieves the Date and Time from a server.
Host ( 519) Host name or IP address for the remote server.
Port ( 519) Represents the port number used by the DayTime protocol.

Legend
Property
read only

TIdDayTime.DayTimeStr Property
Retrieves the Date and Time from a server.

Pascal
property DayTimeStr: String;
Description
DayTimeStr is a String property that causes the component to connect ( 2342) to the Host ( 519) server and retrieve the date
and time. Since this can be returned in a free-form format, this is not converted to a TDateTime and there is no time synchronization
performed.

You must set the Host ( 519) property to the DayTime server before using this property.

TIdDayTime.Host Property
Host name or IP address for the remote server.

Pascal
property Host;
Description
Host is a Published property in TIdDayTime ( 517) tha represents the IP address or host name for the DayTime protocol server
used for the connection.

Set values in the Host and Port ( 519) properties prior to accessing the value in the DayTimeStr ( 519) property.

TIdDayTime.Port Property
Represents the port number used by the DayTime protocol.

Pascal
property Port;
Description
Port is a published property redefined in TIdDayTime ( 517) to specify the default value used for the DayTime protocol.

Port is assigned the default value IdPORT_DAYTIME ( 3952) in the Creaqte constructor. Port is used when the value in
DayTimeStr ( 519) is accessed, and the connection to the DayTime server is opened to read the value of the DayTimeStr ( 519)
property.

See Also
TIdTCPClientCustom.Port

Create ( 267)

DayTimeStr ( 519)

Internet Direct (Indy) Version 10.1.5 519


TIdDayTimeServer Class Classes

TIdDayTimeServer Class
Implements a DayTime protocol server.

File
IdDayTimeServer ( 4614)

Hierarchy

Pascal
TIdDayTimeServer = class(TIdCustomTCPServer);
Description
TIdDayTimeServer is a TIdTCPServer ( 2375) descendant that implements a TCP-based server for the DayTime protocol, as
decribed in the Internet Standards document:

RFC 867 - DayTime Protocol

The DayTime protocol is used to retrieve the current day and time in a human-readable format, and is sometimes used for
debugging. Use TIdDayTime ( 517) for the client connection.

If you need a time-synchronization solution, we recommend that you use the Time protocol encapsulated by TIdTime ( 2475),
TIdTimeUDP ( 2481), TIdTimeServer ( 2478), and TIdTimeUDPServer ( 2483).

See Also
TIdTCPServer ( 2375)

TIdDayTimeUDPServer ( 524)

TIdDayTime ( 517)

TIdDayTimeUDP ( 522)

TIdTime ( 2475)

TIdTimeUDP ( 2481)

TIdTimeServer ( 2478)

TIdTimeUDPServer ( 2483)

TIdDayTimeServer Members
The following tables list the members exposed by TIdDayTimeServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 521) Default port number for the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.

520 Internet Direct (Indy) Version 10.1.5


Classes TIdDayTimeServer Class

OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
TimeZone ( 522) Identifies the Time Zone for the server.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdDayTimeServer Properties
The Properties of the TIdDayTimeServer class are listed here.

Properties
Property Description
DefaultPort ( 521) Default port number for the server.
TimeZone ( 522) Identifies the Time Zone for the server.

Legend
Property

TIdDayTimeServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdDayTimeServer ( 520) that identifies the default port number used by the server, as
described in the DayTime protocol specification.

Internet Direct (Indy) Version 10.1.5 521


TIdDayTimeUDP Class Classes

The default value for DefaultPort is IdPORT_DAYTIME ( 3952), as assigned during initialization of the component.

TIdDayTimeServer.TimeZone Property
Identifies the Time Zone for the server.

Pascal
property TimeZone: String;
Description
TimeZone is a String property that indicates the Time Zone where the server is located, and the value is appended to the string
representation of the time from the server.

The default value for TimeZone is "EST" (Eastern Standard Time), as assigned during initializion of the component.

TIdDayTimeUDP Class
Implements a UDP-based DayTime protocol client.

File
IdDayTimeUDP ( 4614)

Hierarchy

Pascal
TIdDayTimeUDP = class(TIdUDPClient);
Description
TIdDayTimeUDP is a TIdUDPClient ( 2509) descendant that implements a UDP-based variant of the DayTime protocol (RFC 867)
as a client. In this protocol, a DayTime server sends the current day and time in a human readable format and is sometimes used
for debugging.

If you need a time-synchronization solution, we recommend that you use the Time protocol encapsulated by TIdTime ( 2475),
TIdTimeUDP ( 2481), TIdTimeServer ( 2478), and TIdTimeUDPServer ( 2483).

See Also
TIdUDPClient ( 2509)

TIdDayTime ( 517)

TIdTime ( 2475)

TIdTimeUDP ( 2481)

TIdTimeServer ( 2478)

TIdTimeUDPServer ( 2483)

TIdDayTimeUDP Members
The following tables list the members exposed by TIdDayTimeUDP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.

522 Internet Direct (Indy) Version 10.1.5


Classes TIdDayTimeUDP Class

BufferSize ( 2508) Specifies the largest UDP packet size.


DayTimeStr ( 524) Retrieves the Date and Time from a server.
Host ( 2520) Identifies the address of the remote computer system.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
IPVersion ( 2521) Identifies the IP address family supported for the UDP protocol client.
OnConnected ( 2521) Event handler signalled when establishing the UDP client session.
OnDisconnected ( 2521) Event handler signalled when closing the UDP client session.
Port ( 524) Specifies the port number used by the DayTime protocol.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ReceiveTimeout ( 2522) Indicates the timeout while waiting for a readable socket handle.
TransparentProxy ( 2522) Implements a transparent proxy connection for the UDP client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
CloseProxy ( 2511) Closes the socket handle for a proxied connection for the client.
Connect ( 2512) Initializes the client for sending and receiving datagrams.
Connected ( 2512) Indicates if the socket handle for the UDP client has been allocated.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2513) Frees the object instance.
Disconnect ( 2513) Closes the socket handle and transparent proxy for the client.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
OpenProxy ( 2514) Ensures the optional transparent proxy is enabled for the client.
Send ( 2505) Transmits a datagram to a specified host and port number.
Send ( 2517) Transmits a datagram to the host and port number for the client.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)
ReceiveBuffer ( 2514)
SendBuffer ( 2518)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdDayTimeUDP Properties
The Properties of the TIdDayTimeUDP class are listed here.

Properties
Property Description
DayTimeStr ( 524) Retrieves the Date and Time from a server.
Port ( 524) Specifies the port number used by the DayTime protocol.

Internet Direct (Indy) Version 10.1.5 523


TIdDayTimeUDPServer Class Classes

Legend
Property
read only

TIdDayTimeUDP.DayTimeStr Property
Retrieves the Date and Time from a server.

Pascal
property DayTimeStr: String;
Description
DayTimeStr is a String property that cause the component to connect ( 2512) to the Host ( 2520) server and retrieve the date
and time. Since this can be returned in a free-form format, this is not converted to a TDateTime and there is no time synchronization
performed.

You must set the Host ( 2520) property to the DayTime server before using this property.

TIdDayTimeUDP.Port Property
Specifies the port number used by the DayTime protocol.

Pascal
property Port;
Description
Port is a published property and is redefined in TIdDayTime ( 517) to specify the default value used by the DayTime protocol
(IdPORT_DAYTIME ( 3952)).

The default value for Port is assigned during initialization of the component.

Port is used when accessing the value in DayTimeStr ( 524), and a datagram is used to retrieve the property value from the
DayTime server.

See Also
Create ( 267)

DayTimeStr ( 524)

IdPORT_DAYTIME ( 3952)

TIdUDPClient.Port ( 2522)

TIdDayTimeUDPServer Class
Implements a DayTime protocol server.

File
IdDayTimeUDPServer ( 4614)

Hierarchy

Pascal
TIdDayTimeUDPServer = class(TIdUDPServer);
Description
TIdDayTimeUDPServer that implements a UDP-based server for the DayTime protocol, as decribed in the Internet Standards

524 Internet Direct (Indy) Version 10.1.5


Classes TIdDayTimeUDPServer Class

document:

RFC 867 - DayTime Protocol

The DayTime protocol is used to retrieve the current day and time in a human-readable format, and is sometimes used for
debugging. Use TIdDayTime ( 517) for the client connection.

If you need a time-synchronization solution, we recommend that you use the Time protocol encapsulated by TIdTime ( 2475),
TIdTimeUDP ( 2481), TIdTimeServer ( 2478), and TIdTimeUDPServer ( 2483).

See Also
TIdUDPServer ( 2530)

TIdDayTimeUDP ( 522)

TIdTimeUDP ( 2481)

TIdTimeUDPServer ( 2483)

TIdDayTimeUDPServer Members
The following tables list the members exposed by TIdDayTimeUDPServer.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 526) Default port number for the server.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
TimeZone ( 526) Identifies the Time Zone for the server.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Internet Direct (Indy) Version 10.1.5 525


TIdDBInfo Class Classes

Legend
Property
read only
Method
virtual
Event

TIdDayTimeUDPServer Properties
The Properties of the TIdDayTimeUDPServer class are listed here.

Properties
Property Description
DefaultPort ( 526) Default port number for the server.
TimeZone ( 526) Identifies the Time Zone for the server.

Legend
Property

TIdDayTimeUDPServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: integer;
Description
DefaultPort is a published property in TIdDayTimeUDPServer ( 524) that identifies the default port number used by the server, as
described in the DayTime protocol specification.

The default value for DefaultPort is IdPORT_DAYTIME ( 3952), as assigned during initialization of the component.

TIdDayTimeUDPServer.TimeZone Property
Identifies the Time Zone for the server.

Pascal
property TimeZone: String;
Description
TimeZone is a String property that indicates the Time Zone where the server is located, and the value is appended to the string
representation of the time from the server.

The default value for TimeZone is "EST" (Eastern Standard Time), as assigned during initializion of the component.

TIdDBInfo Class
Collection item used to represent textual information about databases available on a DICT server.

File
IdDICTCommon ( 4615)

Hierarchy

526 Internet Direct (Indy) Version 10.1.5


Classes TIdDBList Class

Pascal
TIdDBInfo = class(TIdGeneric);
Description
TIdDBInfo is a TIdGeneric ( 980) descendant that implements the collection item used to represent textual information about
databases available on a DICT server.

TIdDBInfo is the collection item class used in the TIdDBList ( 527) collection.

See Also
TIdGeneric ( 980)

TIdDBList ( 527)

TIdDICT.GetDBInfo

TIdDBList Class
Implements a collection for DICT SHOW DB command responses.

File
IdDICTCommon ( 4615)

Hierarchy

Pascal
TIdDBList = class(TIdCollection);
Description
TIdDBList is a TIdCollection ( 3011) descendant that implements a collection for DICT SHOW DB command responses.

TIdDBList is the type used for the TIdDICT.GetDBInfo property.

See Also
TIdCollection ( 3011)

TIdDICT.GetDBInfo

TIdDBList Members
The following tables list the members exposed by TIdDBList.

Properties
Property Description
Items ( 529) Allows index access to collection items in the container.

Methods
Method Description
Add ( 528) Adds an item to the collection.
Create ( 528) Constructor for the collection.
IndexOf ( 528) Determines the ordinal position (or index) of a specified collection item in the collection.

Legend
Method
virtual
Property

Internet Direct (Indy) Version 10.1.5 527


TIdDBList Class Classes

TIdDBList Methods
The Methods of the TIdDBList class are listed here.

Methods
Method Description
Add ( 528) Adds an item to the collection.
Create ( 528) Constructor for the collection.
IndexOf ( 528) Determines the ordinal position (or index) of a specified collection item in the collection.

Legend
Method
virtual

TIdDBList.Add Method
Adds an item to the collection.

Pascal
function Add: TIdDBInfo;
Returns
TIdDBInfo ( 526) - Collection item added to the container.

Description
Add is a TIdDBInfo ( 526) function used to add a collection item to the container.

Add calls the inherited Add method, and returns a TIdDBInfo ( 526) instance for the new collection item.

Use Items ( 529) read or write a collection item in the container using its ordinal position.

Use IndexOf ( 528) to determine the odinal position of a specified collection item in the container.

See Also
IndexOf ( 528) Items ( 529)

TIdDBList.Create Constructor
Constructor for the collection.

Pascal
constructor Create; virtual; reintroduce;
Description
Create is the reintroduced constructor for the collection.

Create calls the inherited constructor using TIdDBInfo ( 526) as the item class for values added to the collection.

Use Add ( 528) to create new collection items in the container.

See Also
Add ( 528)

TIdDBList.IndexOf Method
Determines the ordinal position (or index) of a specified collection item in the collection.

Pascal
function IndexOf(

528 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoder Class

AItem: TIdDBInfo
): Integer;
Parameters
Parameters Description
AItem Collection item to locate in the container.

Returns
>=0 - Ordinal position (0-based) of the collection item. -1 - Collection item does not exist in the container.

Description
IndexOf is an Integer function used to determine the ordinal position (or index) of the collection item specified in AItem in the
collection.

The return value is the 0-based index of the collection item in the container, or -1 when the collection item does not exist in the
container.

Use Items ( 529) to access (read/write) collection items using the index position of the item in the collection.

Use Add ( 528) to create ( 528) a new collection item in the container.

See Also
Items ( 529)

Add ( 528)

TIdDBList Properties
The Properties of the TIdDBList class are listed here.

Properties
Property Description
Items ( 529) Allows index access to collection items in the container.

Legend
Property

TIdDBList.Items Property
Allows index access to collection items in the container.

Pascal
property Items [AIndex: Integer]: TIdDBInfo;
Description
Items is a TIdDBInfo ( 526) property that allows 0-based indexed access to collection items in the container for both read and
write access.

Items is the default property for the collection item.

Use IndexOf ( 528) to determine the index position for an existing collection item in the container.

Use Add ( 528) to create ( 528) a new collection item in the container.

See Also
IndexOf ( 528)

Add ( 528)

Internet Direct (Indy) Version 10.1.5 529


TIdDecoder Class Classes

TIdDecoder Class
Ancestor for Indy decoder classes.

File
IdCoder ( 4591)

Hierarchy

Pascal
TIdDecoder = class(TIdBaseComponent);
Description
TIdDecoder is a TIdBaseComponent ( 266) descendant that is the ancestor for Indy classes that perform decoding operations on
String values to either String- or Stream-based destinations.

Applications do not normally create ( 267) instances of TIdDecoder, and instead use one of the descendant classes that
implements a specific decoding algorithm. TIdDecoder can be used an as ancestor for classes that utilize a unique decoding
algorithm and also adhere to the Indy coder framework.

Descendants of TIdDecoder include TIdDecoder4to3 ( 535) and TIdDecoderQuotedPrintable ( 545).

See Also
TIdBaseComponent ( 266)

TIdDecoder4to3 ( 535)

TIdDecoderQuotedPrintable ( 545)

TIdDecoder Members
The following tables list the members exposed by TIdDecoder.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Decode ( 531) Specifies the method used for decoding values in a buffer.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Constructor
abstract
virtual
Property
read only

530 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoder Class

TIdDecoder Methods
The Methods of the TIdDecoder class are listed here.

Methods
Method Description
Decode ( 531) Specifies the method used for decoding values in a buffer.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.

Legend
Method
abstract
virtual

TIdDecoder.Decode Method
Specifies the method used for decoding values in a buffer.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); virtual; abstract;
Parameters
Parameters Description
AIn Values to be decoded.
AStartPos Initial position to be decoded. Default is 1.
ABytes Number of bytes toi be decoded. Default is -1.

Description
Decode is an abstract virtual procedure that specifies the method used to convert the encoded value in AIn to its un-encoded form.

AStartPos indicates the initial value in AIn to begin the decoding operation. AStartPos values begin with 1. The default value is 1.

ABytes indicates the number of byte values in AIn to be decoded. The default value is -1, and indicates that all values in AIn are
affected by the operation.

Decode must be overridden and implemented in a descendant class to reverse the specific encoding algorithm for the value in AIn.

Use the DecodeString ( 533) method to decode values passed in a string data type.

See Also
DecodeString ( 533)

TIdDecoder.DecodeBegin Method
Prepares the decoder for storing decoded values to a stream.

Pascal
procedure DecodeBegin(
ADestStream: TIdStream
); virtual;
Parameters
Parameters Description
ADestStream Stream containing encoded values.

Internet Direct (Indy) Version 10.1.5 531


TIdDecoder Class Classes

Description
DecodeBegin is a procedure used to initialize the decoder for reading encoded values and storing the decoded results in the
TIdStream ( 3087) instance speficified in ADestStream.

DecodeBegin is normally called prior to calling the Decode ( 531) method with arguments representing the encoded values to
write to the stream in ADestStream. DecodeBegin assigns the TIdStream ( 3087) instance specified in ADestStream to the
internal member variable allocated for the decoder.

DecodeEnd ( 532) is normally called after all required calls to the Decode ( 531) method to signal that the decoding operation is
complete.

DecodeBegin, Decode ( 531), and DecodeEnd ( 532) are all used in the implementation of the DecodeString ( 533) method.

Example
function TIdDecoder.DecodeString(const aIn: string): string;
var
LStream: TIdMemoryStream;
begin
LStream := TIdMemoryStream.Create;
try
DecodeBegin(LStream);
try
Decode(AIn);
LStream.Position := 0;Result := ReadStringFromStream(LStream);
finally
DecodeEnd;
end;
finally
Sys.FreeAndNil(LStream);
end;
end;
See Also
TIdStream ( 3087)

Decode ( 531)

DecodeEnd ( 532)

DecodeString ( 533)

TIdDecoder.DecodeEnd Method
Signals that decoding has been completed.

Pascal
procedure DecodeEnd; virtual;
Description
DecodeEnd is a procedure used to indicate that the decoding operation has been completed.

Please note that DecodeEnd is an empty procedure in TIdDecoder ( 530).

Use DecodeBegin ( 531) to prepare the decoder for the decoding operation.

Use Decode ( 531) to reverse the encoding algorithm for the decoder implementation.

See Also
TIdStream ( 3087)

Decode ( 531)

DecodeBegin ( 531)

DecodeString ( 533)

532 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoder00E Class

TIdDecoder.DecodeString Method
Provides access to the decoded values for a String data type.

Pascal
function DecodeString(
const aIn: string
): string;
Parameters
Parameters Description
aIn Value to be decoded.

Returns
String - Decoded value of the input parameter.

Description
DecodeString is a String function that provides access to the decoded values for the String specified in AIn.

DecodeString create ( 267) a temporary TIdMemoryStream ( 3058) instance used to accumulate the decoded values for the
string in AIn and calls the DecodeBegin ( 531), Decode ( 531), and DecodeEnd ( 532) methods to perform the operation.
Values in the temporary TIdMemoryStream ( 3058) instance are read into the return value for the method using
ReadStringFromStream ( 2892).

Use the EncodeString ( 2775) function or the Encode method in TIdEncoder ( 653) to generate the encoded values used in
DecodeString.

See Also
Decode ( 531)

DecodeBegin ( 531)

DecodeEnd ( 532)

ReadStringFromStream ( 2892)

TIdMemoryStream ( 3058)

EncodeString ( 2775)

TIdEncoder.Encode ( 654)

TIdDecoder00E Class
Implement the decoding mechanism used in both UUE and XXE decoders.

File
IdCoder00E ( 4592)

Hierarchy

Pascal
TIdDecoder00E = class(TIdDecoder4to3);
Description
TIdDecoder00E is a TIdDecoder4to3 ( 535) descendant that implements an overridden Decode ( 534) method to support
decoding the length and content for the decoder.

In the UUE and XXE encoding algorithms, the initial byte in the encoded values indicates the length of the encoded data stream.

Internet Direct (Indy) Version 10.1.5 533


TIdDecoder00E Class Classes

TIdDecoder00E implements a common routine to support the capability in both TIdDecoderUUE ( 546) and TIdDecoderXXE (
547).

See Also
TIdDecoder4to3 ( 535) TIdDecoderUUE ( 546)

TIdDecoderXXE ( 547) TIdDecoder00E.Decode ( 534)

TIdDecoder00E Members
The following tables list the members exposed by TIdDecoder00E.

Properties
Property Description
FillChar ( 538) Indicates a character value that can be omitted from decoded output.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ConstructDecodeTable ( 536) Initializes the coding table used by the decoder.
Create ( 267) Constructor for the object instance.
Decode ( 534) Implement the common decoding mechanism for both UUE and XXE decoders.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdDecoder00E Methods
The Methods of the TIdDecoder00E class are listed here.

Methods
Method Description
Decode ( 534) Implement the common decoding mechanism for both UUE and XXE decoders.

Legend
Method
virtual

TIdDecoder00E.Decode Method
Implement the common decoding mechanism for both UUE and XXE decoders.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); override;

534 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoder4to3 Class

Parameters
Parameters Description
AIn Encoded values to be decoded in the method.
AStartPos Initial byte value to be used in decoding values. Default is 1.
ABytes Number of bytes to decode in the method. Default is -1.

Description
Decode is an overridden procedure used to implement the common decoding mechanism for both UUE and XXE decoders. Decode
calls the inherited Decode method to convert the 4-byte encoding to its 3-byte unencoded representation.

When ABytes contains -1, all encoded values in AIn are affected by the decoding operation. Decode reads the encoded length of
the encoded values from the first byte in AIn, and uses the decoder table to convert it to an integer value.

When Abytes contains any value othe than -1, it is assumed that the length has already been read from the encoded data stream.
The inherited methgod id called using AStartPos and ABytes to perform the 4-byte to 3-byte decoding operation.

The table-based alphabet for UUE or XXE decoding is not defined in TIdDecoder00E ( 533). Use a descendant class, like
TIdDecoderUUE ( 546) or TIdDecoderXXE ( 547), where the decoder table is implemented.

See Also
TIdDecoder4to3.Decode ( 537) TIdDecoderUUE ( 546)

TIdDecoderXXE ( 547)

TIdDecoder4to3 Class
Implements a table-driven decoder.

File
IdCoder3to4 ( 4593)

Hierarchy

Pascal
TIdDecoder4to3 = class(TIdDecoder);
Description
TIdDecoder4to3 is a TIdDecoder ( 530) descendant that implements decoding capabilities for data encoded using
TIdEncoder3to4 ( 657). TIdDecoder4to3 provides a decoding table to represent the valid characters in the encoder alphabet.

TIdDecoder4to3 provides methods to decode ( 537) string values to a destination stream, and methods to handle the conversion
performed when processing string input values.

TIdDecoder4to3 does not specify the valid characters in the decoding table. Application will generally use a descendant class, like
TIdDeCoderMIME or TIdDecoderUUE ( 546), where the alphabet is specified.

See Also
TIdDecoder ( 530)

TIdDecoderMIME ( 542)

TIdDecoderUUE ( 546)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 535


TIdDecoder4to3 Class Classes

TIdDecoder4to3 Members
The following tables list the members exposed by TIdDecoder4to3.

Properties
Property Description
FillChar ( 538) Indicates a character value that can be omitted from decoded output.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ConstructDecodeTable ( 536) Initializes the coding table used by the decoder.
Create ( 267) Constructor for the object instance.
Decode ( 537) Performs the specifics of the TIdDecoder4to3 ( 535) decoding algorithm.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdDecoder4to3 Methods
The Methods of the TIdDecoder4to3 class are listed here.

Methods
Method Description
ConstructDecodeTable ( 536) Initializes the coding table used by the decoder.
Decode ( 537) Performs the specifics of the TIdDecoder4to3 ( 535) decoding algorithm.

Legend
Method
virtual

TIdDecoder4to3.ConstructDecodeTable Method
Initializes the coding table used by the decoder.

Pascal
class procedure ConstructDecodeTable(
const ACodingTable: string;
var ADecodeArray: TIdDecodeTable
);
Parameters
Parameters Description
ACodingTable String containing the initial coder alphabet.
ADecodeArray Table used by the decoder to detect valid characters and ordinal position.

Description
ConstructDecodeTable is a Class procedure that initializes the CodingTable used by TIdDecoder4to3 ( 535). All elements in
ADecoderArray are initialize to decimal 255, and the valid characters in ACodingTable are overlaid to indicate their ordinal position

536 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoder4to3 Class

in the coder alphabet.

ADecodeArray is used by descendant classes, like TIdDecoderMIME ( 542) and TIdDecoderUUE ( 546), to initialize their
DecodeTable properties based on the alphabet for each specific coder.

Example
Constructing a decoder using the encode and decode alphabets.

[Delphi]
TIdDecoder4to3.ConstructDecodeTable(GBase64CodeTable, GBase64DecodeTable);
See Also
TIdDecoderMIME ( 542)

TIdDecoderUUE ( 546)

TIdDecoderXXE ( 547)

TIdDecoder4to3.Decode Method
Performs the specifics of the TIdDecoder4to3 ( 535) decoding algorithm.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); override;
Parameters
Parameters Description
AIn Values to be converted.
AStartPos Initial position to be decoded.
ABytes Number of bytes to be decoded.

Description
Decode is an overridden procedure that implements the specific processing required to perform the TIdDecoder4to3 ( 535)
decoding algorithm.

AIn contains the value of the encoded data, and must contains a non-empty string value. Decode uses TIdBytes ( 3007) in its
implementation to account for MBCS and Unicode values in AIn.

Values in AIn are copied from AIn starting at the byte value indicated in AStartPos, and including the numner of byte values
indicated in ABytes. When ABytes contains -1, all byte values in AIn are decoded.

Decode reads 4 byte values from AIn, and converts the 6-bits of each byte into their un-encoded representation as 3 Bytes values
in the internal stream for the decoder implementation.

Decoded values might contain the character in FillChar ( 538) value that indicates the decode values can be omitted from the
output for the decoder.

TIdDecoder4to3 Properties
The Properties of the TIdDecoder4to3 class are listed here.

Properties
Property Description
FillChar ( 538) Indicates a character value that can be omitted from decoded output.

Legend
Property

Internet Direct (Indy) Version 10.1.5 537


TIdDecoderBinHex4 Class Classes

TIdDecoder4to3.FillChar Property
Indicates a character value that can be omitted from decoded output.

Pascal
property FillChar: Char;
Description
FillChar is a Char property that Indicates a character value that can be omitted from decoded output.

FillChar should correspond to the value that may have been added by TIdEncoder3to4 ( 657) to force to the length of the encoded
output to be a multiple of 4 bytes.

See Also
TIdEncoder3to4.Encode ( 658)

TIdEncoder3to4.FillChar ( 660)

TIdDecoderBinHex4 Class
Implements a decoder for Apple BinHex 4.0-encoded content.

File
IdCoderBinHex4 ( 4593)

Hierarchy

Pascal
TIdDecoderBinHex4 = class(TIdDecoder4to3);
Description
TIdDecoderBinHex4 is a TIdDecoder4to3 ( 535) descendant that implements a decoder for Apple BinHex 4.0-encoded content, as
described in the Internet Standards document:

RFC 1741 - MIME Content Type for BinHex Encoded Files

TIdDecoderBinHex4 is a variant of a 3-byte-to-4-byte decoder, but it uses ASCII character 90 for sequences of repeating
characters, allowing some compression, but thereby not allowing it to be mapped in as another 3-to-4 decoder.

As per the RFC, BinHex encoded data must be encapsulated in a MIME part (it cannot be directly coded inline in an email "body"),
the part is strictly defined to have a header entry (with the appropriate "myfile.ext"):

Content-Type: application/mac-binhex40; name="myfile.ext"


After the header, the part must start with the text (not indented):

(This file must be converted with BinHex 4.0)


This allows the option and the ambiguity of identifying it by either the Content-Type or by the initial text line. However, it is also
stated that any text before the specified text line must be ignored, implying the line does not have to be the first - an apparent
contradiction. The encoded file then follows, split with CRLFs (to avoid lines that are too long for emails) that must be discarded.

The file starts with a colon (:), a header, followed by the file contents, and ending in another colon.

There is also an interesting article on the web, "BinHex 4.0 Definition by Peter N Lewis, Aug 1991", which has very useful
information on what is implemeted in practice, and seems to come with the good provenance of bitter experience.

The BinHex format

Here is a description of the Hqx7 (7 bit format as implemented in BinHex 4.0) formats for Macintosh Application and File transfers.

538 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoderBinHex4 Class

The main features of the format are:

• Error checking even using ASCII download


• Compression of repetitive characters
• 7-bit encoding for ASCII download
BinHex format is processed at three different levels:

• 8 bit encoding of the file:

Data Type Description


Byte Length of the FileName (1..63)
Bytes FileName bytes (up to "Length" bytes)
Byte Version ( 269)
Long Type
Long Creator
Word Flags (And $F800)
Long Length of Data Fork
Long Length of Resource Fork
Word CRC
Bytes Data Fork ("Data Length" bytes)
Word CRC
Bytes Resource Fork ("Rsrc Length" bytes)
Word CRC

• Compression of repetitive characters. $90 is the marker, and encoding is made for 3-255 characters.
00 11 22 33 44 55 66 77 -> 00 11 22 33 44 55 66 77
11 22 22 22 22 22 22 33 -> 11 22 90 06 33
11 22 90 33 44 -> 11 22 90 00 33 44
The whole file is considered as a stream of bits. This stream will be divided in blocks of 6 bits and then converted to one of 64
characters contained in a table. The characters in this table have been chosen for maximum noise protection. The format will start
with a ":" (first character on a line) and end with a ":". There will be a maximum of 64 characters on a line. It must be preceded, by
this comment, starting in column 1 (it does not start in column 1 in this document):

(This file must be converted with BinHex 4.0)

Any text before this comment is to be ignored.

Use GBinHex4CodeTable ( 3209) to access the characters used in the encoded file format.

Implementation Notes

There are older variants referred to in RFC 1741, but I have only come across encodings in current use as separate MIME parts,
which this implementation is targetted at.

When encoding into BinHex4, you do NOT have to implement the run-length encoding (the character 90 for sequences of repeating
characters), and this encoder does not do it. The CRC values generated in the header have NOT been tested (because this
decoder ignores them).

The decoder has to allow for the run-length encoding. The decoder works irrespective of whether it is preceded by the identification
string or not (GBinHex4IdentificationString ( 3210) below). The string to be decoded must include the starting and ending colons.

Internet Direct (Indy) Version 10.1.5 539


TIdDecoderBinHex4 Class Classes

It can deal with embedded CR ( 3174) and LFs. Unlike base64 and quoted-printable, we cannot decode ( 541) line-by-line
cleanly, because the lines do not contain a clean number of 4-byte blocks due to the first line starting with a colon, leaving 63 bytes
on that line, plus you have the problem of dealing with the run-length encoding and stripping the header. If the attachment only has
a data fork, it is saved; if only a resource fork, it is saved; if both, only the data fork is saved. The decoder does NOT check that the
CRC values are correct.

Indy units use the content-type to decide if the part is BinHex4:

Content-Type: application/mac-binhex40; name="myfile.ext"


WARNING: This code only implements BinHex4.0 when used as a part in a MIME-encoded email. To have a part encoded, set the
value in the content transfer property for the message part:

ContentTransfer := 'binhex40'.
See Also
TIdDecoder4to3 ( 535)

TIdDecoderBinHex4 Members
The following tables list the members exposed by TIdDecoderBinHex4.

Properties
Property Description
FillChar ( 538) Indicates a character value that can be omitted from decoded output.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ConstructDecodeTable ( 536) Initializes the coding table used by the decoder.
Create ( 267) Constructor for the object instance.
Decode ( 541) Decodes BinHex 4.0-encoded data.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdDecoderBinHex4 Methods
The Methods of the TIdDecoderBinHex4 class are listed here.

Methods
Method Description
Decode ( 541) Decodes BinHex 4.0-encoded data.

Legend
Method
virtual

540 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoderMIME Class

TIdDecoderBinHex4.Decode Method
Decodes BinHex 4.0-encoded data.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); override;
Parameters
Parameters Description
AIn Encoded data for the operation.
AStartPos Starting position in the encoded data.
ABytes Number of bytes to be decoded.

Description
Decode is an overridden method in TIdDecoderBinHex4 ( 538). Decode performs decoding for the BinHex data in AIn starting at
the position indicated in AStartPos and continuing for the number of bytes indicated in ABytes.

The value in AStartPos starts at 1 (one).

ABytes can contain any value from 1 to the length of the input data in AIn. -1 indicates that all values in AIn will be decoded.

Decode examines the values in AIn to determine when the Colon delimiter (ASCII decimal 58) is encountered at the start or end of
the BinHex 4.0-encoded data. Decode raises the EIdMissingColon ( 118) exception when the Colon delimiter characters are not
found in the BinHex-encoded data.

After values in AIn have been decoded, Decode checks for run-length encoding in the decoded content by looking for the RLE
marker (ASCII Decimal 144 Hex 90). Run-length encoded values are restored to their non-RLE-encoded values.

Decode removes the BinHex header included at the beginning of the content, including the following data types:

Data Type Description


Byte Length of the FileName (1..63)
Bytes FileName bytes (up to "Length" bytes)
Byte Version ( 269)
Long Type
Long Creator
Word Flags (And $F800)
Long Length of Data Fork
Long Length of Resource Fork
Word CRC
Bytes Data Fork ("Data Length" bytes)
Word CRC
Bytes Resource Fork ("Rsrc Length" bytes)
Word CRC

Decode writes the decoded values for the specified content to the stream for the decoder.

Use TIdEncoderBinHex4 ( 661) to create ( 267) the values used in the AIn argument.

See Also
TIdEncoderBinHex4 ( 661)

Internet Direct (Indy) Version 10.1.5 541


TIdDecoderMIMELineByLine Class Classes

TIdDecoderMIME Class
Implements a decoder for MIME content encoded using the Base64 encoding scheme.

File
IdCoderMIME ( 4595)

Hierarchy

Pascal
TIdDecoderMIME = class(TIdDecoder4to3);
Description
TIdDecoderMIME is a TIdDecoder4to3 ( 535) descendant that implements a decoder for MIME content encoded using the Base64
encoding algorithm. TIdDecoderMIME specifies the decoding table used by the decoder in GBase64DecodeTable ( 3123) based
on the Base64 alphabet in GBase64CodeTable ( 3208). TIdDecoderMIME also uses the special padding character "=" in the
FillChar ( 538) property.

See Also
TIdDecoder4to3 ( 535)

GBase64DecodeTable ( 3123)

GBase64CodeTable ( 3208)

TIdDecoderMIMELineByLine Class
File
IdCoderMIME ( 4595)

Hierarchy

Pascal
TIdDecoderMIMELineByLine = class(TIdDecoderMIME);
Description
TIdDecoderMIMELineByLine is a TIdDecoderMIME ( 542) descendant that implements a specialized MIME (or Base64) decoder.
It is used primarily when handling MIME-encoded mail messages.

WARNING: This is not a general-purpose decoder. It is used, for example, by IdMessageCoderMIME for line-by-line decoding of
base64 encoded parts that are processed on a line-by-line basis, as against the complete encoded block. If you use it, you must
call Clear ( 543) before the first line, and also call CheckForLeftOvers after the last line.

See Also
TIdDecoderMIME ( 542)

TIdDecoderMIMELineByLine Members
The following tables list the members exposed by TIdDecoderMIMELineByLine.

542 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoderMIMELineByLine Class

Properties
Property Description
FillChar ( 538) Indicates a character value that can be omitted from decoded output.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Clear ( 543) Ensures leftover characters from prior decoding operations are removed.
ConstructDecodeTable ( 536) Initializes the coding table used by the decoder.
Create ( 267) Constructor for the object instance.
Decode ( 544) Implements line-oriented decoding for Base64-encoded values.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
FinishDecoding ( 544) Ensures unused characters in TIdDecoderMIMELineByLine ( 542) are padded with the FillChar ( 538) and
decoded.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdDecoderMIMELineByLine Methods
The Methods of the TIdDecoderMIMELineByLine class are listed here.

Methods
Method Description
Clear ( 543) Ensures leftover characters from prior decoding operations are removed.
Decode ( 544) Implements line-oriented decoding for Base64-encoded values.
FinishDecoding ( 544) Ensures unused characters in TIdDecoderMIMELineByLine ( 542) are padded with the FillChar ( 538) and
decoded.

Legend
Method
virtual

TIdDecoderMIMELineByLine.Clear Method
Ensures leftover characters from prior decoding operations are removed.

Pascal
procedure Clear;
Description
Clear is a procedure used to ensure that characters left over from prior calls to Decode ( 544) are removed before starting a new
decoding operation.

TIdDecoderMIMELineByLine ( 542) maintains an internal buffer for decoding operations that use Base64-encoded values that are
not a multiple of 4-bytes. In other words, the FillChar ( 538) may not have been appended to the end of the encoded values.

Use Clear to ensure that these remaining values are discarded proper to calling Decode ( 544) for a new set of Base64-encoded
values.

Internet Direct (Indy) Version 10.1.5 543


TIdDecoderMIMELineByLine Class Classes

See Also
Decode ( 544)

FinishDecoding ( 544)

TIdDecoderMIMELineByLine.Decode Method
Implements line-oriented decoding for Base64-encoded values.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); override;
Parameters
Parameters Description
AIn Base64-encoded values to be decoded.
AStartPos Initial position in the values to decoded. Default value is 1.
ABytes Number of bytes to decode from AIn. Default value is -1 and indicates all byte values.

Description
Decode is an overridden procedure that implements line-oriented decoding for Base64-encoded values.

TIdDecoderMIMELineByLine ( 542) maintains an internal buffer for decoding operations that use Base64-encoded values that are
not a multiple of 4-bytes. In other words, the FillChar ( 538) may not have been appended to the end of the encoded values.
Decode ensure that any remaining values in the internal buffer are included before added new values specified in AIn.

Decode determines if the number of bytes in the input values is a multiple of 4 (for the 4-byte to 3-byte decoding operation). When it
is not a multiple of 4, the unused bytes by are retained in an internal buffer for use in subsequent calls to the Decode method.

Use Clear ( 543) to discard any remaining bytes prior to starting the decoding operation.

Decode calls the inherited method to perform Base64 decoding for the values specified.

Call FinishDecoding ( 544) to ensure that unused bytes in the internal buffer are padded with one or more values from the FillChar
( 538) property and decoded.

See Also
Clear ( 543)

FinishDecoding ( 544)

TIdDecoderMIMELineByLine.FinishDecoding Method
Ensures unused characters in TIdDecoderMIMELineByLine ( 542) are padded with the FillChar ( 538) and decoded.

Pascal
procedure FinishDecoding;
Description
FinishDecoding is a procedure used to ensure that unused characters in the internal buffer for TIdDecoderMIMELineByLine ( 542)
are padded with the value specified in FillChar ( 538) and decoded.

FinishDecoding ensure that the number of pending characters is always a multiple of 4 (for the 4-byte to 3-byte decoding operation).

FinishDecoding calls the inherited Decode ( 544) method.

Use Clear ( 543) to discard and ignore any unused characters from prior calls to the Decode ( 544) method.

See Also
Decode ( 544)

544 Internet Direct (Indy) Version 10.1.5


Classes TIdDecoderQuotedPrintable Class

Clear ( 543)

TIdDecoderQuotedPrintable Class
Implements a decoder for the Quoted-Printable encoding scheme.

File
IdCoderQuotedPrintable ( 4596)

Hierarchy

Pascal
TIdDecoderQuotedPrintable = class(TIdDecoder);
Description
TIdDecoderQuotedPrintable is a TIdDecoder ( 530) descendant that implements the decoding algorithm for the Quoted-Printable
encoding scheme.

TIdDecoderQuotedPrintable will convert values that have been encoded using TIdEncoderQuotedPrintable ( 665) to their original
un-encoded state.

TIdDecoderQuotedPrintable conforms the decoding algorithm as described in the Internet Standards document:

RFC 2045, Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies, Section 6.7
Quoted-Printable Content Transfer Encoding

See Also
TIdDecoder ( 530)

TIdEncoderQuotedPrintable ( 665)

TIdDecoderQuotedPrintable Members
The following tables list the members exposed by TIdDecoderQuotedPrintable.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Decode ( 546) Decodes a Quoted-Printable-encoded string and stores the result in a Stream.
DecodeBegin ( 531) Prepares the decoder for storing decoded values to a stream.
DecodeEnd ( 532) Signals that decoding has been completed.
DecodeString ( 533) Provides access to the decoded values for a String data type.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Constructor
virtual
Property
read only

Internet Direct (Indy) Version 10.1.5 545


TIdDecoderUUE Class Classes

TIdDecoderQuotedPrintable Methods
The Methods of the TIdDecoderQuotedPrintable class are listed here.

Methods
Method Description
Decode ( 546) Decodes a Quoted-Printable-encoded string and stores the result in a Stream.

Legend
Method
virtual

TIdDecoderQuotedPrintable.Decode Method
Decodes a Quoted-Printable-encoded string and stores the result in a Stream.

Pascal
procedure Decode(
const AIn: string;
const AStartPos: Integer = 1;
const ABytes: Integer = -1
); override;
Parameters
Parameters Description
AIn Value to be decoded.
AStartPos Default is 1.
ABytes Default is -1.
ADest Destination for the decoded value.

Description
DecodeToStream is an overridden procedure in TIdDecoderQuotedPrintable ( 545) that implements the decoding algorithm for the
Quoted-Printable encoding scheme. DecodeToStream converts the Quoted-Printable value in AIn to it's original un-encoded form,
and stores the result in the Stream ADest.

AIn contains a value in the format generated by TIdEncoderQuotedPrintable.Encode ( 666). DecodeToStream will remove any
trailing whitespace in AIn before performing the decoding algorithm, in accordance with RFC 2045. If AIn is an empty string (''),
DecodeToStream performs no processing and exits from the method.

ADest is a TStream descendant that will receive the un-encoded value of AIn.

See Also
TIdEncoderQuotedPrintable.Encode ( 666)

TIdDecoderUUE Class
Implements a decoder for data encoded using the UUEncode algorithm and the UUEncode alphabet.

File
IdCoderUUE ( 4597)

Hierarchy

Pascal
TIdDecoderUUE = class(TIdDecoder00E);

546 Internet Direct (Indy) Version 10.1.5


Classes TIdDefinition Class

Description
TIdDecoderUUE is a TIdDecoder00E ( 533) descendant that implements a decoder for data encoded using the UUEncode
algorithm. TIdDecoderUUE provides facilities for decoding the 7-bit US-ASCII representation of encoded data into it's original binary
format. TIdDecoderUUE also specifies the decoding table for the UUEncode alpahabet in GUUEDecodeTable ( 3127), and the
default FillChar ( 538) '~'.

TIdDecoderUUE uses the 4-byte to 3-byte decoding algorithm defined in TIdDecoderUUEBase. TIdDecoderUUEBase handles the
UUEncode body line format, which consists of the encoded length followed by the encoded data.

TIdDecoderUUE is used by other Indy coder classes, such as TIdMessageDecoderUUE ( 1584), that handle UUEncode message
streams in RFC 822-compliant mail messages.

See Also
TIdDecoder4to3 ( 535)

TIdDecoder00E ( 533)

TIdMessageDecoderUUE ( 1584)

IdCoderUUE.pas ( 4597)

GUUEDecodeTable ( 3127)

TIdDecoderXXE Class
Implements a decoder for data encoded using the XXEncode algorithm and the XXEncode alphabet.

File
IdCoderXXE ( 4599)

Hierarchy

Pascal
TIdDecoderXXE = class(TIdDecoder00E);
Description
TIdDecoderXXE is a TIdDecoder00E ( 533) descendant that implements a decoder for data encoded using the XXEncode
algorithm. TIdDecoderXXE provides facilities for decoding the 7-bit US-ASCII representation of encoded data into it's original binary
format. TIdDecoderXXE also specifies the decoding table for the XXEncode alpahabet in GUUEDecodeTable ( 3127), and the
default FillChar ( 538) '~'.

TIdDecoderXXE uses the 4-byte to 3-byte decoding algorithm defined in TIdDecoderUUE ( 546). TIdDecoderXXEBase handles
the XXEncode body line format by using the inherited Decode ( 534) method, which consists of the encoded length followed by
the encoded data.

TIdDecoderXXE is used by other Indy coder classes, such as TIdMessageDecoderXXE, that handle XXEncode message streams
in RFC 822-compliant mail messages.

See Also
TIdDecoder4to3 ( 535)

TIdDecoder00E ( 533)

TIdDecoderUUE ( 546)

IdCoderXXE.pas ( 4599)

GXXEDecodeTable ( 3128)

GXXECodeTable ( 3216)

Internet Direct (Indy) Version 10.1.5 547


TIdDefinition Class Classes

TIdDefinition Class
Implements a collection item class for values added to the TIdDefinitions ( 550) collection.

File
IdDICTCommon ( 4615)

Hierarchy

Pascal
TIdDefinition = class(TIdCollectionItem);
Description
TIdDefinition is a TIdCollectionItem ( 3011) descendant that implements a class for values added to the TIdDefinitions ( 550)
collection.

TIdDefinition represents an individual response received for the DICT DEFINE command used in TIdDICT ( 552).

See Also
TIdCollectionItem ( 3011)

TIdDefinitions ( 550)

TIdDICT.Define ( 556)

TIdDefinition Members
The following tables list the members exposed by TIdDefinition.

Properties
Property Description
DB ( 549)
Definition ( 549)
Word ( 550)

Methods
Method Description
Create ( 549)
Destroy ( 549)

Legend
Constructor
virtual
Property

TIdDefinition Methods
The Methods of the TIdDefinition class are listed here.

Methods
Method Description
Create ( 549)
Destroy ( 549)

548 Internet Direct (Indy) Version 10.1.5


Classes TIdDefinition Class

Legend
Constructor
virtual

TIdDefinition.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is the overridden constructor for the object instance.

TIdDefinition.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor.

TIdDefinition Properties
The Properties of the TIdDefinition class are listed here.

Properties
Property Description
DB ( 549)
Definition ( 549)
Word ( 550)

Legend
Property

TIdDefinition.DB Property
Pascal
property DB: TIdDBInfo;
Description
DB is a Published TIdDBInfo ( 526) property. Write access for the property is implemented using FDB.

TIdDefinition.Definition Property
Pascal
property Definition: TIdStrings;
Description
Definition is a Published TIdStrings ( 3089) property. Write access for the property is implemented using SetDefinition.

Internet Direct (Indy) Version 10.1.5 549


TIdDefinitions Class Classes

TIdDefinition.Word Property
Pascal
property Word: string;
Description
Word is a Published string property. Write access for the property is implemented using FWord.

TIdDefinitions Class
Implements a collection for DICT DEFINE command responses received in TIdDICT.Define ( 556).

File
IdDICTCommon ( 4615)

Hierarchy

Pascal
TIdDefinitions = class(TIdCollection);
Description
TIdDefinitions is a TIdCollection ( 3011) descendant that implements a collection for DICT DEFINE command responses.

TIdDefinitions is the type used for the Define property in TIdDict.

See Also
TIdCollection ( 3011)

TIdDICT.Define ( 556)

TIdDefinition ( 548)

TIdDefinitions Members
The following tables list the members exposed by TIdDefinitions.

Properties
Property Description
Items ( 552)

Methods
Method Description
Add ( 551)
Create ( 551)
IndexOf ( 551)

Legend
Method
virtual
Property

TIdDefinitions Methods
The Methods of the TIdDefinitions class are listed here.

550 Internet Direct (Indy) Version 10.1.5


Classes TIdDefinitions Class

Methods
Method Description
Add ( 551)
Create ( 551)
IndexOf ( 551)

Legend
Method
virtual

TIdDefinitions.Add Method
Pascal
function Add: TIdDefinition;
Returns
TIdDefinition ( 548)

Description
Add is a method.

Add returns a TIdDefinition ( 548) value.

TIdDefinitions.Create Constructor
Pascal
constructor Create; virtual; reintroduce;
Description
Create is a reintroduced,virtual constructor.

TIdDefinitions.IndexOf Method
Pascal
function IndexOf(
AItem: TIdDefinition
): Integer;
Parameters
Parameters Description
AItem Type is TIdDefinition ( 548).

Returns
Integer

Description
IndexOf is a method.

IndexOf returns a Integer value.

TIdDefinitions Properties
The Properties of the TIdDefinitions class are listed here.

Properties
Property Description
Items ( 552)

Internet Direct (Indy) Version 10.1.5 551


TIdDICT Class Classes

Legend
Property

TIdDefinitions.Items Property
Pascal
property Items [AIndex: Integer]: TIdDefinition;
Description
Items is a Public TIdDefinition ( 548) property. Write access for the property is implemented using SetItems.

Items is the default property for the object instance.

TIdDICT Class
Implements a client for the Dictionary Server ( 566) Protocol.

File
IdDICT ( 4615)

Hierarchy

Pascal
TIdDICT = class(TIdTCPClient);
Description
TIdDICT is a TIdTCPClient ( 2333) descendant that implements a client for the Dictionary Server ( 566) Protocol, as described in
the Internet Standards document:

RFC 2229 - A Dictionary Server Protocol

The DICT protocol is designed to provide access to multiple databases. Word definitions can be requested, the word index can be
searched (using an easily extended set of algorithms), information about the server can be provided (e.g., which index search
strategies are supported, or which databases are available), and information about a database can be provided (e.g., copyright,
citation, or distribution information). Further, the DICT protocol has hooks that can be used to restrict access to some or all of the
databases available on a DICT server.

TIdDICT provides properties and methods needed to implement the following DICT commands:

AUTH
CLIENT
DEFINE
HELP
MATCH
OPTION MIME
QUIT
SASLAUTH
SHOW DB
SHOW INFO
SHOW SERVER

552 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

SHOW STRAT
STATUS

Summary of Response Codes


Below is a summary of response codes used in the DICT protocol. (x) in the first column indicates the response has defined
arguments that must be provided.

? Rsp Meaning
x 110 n databases present - text follows
x 111 n strategies available - text follows
112 database information follows
113 help text follows
114 server information follows
130 challenge follows
x 150 n definitions retrieved - definitions follow
x 151 word database name - text follows
x 152 n matches found - text follows
210 (optional timing and statistical information here)
x 220 text msg-id
221 Closing Connection
230 Authentication successful
250 ok (optional timing information here)
330 send response
420 Server ( 566) temporarily unavailable
421 Server ( 566) shutting down at operator request
500 Syntax error, command not recognized
501 Syntax error, illegal parameters
502 Command not implemented
503 Command parameter not implemented
530 Access denied
531 Access denied, use "SHOW INFO" for server information
532 Access denied, unknown mechanism
550 Invalid database, use "SHOW DB" for list of databases
551 Invalid strategy, use "SHOW STRAT" for a list of strategies
552 No match ( 560)
554 No databases present
555 No strategies available

See Also
TIdTCPClient ( 2333)

Internet Direct (Indy) Version 10.1.5 553


TIdDICT Class Classes

TIdDICT Members
The following tables list the members exposed by TIdDICT.

Properties
Property Description
AuthType ( 564) Indicates the authentication mechanism used for the client.
BoundIP ( 2335) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2336) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 565) Indicates the features supported on the DICT server.
Client ( 565) Provides information about the client to the server for logging and statistical purposes.
ConnectTimeout ( 2336) Millseconds to wait for successful completion of a connection attempt.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 2337) IP address or host name for the remote network connection.
IOHandler ( 2364) The input / output mechanism for the connection.
IPVersion ( 2337) Indicates the IP version used for addresses in the client.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2338) Event handler signalled after the socket handle is bound for the connection.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2338) Event handler signalled proper to binding the socket handle for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 565) Authentication credentials provided during authentication for the client.
Port ( 566) Port number for the connection to the remote server.
ReadTimeout ( 2339) Millseconds to wait for successful completion of a read attempt.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
SASLMechanisms ( 566) Simple Authentication and Security Layer mechanisms available for the client connection.
Server ( 566) Server identification.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
TryMIME ( 566) Indicates if the DICT OPTION MIME command is used for the client connection.
Username ( 567) Authentication identity provided during authentication for the client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
Connect ( 555) Establishes the connection to the DICT server.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 558) Frees the object instance.
DisconnectNotifyPeer ( 558) Close the connection using the QUIT command.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetDBList ( 558) Gets the list of databases on the DICT server.

554 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

GetDictInfo ( 559) Retrieve information about a specific database on the DICT server.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetStrategyList ( 559) Retrieves the list of search strategies supported on the DICT server.
GetSvrInfo ( 559) Retrieves information about the DICT server.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Define ( 556)
Match ( 560)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdDICT Methods
The Methods of the TIdDICT class are listed here.

Methods
Method Description
Connect ( 555) Establishes the connection to the DICT server.
Define ( 556)
Destroy ( 558) Frees the object instance.
DisconnectNotifyPeer ( 558) Close the connection using the QUIT command.
GetDBList ( 558) Gets the list of databases on the DICT server.
GetDictInfo ( 559) Retrieve information about a specific database on the DICT server.
GetStrategyList ( 559) Retrieves the list of search strategies supported on the DICT server.
GetSvrInfo ( 559) Retrieves information about the DICT server.
Match ( 560)

Legend
Method
virtual

TIdDICT.Connect Method
Establishes the connection to the DICT server.

Pascal
procedure Connect; override;
Description
Connect is an overridden method in TIdDICT ( 552) that establishes the connection to the DICT server indicated using the Host (
2337) and Port ( 566) properties.

Internet Direct (Indy) Version 10.1.5 555


TIdDICT Class Classes

Connect clears the Capabilities ( 565) and Server ( 566) properties prior to calling the inherited Connect method to open the
client connection to the server. If the connection is successful, as indicated by the numeric response code 220, value are parsed
from the server greeting and stored in the Server ( 566) and Capabilities ( 565) properties.

Connect sends the DICT CLIENT command using the value in the Client ( 565) property to provide information about the client to
the DICT server.

Connect performs authentication for the client based on the value of the AuthType ( 564) property and the Capabilities ( 565)
supported on the DICT server. When AuthType ( 564) contains atDefault, the DICT AUTH command is used with the values in
Username ( 567) and Password ( 565) to perform authentication using an MD5 hash value. When AuthType ( 564) contains
atSASL, the SASLMechanisms ( 566) for the client are used to perform authentication.

Connect sends the DICT OPTION MIME command when "MIME" is included in the Capabilities ( 565) supported on the DICT
server.

If an exception is encountered during processing in the Connect method, the Disconnect ( 2355) method is called to close the
connection to the DICT server.

See Also
AuthType ( 564) Capabilities ( 565) Disconnect ( 2355) Password ( 565) SASLMechanisms ( 566) Server ( 566)
Username ( 567)

TIdDICT.Define Method
Overload List

Method Description
TIdDICT.Define (String, String, Retrieves definitions from the DICT server.
TIdDefinitions) ( 556)
TIdDICT.Define (String, TIdDefinitions, Retrieves definitions from the DICT server.
Boolean) ( 557)

TIdDICT.Define Method (String, String, TIdDefinitions)


Retrieves definitions from the DICT server.

Pascal
procedure Define(
const AWord: String;
const ADBName: String;
AResults: TIdDefinitions
); overload;
Parameters
Parameters Description
AWord Word definition to search for in the database.
ADBName Database to search for matching word definitions.
AResults Container for definitions returned by the DICT server.

Description
Define is an overloaded method used to implement the DICT DEFINE command. Define performs a lookup for the definition of the
specified word in the databases on the DICT server.

AWord indicates the word to lookup in the databases on the DICT server.

ADBName indicates the database to search for matching word definitions.

AResults is the TIdDefinitions ( 550) instance used to store definitions retrieved from the DICT server. Define clears any exisiting
definitions stored in the AResults argument.

Define sends the DICT DEFINE command using the arguments indicated in AWord and ADBName.

556 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

Define will normally result in the following status codes being returned to the client:

Code Description
552 No match ( 560)
150 n definitions retrieved - definitions follow
151 word database name - text follows
250 ok (optional timing information here)

Definitions returned with response code 151 are captured and stored in the AResults.

See Also
TIdDICT.Define

TIdDefinitions ( 550)

TIdDefinition ( 548)

TIdDICT.Define Method (String, TIdDefinitions, Boolean)


Retrieves definitions from the DICT server.

Pascal
procedure Define(
const AWord: String;
AResults: TIdDefinitions;
const AGetAll: Boolean = True
); overload;
Parameters
Parameters Description
AWord Word definition to search for in the databases.
AResults Container for definitions returned by the DICT server.
AGetAll Indictes if all word matches are included in the results.

Description
Define is an overloaded method used to implement the DICT DEFINE command. Define performs a lookup for the definition of the
specified word in the databases on the DICT server.

AWord indicates the word to lookup in the databases on the DICT server.

AResults is the TIdDefinitions ( 550) instance used to store definitions retrieved from the DICT server.

AGetAll indicates that all word matches in all databases will be included in the definitions returned to the client. When AGetAll
contains False, a single match ( 560) from all databases is returned.

Define will normally result in the following status codes being returned to the client:

Code Description
552 No match ( 560)
150 n definitions retrieved - definitions follow
151 word database name - text follows
250 ok (optional timing information here)

Definitions returned with response code 151 are captured and stored in the AResults.

See Also
TIdDICT.Define

Internet Direct (Indy) Version 10.1.5 557


TIdDICT Class Classes

TIdDefinitions ( 550)

TIdDefinition ( 548)

TIdDICT.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance. Destroy frees resources allocated to the SASLMechanisms ( 566) and
Capabilities ( 565) properties during initialization of the component.

Destroy calls the inherited method prior to exit.

See Also
SASLMechanisms ( 566) Capabilities ( 565)

TIdDICT.DisconnectNotifyPeer Method
Close the connection using the QUIT command.

Pascal
procedure DisconnectNotifyPeer; override;
Description
DisconnectNotifyPeer is an overridden method in TIdDICT ( 552) used to send the DICT QUIT command and close the
connection to the remote server. When the Connected ( 2353) properties contains True, the DICT QUIT command is sent to the
server.

DisconnectNotifyPeer calls the inherited DisconnectNotifyPeer method prior to exit.

See Also
Connected ( 2353)

TIdDICT.GetDBList Method
Gets the list of databases on the DICT server.

Pascal
procedure GetDBList(
ADB: TIdDBList
);
Parameters
Parameters Description
ADB Container for database names found on the DICT server.

Description
GetDBList is a procedure used to get the list of databases found on the DICT server.

GetDBList sends the DICT SHOW DB command to the server, and captures the returned names and descriptions in the container
specified in ADB.

See Also
TIdDBList ( 527)

TIdDBInfo ( 526)

558 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

TIdDICT.GetDictInfo Method
Retrieve information about a specific database on the DICT server.

Pascal
procedure GetDictInfo(
const ADict: String;
AResults: TIdStrings
);
Parameters
Parameters Description
ADict Dictionary name for the request.
AResults Stores information about the requeste dictionary.

Description
GetDictInfo is a procedure used to retrieve information about the database specified in ADict.

GetDictInfo sends the DICT SHOW INFO command using the value in ADict as an argument.

GetDictInfo captures the information returned for the database in the AResults parameter variable. The data normally includes
source, copyright, and licensing information about the specified database. The information is free-form text and is suitable for
display to the user in the same manner as a definition. The textual body of the information is terminated with a CRLF period CRLF
sequence.

Use Server ( 566) or GetSvrInfo ( 559) to get information about the DICT server.

See Also
GetSvrInfo ( 559)

Server ( 566)

TIdDICT.GetStrategyList Method
Retrieves the list of search strategies supported on the DICT server.

Pascal
procedure GetStrategyList(
AStrats: TIdStrategyList
);
Parameters
Parameters Description
AStrats Container for the search strategies supported on the DICT server.

Description
GetStrategyList is a procedure used to retrieve the list of search strategies supported on the DICT server.

GetStrategyList sends the DICT SHOW STRAT command, and captures the textual body of the strategy list in the AStrats
parameter variable.

See Also
TIdStrategyList ( 2255) TIdStrategy ( 2255)

TIdDICT.GetSvrInfo Method
Retrieves information about the DICT server.

Pascal
procedure GetSvrInfo(
AResults: TIdStrings

Internet Direct (Indy) Version 10.1.5 559


TIdDICT Class Classes

);
Parameters
Parameters Description
AResults Storage for information about the DICT server.

Description
GetSvrInfo is a procedure used to retrieve server information create ( 267) by the local administrator for the DICT server. This
information could include information about local databases or strategies, or administrative information such as who to contact for
access to databases requiring authentication.

GetSvrInfo send the DICT SHOW SERVER command, and captures the textual response in the AResults parameter variable.

Use GetDBInfo or GetDictInfo ( 559) to retrieve information about databases or dictionaries on the DICT server.

Use Server ( 566) to check the server identification string captured during Connect ( 555).

See Also
GetDBInfo

GetDictInfo ( 559)

Server ( 566)

TIdDICT.Match Method
Overload List

Method Description
TIdDICT.Match (String, String, String, Searches a dictionary index for words that match the specified criteria.
TIdMatchList) ( 560)
TIdDICT.Match (String, String, Searches a dictionary index for words that match the specified criteria.
TIdMatchList, Boolean) ( 561)
TIdDICT.Match (String, TIdMatchList, Searches a dictionary index for words that match the specified criteria.
Boolean) ( 563)

TIdDICT.Match Method (String, String, String, TIdMatchList)


Searches a dictionary index for words that match the specified criteria.

Pascal
procedure Match(
const AWord: String;
const ADBName: String;
const AStrat: String;
AResults: TIdMatchList
); overload;
Parameters
Parameters Description
AWord Word to match in the selected database.
ADBName Database to search for word matches.
AStrat Search strategy for the matches.
AResults Container for matches found in the dictionary indices.

Description
Match is an overloaded method used to search an index for a dictionary on the DICT server, and reports words found using a
particular search strategy. Not all strategies are useful for all dictionaries, and some dictionaries may support additional search
strategies (e.g., reverse lookup).

Match sends the DICT MATCH command using the provided arguments.

560 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

AWord indictes the word to match, and is used relative to the search strategy.

AResults is the container for the word matches found using a given search strategy.

All DICT servers implement the MATCH command, and must support the "exact" and "prefix" strategies. These are easy to
implement and are generally the most useful. Other strategies are server dependent.

The "exact" strategy matches a word exactly, although different servers may treat non-alphanumeric data differently.
Case-insensitive comparison which ignores non-alphanumeric characters and which folds whitespace is useful for English-language
dictionaries. Other comparisons may be more appropriate for other languages or when using extended character sets.

The "prefix" strategy is similar to "exact", except that it only compares the first part of the word.

Different servers may implement these algorithms differently. The requirement is that strategies with the names "exact" and "prefix"
exist so that a simple client can use them.

Other strategies that might be considered by a server implementor are matches based on substring, suffix, regular expressions,
soundex [KNUTH73], and Levenshtein [PZ85] algorithms. These last two are especially useful for correcting spelling errors. Other
useful strategies perform some sort of "reverse" lookup (i.e., by searching definitions to find the word that the query suggests).

If the database name is specified with an exclamation point (decimal code 33, "!"), then all of the databases will be searched until a
match is found, and all matches in that database will be displayed. If the database name is specified with a star (decimal code 42,
"*"), then all of the matches in all available databases will be displayed. In both of these special cases, the databases will be
searched in the same order as that printed by the "SHOW DB" command.

If the strategy is specified using a period (decimal code 46, "."), then the word will be matched using a server-dependent default
strategy, which should be the best strategy available for interactive spell checking. This is usually a derivative of the Levenshtein
algorithm [PZ85].

Match sends the DICT MATCH command using the values indicated in ADBName, AStrat, and AWord as arguments.

If no matches are found in any of the searched databases, then status code 552 will be returned.

Otherwise, status code 152 will be returned followed by a list of matched words in AResults.

This makes the responses directly useful in a DEFINE command.

Following the list, status code 250 is sent, which may include server-specific timing and statistical information, as discussed in the
section on the DEFINE command.

Responses

Rsp Meaning
550 Invalid database, use "SHOW DB" for list of databases
551 Invalid strategy, use "SHOW STRAT" for a list of strategies
552 No match
152 n matches found - text follows
250 ok (optional timing information here)

See Also
TIdDICT.Match

TIdMatchList ( 1519)

TIdDICT.Match Method (String, String, TIdMatchList, Boolean)


Searches a dictionary index for words that match the specified criteria.

Pascal
procedure Match(

Internet Direct (Indy) Version 10.1.5 561


TIdDICT Class Classes

const AWord: String;


const AStrat: String;
AResults: TIdMatchList;
const AGetAll: Boolean = True
); overload;
Parameters
Parameters Description
AWord Word to match in the selected database.
AStrat Search strategy for the matches.
AResults Container for matches found in the dictionary indices.
AGetAll Indicates is all matches are included, or one match per database.

Description
Match is an overloaded method used to search an index for a dictionary on the DICT server, and reports words found using a
particular search strategy. Not all strategies are useful for all dictionaries, and some dictionaries may support additional search
strategies (e.g., reverse lookup).

Match sends the DICT MATCH command using the provided arguments.

AWord indictes the word to match, and is used relative to the search strategy.

AResults is the container for the word matches found using a given search strategy.

All DICT servers implement the MATCH command, and must support the "exact" and "prefix" strategies. These are easy to
implement and are generally the most useful. Other strategies are server dependent.

The "exact" strategy matches a word exactly, although different servers may treat non-alphanumeric data differently.
Case-insensitive comparison which ignores non-alphanumeric characters and which folds whitespace is useful for English-language
dictionaries. Other comparisons may be more appropriate for other languages or when using extended character sets.

The "prefix" strategy is similar to "exact", except that it only compares the first part of the word.

Different servers may implement these algorithms differently. The requirement is that strategies with the names "exact" and "prefix"
exist so that a simple client can use them.

Other strategies that might be considered by a server implementor are matches based on substring, suffix, regular expressions,
soundex [KNUTH73], and Levenshtein [PZ85] algorithms. These last two are especially useful for correcting spelling errors. Other
useful strategies perform some sort of "reverse" lookup (i.e., by searching definitions to find the word that the query suggests).

If the database name is specified with an exclamation point (decimal code 33, "!"), then all of the databases will be searched until a
match is found, and all matches in that database will be displayed. If the database name is specified with a star (decimal code 42,
"*"), then all of the matches in all available databases will be displayed. In both of these special cases, the databases will be
searched in the same order as that printed by the "SHOW DB" command.

If the strategy is specified using a period (decimal code 46, "."), then the word will be matched using a server-dependent default
strategy, which should be the best strategy available for interactive spell checking. This is usually a derivative of the Levenshtein
algorithm [PZ85].

Match sends the DICT MATCH command using the values indicated in AWord using the server-dependent default strategy. When
AGetAll is True, all availble matched are requested. When AGetAll is False, only one match per database is requested.

If no matches are found in any of the searched databases, then status code 552 will be returned.

Otherwise, status code 152 will be returned followed by a list of matched words in AResults.

This makes the responses directly useful in a DEFINE command.

Following the list, status code 250 is sent, which may include server-specific timing and statistical information, as discussed in the
section on the DEFINE command.

Responses

562 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

Rsp Meaning
550 Invalid database, use "SHOW DB" for list of databases
551 Invalid strategy, use "SHOW STRAT" for a list of strategies
552 No match
152 n matches found - text follows
250 ok (optional timing information here)

See Also
TIdDICT.Match

TIdMatchList ( 1519)

TIdDICT.Match Method (String, TIdMatchList, Boolean)


Searches a dictionary index for words that match the specified criteria.

Pascal
procedure Match(
const AWord: String;
AResults: TIdMatchList;
const AGetAll: Boolean = True
); overload;
Parameters
Parameters Description
AWord Word to match in the selected database.
AResults Container for matches found in the dictionary indices.
AGetAll Indicates is all matches are included, or one match per database.

Description
Match is an overloaded method used to search an index for a dictionary on the DICT server, and reports words found using a
particular search strategy. Not all strategies are useful for all dictionaries, and some dictionaries may support additional search
strategies (e.g., reverse lookup).

Match sends the DICT MATCH command using the provided arguments.

AWord indictes the word to match, and is used relative to the search strategy.

AResults is the container for the word matches found using a given search strategy.

All DICT servers implement the MATCH command, and must support the "exact" and "prefix" strategies. These are easy to
implement and are generally the most useful. Other strategies are server dependent.

The "exact" strategy matches a word exactly, although different servers may treat non-alphanumeric data differently.
Case-insensitive comparison which ignores non-alphanumeric characters and which folds whitespace is useful for English-language
dictionaries. Other comparisons may be more appropriate for other languages or when using extended character sets.

The "prefix" strategy is similar to "exact", except that it only compares the first part of the word.

Different servers may implement these algorithms differently. The requirement is that strategies with the names "exact" and "prefix"
exist so that a simple client can use them.

Other strategies that might be considered by a server implementor are matches based on substring, suffix, regular expressions,
soundex [KNUTH73], and Levenshtein [PZ85] algorithms. These last two are especially useful for correcting spelling errors. Other
useful strategies perform some sort of "reverse" lookup (i.e., by searching definitions to find the word that the query suggests).

If the database name is specified with an exclamation point (decimal code 33, "!"), then all of the databases will be searched until a
match is found, and all matches in that database will be displayed. If the database name is specified with a star (decimal code 42,
"*"), then all of the matches in all available databases will be displayed. In both of these special cases, the databases will be
searched in the same order as that printed by the "SHOW DB" command.

Internet Direct (Indy) Version 10.1.5 563


TIdDICT Class Classes

If the strategy is specified using a period (decimal code 46, "."), then the word will be matched using a server-dependent default
strategy, which should be the best strategy available for interactive spell checking. This is usually a derivative of the Levenshtein
algorithm [PZ85].

Match sends the DICT MATCH command using the values indicated in AWord using the server-dependent default strategy. When
AGetAll is True, all availble matched are requested. When AGetAll is False, only one match per database is requested.

If no matches are found in any of the searched databases, then status code 552 will be returned.

Otherwise, status code 152 will be returned followed by a list of matched words in AResults.

This makes the responses directly useful in a DEFINE command.

Following the list, status code 250 is sent, which may include server-specific timing and statistical information, as discussed in the
section on the DEFINE command.

Responses

Rsp Meaning
550 Invalid database, use "SHOW DB" for list of databases
551 Invalid strategy, use "SHOW STRAT" for a list of strategies
552 No match
152 n matches found - text follows
250 ok (optional timing information here)

See Also
TIdDICT.Match

TIdMatchList ( 1519)

TIdDICT Properties
The Properties of the TIdDICT class are listed here.

Properties
Property Description
AuthType ( 564) Indicates the authentication mechanism used for the client.
Capabilities ( 565) Indicates the features supported on the DICT server.
Client ( 565) Provides information about the client to the server for logging and statistical purposes.
Password ( 565) Authentication credentials provided during authentication for the client.
Port ( 566) Port number for the connection to the remote server.
SASLMechanisms ( 566) Simple Authentication and Security Layer mechanisms available for the client connection.
Server ( 566) Server identification.
TryMIME ( 566) Indicates if the DICT OPTION MIME command is used for the client connection.
Username ( 567) Authentication identity provided during authentication for the client.

Legend
Property
read only

TIdDICT.AuthType Property
Indicates the authentication mechanism used for the client.

564 Internet Direct (Indy) Version 10.1.5


Classes TIdDICT Class

Pascal
property AuthType: TIdDICTAuthenticationType;
Description
AuthType is a TIdDICTAuthenticationType ( 2948) property that indicates the mechanism to use when performing authentication
in the Connect ( 555) method.

The default value for AuthType is DICT_AUTHDEF ( 3201) and cause the DICT AUTH command to be used for authenticating the
Username ( 567) and Password ( 565) for the client. atDefault involves creating the MD5 hash value sent in the AUTH command.

Use Capabilities ( 565) to determine the SASL authentication mechanisms supported on the DICT server for the client connection.

TIdDICT.Capabilities Property
Indicates the features supported on the DICT server.

Pascal
property Capabilities: TIdStrings;
Description
Capabilities is a read-only TIdStrings ( 3089) property that represents the features supported on the DICT server for the client
connection. Capabilities is updated in the Connect ( 555) method using the values returned as a greeting from the DICT server.

See Also
Connect ( 555)

TIdDICT.Client Property
Provides information about the client to the server for logging and statistical purposes.

Pascal
property Client: String;
Description
Client is a String property that allows the client to provide information about itself to the server for logging and statistical purposes.

Client used in the Connect ( 555) method when the DICT CLIENT command is sent after establishing the connection to the
remote server identified in Host ( 2337) and Port ( 566).

See Also
Connect ( 555)

TIdDICT.Password Property
Authentication credentials provided during authentication for the client.

Pascal
property Password;
Description
Password is a published property in TIdDICT ( 552) that represents the authentication credentials provided during authentication
for the client.

Username ( 567) and Password are provided to the DICT AUTH command or the SASLMechanisms ( 566) for the client
depending on the values in AuthType ( 564) and Capabilities ( 565).

See Also
Username ( 567)

SASLMechanisms ( 566)

Internet Direct (Indy) Version 10.1.5 565


TIdDICT Class Classes

AuthType ( 564)

TIdDICT.Port Property
Port number for the connection to the remote server.

Pascal
property Port;
Description
Port is a Published property in TIdDICT ( 552).

The default value for Port is IdPORT_DICT ( 3966) as assigned during initialization of the component.

Set values in Host ( 2337) and Port prior to calling Connect ( 555).

See Also
Connect ( 555) Host ( 2337)

TIdDICT.SASLMechanisms Property
Simple Authentication and Security Layer mechanisms available for the client connection.

Pascal
property SASLMechanisms: TIdSASLEntries;
Description
SASLMechanisms is a TIdSASLList property that represents a container for the Simple Authentication and Security Layer
mechanisms available for the DICT client connection.

SASLMechanisms is used in the COnnect method to perform authentication based on the value in AuthType ( 564).

See Also
TIdSASLList

TIdDICT.Server Property
Server identification.

Pascal
property Server: String;
Description
Server is a read-only String property that represents the server identification returned in the server greeting in the Connect ( 555)
method.

See Also
Connect ( 555)

TIdDICT.TryMIME Property
Indicates if the DICT OPTION MIME command is used for the client connection.

Pascal
property TryMIME: Boolean;
Description
TryMIME is a Boolean property that indicates if the DICT OPTION MIME command should be used when establishing the DICT
client connection in the Connect ( 555) method.

566 Internet Direct (Indy) Version 10.1.5


Classes TIdDICTServer Class

When TryMIME contains True and the value "MIME" is stored in the Capabilities ( 565) for the DICT server, the DICT OPTION
MIME command is sent to the remote server.

The default value for TryMIME is DEF_TRYMIME ( 3197) as assigned during initialization of the component.

See Also
Capabilities ( 565) Connect ( 555)

TIdDICT.Username Property
Authentication identity provided during authentication for the client.

Pascal
property Username;
Description
Username is a published property in TIdDICT ( 552) that represents the authentication identity provided during authentication for
the client.

Username and Password ( 565) are provided to the DICT AUTH command or the SASLMechanisms ( 566) for the client
depending on the values in AuthType ( 564) and Capabilities ( 565).

See Also
Password ( 565) SASLMechanisms ( 566) AuthType ( 564)

TIdDICTServer Class
Implements a Dictionary Protocol server for dictionary databases.

File
IdDICTServer ( 4616)

Hierarchy

Pascal
TIdDICTServer = class(TIdCmdTCPServer);
Description
TIdDICTServer is a TIdCmdTCPServer ( 326) descendant that implements a server for the Dictionary Server Protocol, as
described in the Internet Standards document:

RFC 2229 - A Dictionary Server Protocol

The Dictionary Server Protocol (DICT) is a TCP transaction based query/response protocol that allows a client to access dictionary
definitions from a set of natural language dictionary databases.

TIdDICTServer uses an event-based architecture that provides event handlers for the following DICT protocol commands:

TIdDICTServer also provides the OnCommandOther ( 572) event handler to respond to unknown DICT commands, or DICT
protocol extensions.

TIdDICTServer does not provide an implementation of the event handlers. The application should assign procedures to the event
handlers to respond to event notifications, or the result code 500 with the error message RSCMDNotRecognized will be generated.

See Also
TIdCmdTCPServer ( 326) IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 567


TIdDICTServer Class Classes

TIdDICTServer Members
The following tables list the members exposed by TIdDICTServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 569) Default port number for the server.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 330) Frees the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandAuth ( 570) Specifies the DICT AUTH command event handler.
OnCommandClient ( 570) Specifies the DICT CLIENT command event handler.
OnCommandDefine ( 570) Specifies the DICT DEFINE command event handler.
OnCommandHelp ( 570) Specifies the DICT HELP command event handler.
OnCommandMatch ( 571) Specifies the DICT MATCH command event handler.
OnCommandOption ( 571) Specifies the event handler for the DICT OPTION command.
OnCommandOther ( 572) Specifies the command event handler for unknown DICT commands.

568 Internet Direct (Indy) Version 10.1.5


Classes TIdDICTServer Class

OnCommandQuit ( 572) Specifies the event handler for the DICT QUIT command.
OnCommandSASLAuth ( 572) Specifies the event handler for the DICT SASLAUTH command.
OnCommandShow ( 572) Specifies the event handler for the DICT SHOW command.
OnCommandStatus ( 573) Specifies the event handler for the DICT STATUS command.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdDICTServer Properties
The Properties of the TIdDICTServer class are listed here.

Properties
Property Description
DefaultPort ( 569) Default port number for the server.

Legend
Property

TIdDICTServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdDICTServer ( 567) that identifies the default port number for the server, as described in
the Dictionary Server Protocol specification.

The default value for DefaultPort is IdPORT_DICT ( 3966).

TIdDICTServer Events
The Events of the TIdDICTServer class are listed here.

Events
Event Description
OnCommandAuth ( 570) Specifies the DICT AUTH command event handler.
OnCommandClient ( 570) Specifies the DICT CLIENT command event handler.
OnCommandDefine ( 570) Specifies the DICT DEFINE command event handler.
OnCommandHelp ( 570) Specifies the DICT HELP command event handler.
OnCommandMatch ( 571) Specifies the DICT MATCH command event handler.
OnCommandOption ( 571) Specifies the event handler for the DICT OPTION command.
OnCommandOther ( 572) Specifies the command event handler for unknown DICT commands.
OnCommandQuit ( 572) Specifies the event handler for the DICT QUIT command.
OnCommandSASLAuth ( 572) Specifies the event handler for the DICT SASLAUTH command.
OnCommandShow ( 572) Specifies the event handler for the DICT SHOW command.
OnCommandStatus ( 573) Specifies the event handler for the DICT STATUS command.

Internet Direct (Indy) Version 10.1.5 569


TIdDICTServer Class Classes

Legend
Event

TIdDICTServer.OnCommandAuth Event
Specifies the DICT AUTH command event handler.

Pascal
property OnCommandAuth: TIdDICTAuthEvent;
Description
OnCommandAuth specifies the TIdDICTAuthEvent ( 3018) event handler used to respond to the DICT AUTH command, as
described in RFC 2229. The DICT AUTH command allows a client to be authenticated using a user name and an APOP-style MD5
Checksum as described in RFC 1939.

Authentication is an optional server capability. The AUTH command may be implemented by a DICT server. Applications should
assign a procedure to the event handler in order to respond to the DICT command, or the server will return the default message:

TIdDICTServer.OnCommandClient Event
Specifies the DICT CLIENT command event handler.

Pascal
property OnCommandClient: TIdDICTShowEvent;
Description
OnCommandClient specifies the TIdDICTShowEvent ( 3021) event handler used to respond to the DICT CLIENT command, as
described in RFC 2229.

The CLIENT command allows the client to provide information about itself for possible logging and statistical purposes. All clients
should send this command after connecting to the server. All DICT servers must implement this command, though, the server
doesn't have to do anything with the information provided by the client.

Applications should assign a procedure to the event handler in order to respond to the DICT command, or the server will return the
default message:

TIdDICTServer.OnCommandDefine Event
Specifies the DICT DEFINE command event handler.

Pascal
property OnCommandDefine: TIdDICTDefineEvent;
Description
OnCommandDefine specifies the TIdDICTDefineEvent ( 3019) event handler used to respond to the DICT DEFINE command, as
described in RFC 2229.

The DICT DEFINE command is used to perform a search for the specified word in the indicated database(s). Applications should
assign a procedure to the event handler in order to respond to the DICT command, or the server will return the default message:

TIdDICTServer.OnCommandHelp Event
Specifies the DICT HELP command event handler.

Pascal
property OnCommandHelp: TIdDICTGetEvent;
Description
OnCommandHelp specifies the TIdDICTGetEvent ( 3019) event handler used to respond to the DICT HELP command, as

570 Internet Direct (Indy) Version 10.1.5


Classes TIdDICTServer Class

described in RFC 2229.

The DICT HELP command provides a short summary of commands that are understood by this implementation of the DICT server.
All DICT servers implement the HELP command.

Applications should assign a procedure to the event handler in order to respond to the DICT command, or the server will return the
default message:

500 command not recognized

TIdDICTServer.OnCommandMatch Event
Specifies the DICT MATCH command event handler.

Pascal
property OnCommandMatch: TIdDICTMatchEvent;
Description
OnCommandMatch specifies the TIdDICTMatchEvent ( 3019) event handler used to respond to the DICT MATCH command, as
described in RFC 2229.

The DICT MATCH command is used to search the dictionary index and report the words found using a particular strategy. All DICT
servers must implement the MATCH command, and must support the "exact" and "prefix" strategies.

The "exact" strategy performs a case-insensitive comparison. The "prefix" strategy is similar to "exact", except that it only compares
the first part of the word. These strategies are easily implemented and are generally the most useful. Other strategies are server
dependent.

Other strategies that might be considered are matches based on substring, suffix, regular expressions, soundex [KNUTH73], and
Levenshtein [PZ85] algorithms. These last two are especially useful for correcting spelling errors. Other useful strategies perform
some sort of "reverse" lookup (i.e., by searching definitions to find the word that the query suggests).

Strategy may also contain the special character ".", which indicates that the server should use the default strategy for that server.
This is usually a derivative of the Levenshtein algorithm [PZ85].

Database contains the name of the database to be searched, in a form returned by SHOW DB, or one the following wildcard
characters:

• "!" - Search all databases until a match is found.


• "* " - Search for all matches in the current database.
Applications should assign a procedure to the event handler in order to respond to the DICT command, or the server will return the
default message:

500 command not recognized

TIdDICTServer.OnCommandOption Event
Specifies the event handler for the DICT OPTION command.

Pascal
property OnCommandOption: TIdDICTOtherEvent;
Description
TIdDICTServer ( 567) uses the OnCommandOption event handler to respond to the DICT OPTION command, which informs the
server that the client wishes to utilize one of the defined protocol options.

At the current time, OPTION MIME is the only recognized option. In the future, standard extensions to this protocol should be
proposed which allow the client to request certain content types or encodings.

OPTION MIME requests that all text responses be prefaced by a MIME header, as described in RFC2045, and followed by a single
blank line (CRLF). If a client requests this option, then the client MUST be able to parse Content-Type and
Content-transfer-encoding headers, and MUST be able to ignore textual responses which have an unsupported content or

Internet Direct (Indy) Version 10.1.5 571


TIdDICTServer Class Classes

encoding. A client MUST support the UTF-8 encoding described in RFC2044.

OPTION MIME is a REQUIRED server capability, and all DICT servers MUST implement this command.

TIdDICTServer.OnCommandOther Event
Specifies the command event handler for unknown DICT commands.

Pascal
property OnCommandOther: TIdDICTOtherEvent;
Description
OnCommandOther specifies the event type for unrecognized DICT commands, and allows the server to respond to DICT
extensions or provide default error handling by using the event handler mechanism.

TIdDICTServer.OnCommandQuit Event
Specifies the event handler for the DICT QUIT command.

Pascal
property OnCommandQuit: TIdDICTGetEvent;
Description
TIdDICTServer ( 567) uses the OnCommandQuit event handler to respond to the DICT QUIT command, which informs the server
that the client wishes to close the connection to the DICT server.

The DICT server must implement the QUIT command.

TIdDICTServer.OnCommandSASLAuth Event
Specifies the event handler for the DICT SASLAUTH command.

Pascal
property OnCommandSASLAuth: TIdDICTAuthEvent;
Description
TIdDICTAuthEvent ( 3018) specifies the event type for the DICT SASLAUTH command, and is used by the TIdDICTServer (
567) OnCommandSASLAuth event handler to perform user authentication.

OnCommandSASLAuth must provide, as parameters, the name of the user to be authenticated, and the BASE64-encoded initial
SASL response as described in RFC 2045. All responses to the SASLAUTH server challenge should use the SASLRESP
command and a BASE64-encoded parameter.

Authentication is an optional server capability. The SASLAUTH command may be implemented by a DICT server.

TIdDICTServer.OnCommandShow Event
Specifies the event handler for the DICT SHOW command.

Pascal
property OnCommandShow: TIdDICTShowEvent;
Description
OnCommandShow specifies the event handler for the DICT SHOW command, and is used by the TIdDICTServer ( 567) to
implement the DICT command.

OnCommandShow must provide parameters that indicate the thread of execution performing the command, and the SHOW
command parameters to be included in the command execution. The command options include:

572 Internet Direct (Indy) Version 10.1.5


Classes TIdDigestAuthentication Class

TIdDICTServer.OnCommandStatus Event
Specifies the event handler for the DICT STATUS command.

Pascal
property OnCommandStatus: TIdDICTGetEvent;
Description
OnCommandStatus specifies the event handler for the DICT STATUS command, and is used by the TIdDICTServer ( 567) to
implement the DICT command.

The STATUS command returns server-specific timing or debugging information. This information may be useful in debugging or
tuning a DICT server. All DICT servers MUST implement this command, although the text part of the response is not specified and
may be omitted.

TIdDigestAuthentication Class
Implements an HTTP Digest Authentication ( 575) scheme.

File
IdAuthenticationDigest ( 4587)

Hierarchy

Pascal
TIdDigestAuthentication = class(TIdAuthentication);
Description
TIdAuthenticationDigest is a TIDAuthentication ( 253) descendant that implements the HTTP Digest Access Authentication (
575) Scheme, as described in the Internet Standards documents:

RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication

TIdAuthenticationDigest extends the ancestor class by providing internal properties and methods needed to create ( 255) the
message digest returned in the authentication ( 575) string. This is includes values in the format:

Digest username="jdoe" realm="http://www.domain.com" result="00112233445566778899aabbccddeeff"


TIdAuthenticationDigest provides an overridden DoNext method that reads the values for the message digest and stores the
arguments in the following internal properties:

Algorithm
Domain
Nonce
Opaque
QopOptions
Realm
Stale

An EIdInvalidAlgorithm ( 108) will be raised if the Algorithm read for the message digest contains a value other than 'MD5'.

Internet Direct (Indy) Version 10.1.5 573


TIdDigestAuthentication Class Classes

Exceptions
Exceptions Description
EIdInvalidAlgorithm ( 108) With the message RSHTTPAuthInvalidHash.

See Also
TIdHTTP ( 1041)

TIdHTTPServer ( 1102)

TIdAuthentication ( 253)

TIdBasicAuthentication ( 275)

EIdInvalidAlgorithm ( 108)

RSHTTPAuthInvalidHash

IndySupport ( 15)

TIdDigestAuthentication Members
The following tables list the members exposed by TIdDigestAuthentication.

Properties
Property Description
AuthParams ( 256) Represents authentication ( 254) parameters to be used for the process.
CurrentStep ( 257) Identifies the current task number during authentication ( 254) processing.
Method ( 575)
Params ( 257) Contains authentication ( 254) parameters for the mechanism.
Password ( 257) Represents the authorization credentials for the authentication ( 254) process.
Postbody ( 576)
Steps ( 257) Number of tasks required for the authentication ( 254) process.
Uri ( 576)
Username ( 258) Represents the authorization identity for the authentication ( 254) process.

Methods
Method Description
Authentication ( 575) Calculates the Authentication credentials and message digest.
Create ( 255) Constructor for the object instance.
Destroy ( 575) Frees the object instance.
KeepAlive ( 255) Indicates that Keep-Alive signals are supported for the authentication ( 254) mechanism.
Next ( 255) Identifies the next action in the authentication ( 254) process.
Reset ( 256) Clears the number of retries for the authentication ( 254) mechanism.

Legend
Method
virtual
abstract
Property
read only

TIdDigestAuthentication Methods
The Methods of the TIdDigestAuthentication class are listed here.

Methods
Method Description
Authentication ( 575) Calculates the Authentication credentials and message digest.
Destroy ( 575) Frees the object instance.

574 Internet Direct (Indy) Version 10.1.5


Classes TIdDigestAuthentication Class

Legend
Method
virtual

TIdDigestAuthentication.Authentication Method
Calculates the Authentication credentials and message digest.

Pascal
function Authentication: String; override;
Returns
String - Authentication credentials for the user and realm.

Description
Authentication is an overridden String function in TIdDigestAuthentication ( 573) that returns the credentials and the message
digest required for the authentication scheme.

The return value is in the form:

Digest username="jdoe" realm="http://www.domain.com" result="00112233445566778899aabbccddeeff"

TIdDigestAuthentication.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees resources allocated to internal member variables like the QOp
options and Domain.

Destroy calls the inherited Destroy destructor prior to exiting from the method.

See Also
Authentication ( 575)

TIdDigestAuthentication Properties
The Properties of the TIdDigestAuthentication class are listed here.

Properties
Property Description
Method ( 575)
Postbody ( 576)
Uri ( 576)

Legend
Property

TIdDigestAuthentication.Method Property
Pascal
property Method: String;
Description
Method is a String property.

Internet Direct (Indy) Version 10.1.5 575


TIdDISCARDServer Class Classes

TIdDigestAuthentication.Postbody Property
Pascal
property Postbody: TIdStringList;
Description
Postbody is a TIdStringList ( 3088) property.

TIdDigestAuthentication.Uri Property
Pascal
property Uri: String;
Description
Uri is a String property.

TIdDISCARDServer Class
Implements a Discard Protocol server.

File
IdDiscardServer ( 4616)

Hierarchy

Pascal
TIdDISCARDServer = class(TIdCustomTCPServer);
Description
TIdDISCARDServer is a TIdTCPServer ( 2375) descendant that implements a TCP-based server for the Discard Protocol, as
described in the Internet Standards document:

RFC 863 - Discard Protocol

TIdDISCARDServer is a useful debugging and measurement protocol where the data sent to the server is simply discarded.
TIdDISCARDServer provides a default implementation that accepts threaded client connections, reads the connection for the
TIdPeerThread to determine it's InputBuffer contents, and discards the values. The threaded client connection automatically
terminates after reading the InputBuffer.

See Also
TIdDiscardUDPServer ( 578)

TIdTCPServer ( 2375)

TIdContext ( 376)

TIdDISCARDServer Members
The following tables list the members exposed by TIdDISCARDServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.

576 Internet Direct (Indy) Version 10.1.5


Classes TIdDISCARDServer Class

ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 577) Default port number used for client connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdDISCARDServer Properties
The Properties of the TIdDISCARDServer class are listed here.

Properties
Property Description
DefaultPort ( 577) Default port number used for client connections.

Legend
Property

TIdDISCARDServer.DefaultPort Property
Default port number used for client connections.

Internet Direct (Indy) Version 10.1.5 577


TIdDiscardUDPServer Class Classes

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is an Integer property that represents the default port number for listening and accepting client connections to
TIdDISCARDServer ( 576).

DefaultPort is redefined in TIdDISCARDServer ( 576), and the value IdPORT_DISCARD ( 3969) is assigned during initialization
of the component.

See Also
IdPORT_DISCARD ( 3969)

TIdDiscardUDPServer Class
Implements a UDP-based Discard Protocol server.

File
IdDiscardUDPServer ( 4617)

Hierarchy

Pascal
TIdDiscardUDPServer = class(TIdUDPServer);
Description
TIdDiscardUDPServer is a TIdUDPServer ( 2530) descendant that implements a UDP-based server for the Discard Protocol, as
described in the Internet Standards document:

RFC 863 - Discard Protocol

TIdDiscardUDPServer is a useful debugging and measurement protocol where the data sent to the server is simply discarded.
TIdDISCARDServer ( 576) provides a default implementation that accepts threaded client connections, reads the connection for
the TIdPeerThread to determine it's InputBuffer contents, and discards the values. The threaded client connection automatically
terminates after reading the InputBuffer.

See Also
TIdUDPServer ( 2530)

TIdContext ( 376)

TIdDiscardUDPServer Members
The following tables list the members exposed by TIdDiscardUDPServer.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 579) Default port number used to listen for client sessions.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.

578 Internet Direct (Indy) Version 10.1.5


Classes TIdDiscardUDPServer Class

ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Property
read only
Method
virtual
Event

TIdDiscardUDPServer Properties
The Properties of the TIdDiscardUDPServer class are listed here.

Properties
Property Description
DefaultPort ( 579) Default port number used to listen for client sessions.

Legend
Property

TIdDiscardUDPServer.DefaultPort Property
Default port number used to listen for client sessions.

Pascal
property DefaultPort: integer;
Description
DefaultPort is an Integer property that represents the default port number for listening and accepting client sessions on the Discard
server.

DefaultPort is redefined in TIdDiscardUDPServer ( 578), and the value IdPORT_DISCARD ( 3969) is assigned during
initialization of the component.

Internet Direct (Indy) Version 10.1.5 579


TIdDistinctTCPIPFTPListItem Class Classes

See Also
IdPORT_DISCARD ( 3969)

TIdDistinctTCPIPFTPListItem Class
File
IdFTPListParseDistinctTCPIP ( 4637)

Hierarchy

Pascal
TIdDistinctTCPIPFTPListItem = class(TIdDOSBaseFTPListItem);
Description
TIdDistinctTCPIPFTPListItem is a TIdDOSBaseFTPListItem ( 627) descendant.

See Also
TIdDOSBaseFTPListItem ( 627)

TIdDistinctTCPIPFTPListItem Members
The following tables list the members exposed by TIdDistinctTCPIPFTPListItem.

Properties
Property Description
Attributes ( 629) Represents MS DOS file attributes for a file or directory entry in a FTP directory listing.
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
Dist32FileAttributes ( 581)
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
ModifiedDateGMT ( 581)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 628) Constructor for the collection item.
Create ( 853) Constructor for the collection item.
Destroy ( 628) Frees the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

580 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_ProcessThread Class

TIdDistinctTCPIPFTPListItem Properties
The Properties of the TIdDistinctTCPIPFTPListItem class are listed here.

Properties
Property Description
Dist32FileAttributes ( 581)
ModifiedDateGMT ( 581)

Legend
Property

TIdDistinctTCPIPFTPListItem.Dist32FileAttributes Property
Pascal
property Dist32FileAttributes: string;
Description
Dist32FileAttributes is a Public string property. Write access for the property is implemented using FDist32FileAttributes.

TIdDistinctTCPIPFTPListItem.ModifiedDateGMT Property
Pascal
property ModifiedDateGMT;
Description
ModifiedDateGMT is a Public property.

TIdDNS_ProcessThread Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNS_ProcessThread = class(TIdThread);
Description
TIdDNS_ProcessThread is a TIdThread ( 2415) descendant.

See Also
TIdThread ( 2415)

TIdDNS_ProcessThread Members
The following tables list the members exposed by TIdDNS_ProcessThread.

Properties
Property Description
Data ( 2422) Storage slot for data used by a thread.

Internet Direct (Indy) Version 10.1.5 581


TIdDNS_ProcessThread Class Classes

Loop ( 2422) Indicates if the thread is Run continuously until Stopped ( 2423).
MyBinding ( 583)
MyData ( 583)
Name ( 2422) Name assigned to the thread during execution.
ReturnValue ( 2423) Return value from execution of the thread.
Server ( 584)
StopMode ( 2423) Determines the action taken when the Stop ( 2420) method is called.
Stopped ( 2423) Indicates when a thread is terminated or suspended.
Terminated ( 2424) Indicates if the thread has been halted by calling Terminate ( 2421).
TerminatingException ( 2424) Contains the text of an Exception.Message raised within the Execute method.
TerminatingExceptionClass ( 2424) Represents the class type for an exception raised during Execute.
Yarn ( 2425) Represents the thread or fiber for the scheduler of the thread.

Methods
Method Description
Create ( 582)
Destroy ( 583)
Start ( 2419) Starts or resumes execution of a thread.
Stop ( 2420) Halts execution of the thread instance.
Synchronize ( 2420) Executes a thread method synchronized to the main VCL thread.
Terminate ( 2421) Forces the thread of execution to be halted.
TerminateAndWaitFor ( 2421) Signals a thread to terminate ( 2421) and waits for completion of the Execute method.

Events
Event Description
OnException ( 2425) Handles exceptions raised in the thread of execution.
OnStopped ( 2426) Represents an event handler signalled when stopping a thread of execution.

Legend
Constructor
virtual
Property
read only
Event

TIdDNS_ProcessThread Methods
The Methods of the TIdDNS_ProcessThread class are listed here.

Methods
Method Description
Create ( 582)
Destroy ( 583)

Legend
Constructor
virtual

TIdDNS_ProcessThread.Create Constructor
Pascal
constructor Create(
ACreateSuspended: Boolean = True;
Data: String = '';
DataSize: integer = 0;
MainBinding: TIdSocketHandle = nil;
Binding: TIdSocketHandle = nil;
Server: TIdDNS_UDPServer = nil
); overload; reintroduce;

582 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_ProcessThread Class

Parameters
Parameters Description
ACreateSuspended Type is Boolean. Default value is True.
Data Type is String. Default value is ''.
DataSize Type is integer. Default value is 0.
MainBinding Type is TIdSocketHandle ( 2071). Default value is nil.
Binding Type is TIdSocketHandle ( 2071). Default value is nil.
Server Type is TIdDNS_UDPServer ( 586). Default value is nil.

Description
Create is a reintroduced,overloaded constructor for the object instance.

See Also
TIdDNS_ProcessThread.Create

TIdDNS_ProcessThread.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDNS_ProcessThread Properties
The Properties of the TIdDNS_ProcessThread class are listed here.

Properties
Property Description
MyBinding ( 583)
MyData ( 583)
Server ( 584)

Legend
Property

TIdDNS_ProcessThread.MyBinding Property
Pascal
property MyBinding: TIdSocketHandle;
Description
MyBinding is a Public TIdSocketHandle ( 2071) property. Write access for the property is implemented using SetMyBinding.

TIdDNS_ProcessThread.MyData Property
Pascal
property MyData: TIdStream;
Description
MyData is a Public TIdStream ( 3087) property. Write access for the property is implemented using SetMyData.

Internet Direct (Indy) Version 10.1.5 583


TIdDNS_TCPServer Class Classes

TIdDNS_ProcessThread.Server Property
Pascal
property Server: TIdDNS_UDPServer;
Description
Server is a Public TIdDNS_UDPServer ( 586) property. Write access for the property is implemented using SetServer.

TIdDNS_TCPServer Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNS_TCPServer = class(TIdCustomTCPServer);
Description
TIdDNS_TCPServer is a TIdCustomTCPServer ( 453) descendant.

See Also
TIdCustomTCPServer ( 453)

TIdDNS_TCPServer Members
The following tables list the members exposed by TIdDNS_TCPServer.

Properties
Property Description
AccessControl ( 586)
AccessList ( 586)
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.

584 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_TCPServer Class

Create ( 267) Constructor for the object instance.


Destroy ( 585)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdDNS_TCPServer Methods
The Methods of the TIdDNS_TCPServer class are listed here.

Methods
Method Description
Destroy ( 585)

Legend
Destructor
virtual

TIdDNS_TCPServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDNS_TCPServer Properties
The Properties of the TIdDNS_TCPServer class are listed here.

Properties
Property Description
AccessControl ( 586)
AccessList ( 586)

Legend
Property

Internet Direct (Indy) Version 10.1.5 585


TIdDNS_UDPServer Class Classes

TIdDNS_TCPServer.AccessControl Property
Pascal
property AccessControl: boolean;
Description
AccessControl is a Published boolean property. Write access for the property is implemented using FAccessControl.

TIdDNS_TCPServer.AccessList Property
Pascal
property AccessList: TIdStrings;
Description
AccessList is a Published TIdStrings ( 3089) property. Write access for the property is implemented using SetAccessList.

TIdDNS_UDPServer Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNS_UDPServer = class(TIdUDPServer);
Description
TIdDNS_UDPServer is a TIdUDPServer ( 2530) descendant.

See Also
TIdUDPServer ( 2530)

TIdDNS_UDPServer Members
The following tables list the members exposed by TIdDNS_UDPServer.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
AutoLoadMasterFile ( 592)
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
Busy ( 592)
Cached_Tree ( 592)
CacheUnknowZone ( 592)
DefaultPort ( 593)
DNSVersion ( 593)
GlobalCS ( 593)
Handed_DomainList ( 593)
Handed_Tree ( 593)

586 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_UDPServer Class

IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
offerDNSVersion ( 593)
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
RootDNS_NET ( 593)
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
ZoneMasterFiles ( 594)

Methods
Method Description
AXFR ( 588)
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
CompleteQuery ( 588)
Create ( 267) Constructor for the object instance.
Destroy ( 589)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
FindHandedNodeByName ( 589)
FindNodeFullName ( 589)
GetVersion ( 269) Version ( 269) number for Indy component suite.
LoadZoneFromMasterFile ( 590)
LoadZoneStrings ( 590)
SearchTree ( 590)
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
UpdateTree ( 591)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnAfterCacheSaved ( 594)
OnAfterQuery ( 594)
OnAfterSendBack ( 594)
OnBeforeQuery ( 595)
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Method
virtual
Property
read only
Event

TIdDNS_UDPServer Methods
The Methods of the TIdDNS_UDPServer class are listed here.

Methods
Method Description
AXFR ( 588)
CompleteQuery ( 588)
Destroy ( 589)

Internet Direct (Indy) Version 10.1.5 587


TIdDNS_UDPServer Class Classes

FindHandedNodeByName ( 589)
FindNodeFullName ( 589)
LoadZoneFromMasterFile ( 590)
LoadZoneStrings ( 590)
SearchTree ( 590)
UpdateTree ( 591)

Legend
Method
virtual

TIdDNS_UDPServer.AXFR Method
Pascal
function AXFR(
Header: TDNSHeader;
Question: string;
var Answer: TIdBytes
): string;
Parameters
Parameters Description
Header Type is TDNSHeader ( 198).
Question Type is string.
Answer Scope is var. Type is TIdBytes ( 3007).

Returns
string

Description
AXFR is a method.

AXFR returns a string value.

TIdDNS_UDPServer.CompleteQuery Method
Pascal
function CompleteQuery(
DNSHeader: TDNSHeader;
Question: string;
OriginalQuestion: TIdBytes;
var Answer: TIdBytes;
QType: word;
QClass: word;
DNSResolver: TIdDNSResolver
): string;
Parameters
Parameters Description
DNSHeader Type is TDNSHeader ( 198).
Question Type is string.
OriginalQuestion Type is TIdBytes ( 3007).
Answer Scope is var. Type is TIdBytes ( 3007).
QType Type is word.
QClass Type is word.
DNSResolver Type is TIdDNSResolver ( 600).

Returns
string

588 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_UDPServer Class

Description
CompleteQuery is a method.

CompleteQuery returns a string value.

TIdDNS_UDPServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDNS_UDPServer.FindHandedNodeByName Method
Pascal
function FindHandedNodeByName(
QName: String;
QType: Word
): TIdDNTreeNode;
Parameters
Parameters Description
QName Type is String.
QType Type is Word.

Returns
TIdDNTreeNode ( 612)

Description
FindHandedNodeByName is a method.

FindHandedNodeByName returns a TIdDNTreeNode ( 612) value.

TIdDNS_UDPServer.FindNodeFullName Method
Pascal
function FindNodeFullName(
Root: TIdDNTreeNode;
QName: String;
QType: Word
): string;
Parameters
Parameters Description
Root Type is TIdDNTreeNode ( 612).
QName Type is String.
QType Type is Word.

Returns
string

Description
FindNodeFullName is a method.

FindNodeFullName returns a string value.

Internet Direct (Indy) Version 10.1.5 589


TIdDNS_UDPServer Class Classes

TIdDNS_UDPServer.LoadZoneFromMasterFile Method
Pascal
function LoadZoneFromMasterFile(
MasterFileName: String
): boolean;
Parameters
Parameters Description
MasterFileName Type is String.

Returns
boolean

Description
LoadZoneFromMasterFile is a method.

LoadZoneFromMasterFile returns a boolean value.

TIdDNS_UDPServer.LoadZoneStrings Method
Pascal
function LoadZoneStrings(
FileStrings: TIdStrings;
Filename: String;
TreeRoot: TIdDNTreeNode
): boolean;
Parameters
Parameters Description
FileStrings Type is TIdStrings ( 3089).
Filename Type is String.
TreeRoot Type is TIdDNTreeNode ( 612).

Returns
boolean

Description
LoadZoneStrings is a method.

LoadZoneStrings returns a boolean value.

TIdDNS_UDPServer.SearchTree Method
Pascal
function SearchTree(
Root: TIdDNTreeNode;
QName: String;
QType: Word
): TIdDNTreeNode;
Parameters
Parameters Description
Root Type is TIdDNTreeNode ( 612).
QName Type is String.
QType Type is Word.

Returns
TIdDNTreeNode ( 612)

590 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_UDPServer Class

Description
SearchTree is a method.

SearchTree returns a TIdDNTreeNode ( 612) value.

TIdDNS_UDPServer.UpdateTree Method
Overload List

Method Description
TIdDNS_UDPServer.UpdateTree
(TIdDNTreeNode,
TIdTextModeResourceRecord) ( 591)
TIdDNS_UDPServer.UpdateTree
(TIdDNTreeNode, TResultRecord) ( 591)

TIdDNS_UDPServer.UpdateTree Method (TIdDNTreeNode, TIdTextModeResourceRecord)


Pascal
procedure UpdateTree(
TreeRoot: TIdDNTreeNode;
RR: TIdTextModeResourceRecord
); overload;
Parameters
Parameters Description
TreeRoot Type is TIdDNTreeNode ( 612).
RR Type is TIdTextModeResourceRecord ( 2408).

Description
UpdateTree is a overloaded method.

See Also
TIdDNS_UDPServer.UpdateTree

TIdDNS_UDPServer.UpdateTree Method (TIdDNTreeNode, TResultRecord)


Pascal
procedure UpdateTree(
TreeRoot: TIdDNTreeNode;
RR: TResultRecord
); overload;
Parameters
Parameters Description
TreeRoot Type is TIdDNTreeNode ( 612).
RR Type is TResultRecord ( 2682).

Description
UpdateTree is a overloaded method.

See Also
TIdDNS_UDPServer.UpdateTree

TIdDNS_UDPServer Properties
The Properties of the TIdDNS_UDPServer class are listed here.

Internet Direct (Indy) Version 10.1.5 591


TIdDNS_UDPServer Class Classes

Properties
Property Description
AutoLoadMasterFile ( 592)
Busy ( 592)
Cached_Tree ( 592)
CacheUnknowZone ( 592)
DefaultPort ( 593)
DNSVersion ( 593)
GlobalCS ( 593)
Handed_DomainList ( 593)
Handed_Tree ( 593)
offerDNSVersion ( 593)
RootDNS_NET ( 593)
ZoneMasterFiles ( 594)

Legend
Property
read only

TIdDNS_UDPServer.AutoLoadMasterFile Property
Pascal
property AutoLoadMasterFile: Boolean;
Description
AutoLoadMasterFile is a Published Boolean property. Write access for the property is implemented using FAutoLoadMasterFile.
The default value for the property is False.

TIdDNS_UDPServer.Busy Property
Pascal
property Busy: boolean;
Description
Busy is a Public read-only boolean property.

TIdDNS_UDPServer.Cached_Tree Property
Pascal
property Cached_Tree: TIdDNTreeNode;
Description
Cached_Tree is a Public read-only TIdDNTreeNode ( 612) property.

TIdDNS_UDPServer.CacheUnknowZone Property
Pascal
property CacheUnknowZone: boolean;
Description
CacheUnknowZone is a Published boolean property. Write access for the property is implemented using FCacheUnknowZone. The
default value for the property is False.

592 Internet Direct (Indy) Version 10.1.5


Classes TIdDNS_UDPServer Class

TIdDNS_UDPServer.DefaultPort Property
Pascal
property DefaultPort: integer;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_DOMAIN ( 3977).

TIdDNS_UDPServer.DNSVersion Property
Pascal
property DNSVersion: string;
Description
DNSVersion is a Published string property. Write access for the property is implemented using FDNSVersion.

TIdDNS_UDPServer.GlobalCS Property
Pascal
property GlobalCS: TIdCriticalSection;
Description
GlobalCS is a Public read-only TIdCriticalSection ( 404) property.

TIdDNS_UDPServer.Handed_DomainList Property
Pascal
property Handed_DomainList: TIdStrings;
Description
Handed_DomainList is a Published TIdStrings ( 3089) property. Write access for the property is implemented using
SetHanded_DomainList.

TIdDNS_UDPServer.Handed_Tree Property
Pascal
property Handed_Tree: TIdDNTreeNode;
Description
Handed_Tree is a Public read-only TIdDNTreeNode ( 612) property.

TIdDNS_UDPServer.offerDNSVersion Property
Pascal
property offerDNSVersion: boolean;
Description
offerDNSVersion is a Published boolean property. Write access for the property is implemented using FofferDNSVersion.

TIdDNS_UDPServer.RootDNS_NET Property
Pascal
property RootDNS_NET: TIdStrings;

Internet Direct (Indy) Version 10.1.5 593


TIdDNS_UDPServer Class Classes

Description
RootDNS_NET is a Public TIdStrings ( 3089) property. Write access for the property is implemented using SetRootDNS_NET.

TIdDNS_UDPServer.ZoneMasterFiles Property
Pascal
property ZoneMasterFiles: TIdStrings;
Description
ZoneMasterFiles is a Published TIdStrings ( 3089) property. Write access for the property is implemented using
SetZoneMasterFiles.

TIdDNS_UDPServer Events
The Events of the TIdDNS_UDPServer class are listed here.

Events
Event Description
OnAfterCacheSaved ( 594)
OnAfterQuery ( 594)
OnAfterSendBack ( 594)
OnBeforeQuery ( 595)

Legend
Event

TIdDNS_UDPServer.OnAfterCacheSaved Event
Pascal
property OnAfterCacheSaved: TIdDNSAfterCacheSaved;
Description
OnAfterCacheSaved is a Published TIdDNSAfterCacheSaved ( 3021) event handler property. Write access for the property is
implemented using FOnAfterCacheSaved.

TIdDNS_UDPServer.OnAfterQuery Event
Pascal
property OnAfterQuery: TIdDNSAfterQueryEvent;
Description
OnAfterQuery is a Published TIdDNSAfterQueryEvent ( 3022) event handler property. Write access for the property is
implemented using FOnAfterQuery.

TIdDNS_UDPServer.OnAfterSendBack Event
Pascal
property OnAfterSendBack: TIdDNSAfterQueryEvent;
Description
OnAfterSendBack is a Published TIdDNSAfterQueryEvent ( 3022) event handler property. Write access for the property is
implemented using FOnAfterSendBack.

594 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSHdr Class

TIdDNS_UDPServer.OnBeforeQuery Event
Pascal
property OnBeforeQuery: TIdDNSBeforeQueryEvent;
Description
OnBeforeQuery is a Published TIdDNSBeforeQueryEvent ( 3022) event handler property. Write access for the property is
implemented using FOnBeforeQuery.

TIdDNSHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdDNSHdr = class(TIdStruct);
Description
TIdDNSHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdDNSHdr Members
The following tables list the members exposed by TIdDNSHdr.

Properties
Property Description
dns_flags ( 597)
dns_id ( 597)
dns_num_addi_rr ( 597)
dns_num_answ_rr ( 597)
dns_num_auth_rr ( 597)
dns_num_q ( 597)

Methods
Method Description
create ( 2262)
ReadStruct ( 596)
WriteStruct ( 596)

Legend
Constructor
virtual
Property

TIdDNSHdr Methods
The Methods of the TIdDNSHdr class are listed here.

Internet Direct (Indy) Version 10.1.5 595


TIdDNSHdr Class Classes

Methods
Method Description
ReadStruct ( 596)
WriteStruct ( 596)

Legend
Method
virtual

TIdDNSHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdDNSHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdDNSHdr Properties
The Properties of the TIdDNSHdr class are listed here.

Properties
Property Description
dns_flags ( 597)
dns_id ( 597)
dns_num_addi_rr ( 597)
dns_num_answ_rr ( 597)
dns_num_auth_rr ( 597)
dns_num_q ( 597)

Legend
Property

596 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSMap Class

TIdDNSHdr.dns_flags Property
Pascal
property dns_flags: word;
Description
dns_flags is a Public word property. Write access for the property is implemented using Fdns_flags.

TIdDNSHdr.dns_id Property
Pascal
property dns_id: word;
Description
dns_id is a Public word property. Write access for the property is implemented using Fdns_id.

TIdDNSHdr.dns_num_addi_rr Property
Pascal
property dns_num_addi_rr: word;
Description
dns_num_addi_rr is a Public word property. Write access for the property is implemented using Fdns_num_addi_rr.

TIdDNSHdr.dns_num_answ_rr Property
Pascal
property dns_num_answ_rr: word;
Description
dns_num_answ_rr is a Public word property. Write access for the property is implemented using Fdns_num_answ_rr.

TIdDNSHdr.dns_num_auth_rr Property
Pascal
property dns_num_auth_rr: word;
Description
dns_num_auth_rr is a Public word property. Write access for the property is implemented using Fdns_num_auth_rr.

TIdDNSHdr.dns_num_q Property
Pascal
property dns_num_q: word;
Description
dns_num_q is a Public word property. Write access for the property is implemented using Fdns_num_q.

Internet Direct (Indy) Version 10.1.5 597


TIdDNSMap Class Classes

TIdDNSMap Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNSMap = class(TIdObjectList);
Description
TIdDNSMap TIdObjectList ( 1757) descendant

See Also
TIdObjectList ( 1757)

TIdDNSMap Members
The following tables list the members exposed by TIdDNSMap.

Properties
Property Description
Items ( 599)
OwnsObjects ( 1762)
Server ( 599)

Methods
Method Description
Add ( 1759)
Assign ( 1759)
BubbleSort ( 1759)
Create ( 599)
Destroy ( 599)
FindInstanceOf ( 1760)
IndexOf ( 1760)
Insert ( 1761)
Remove ( 1761)
Create ( 1759)

Legend
Method
virtual
Property

TIdDNSMap Methods
The Methods of the TIdDNSMap class are listed here.

Methods
Method Description
Create ( 599)
Destroy ( 599)

598 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSResolver Class

Legend
Constructor
virtual

TIdDNSMap.Create Constructor
Pascal
constructor Create(
Server: TIdDNS_UDPServer
);
Parameters
Parameters Description
Server Type is TIdDNS_UDPServer ( 586).

Description
Create

TIdDNSMap.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden

TIdDNSMap Properties
The Properties of the TIdDNSMap class are listed here.

Properties
Property Description
Items ( 599)
Server ( 599)

Legend
Property

TIdDNSMap.Items Property
Pascal
property Items [Index: Integer]: TIdDomainNameServerMapping;
Description
Items is a Public TIdDomainNameServerMapping ( 617) property default property

TIdDNSMap.Server Property
Pascal
property Server: TIdDNS_UDPServer;
Description
Server is a Public TIdDNS_UDPServer ( 586) property

Internet Direct (Indy) Version 10.1.5 599


TIdDNSResolver Class Classes

TIdDNSResolver Class
Implements a resolver for DNS queries.

File
IdDNSResolver ( 4620)

Hierarchy

Pascal
TIdDNSResolver = class(TIdTCPConnection);
Description
TIdDNSResolver is a TIdTCPClient ( 2333) descendant that provides an implementation of a resolver for DNS (Domain Name
Server) queries using the DNS protocol. The DNS protocol is described in the Internet Standards documents:

RFC 1034 - Domain Names Concepts and Facilities

RFC 1035 - Domain Names Implementation and Specification

RFC 1591 - Domain Name System Structure and Delegation

RFC 1183 - New DNS RR Definitions

RFC 1884 - IP Version 6 Addressing Architecture

RFC 1886 - DNS Extensions to support IP version 6

RFC 1995 - Incremental Zone Transfer in DNS

RFC 2181 - Clarifications to the DNS Specification.

TIdDNSResolver provides facilities for accessing the Domain Name Space and Resource Records retrieved from a DNS Server
using queries for specified domain names, resource types, and resource classes.

TIdDNSResolver provides properties and methods that simplify the process of creating a valid DNS query, and accessing the
resource records returned in the query results.

Use QueryType ( 607) to indicate the DNS Resource Record types to be returned by the DNS Query. QueryType ( 607) must
contain on or more of the values from TQueryRecordTypes ( 2986).

Set AllowRecursiveQueries ( 605) to the value to be used in the DNS Query header. AllowRecursiveQueries ( 605) permits a
DNS server to pursue the query for DNS resource records on another name server. AllowRecursiveQueries ( 605) has no effect if
the DNS server does not implement recursive queries.

Use the Resolve ( 604) method to peform a DNS Query for the specified domain name. Resolve ( 604) creates the DNS Query
packet, including the DNS header, transmits the request to the DNS host, and captures and parses the query results.

Use QueryResult ( 607) to determine the number of resource records returned by the QueryClass, QueryType ( 607), and
DomainName ( 2771) in the DNS Query, and to access the TResultRecord ( 2682) object instances containing the data for the
resource records. Items in QueryResults may also be cast to an instance of a TResultRecord ( 2682) descendant class to access
additional properties and methods based on its resource record type and class.

TIdDNSResolver normally use UDP for resolving DNS queries, unless a Zone Transfer is indicated using the XFRType and
QueryType ( 607) properties. In this situation, TCP is used resolve ( 604) the DNS query.

Currently, the TIdDNSResolver implementation does not support all aspects of the DNS protocol, and includes the following
limitations:

• The DNS query type is limited to standard queries, where the DNS Header OPCODE is 0.

600 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSResolver Class

• Inverse queries (OPCODE=1) and Status queries (OPCODE=2) are not supported at this time.
• The DNS query class field is limited to examing resource records for the IN (Internet) class only. CS (CSNet), CH (CHAOS), and
HS (Hesiod) are not supported at this time.
See Also
TDNSHeader ( 198) TQueryResult ( 2669) TQueryRecordTypes ( 2986) TResultRecord ( 2682) TXFRTypes IndySupport (
15)

TIdDNSResolver Members
The following tables list the members exposed by TIdDNSResolver.

Properties
Property Description
AllowRecursiveQueries ( 605) Indicates if recursive DNS queries are desired on the DNS server.
DNSHeader ( 605)
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 605) Identifies the host name or IP address for the DNS server.
InternalQuery ( 606)
IOHandler ( 2364) The input / output mechanism for the connection.
IPVersion ( 606) Indicates the IP address family supported for connections to the DNS server.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
PlainTextResult ( 606) Represents the plain text version of values received in a DNS query reponse.
Port ( 606) Indicates the port number for the DNS server used to resolve ( 604) DNS queries.
QueryResult ( 607) Container for values and resource records in a DNS response.
QueryType ( 607) Indicates the resource record types requested when resolving a DNS query.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WaitingTime ( 607)
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ClearInternalQuery ( 602)
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
CreateQuery ( 602)
Destroy ( 603) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
FillResult ( 603) Captures and parses results returned in a DNS query response.
FillResultWithOutCheckId ( 604)
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ParseAnswers ( 604)
Resolve ( 604)
CType ( 267)
Create ( 1274)
CheckResponse ( 2352)
Disconnect ( 2355)

Internet Direct (Indy) Version 10.1.5 601


TIdDNSResolver Class Classes

GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdDNSResolver Methods
The Methods of the TIdDNSResolver class are listed here.

Methods
Method Description
ClearInternalQuery ( 602)
CreateQuery ( 602)
Destroy ( 603) Frees the object instance.
FillResult ( 603) Captures and parses results returned in a DNS query response.
FillResultWithOutCheckId ( 604)
ParseAnswers ( 604)
Resolve ( 604)

Legend
Method
virtual

TIdDNSResolver.ClearInternalQuery Method
Pascal
procedure ClearInternalQuery;
Description
ClearInternalQuery is a method used to ensure that the InternalQuery ( 606) property containing the DNS query packet is cleared
and sets its length to zero (0) bytes.

ClearInternalQuery is used in the implementation of the CreateQuery ( 602) method.

See Also
InternalQuery ( 606) CreateQuery ( 602)

TIdDNSResolver.CreateQuery Method
Pascal
procedure CreateQuery(
ADomain: string;
SOARR: TIdRR_SOA;
QueryClass: integer = Class_IN
);

602 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSResolver Class

Parameters
Parameters Description
ADomain Type is string.
SOARR Type is TIdRR_SOA ( 1907).
QueryClass Type is integer. Default value is Class_IN ( 3171).

Description
CreateQuery is a method.

TIdDNSResolver.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy frees resource allocated to the QueryResult ( 607) and the internal DNSHeader ( 605) properties during initialization of
the component.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
QueryResult ( 607)

TIdDNSResolver.FillResult Method
Captures and parses results returned in a DNS query response.

Pascal
procedure FillResult(
AResult: TIdBytes;
checkID: boolean = true;
ResetResult: boolean = true
);
Parameters
Parameters Description
AResult Raw byte values for the DNS query result.
checkID Indicates if the ID in the DNS query response must match the ID in the DNS query.
ResetResult Indicates QueryResult ( 607) is cleared prior to parsing answers in the DNS query response.

Description
FillResult is a procedure used to capture and parse results returned in a DNS query response in the Resolve ( 604) method.

FillResult will raise an EIdDnsResolverError ( 73) exception if the size of the DNS results in AResult is smaller than the 12 bytes
(size of the DNS header in a DNS query response).

FillResult parses values in the DNS header to get access to the identifier and result code for the DNS query response.

When CheckID contains True, the identifier in the DNS query reponse must match the identifier from the DNS query or an
EIdDnsResolverError ( 73) will be raised.

FillResult checks the result code from the internal TDNSHeader ( 198) instance to determine if an error has occurred. A non-zero
value in the result code causes an EIdDnsResolverError ( 73) exception to be raised.

FillResult parses each of the DNS answers included in the DNS query response.

When ResetResult contains True, the value in QueryResult ( 607) is cleared when ParseAnswer is called to parse each answer in
the DNS query response.

Internet Direct (Indy) Version 10.1.5 603


TIdDNSResolver Class Classes

Use QueryResult ( 607) to access the resource records returned in the DNS query response.

Exceptions
Exceptions Description
EIdDnsResolverError ( 73) With the message RSQueryLessThanTwelve when an invalid DNS header is present. With the message
RSQueryInvalidHeaderID when the DNS query response identifier does not match the DNS query identifier.
With the response code from the DNS query response.

See Also
EIdDnsResolverError ( 73) ParseAnswer QueryResult ( 607) TDNSHeader ( 198)

TIdDNSResolver.FillResultWithOutCheckId Method
Pascal
procedure FillResultWithOutCheckId(
AResult: string
);
Parameters
Parameters Description
AResult Type is string.

Description
FillResultWithOutCheckId is a method procedure

TIdDNSResolver.ParseAnswers Method
Pascal
procedure ParseAnswers(
DNSHeader: TDNSHeader;
Answer: TIdBytes;
ResetResult: boolean = true
);
Parameters
Parameters Description
DNSHeader Type is TDNSHeader ( 198).
Answer Type is TIdBytes ( 3007).
ResetResult Type is boolean. Default value is true.

Description
ParseAnswers is a method.

TIdDNSResolver.Resolve Method
Pascal
procedure Resolve(
ADomain: string;
SOARR: TIdRR_SOA = nil;
QClass: integer = Class_IN
);
Parameters
Parameters Description
ADomain Type is string.
SOARR Type is TIdRR_SOA ( 1907). Default value is nil.
QClass Type is integer. Default value is Class_IN ( 3171).

Description
Resolve is a method.

604 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSResolver Class

TIdDNSResolver Properties
The Properties of the TIdDNSResolver class are listed here.

Properties
Property Description
AllowRecursiveQueries ( 605) Indicates if recursive DNS queries are desired on the DNS server.
DNSHeader ( 605)
Host ( 605) Identifies the host name or IP address for the DNS server.
InternalQuery ( 606)
IPVersion ( 606) Indicates the IP address family supported for connections to the DNS server.
PlainTextResult ( 606) Represents the plain text version of values received in a DNS query reponse.
Port ( 606) Indicates the port number for the DNS server used to resolve ( 604) DNS queries.
QueryResult ( 607) Container for values and resource records in a DNS response.
QueryType ( 607) Indicates the resource record types requested when resolving a DNS query.
WaitingTime ( 607)

Legend
Property
read only

TIdDNSResolver.AllowRecursiveQueries Property
Indicates if recursive DNS queries are desired on the DNS server.

Pascal
property AllowRecursiveQueries: boolean;
Description
AllowRecursiveQueries is a Boolean property that indicates if the DNS server should persue client queries which require resource
records from another DNS name server. AllowRecursiveQueries is stored in the DNS Header for the request to the DNS server.

AllowRecursiveQueries will have no effect when the DNS does not implement recursive queries, as indicated in the DNS Header
RA field from the server response.

The default value for AllowRecursiveQueries is True, as assigned during initialization of the component. Set the desired value for
AllowRecursiveQueries prior to calling Resolve ( 604).

See Also
TDNSHeader ( 198) Resolve ( 604)

TIdDNSResolver.DNSHeader Property
Pascal
property DNSHeader: TDNSHeader;
Description
DNSHeader is a Public read-only TDNSHeader ( 198) property.

TIdDNSResolver.Host Property
Identifies the host name or IP address for the DNS server.

Pascal
property Host: string;

Internet Direct (Indy) Version 10.1.5 605


TIdDNSResolver Class Classes

Description
Host is a Published string property that identifies the host name or IP address for the DNS server to be used for resolving DNS
queries.

Set values in the Host and Port ( 606) properties prior to calling the Resolve ( 604) method.

TIdDNSResolver.InternalQuery Property
Pascal
property InternalQuery: TIdBytes;
Description
InternalQuery is a TIdBytes ( 3007) property that represents the raw contents of the DNS query used in the Resolve ( 604)
method.

TIdDNSResolver.IPVersion Property
Indicates the IP address family supported for connections to the DNS server.

Pascal
property IPVersion: TIdIPVersion;
Description
IPVersion is a published TIdIPVersion ( 2962) property that indicates the IP address family supported for connections to the DNS
server.

See Also
Host ( 605) Port ( 606)

TIdDNSResolver.PlainTextResult Property
Represents the plain text version of values received in a DNS query reponse.

Pascal
property PlainTextResult: TIdBytes;
Description
PlainTextResult is a TIdBytes ( 3007) property that represents the plain text version of values received in a DNS query reponse.

PlainTextResult is updated when the DNS query response is received in the Resolve ( 604) method.

PlainTextResult can be used to as a debugging aid to determine if valid DNS query responses are being received for the DNS
query.

See Also
Resolve ( 604)

TIdDNSResolver.Port Property
Indicates the port number for the DNS server used to resolve ( 604) DNS queries.

Pascal
property Port: TIdPort;
Description
Port is a Published TIdPort ( 3076) property that indicates the port number for the DNS server used to resolve ( 604) DNS
queries.

606 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSResolver Class

The default value for Port is IdPORT_DOMAIN ( 3977), as assigned during initialization of the component.

Set values in the Host ( 605) and Port properties prior to calling the Resolve ( 604) method.

See Also
Host ( 605) Resolve ( 604)

TIdDNSResolver.QueryResult Property
Container for values and resource records in a DNS response.

Pascal
property QueryResult: TQueryResult;
Description
QueryResult is a read-only TQueryResult ( 2669) property that acts as a container for the results from a DNS query. QueryResult
will indicate the class, type, and domain name used in the DNS query, as well as any DNS resource records returned in the query
response.

QueryResult is updated when ParseAnswers ( 604) is called by the Resolve ( 604) method to parse values found in the Answer
portion of the DNS response.

QueryResult is a generic collection for TResultRecord ( 2682) and descendant resource records. Items in the collection can be
accessed using their integer position.

Items in QueryResult must be cast to a TResultRecord ( 2682) or descendant class instance to allow access to additional
properties and methods specific to the resource record type.

See Also
TARecord ( 189) TCNRecord ( 190) TDNSHeader ( 198) THINFORecord ( 213) TMINFORecord ( 2647) TMXRecord (
2649) TNAMERecord ( 2652) TNSRecord ( 2657) TPTRRecord ( 2668) TRDATARecord ( 2673) TResultRecord ( 2682)
TSOARecord ( 2694) TTextRecord ( 2702) TWKSRecord ( 2705) Resolve ( 604) ParseAnswers ( 604)

TIdDNSResolver.QueryType Property
Indicates the resource record types requested when resolving a DNS query.

Pascal
property QueryType: TQueryType;
Description
QueryType is a Published TQueryType ( 3117) property that indicates the resource record types requested when resolving a DNS
query.

QueryType is used in the Resolve ( 604) method, and when creating DNS header and DNS Question portion of the DNS packet in
CreateQuery ( 602).

Values included in QueryType can affect both the expected response(s) and processing that occurs in the Resolve ( 604) method.

Specifically, the value qtAXFR (for Zone transfer queries) is generally used alone and causes additional constraints to be places on
the resource record types and counts allowed in the DNS query response.

Update QueryType to include the resource record type values desired prior to calling the Resolve ( 604) method.

See Also
TQueryType ( 3117) Resolve ( 604)

TIdDNSResolver.WaitingTime Property
Pascal
property WaitingTime: integer;

Internet Direct (Indy) Version 10.1.5 607


TIdDNSServer Class Classes

Description
WaitingTime is a Published integer property

TIdDNSServer Class
Implements a server for the DNS (Domain Name Server) protocol.

File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNSServer = class(TIdComponent);
Description
TIdDNSServer is a TIdComponent ( 355) descendant that implements a server for the DNS (Domain Name Server) protocol, as
described in the Internet Standards documents:

RFC 1034 - Domain Names Concepts and Facilities

RFC 1035 - Domain Names Implementation and Specification

RFC 1591 - Domain Name System Structure and Delegation

RFC 1183 - New DNS RR Definitions

RFC 1884 - IP Version 6 Addressing Architecture

RFC 1886 - DNS Extensions to support IP version 6

RFC 1995 - Incremental Zone Transfer in DNS

RFC 2181 - Clarifications to the DNS Specification.

TIdDNSServer is not like most typical server implementations in the Indy library. The DNS protocol requires that the server be able
to respond to both TCP-based and UDP-based requests, so TIdDNSServer does not follow the convention of inheriting from a
TIdTCPServer ( 2375) or TIdUDPServer ( 2530) ancestor class. Instead, it implements the TCPTunnel ( 611) and UDPTunnel
( 612) properties that act as the server(s) used in its implementation.

UDPTunnel ( 612) is, in essence, the DNS server and responds to all DNS queries issued by clients.

TCPTunnel ( 611) is used primarily to perform updates and receive notifications of updates for zone tranfer information when
ServerType ( 611) contains the value stSecondary indicating a secondary DNS server implementation. TCPTunnel ( 611) is
activated only in this scenrio, and uses a TIdDomainExpireCheckThread ( 617) instance to determine when expired Domain
information needs to be reloaded from the primary DNS server.

Use the Bindings ( 611) property to define one or more socket handles used for listener threads (for both TCPTunnel ( 611) and
UDPTunnel ( 612)).

Set ServerType ( 611) to indicate if the DNS server is the primary Domain Name Service server or a secondary server dependent
on updates from the primary DNS server.

Use AccessList ( 611) to specify IP addresses allowed to announce notifications of updated Zone information in the TCPTunnel (
611) server when ServerType ( 611) is stSecondary and TCPACLActive ( 611) contains True.

Use Active ( 611) to start the UDP-based server in UDPTunnel ( 612), and optionally the TCP-based server used to exchange
zone transfer information with the primary DNS server.

Use properties, methods, and events in TIdDNS_UDPServer ( 586) to control operation of the server using UDPTunnel ( 612)
for DNS queries issued by clients. This includes the ability to setup options like:

608 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSServer Class

• Root DNS servers


• Build and maintain the DNS tree for the server
• Specify and load Master Zone files for the server
• Assign event handlers execute before and after the DNS response
See Also
TIdComponent ( 355)

TIdDNS_UDPServer ( 586)

TIdDNS_TCPServer ( 584)

TIdDNSServer Members
The following tables list the members exposed by TIdDNSServer.

Properties
Property Description
AccessList ( 611)
Active ( 611)
Bindings ( 611)
ServerType ( 611)
TCPACLActive ( 611)
TCPTunnel ( 611)
UDPTunnel ( 612)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckIfExpire ( 610)
Create ( 267) Constructor for the object instance.
Destroy ( 610)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Data Member
Method
virtual
Property
read only
Event

TIdDNSServer Fields
The Fields of the TIdDNSServer class are listed here.

Internet Direct (Indy) Version 10.1.5 609


TIdDNSServer Class Classes

Legend
Data Member

TIdDNSServer.BackupDNSMap Field
Pascal
BackupDNSMap: TIdDNSMap;
Description
BackupDNSMap

TIdDNSServer Methods
The Methods of the TIdDNSServer class are listed here.

Methods
Method Description
CheckIfExpire ( 610)
Destroy ( 610)

Legend
Method
virtual

TIdDNSServer.CheckIfExpire Method
Pascal
procedure CheckIfExpire(
Sender: TObject
);
Parameters
Parameters Description
Sender Type is TObject.

Description
CheckIfExpire

TIdDNSServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor

TIdDNSServer Properties
The Properties of the TIdDNSServer class are listed here.

Properties
Property Description
AccessList ( 611)
Active ( 611)
Bindings ( 611)

610 Internet Direct (Indy) Version 10.1.5


Classes TIdDNSServer Class

ServerType ( 611)
TCPACLActive ( 611)
TCPTunnel ( 611)
UDPTunnel ( 612)

Legend
Property

TIdDNSServer.AccessList Property
Pascal
property AccessList: TIdStrings;
Description
AccessList is a TStrings property

TIdDNSServer.Active Property
Pascal
property Active: boolean;
Description
Active is a Boolean property

TIdDNSServer.Bindings Property
Pascal
property Bindings: TIdSocketHandles;
Description
Bindings is a TIdSocketHandles ( 2090) property

TIdDNSServer.ServerType Property
Pascal
property ServerType: TDNSServerTypes;
Description
ServerType is a TDNSServerTypes ( 2943) property

TIdDNSServer.TCPACLActive Property
Pascal
property TCPACLActive: boolean;
Description
TCPACLActive is a Boolean property

TIdDNSServer.TCPTunnel Property
Pascal
property TCPTunnel: TIdDNS_TCPServer;
Description
TCPTunnel is a TIdDNS_TCPServer ( 584) property

Internet Direct (Indy) Version 10.1.5 611


TIdDNTreeNode Class Classes

TIdDNSServer.UDPTunnel Property
Pascal
property UDPTunnel: TIdDNS_UDPServer;
Description
UDPTunnel is a Published TIdDNS_UDPServer ( 586) property. Write access for the property is implemented using FUDPTunnel.

TIdDNTreeNode Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDNTreeNode = class(TIdMWayTreeNode);
Description
TIdDNTreeNode is a TIdMWayTreeNode ( 1675) descendant.

See Also
TIdMWayTreeNode ( 1675)

TIdDNTreeNode Members
The following tables list the members exposed by TIdDNTreeNode.

Properties
Property Description
AutoSortChild ( 616)
ChildIndex ( 616)
Children ( 616)
CLabel ( 616)
FullName ( 616)
FundmentalClass ( 1677)
ParentNode ( 616)
RRs ( 617)

Methods
Method Description
AddChild ( 613)
Clear ( 613)
Create ( 613)
Destroy ( 614)
IndexByLabel ( 614)
IndexByNode ( 614)
InsertChild ( 614)
RemoveChild ( 615)
SaveToFile ( 615)
SortChildren ( 615)

612 Internet Direct (Indy) Version 10.1.5


Classes TIdDNTreeNode Class

Legend
Method
virtual
Property
read only

TIdDNTreeNode Methods
The Methods of the TIdDNTreeNode class are listed here.

Methods
Method Description
AddChild ( 613)
Clear ( 613)
Create ( 613)
Destroy ( 614)
IndexByLabel ( 614)
IndexByNode ( 614)
InsertChild ( 614)
RemoveChild ( 615)
SaveToFile ( 615)
SortChildren ( 615)

Legend
Method
virtual

TIdDNTreeNode.AddChild Method
Pascal
function AddChild: TIdDNTreeNode;
Returns
TIdDNTreeNode ( 612)

Description
AddChild is a method.

AddChild returns a TIdDNTreeNode ( 612) value.

TIdDNTreeNode.Clear Method
Pascal
procedure Clear;
Description
Clear is a method.

TIdDNTreeNode.Create Constructor
Pascal
constructor Create(
ParentNode: TIdDNTreeNode
); reintroduce;

Internet Direct (Indy) Version 10.1.5 613


TIdDNTreeNode Class Classes

Parameters
Parameters Description
ParentNode Type is TIdDNTreeNode ( 612).

Description
Create is a reintroduced constructor for the object instance.

TIdDNTreeNode.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDNTreeNode.IndexByLabel Method
Pascal
function IndexByLabel(
CLabel: AnsiString
): integer;
Parameters
Parameters Description
CLabel Type is AnsiString.

Returns
integer

Description
IndexByLabel is a method.

IndexByLabel returns a integer value.

TIdDNTreeNode.IndexByNode Method
Pascal
function IndexByNode(
ANode: TIdDNTreeNode
): integer;
Parameters
Parameters Description
ANode Type is TIdDNTreeNode ( 612).

Returns
integer

Description
IndexByNode is a method.

IndexByNode returns a integer value.

TIdDNTreeNode.InsertChild Method
Pascal
function InsertChild(

614 Internet Direct (Indy) Version 10.1.5


Classes TIdDNTreeNode Class

Index: integer
): TIdDNTreeNode;
Parameters
Parameters Description
Index Type is integer.

Returns
TIdDNTreeNode ( 612)

Description
InsertChild is a method.

InsertChild returns a TIdDNTreeNode ( 612) value.

TIdDNTreeNode.RemoveChild Method
Pascal
procedure RemoveChild(
Index: integer
);
Parameters
Parameters Description
Index Type is integer.

Description
RemoveChild is a method.

TIdDNTreeNode.SaveToFile Method
Pascal
procedure SaveToFile(
Filename: String
);
Parameters
Parameters Description
Filename Type is String.

Description
SaveToFile is a method.

TIdDNTreeNode.SortChildren Method
Pascal
procedure SortChildren;
Description
SortChildren is a method.

TIdDNTreeNode Properties
The Properties of the TIdDNTreeNode class are listed here.

Properties
Property Description
AutoSortChild ( 616)

Internet Direct (Indy) Version 10.1.5 615


TIdDNTreeNode Class Classes

ChildIndex ( 616)
Children ( 616)
CLabel ( 616)
FullName ( 616)
ParentNode ( 616)
RRs ( 617)

Legend
Property
read only

TIdDNTreeNode.AutoSortChild Property
Pascal
property AutoSortChild: boolean;
Description
AutoSortChild is a Public boolean property. Write access for the property is implemented using FAutoSortChild.

TIdDNTreeNode.ChildIndex Property
Pascal
property ChildIndex: TIdStrings;
Description
ChildIndex is a Public TIdStrings ( 3089) property. Write access for the property is implemented using SetChildIndex.

TIdDNTreeNode.Children Property
Pascal
property Children [Index : integer]: TIdDNTreeNode;
Description
Children is a Public TIdDNTreeNode ( 612) property. Write access for the property is implemented using SetNode.

TIdDNTreeNode.CLabel Property
Pascal
property CLabel: AnsiString;
Description
CLabel is a Public AnsiString property. Write access for the property is implemented using SetCLabel.

TIdDNTreeNode.FullName Property
Pascal
property FullName: string;
Description
FullName is a Public read-only string property.

TIdDNTreeNode.ParentNode Property
Pascal
property ParentNode: TIdDNTreeNode;

616 Internet Direct (Indy) Version 10.1.5


Classes TIdDomainNameServerMapping Class

Description
ParentNode is a Public TIdDNTreeNode ( 612) property. Write access for the property is implemented using FParentNode.

TIdDNTreeNode.RRs Property
Pascal
property RRs: TIdTextModeRRs;
Description
RRs is a Public TIdTextModeRRs ( 2413) property. Write access for the property is implemented using SetRRs.

TIdDomainExpireCheckThread Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDomainExpireCheckThread = class(TIdThread);
Description
TIdDomainExpireCheckThread is a TIdThread ( 2415) descendant.

See Also
TIdThread ( 2415)

TIdDomainNameServerMapping Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdDomainNameServerMapping = class(TObject);
Description
TIdDomainNameServerMapping is a TObject descendant.

See Also
TObject

TIdDomainNameServerMapping Members
The following tables list the members exposed by TIdDomainNameServerMapping.

Internet Direct (Indy) Version 10.1.5 617


TIdDomainNameServerMapping Class Classes

Properties
Property Description
DomainName ( 619)
Host ( 619)

Methods
Method Description
Create ( 618)
Destroy ( 618)
SyncAndUpdate ( 618)

Legend
Constructor
virtual
Property

TIdDomainNameServerMapping Methods
The Methods of the TIdDomainNameServerMapping class are listed here.

Methods
Method Description
Create ( 618)
Destroy ( 618)
SyncAndUpdate ( 618)

Legend
Constructor
virtual

TIdDomainNameServerMapping.Create Constructor
Pascal
constructor Create(
List: TIdDNSMap
);
Parameters
Parameters Description
List Type is TIdDNSMap ( 598).

Description
Create is a constructor for the object instance.

TIdDomainNameServerMapping.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdDomainNameServerMapping.SyncAndUpdate Method
Pascal
procedure SyncAndUpdate(

618 Internet Direct (Indy) Version 10.1.5


Classes TIdDOSAttributes Class

Sender: TObject
);
Parameters
Parameters Description
Sender Type is TObject.

Description
SyncAndUpdate is a method.

TIdDomainNameServerMapping Properties
The Properties of the TIdDomainNameServerMapping class are listed here.

Properties
Property Description
DomainName ( 619)
Host ( 619)

Legend
Property

TIdDomainNameServerMapping.DomainName Property
Pascal
property DomainName: string;
Description
DomainName is a Published string property. Write access for the property is implemented using FDomainName.

TIdDomainNameServerMapping.Host Property
Pascal
property Host: string;
Description
Host is a Published string property. Write access for the property is implemented using SetHost.

TIdDOSAttributes Class
Implements storage for MS DOS file and directory attributes returned in structured directory listings.

File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdDOSAttributes = class(TIdPersistent);
Description
TIdDOSAttributes is a TIdPersistent ( 3073) descendant used to implement storage for file and directory attributes returned in
structured directory listings for remote FTP server using the MS DOS file system.

Internet Direct (Indy) Version 10.1.5 619


TIdDOSAttributes Class Classes

TIdDOSAttributes implements properties that represents file attribute values parsed using an FTP directory listing parser.

Use FileAttributes ( 624) to access the Cardinal value containing all of the pertinent attributes for the remote file system.

Use the following properties to read or write the individual file or directory attributes as Boolean properties:

• Read_Only ( 626)
• Archive ( 623)
• System ( 626)
• Directory ( 624)
• Hidden ( 625)
• Normal ( 625)
Use AddAttribute ( 621) and AsString ( 623) to access the Boolean properties represented in a human-readable format.

See Also
TIdPersistent ( 3073)

TIdDOSAttributes Members
The following tables list the members exposed by TIdDOSAttributes.

Properties
Property Description
Archive ( 623) Indicates if the Archive attribute is in effect for the current object instance.
AsString ( 623) Represents attribute values for the object using the MS DOS ATTRIB command format.
Directory ( 624) Indicates if the Directory attribute is in effect for the current object instance.
FileAttributes ( 624) Stores the cardinal representation of the MS DOS file attributes.
Hidden ( 625) Indicates if the file has the hidden attribute applied for the current object instance.
Normal ( 625) Indicates if the file has the "normal" attribute applied for the current object instance.
Read_Only ( 626) Indicates if the file has the "read-only" attribute applied for the current object instance.
System ( 626) Indicates if the file has the "system" attribute applied for the current object instance.

Methods
Method Description
AddAttribute ( 621) Sets the Boolean properties of the using a string representation of the attribute for the entry.
Assign ( 622)
GetAsString ( 622) Derives a String representation of the FileAttributes ( 624) for the object instance.

Legend
Method
virtual
Property
read only

TIdDOSAttributes Methods
The Methods of the TIdDOSAttributes class are listed here.

Methods
Method Description
AddAttribute ( 621) Sets the Boolean properties of the using a string representation of the attribute for the entry.
Assign ( 622)
GetAsString ( 622) Derives a String representation of the FileAttributes ( 624) for the object instance.

620 Internet Direct (Indy) Version 10.1.5


Classes TIdDOSAttributes Class

Legend
Method
virtual

TIdDOSAttributes.AddAttribute Method
Sets the Boolean properties of the using a string representation of the attribute for the entry.

Pascal
function AddAttribute(
const AString: String
): Boolean;
Parameters
Parameters Description
AString One or more attributes to apply to the current object instance.

Returns
Boolean - True when attribute(s) have been successfully applied. False when an unknown attribute is specified in AString.

Description
AddAttribute is a Boolean function used to apply the attributes specified in AString to the current object instance. AString can
contain one or more attribute values represented as uppercase characters. The character(s) in AString determine which Boolean
properties have their value altered, including:

Character Property Affected Property Value


A Archive ( 623) True
H Hidden ( 625) True
S System ( 626) True
R Read_Only ( 626) True
W Read_Only ( 626) False

The order of attributes specified in AString are insignifcant. All valid attribute values will be applied to their corresponding properties
regardless of their order or position in AString.

Arguments passed to AddAttribute in AString are case sensitive. AString must contain uppercase characters for the attribute values,
or no action is taken towards updating the corresponding Boolean properties.

An invalid attribute value encountered in AddAttribute (including incorrect case) causes any subsequent attributes in AString to be
ignored.

Please note that the Directory ( 624) and Normal ( 625) properties cannot be updated using the AddAttribute method.

The return value for the method is True when all attribute values in AString are valid and applied to the Boolen properties in the
current object instance. The return value is False if an invalid attribute value is encountered in AString.

See Also
Read_Only ( 626)

Archive ( 623)

Hidden ( 625)

System ( 626)

Normal ( 625)

Directory ( 624)

AsString ( 623)

Internet Direct (Indy) Version 10.1.5 621


TIdDOSAttributes Class Classes

FileAttributes ( 624)

TIdDOSAttributes.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Contains values to assign to the current object instance.

Description
Assign is an overridden method in TIdDOSAttributes ( 619) used to assign property values found in the Source argument to the
current object instance.

When Source is an instance of TIdDOSAttributes ( 619), the value of the FileAttributes ( 624) property in Source is stored in the
corresponding property in the current object instance. When Source is any other TIdPersistent ( 3073) class instance, the
inherited Assign method is called using Source as an argument.

See Also
FileAttributes ( 624)

TIdPersistent ( 3073)

TIdDOSAttributes.GetAsString Method
Derives a String representation of the FileAttributes ( 624) for the object instance.

Pascal
function GetAsString: String; virtual;
Returns
String - String representation of the FileAttributes ( 624) for the object instance.

Description
GetAsString is a String function used to form a String representation of the FileAttributes ( 624) for the object instance.
GetAsString is the read-access specifier for the AsString ( 623) property.

See Also
AsString ( 623)

FileAttributes ( 624)

TIdDOSAttributes Properties
The Properties of the TIdDOSAttributes class are listed here.

Properties
Property Description
Archive ( 623) Indicates if the Archive attribute is in effect for the current object instance.
AsString ( 623) Represents attribute values for the object using the MS DOS ATTRIB command format.
Directory ( 624) Indicates if the Directory attribute is in effect for the current object instance.
FileAttributes ( 624) Stores the cardinal representation of the MS DOS file attributes.
Hidden ( 625) Indicates if the file has the hidden attribute applied for the current object instance.
Normal ( 625) Indicates if the file has the "normal" attribute applied for the current object instance.
Read_Only ( 626) Indicates if the file has the "read-only" attribute applied for the current object instance.
System ( 626) Indicates if the file has the "system" attribute applied for the current object instance.

622 Internet Direct (Indy) Version 10.1.5


Classes TIdDOSAttributes Class

Legend
Property
read only

TIdDOSAttributes.Archive Property
Indicates if the Archive attribute is in effect for the current object instance.

Pascal
property Archive: Boolean;
Description
Archive is a Boolean property used to indicate if the Archive attribute is in effect for the current object instance. The value in the
property is normally updated when a directory listing parser handles responses from a remote FTP server.

Use AddAttribute ( 621) to update one or more of the Boolean properties that represent the values found in the FileAttributes (
624) property.

See Also
Read_Only ( 626)

Hidden ( 625)

System ( 626)

Normal ( 625)

Directory ( 624)

AsString ( 623)

FileAttributes ( 624)

TIdDOSAttributes.AsString Property
Represents attribute values for the object using the MS DOS ATTRIB command format.

Pascal
property AsString: String;
Description
AsString is a read-only String property that represents the attribute values for the object instance as a string. Values returned by
reading the AsString property emulate the format used in the MS DOS ATTRIB command, and include the following characters:

Character Description
R Read_only attribute is set.
A Archive ( 623) attribute is set.
S System ( 626) attrribute is set.
H Hidden ( 625) attribute is set.

Attribute which are not set are represented as a space character (CHAR32 ( 3169)) in the value for the AsString property.

See Also
Read_Only ( 626)

Archive ( 623)

System ( 626)

Internet Direct (Indy) Version 10.1.5 623


TIdDOSAttributes Class Classes

Hidden ( 625)

TIdDOSAttributes.Directory Property
Indicates if the Directory attribute is in effect for the current object instance.

Pascal
property Directory: Boolean;
Description
Directory is a Boolean property used to indicate if the Directory attribute is in effect for the current object instance. The value in the
property is normally updated when a directory listing parser handles responses from a remote FTP server.

Use AddAttribute ( 621) to update one or more of the Boolean properties that represent the values found in the FileAttributes (
624) property.

See Also
Read_Only ( 626)

Archive ( 623)

Hidden ( 625)

System ( 626)

Normal ( 625)

AsString ( 623)

FileAttributes ( 624)

TIdDOSAttributes.FileAttributes Property
Stores the cardinal representation of the MS DOS file attributes.

Pascal
property FileAttributes: Cardinal;
Description
FileAttributes is a Cardinal property that represents the value for individual bit fields used in MS DOS file attributes. Bit fields in
FileAttributes are derived by combining the following file attribute values using a bitwise OR operation:

IdFILE_ATTRIBUTE_READONLY ( 3837)
IdFILE_ATTRIBUTE_HIDDEN ( 3836)
IdFILE_ATTRIBUTE_SYSTEM ( 3837)
IdFILE_ATTRIBUTE_DIRECTORY ( 3835)
IdFILE_ATTRIBUTE_ARCHIVE ( 3834)
IdFILE_ATTRIBUTE_NORMAL ( 3836)

Bit fields values in FileAttributes are checked using a bitwise AND operation, and used to set the Boolean value for the following
properties:

Read_Only ( 626)
Hidden ( 625)
System ( 626)

624 Internet Direct (Indy) Version 10.1.5


Classes TIdDOSAttributes Class

Directory ( 624)
Archive ( 623)
Normal ( 625)

See Also
Read_Only ( 626)

Hidden ( 625)

System ( 626)

Directory ( 624)

Archive ( 623)

Normal ( 625)

IdFILE_ATTRIBUTE_READONLY ( 3837)

IdFILE_ATTRIBUTE_HIDDEN ( 3836)

IdFILE_ATTRIBUTE_SYSTEM ( 3837)

IdFILE_ATTRIBUTE_DIRECTORY ( 3835)

IdFILE_ATTRIBUTE_ARCHIVE ( 3834)

IdFILE_ATTRIBUTE_NORMAL ( 3836)

TIdWin32ea ( 2622)

TIdDOSAttributes.Hidden Property
Indicates if the file has the hidden attribute applied for the current object instance.

Pascal
property Hidden: Boolean;
Description
Hidden is a Boolean property that indicates if the IdFILE_ATTRIBUTE_HIDDEN ( 3836) flag is used in the MS DOS file attributes
for the current object instance. The value of the property is read from and written to the FileAttributes ( 624) property.

See Also
Archive ( 623)

Directory ( 624)

Normal ( 625)

Read_Only ( 626)

System ( 626)

FileAttributes ( 624)

IdFILE_ATTRIBUTE_HIDDEN ( 3836)

TIdDOSAttributes.Normal Property
Indicates if the file has the "normal" attribute applied for the current object instance.

Pascal
property Normal: Boolean;

Internet Direct (Indy) Version 10.1.5 625


TIdDOSAttributes Class Classes

Description
Normal is a Boolean property that indicates if the IdFILE_ATTRIBUTE_NORMAL ( 3836) flag is used in the MS DOS file attributes
for the current object instance. The value of the property is read from and written to the FileAttributes ( 624) property.

See Also
Archive ( 623)

Directory ( 624)

Hidden ( 625)

Read_Only ( 626)

System ( 626)

FileAttributes ( 624)

IdFILE_ATTRIBUTE_NORMAL ( 3836)

TIdDOSAttributes.Read_Only Property
Indicates if the file has the "read-only" attribute applied for the current object instance.

Pascal
property Read_Only: Boolean;
Description
Read_Only is a Boolean property that indicates if the IdFILE_ATTRIBUTE_READONLY ( 3837) flag is used in the MS DOS file
attributes for the current object instance. The value of the property is read from and written to the FileAttributes ( 624) property.

See Also
Archive ( 623)

Directory ( 624)

Hidden ( 625)

Normal ( 625)

System ( 626)

FileAttributes ( 624)

IdFILE_ATTRIBUTE_READONLY ( 3837)

TIdDOSAttributes.System Property
Indicates if the file has the "system" attribute applied for the current object instance.

Pascal
property System: Boolean;
Description
System is a Boolean property that indicates if the IdFILE_ATTRIBUTE_SYSTEM ( 3837) flag is used in the MS DOS file attributes
for the current object instance. The value of the property is read from and written to the FileAttributes ( 624) property.

See Also
Archive ( 623)

Directory ( 624)

Hidden ( 625)

Normal ( 625)

626 Internet Direct (Indy) Version 10.1.5


Classes TIdDOSBaseFTPListItem Class

Read_Only ( 626)

FileAttributes ( 624)

IdFILE_ATTRIBUTE_SYSTEM ( 3837)

TIdDOSBaseFTPListItem Class
Implements support for MS DOS file attributes in FTP client structured directory listings.

File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdDOSBaseFTPListItem = class(TIdFTPListItem);
Description
TIdDOSBaseFTPListItem is a TIdFTPListItem ( 851) descendant that implements support for MS DOS file attributes in the
structured directory listings collection for the Indy FTP client. TIdDOSBaseFTPListItem extends the ancestor class to include
storage for a TIdDOSAttributes ( 619) instance in the Attributes ( 629) property.

TIdDOSBaseFTPListItem is used in directory listing parsers that populate the TIdFTP.DirectoryListing ( 818) property for remote
FTP servers using the MS DOS listing format.

See Also
TIdFTPListItem ( 851)

TIdDOSAttributes ( 619)

TIdFTP.DirectoryListing ( 818)

TIdDOSBaseFTPListItem Members
The following tables list the members exposed by TIdDOSBaseFTPListItem.

Properties
Property Description
Attributes ( 629) Represents MS DOS file attributes for a file or directory entry in a FTP directory listing.
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 628) Constructor for the collection item.
Destroy ( 628) Frees the collection item.

Internet Direct (Indy) Version 10.1.5 627


TIdDOSBaseFTPListItem Class Classes

Legend
Method
virtual
Property

TIdDOSBaseFTPListItem Methods
The Methods of the TIdDOSBaseFTPListItem class are listed here.

Methods
Method Description
Create ( 628) Constructor for the collection item.
Destroy ( 628) Frees the collection item.

Legend
Constructor
virtual

TIdDOSBaseFTPListItem.Create Constructor
Constructor for the collection item.

Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Collection that owns the collection item.

Description
Create is the overridden constructor for the collection item. Create calls the inherited constructor using AOwner as an argument.

Create allocates resources required for the member that storages values for the Attributes ( 629) property.

Use free to call the destructor which frees resources allocated for the collection item.

See Also
Destroy ( 628)

Attributes ( 629)

TIdDOSBaseFTPListItem.Destroy Destructor
Frees the collection item.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the colleciton item.

Destroy clears and frees resources allocated to the Attributes ( 629) property. Destroy also calls the inherited Destructor to free
the object instance.

See Also
Create ( 628)

Attributes ( 629)

628 Internet Direct (Indy) Version 10.1.5


Classes TIdEcho Class

TIdDOSBaseFTPListItem Properties
The Properties of the TIdDOSBaseFTPListItem class are listed here.

Properties
Property Description
Attributes ( 629) Represents MS DOS file attributes for a file or directory entry in a FTP directory listing.

Legend
Property

TIdDOSBaseFTPListItem.Attributes Property
Represents MS DOS file attributes for a file or directory entry in a FTP directory listing.

Pascal
property Attributes: TIdDOSAttributes;
Description
Attributes is a TIdDOSAttributes ( 619) property that represents MS DOS file attributes for a file or directory entry in a FTP
directory listing.

See Also
TIdDOSAttributes ( 619)

TIdFTP.DirectoryListing ( 818)

TIdEcho Class
Implements a TCP-based Echo ( 631) client.

File
IdEcho ( 4622)

Hierarchy

Pascal
TIdEcho = class(TIdTCPClientCustom);
Description
TIdEcho is a TIdTCPClientCustom ( 2340) descendant that implements the TCP-based variant of the Echo ( 631) Protocol as
described in the Internet Standards document:

RFC 862 - Echo Protocol

TIdEcho is useful as a debugging and measurement protocol where the data sent to the server is simply sent back to the originating
client. TIdEcho is provided as a measure of the time it takes to send and receive data from an Echo ( 631) Server
(TIdECHOServer ( 633)).

The TCP-based implementation of the Echo ( 631) Protocol is a connection based application. An Echo ( 631) Server listens for
TCP connections on TCP Port ( 633) 7.

When a connection is established, any data received by the server is returned to the originating client. The connection remains
open until the client application closes the connection.

To use TIdEcho, perform the following actions in your application:

Internet Direct (Indy) Version 10.1.5 629


TIdEcho Class Classes

Set values in the Host ( 632) and Port ( 633) properties, as required.
Call Connect ( 2342) to open a connection to the Echo ( 631) Server.
Call Echo ( 631) to send data to the server and receive the server response. Use EchoTime ( 632) to retrieve the number of
milliseconds needed to send and receive data from the server.
Call Disconnect ( 2355) to close the connection to the Echo ( 631) server.

See Also
TIdTCPClientCustom ( 2340)

IndySupport ( 15)

TIdEcho Members
The following tables list the members exposed by TIdEcho.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
EchoTime ( 632) Indicates the elapsed time needed to send and receive echo ( 631) data.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 632) IP address or host name for the echo ( 631) server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 633) Port number for the Echo ( 631) protocol server .
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
Echo ( 631) Sends and receives echo data.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.

630 Internet Direct (Indy) Version 10.1.5


Classes TIdEcho Class

GetVersion ( 269) Version ( 269) number for Indy component suite.


CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdEcho Methods
The Methods of the TIdEcho class are listed here.

Methods
Method Description
Echo ( 631) Sends and receives echo data.

Legend
Method

TIdEcho.Echo Method
Sends and receives echo data.

Pascal
function Echo(
AText: String
): String;
Parameters
Parameters Description
AText Data to send to the echo server.

Returns
String - Data received from the echo server.

Description
Echo is a String function that sends the text in AText to the echo server, and returns the text received from the echo server. If the
returned value is not the same as the text in AText, there may be a problem with the server or the TCP connection.

Echo monitors the time needed to send the echo request and receive the echo response, and stores the elapsed time in EchoTime
( 632).

Echo uses GetTickCount to retrieve both the starting and ending times (in milliseconds) used to determine EchoTime ( 632).
EchoTime ( 632) is the difference between the starting and ending tick counts, and accounts for the ending time reverting to a 0
(zero) value after starting the Echo transmission.

Internet Direct (Indy) Version 10.1.5 631


TIdEcho Class Classes

Echo triggers the OnWorkBegin ( 2368) and OnWorkEnd ( 2369) event handlers both prior to and following the act of writing the
value in AText using the IOHandler ( 2364) for the connection.

Echo also triggers the OnWorkBegin ( 2368) and OnWorkEnd ( 2369) event handlers both prior to and following the act of
reading the echo response using the internal buffering mechanism for the IOHandler ( 2364).

Assign values to the Host ( 632) and Port ( 633) properties and call Connect ( 2342) to open the connection and IOHandler (
2364) for the client.

See Also
GetTickDiff ( 2813) TIdEcho.Host ( 632) TIdEcho.Port ( 633) TIdEcho.EchoTime ( 632)

TIdEcho Properties
The Properties of the TIdEcho class are listed here.

Properties
Property Description
EchoTime ( 632) Indicates the elapsed time needed to send and receive echo ( 631) data.
Host ( 632) IP address or host name for the echo ( 631) server.
Port ( 633) Port number for the Echo ( 631) protocol server .

Legend
Property
read only

TIdEcho.EchoTime Property
Indicates the elapsed time needed to send and receive echo ( 631) data.

Pascal
property EchoTime: Cardinal;
Description
EchoTime is a read-only Cardinal property that indicates the number of milliseconds required to send and receive data using the
Echo ( 631) method. Use EchoTime to determine when there may be problems with the network or connection.

EchoTime is calculated in the Echo ( 631) method using GetTickCount and GetTickDiff ( 2813), and represents the elapsed
milliseconds from the start of the echo ( 631) request until completion of the echo ( 631) response. EchoTime is adjusted to
reflect situations where the ending time reverts to a 0 (zero) value after the Echo ( 631) transmission has been started.

See Also
TIdEcho.Echo ( 631) GetTickCount GetTickDiff ( 2813)

TIdEcho.Host Property
IP address or host name for the echo ( 631) server.

Pascal
property Host;
Description
Host is a published String property in TIdEcho ( 629). Host indicates the IP address or host name for the Echo ( 631) server.

Set the value in Port ( 633) to indicate the port number where the Echo ( 631) server listens for client connections and
transmissions.

Set values in Host and Port ( 633) prior to calling Connect ( 2342).

632 Internet Direct (Indy) Version 10.1.5


Classes TIdECHOServer Class

See Also
Port ( 633)

TIdEcho.Port Property
Port number for the Echo ( 631) protocol server .

Pascal
property Port;
Description
Port is a published Integer property in TIdEcho ( 629). Port represents the port number used by the ECHO protocol, and the port
where the server in HOst listens for client connections and transmissions.

Port is assigned the default port number for the Echo ( 631) protocol (IdPORT_ECHO ( 3984)). The default value for Port is
assigned during initailization of the component.

Set values in the Host ( 632) and Port properties prior to calling Connect ( 2342).

See Also
IdPORT_ECHO ( 3984) Host ( 632)

TIdECHOServer Class
Implements a TCP-based Echo server.

File
IdEchoServer ( 4623)

Hierarchy

Pascal
TIdECHOServer = class(TIdCustomTCPServer);
Description
TIdECHOServer is a TIdTCPServer ( 2375) descendant that implements the TCP-based variant of the Echo Protocol, as
described in the Internet Standards document:

RFC 862 - Echo Protocol

TIdEchoServer is useful as a debugging and measurement protocol where the data sent to the server is simply sent back to the
originating client. The ECHO protocol provides a measure of the time it takes to send and receive data from an Echo Server
(TIdECHOServer).

The TCP-based implementation of the Echo Protocol server is a connection based application. An Echo Server listens for TCP
connections on TCP Port 7.

When a connection is established, any data received by the server is returned to the originating client. The connection remains
open until the client application closes the connection.

Set the value in DefaultPort ( 635) to indicate the port assigned for listener threads in the server.

Definitions for socket handles can be added to Bindings ( 461), and used to created one or more listener threads when the Active
( 458) propert y in the server is set to True.

TIdECHOServer overrides the protected method that controls execution of the tasks for client connections to implement the limited
functionality of the ECHO protocol. As a result, the general-purpose OnExecute event handler is unused in TIdECHOServer. Any
procedure assigned to the OnExecute event handler will be ignored.

Internet Direct (Indy) Version 10.1.5 633


TIdECHOServer Class Classes

When new connections are accepted by the listener thread(s) in the server, the client context is executed. Data read from the
connection is echoed back to the originating IP address and port number. Execution of the client context repeates until the
connection for the client context is closed.

See Also
TIdTCPServer ( 2375)

IndySupport ( 15)

TIdECHOServer Members
The following tables list the members exposed by TIdECHOServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 635) Default port number for listener threads in the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method

634 Internet Direct (Indy) Version 10.1.5


Classes TIdEchoUDP Class

virtual
Event

TIdECHOServer Properties
The Properties of the TIdECHOServer class are listed here.

Properties
Property Description
DefaultPort ( 635) Default port number for listener threads in the server.

Legend
Property

TIdECHOServer.DefaultPort Property
Default port number for listener threads in the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdECHOServer ( 633). DefaultPort represents the port number to use when creating
listener thread(s) used in the server.

DefaultPort is used in the Bindings ( 461) collection.

Set the value in DefaultPort prior to creating socket handle definitions in Bindings ( 461), or setting the servers Active ( 458)
property to True. Changing the value in DefaultPort has no effect on existing definitions in Bindings ( 461).

The default value for DefaultPort is IdPORT_ECHO ( 3984) as assigned during initialization of the component.

See Also
Bindings ( 461)

TIdEchoUDP Class
Implements a UDP-based Echo ( 637) client.

File
IdEchoUDP ( 4623)

Hierarchy

Pascal
TIdEchoUDP = class(TIdUDPClient);
Description
TIdEchoUDP is a TIdUDPClient ( 2509) descendant that implements the TCP-based variant of the Echo ( 637) Protocol as
described in the Internet Standards document:

RFC 862 - Echo Protocol

TIdEchoUDP is useful as a debugging and measurement protocol where the data sent to the server is simply sent back to the
originating client. TIdEchoUDP is provided as a measure of the time it takes to send ( 2517) and receive data from an Echo (
637) Server (TIdECHOUDPServer).

Internet Direct (Indy) Version 10.1.5 635


TIdEchoUDP Class Classes

The UDP-based implementation of the Echo ( 637) Protocol is not a connection based application. An Echo ( 637) Server listens
for the arrival of UDP datagrams on TCP Port ( 638) 7.

When a UDP datagram arrives at the UDP server, any data received by the server is returned to the originating client.

To use TIdEchoUDP, perform the following actions in your application:

Set the value in the Port ( 638) property, as required.


Call Echo ( 637) to send ( 2517) data to the server and receive the server response.
Use EchoTime ( 638) to retrieve the number of milliseconds needed to send ( 2517) and receive data from the server.

See Also
TIdUDPClient ( 2509)

IndySupport ( 15)

TIdEchoUDP Members
The following tables list the members exposed by TIdEchoUDP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
EchoTime ( 638) Indicates the elapsed time needed to send ( 2517) and receive echo ( 637) data.
Host ( 2520) Identifies the address of the remote computer system.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
IPVersion ( 2521) Identifies the IP address family supported for the UDP protocol client.
OnConnected ( 2521) Event handler signalled when establishing the UDP client session.
OnDisconnected ( 2521) Event handler signalled when closing the UDP client session.
Port ( 638) Port number for the Echo ( 637) protocol server .
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ReceiveTimeout ( 2522) Indicates the timeout while waiting for a readable socket handle.
TransparentProxy ( 2522) Implements a transparent proxy connection for the UDP client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
CloseProxy ( 2511) Closes the socket handle for a proxied connection for the client.
Connect ( 2512) Initializes the client for sending and receiving datagrams.
Connected ( 2512) Indicates if the socket handle for the UDP client has been allocated.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2513) Frees the object instance.
Disconnect ( 2513) Closes the socket handle and transparent proxy for the client.
DoWork ( 357) Triggers the OnWork event handler.
Echo ( 637) Sends and receives echo data.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
OpenProxy ( 2514) Ensures the optional transparent proxy is enabled for the client.
Send ( 2505) Transmits a datagram to a specified host and port number.

636 Internet Direct (Indy) Version 10.1.5


Classes TIdEchoUDP Class

Send ( 2517) Transmits a datagram to the host and port number for the client.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)
ReceiveBuffer ( 2514)
SendBuffer ( 2518)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdEchoUDP Methods
The Methods of the TIdEchoUDP class are listed here.

Methods
Method Description
Echo ( 637) Sends and receives echo data.

Legend
Method

TIdEchoUDP.Echo Method
Sends and receives echo data.

Pascal
function Echo(
AText: String
): String;
Parameters
Parameters Description
AText Data to send ( 2517) to the echo server.

Returns
String - Data received from the echo server.

Description
Echo is a String function that sends the text in AText to the echo server, and returns the text received from the echo server. If the
returned value is not the same as the text in AText, there may be a problem with the server or the network connection.

Echo monitors the time needed to send ( 2517) the echo request and receive the echo response, and stores the elapsed time in
EchoTime ( 638).

Echo uses GetTickCount to retrieve both the starting and ending times (in milliseconds) used to determine EchoTime ( 638).
EchoTime ( 638) is the difference between the starting and ending tick counts, and accounts for the ending time reverting to a 0
(zero) value after starting the Echo transmission.

Echo triggers the OnWorkBegin and OnWorkEnd event handlers both prior to and following the act of writing the value in AText
using the IOHandler for the connection.

Internet Direct (Indy) Version 10.1.5 637


TIdEchoUDP Class Classes

Echo also triggers the OnWorkBegin and OnWorkEnd event handlers both prior to and following the act of reading the echo
response using the internal buffering mechanism for the IOHandler.

Assign a value to the Port ( 638) property prior to calling the Echo method.

See Also
GetTickDiff ( 2813) Port ( 638) EchoTime ( 638)

TIdEchoUDP Properties
The Properties of the TIdEchoUDP class are listed here.

Properties
Property Description
EchoTime ( 638) Indicates the elapsed time needed to send ( 2517) and receive echo ( 637) data.
Port ( 638) Port number for the Echo ( 637) protocol server .

Legend
Property
read only

TIdEchoUDP.EchoTime Property
Indicates the elapsed time needed to send ( 2517) and receive echo ( 637) data.

Pascal
property EchoTime: Cardinal;
Description
EchoTime is a read-only Cardinal property that indicates the number of milliseconds required to send ( 2517) and receive data
using the Echo ( 637) method. Use EchoTime to determine when there may be problems with the network connection.

EchoTime is calculated in the Echo ( 637) method using GetTickCount and GetTickDiff ( 2813), and represents the elapsed
milliseconds from the start of the echo ( 637) request until completion of the echo ( 637) response. EchoTime is adjusted to
reflect situations where the ending time reverts to a 0 (zero) value after the Echo ( 637) transmission has been started.

See Also
Echo ( 637)

GetTickCount

GetTickDiff ( 2813)

TIdEchoUDP.Port Property
Port number for the Echo ( 637) protocol server .

Pascal
property Port;
Description
Port is a published Integer property in TIdEcho ( 629). Port represents the port number used by the ECHO protocol, and the port
where the server listens for client transmissions.

Port is assigned the default port number for the Echo ( 637) protocol (IdPORT_ECHO ( 3984)). The default value for Port is
assigned during initailization of the component.

Set the value for the Port property prior to calling Echo ( 637).

638 Internet Direct (Indy) Version 10.1.5


Classes TIdEchoUDPServer Class

See Also
IdPORT_ECHO ( 3984)

TIdEchoUDPServer Class
Implements a UDP-based Echo server.

File
IdEchoUDPServer ( 4624)

Hierarchy

Pascal
TIdEchoUDPServer = class(TIdUDPServer);
Description
TIdEchoUDPServer is a TIdUDPServer ( 2530) descendant that implements the UDP-based variant of the Echo Protocol, as
described in the Internet Standards document:

RFC 862 - Echo Protocol

TIdEchoUDPServer is useful as a debugging and measurement protocol where the data sent to the server is simply sent back to
the originating client. The ECHO protocol provides a measure of the time it takes to send ( 2505) and receive data from an Echo
Server (TIdEchoUDPServer).

The UDP-based implementation of the Echo Protocol server is not a connection based application.

An Echo Server listens for TCP connections on TCP Port 7.

The UDP server listens for the arrival of datagrams, and any data received by the server is returned to the originating client.

Set the value in DefaultPort ( 640) to indicate the port assigned for listener threads in the server.

Definitions for socket handles can be added to Bindings ( 2532), and used to created one or more listener threads when the
Active ( 2507) property in the server is set to True.

TIdEchoUDPServer overrides the protected method executed an arriving datagram on a socket handle for a a listener thread is
detected. Data read from the socket handle is written to the originating IP address and port number for the datagram.

See Also
TIdUDPServer ( 2530) IndySupport ( 15)

TIdEchoUDPServer Members
The following tables list the members exposed by TIdEchoUDPServer.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 640) Default port number for listener threads in the server.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.

Internet Direct (Indy) Version 10.1.5 639


TIdEchoUDPServer Class Classes

Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Property
read only
Method
virtual
Event

TIdEchoUDPServer Properties
The Properties of the TIdEchoUDPServer class are listed here.

Properties
Property Description
DefaultPort ( 640) Default port number for listener threads in the server.

Legend
Property

TIdEchoUDPServer.DefaultPort Property
Default port number for listener threads in the server.

Pascal
property DefaultPort: integer;
Description
DefaultPort is a published property in TIdEchoUDPServer ( 639). DefaultPort represents the port number to use when creating
listener thread(s) used in the server.

DefaultPort is used in the Bindings ( 2532) collection.

Set the value in DefaultPort prior to creating socket handle definitions in Bindings ( 2532), or setting the servers Active ( 2507)
property to True. Changing the value in DefaultPort has no effect on existing definitions in Bindings ( 2532).

640 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressItem Class

The default value for DefaultPort is IdPORT_ECHO ( 3984) as assigned during initialization of the component.

See Also
Bindings ( 2532)

TIdEMailAddressItem Class
Implements a class for an RFC 2822-compliant email address.

File
IdEMailAddress ( 4624)

Hierarchy

Pascal
TIdEMailAddressItem = class(TIdCollectionItem);
Description
The TIdEMailAddressItem is a TIdCollectionItem ( 3011) descendant that structures components in an EMail address into an RFC
2822-compliant form.

TIdEMailAddressItem can also be used to parse the Text ( 646) representing an RFC 2822-compliant EMail address into the
component values defined in RFC 2822. These values are stored in properties, including:

Address ( 644)
Name ( 645)
User ( 646)
Domain ( 645)

TIdEMailAddressItem also provides encoding and decoding of quoted characters as specified in the the lexical requirements for
character quoting in RFC 2822.

TIdEMailAddressItem is the collection item class used in the TIdEMailAddressList ( 647) collection, and for properties
representing a single email address in TIdMessage ( 1521).

See Also
TIdEMailAddressList ( 647)

TIdMessage ( 1521)

IndySupport ( 15)

TIdEMailAddressItem Members
The following tables list the members exposed by TIdEMailAddressItem.

Properties
Property Description
Address ( 644) Represents the person's Email address.
Domain ( 645) Indicates the host name for the email address.
Name ( 645) Represents the person's name in an EMail address.
Text ( 646) Represents the the full contents of an email address.
User ( 646) Represents the mailbox User name in the email address.

Internet Direct (Indy) Version 10.1.5 641


TIdEMailAddressItem Class Classes

Methods
Method Description
Assign ( 642) Copies the properties of an Email Address ( 644) item to the current object instance.
Create ( 642)

Legend
Method
virtual
Property

TIdEMailAddressItem Methods
The Methods of the TIdEMailAddressItem class are listed here.

Methods
Method Description
Assign ( 642) Copies the properties of an Email Address ( 644) item to the current object instance.
Create ( 642)

Legend
Method
virtual

TIdEMailAddressItem.Assign Method
Copies the properties of an Email Address ( 644) item to the current object instance.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
ASource Persistent class to be assigned to the current object instance.

Description
Assign is an overridden procedure that allows the persistent TIdEmailAddressItem ( 641) to assign the values in another instance
to the current instance.

Assign copies the values of the Name ( 645) and Address ( 644) members when ASource is another TIdEMailAddessItem
instance. Otherwise, Assign relies on the inherited Assign method.

See Also
TIdEMailAddressItem ( 641)

TIdEMailAddressItem.Create Constructor
Overload List

Method Description
TIdEMailAddressItem.Create () ( 643) Constructor for the object instance.
TIdEMailAddressItem.Create (string) ( Constructor for the object instance.
643)
TIdEMailAddressItem.Create Constructor for the object instance.
(TIdCollection) ( 643)

642 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressItem Class

TIdEMailAddressItem.Create Constructor ()
Constructor for the object instance.

Pascal
constructor Create; overload; reintroduce;
Description
Create is the overloaded, reintroduced constructor for the object instance. Create calls the inherited constructor using a null owner
for the collection item (Nil).

Use one of the overloaded variants of Create to initialize a collection item using either a specified owner collection or an email
address value.

See Also
TIdEMailAddressItem.Create

TIdEMailAddressList ( 647)

TIdEMailAddressItem.Create Constructor (TIdCollection)


Constructor for the object instance.

Pascal
constructor Create(
aCollection: TIdCollection
); override; overload;
Parameters
Parameters Description
aCollection Type is TIdCollection ( 3011).

Description
Create is the overloaded, reintroduced constructor for the object instance. Create calls the inherited constructor using the value
specified in ACollection as the owner of the collection item.

Use an overloaded variant of the constructor to initialize an email address using a null collection item owner.

See Also
TIdEMailAddressItem.Create

TIdEMailAddressList ( 647)

TIdEMailAddressItem.Create Constructor (string)


Constructor for the object instance.

Pascal
constructor Create(
aText: string
); overload; reintroduce;
Parameters
Parameters Description
aText Email address to assign ( 642) to the properties in the object instance.

Description
Create is the overloaded, reintroduced constructor for the object instance. Create calls the inherited constructor using a null null
owner for the collection item (Nil).

Creates sets the value of the Text ( 646) property to the value specified in the AText argument.

Use an overloaded variant of the constructor to initialize an email address using either a specified owner collection, or with neither

Internet Direct (Indy) Version 10.1.5 643


TIdEMailAddressItem Class Classes

an owner nor an email address value.

See Also
TIdEMailAddressItem.Create

TIdEMailAddressList ( 647)

TIdEMailAddressItem Properties
The Properties of the TIdEMailAddressItem class are listed here.

Properties
Property Description
Address ( 644) Represents the person's Email address.
Domain ( 645) Indicates the host name for the email address.
Name ( 645) Represents the person's name in an EMail address.
Text ( 646) Represents the the full contents of an email address.
User ( 646) Represents the mailbox User name in the email address.

Legend
Property

TIdEMailAddressItem.Address Property
Represents the person's Email address.

Pascal
property Address: string;
Description
Address is a String property that represents an Email address in RFC 2822-compliant form.

Updating the Name ( 645) or Address portions of the email address causes the Text ( 646) property to be updated to reflect the
new email address.

For example:

// var AEmail: TIdEmailAddressItem;

AEmail.Text := '"John Doe" <jdoe@some.net>';


// AEmail.Name contains 'John Doe'
// AEmail.Address contains 'jdoe@some.net'
// AEmail.User contains 'jdoe'
// AEmail.Domain contains 'some.net'

AEmail.Name := 'Jane Doe';


AEmail.Address := 'janed@another.net';
// AEmail.Text contains '"Jane Doe" <janed@another.net>'
Use Text ( 646) to access the concatenated Name ( 645) and Address for the email address.

Use User ( 646) and Domain ( 645) to access the mailbox and registered organization for the email address.

See Also
TIdEMailAddressItem.Text ( 646)

TIdEMailAddressItem.Name ( 645)

TIdEMailAddressItem.User ( 646)

TIdEMailAddressItem.Domain ( 645)

644 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressItem Class

TIdEMailAddressItem.Domain Property
Indicates the host name for the email address.

Pascal
property Domain: string;
Description
Domain is a read-only String property that indicates the host name or mail exchange where the email will be delivered using a
delivery mechanism as described in the Internet Standards document:

RFC 2821 - Simple Mail Transfer Protocol

Domain returns the contents of the Address ( 644) property following the "@" symbol that indicates the beginning of the domain
literal for the address.

Domain can contain an empty string ('') when Address ( 644) does not contain a value, or the "@" symbol cannot be located in
Address ( 644).

Use Address ( 644) to access non-domain information (like comments) that may be included in the email address follwing the
value in Domain.

Use Name ( 645) to access the optional name of the person for the email address.

Use User ( 646) to access the mailbox name for the email address.

Use Text ( 646) to access the Name ( 645) and Address ( 644) concatenated into an RFC 2822-compliant form.

See Also
TIdEMailAddressItem.Address ( 644)

TIdEMailAddressItem.User ( 646)

TIdEMailAddressItem.Name ( 645)

TIdEMailAddressItem.Name Property
Represents the person's name in an EMail address.

Pascal
property Name: string;
Description
Name is a String property that represents the persons name in the Email address.

Updating the Name or Address ( 644) portions of the email address causes the Text ( 646) property to be updated to reflect the
new email address.

For example:

// var AEmail: TIdEmailAddressItem;

AEmail.Text := '"John Doe" <jdoe@some.net>';


// AEmail.Name contains 'John Doe'
// AEmail.Address contains 'jdoe@some.net'
// AEmail.User contains 'jdoe'
// AEmail.Domain contains 'some.net'

AEmail.Name := 'Jane Doe';


AEmail.Address := 'janed@another.net';
// AEmail.Text contains '"Jane Doe" <janed@another.net>'
Use Text ( 646) to access the concatenated Name and Address ( 644) for the email address.

Use User ( 646) and Domain ( 645) to access the mailbox and registered organization for the email address.

Internet Direct (Indy) Version 10.1.5 645


TIdEMailAddressItem Class Classes

See Also
TIdEMailAddressItem.Text ( 646)

TIdEMailAddressItem.Address ( 644)

TIdEmailAddressItem. User ( 646)

TIdEMailAddressItem.Domain ( 645)

TIdEMailAddressItem.Text Property
Represents the the full contents of an email address.

Pascal
property Text: string;
Description
Text is a String property that represents the persons name and email address in RFC 2822-compliant form. Text can be used to set
both the Name ( 645) and Address ( 644) for the TIdEMailAddressItem ( 641) by providing an RFC 2822-compliant string.

For example:

// var AEmail: TIdEmailAddressItem;

AEmail.Text := '"John Doe" <jdoe@some.net>';


// AEmail.Name contains 'John Doe'
// AEmail.Address contains 'jdoe@some.net'
// AEmail.User contains 'jdoe'
// AEmail.Domain contains 'some.net'

AEmail.Name := 'Jane Doe';


AEmail.Address := 'janed@another.net';
// AEmail.Text contains '"Jane Doe" <janed@another.net>'
When changing the property value, the new email address is examined for use of reserved characters, including '<', '>', '@', '(', ')',
'"', SPACE, and TAB ( 4393). When the new value for Text contains one of these reserved characters, it is examined for proper
use of the characters in the name and address portions of the email address.

Use Address ( 644) to access the email address represented by the User ( 646) and Domain ( 645) portions of the value; ie.
without the Name ( 645) portion of the email address.

Use User ( 646) and Domain ( 645) to access the mailbox and registered organization for the email address.

See Also
TIdEMailAddressItem.Name ( 645)

TIdEMailAddressItem.Address ( 644)

TIdEMailAddressItem.User ( 646)

TIdEMailAddressItem.Domain ( 645)

TIdEMailAddressItem.User Property
Represents the mailbox User name in the email address.

Pascal
property User: string;
Description
User is a String property that represents the user name for the mailbox for the email address. The value in the User property is
derived from the Address ( 644) property, and represents the portion of the email Address ( 644) that occurs before the '@' that
indicates the host domain for the mailbox. User can return an empty string ('') when Address ( 644) is blank, or when address

646 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressList Class

does not contain an '@' character representing the Domain ( 645) for the Address ( 644).

// var AEmail: TIdEmailAddressItem;

AEmail.Text := '"John Doe" <jdoe@some.net>';


// AEmail.Name contains 'John Doe'
// AEmail.Address contains 'jdoe@some.net'
// AEmail.User contains 'jdoe'
// AEmail.Domain contains 'some.net'

AEmail.Name := 'Jane Doe';


AEmail.Address := 'janed@another.net';
// AEmail.Text contains '"Jane Doe" <janed@another.net>'

TIdEMailAddressList Class
Represents a collection of EMail addresses.

File
IdEMailAddress ( 4624)

Hierarchy

Pascal
TIdEMailAddressList = class(TIdOwnedCollection);
Description
TIdEMailAddressList is a TIdOwnedCollection ( 3072) descendant that contains a list of EMail addresses, or TIdEMailAddressItem
( 641) object instances.

TIdEMailAddressList allows Items ( 652) to be added or maintained in the collection, and can be used to access the list as a
TIdStrings ( 3089) instance or as a comma-delimited string as used in many EMail messages.

TIdEMailAddressList provides methods that allow extracting a list with the unique domain names for email addresses in the list, or
extacting a list of email addresses for a specific domain name.

TIdEMailAddressList may be sorted by Domain name to make it easier to perform processing and delivery for email addresses in
the list.

TIdEMailAddressList is the type used to represent TIdMessage ( 1521) properties that can accept one or more EMail addresses,
like Receipients, CCList, and BCCList.

See Also
TIdOwnedCollection ( 3072)

TIdEMailAddressItem ( 641)

TIdMessage ( 1521)

TIdMessage.Recipients ( 1551)

TIdMessage.CCList ( 1538)

TIdMessage.BccList ( 1537)

IndySupport ( 15)

TIdEMailAddressList Members
The following tables list the members exposed by TIdEMailAddressList.

Internet Direct (Indy) Version 10.1.5 647


TIdEMailAddressList Class Classes

Properties
Property Description
EMailAddresses ( 652) Represents the contents of the collection as a comma-delimited list of email addresses.
Items ( 652) Allows indexed access to email addresses in the collection.

Methods
Method Description
Add ( 648) Creates and returns a new Email Address item.
AddItems ( 649) Appends an existing collection of email addresses to the current collection.
AddressesByDomain ( 649) Gathers a list of email addresses in the collection having the specified Domain value.
Create ( 650) Constructor for the object instance.
FillTStrings ( 650) Fills a string list with email addresses in the collection.
GetDomains ( 651) Populates a list with the unique domain names found in the email address collection.
SortByDomain ( 651) Sorts the collection items alphabetically by Domain name.

Legend
Method
Property

TIdEMailAddressList Methods
The Methods of the TIdEMailAddressList class are listed here.

Methods
Method Description
Add ( 648) Creates and returns a new Email Address item.
AddItems ( 649) Appends an existing collection of email addresses to the current collection.
AddressesByDomain ( 649) Gathers a list of email addresses in the collection having the specified Domain value.
Create ( 650) Constructor for the object instance.
FillTStrings ( 650) Fills a string list with email addresses in the collection.
GetDomains ( 651) Populates a list with the unique domain names found in the email address collection.
SortByDomain ( 651) Sorts the collection items alphabetically by Domain name.

Legend
Method

TIdEMailAddressList.Add Method
Creates and returns a new Email Address item.

Pascal
function Add: TIdEMailAddressItem;
Returns
TIdEMailAddressItem ( 641) - Email address added to the collection.

Description
Add is a TIdEMailAddressItem ( 641) function used to create ( 650) and return a new email address instance which is added to
the TIdEMailAddressList ( 647) collection.

Add calls the inherited Add method, and ensures that the return value is cast to a TIdEMailAddressItem ( 641) object instance.

Use AddItems ( 649) to append a an existing collection of email addresses to the current collection.

Use methods in the ancestor class to maintain Items ( 652) in the collection, like Delete, Clear, or Destroy.

See Also
AddItems ( 649)

TIdEMailAddressItem ( 641)

648 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressList Class

TIdEMailAddressList.AddItems Method
Appends an existing collection of email addresses to the current collection.

Pascal
procedure AddItems(
AList: TIdEMailAddressList
);
Parameters
Parameters Description
AList An exisiting collection of email addresses to append to the current collection.

Description
AddItems is a method used to append an existing collection of email addresses to the current collection. AList represents the
collection with TIdEmailAddressItem instances to append to the current collection items. When AList is empty (when the collection
Count in AList contains 0), no action is performed.

AddItems iterates over the TIdEmailAddressItem instances in the AList collection, and creates a item in the current collection by
calling the Add ( 648) method. The value of the new collection item is set by calling Assign using the collection item in AList as an
argument.

Use methods in the ancestor class to maintain Items ( 652) in the collection, like Delete, Clear, or Destroy.

See Also
TIdEmailAddressItem

TIdEMailAddressList.AddressesByDomain Method
Gathers a list of email addresses in the collection having the specified Domain value.

Pascal
procedure AddressesByDomain(
AList: TIdEMailAddressList;
const ADomain: string
);
Parameters
Parameters Description
AList List of email address with the specified Domain value.
ADomain Domain value to use for inclusion in the list of email addresses.

Description
AddressesByDomain is a method used to gather a list of email addresses in the collection having the value specified in ADomain in
the Domain property for the collection items.

AList is used to store any collection items in the list that match the domain specified in the ADomain argument. The collection
specified in AList is cleared prior to gathering TIdEmailAddressItem instances in the collection.

ADomain is the host Domain value in TIdEmailAddressItem instances in the collection to include in the AList argument. The value
specified in ADomain is case-insensitive; all comparisions are performed using the lower-case equivalent of the Domain property in
the collection items.

AddressesByDomain iterates over the items in the collection. When a collection item is found that has the specified value in its'
Domain property, a corresponding TIdEmailAddressItem item is created in the AList collection.

Use SortByDomain ( 651) to order the current collection using the value of the Domain property stored in each of the the collection
items.

Use EmailAddresses to access a comma-delimited list that represents all email addresses in the collection regardless of their
Domain.

Internet Direct (Indy) Version 10.1.5 649


TIdEMailAddressList Class Classes

Use FillTStrings ( 650) to populate a TIdStrings ( 3089) instance with the textual version of all email addresses in the collection
regardless of their Domain.

See Also
EmailAddresses

FillTStrings ( 650)

SortByDomain ( 651)

TIdEmailAddressItem.Domain

TIdEmailAddressItem.Text

TIdEMailAddressList.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AOwner: TIdPersistent
); reintroduce;
Parameters
Parameters Description
AOwner Owner of the object instance.

Description
Create is the constructor for the object instance, and is reintroduced to allow assignment of the owner of the list and the class type
for Items ( 652) added to the collection.

Create calls the inherited constructor using AOwner and a TIdEMailAddressItem ( 641) class reference as parameters.

See Also
TIdEMailAddressItem ( 641)

TIdPersistent ( 3073)

TIdEMailAddressList.FillTStrings Method
Fills a string list with email addresses in the collection.

Pascal
procedure FillTStrings(
AStrings: TIdStrings
);
Parameters
Parameters Description
AStrings List of email addresses in the collection.

Description
FillTStrings is a method used to fill the TIdStrings ( 3089) instance, specified by AStrings, with the RFC-2822 formatted EMail
addresses from the collection.

Each TIdEmailAddressItem in the Items ( 652) for the collection will result in a single line being added to AStrings that contains
the value of the Text property for each email address collection item.

FillTStrings does NOT clear the contents of the string list in AStrings before adding values from the collection.

Use SortByDomain ( 651) to pre-sort collection items by their Domain property values.

Use GetDomains ( 651) to gather a unique list of Domain values found in the Items ( 652) for the collection.

650 Internet Direct (Indy) Version 10.1.5


Classes TIdEMailAddressList Class

Use AddressesByDomain ( 649) to gather a list of collection items that match a specified Domain value.

See Also
SortByDomain ( 651)

GetDomains ( 651)

AddressesByDomain ( 649)

TIdEMailAddressItem ( 641)

TIdEMailAddressItem.Text ( 646)

TIdEMailAddressList.GetDomains Method
Populates a list with the unique domain names found in the email address collection.

Pascal
procedure GetDomains(
AStrings: TIdStrings
);
Parameters
Parameters Description
AStrings List of unique domain names found in email addresses in the collection.

Description
GetDomains is a procedure used to populate the string list in AStrings with a unique list of domain names found in the Items (
652) for the collection. GetDomains clears the contents of the string list in AStrings prior to adding domain names found in the
collection.

GetDomains is useful when performing MX (Mail Exchange) lookups prior to delivery of email messages.

Use SortByDomain ( 651) to pre-order items in the collection by their Domain property value.

Use AddressesByDomain ( 649) to retrieve a list of email address for a specific domain name.

Use FillTStrings ( 650) to populate a TIdStrings ( 3089) instance with the textual version of all email addresses in the collection.

See Also
AddressesByDomain ( 649)

FillTStrings ( 650)

SortByDomain ( 651)

TIdEmailAddressItem.Domain

TIdEMailAddressList.SortByDomain Method
Sorts the collection items alphabetically by Domain name.

Pascal
procedure SortByDomain;
Description
SortByDomain is a procedure used to sort the Items ( 652) in the email address collection alphabetically by the Domain name for
the email address collection items.

After calling SortByDomain, reading Items ( 652) by their ordinal position returns the collection items in the alphabetically-sorted
order.

Use GetDomains ( 651) to gather a unique list of Domain values found in the Items ( 652) for the collection.

Use AddressesByDomain ( 649) to gather a list of collection items that match a specified Domain value.

Internet Direct (Indy) Version 10.1.5 651


TIdEMailAddressList Class Classes

See Also
Items ( 652)

GetDomains ( 651)

GetAddressesByDomain

TIdEMailAddressList Properties
The Properties of the TIdEMailAddressList class are listed here.

Properties
Property Description
EMailAddresses ( 652) Represents the contents of the collection as a comma-delimited list of email addresses.
Items ( 652) Allows indexed access to email addresses in the collection.

Legend
Property

TIdEMailAddressList.EMailAddresses Property
Represents the contents of the collection as a comma-delimited list of email addresses.

Pascal
property EMailAddresses: string;
Description
EMailAddresses is a String property that represents the contents of the collection as a comma-delimited list of email addresses in
RFC 2822-compliant form.

Reading the value in EMailAddresses results in a string that contains a comma-delimited list of values for each
TIdEmailAddressItem in collection.

Writing to EMailAddresses will call Clear to empty the collection, and add ( 648) each EMail address parsed from the new property
value to the collection. Please note that Group EMail addresses, delimited with the ":" (colon) and ";" (semi-colon) characters, are
ignored when email addresses are added to the collection.

See Also
TIdEMailAddressItem ( 641)

TIdEMailAddressList.Items Property
Allows indexed access to email addresses in the collection.

Pascal
property Items [Index: Integer]: TIdEMailAddressItem;
Description
Items is an indexed TIdEMailAddressItem ( 641) property that allows access to TIdEMailAddressItem ( 641) entries in the
collection using an Integer index value.

Index positions in the collection are zero-based. Accessing an index position larger than the length of the collection will raise an
exception.

Items is the default property for the TIdEMailAddressList ( 647) collection.

Use SortByDomain ( 651) to order the Items in the collection by the domain name for each email address collection item.

Use AddressesByDomain ( 649) to gather a list of collection items that match a specified Domain value.

Use GetDomains ( 651) to gather a unique list of Domain values found in the Items for the collection.

652 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoder Class

See Also
TIdEMailAddressList.SortByDomain ( 651)

TIdEMailAddressList.AddressesByDomain ( 649)

TIdEMailAddressList.GetDomains ( 651)

TIdEMailAddressItem ( 641)

TIdEncoder Class
Ancestor for Indy encoder classes.

File
IdCoder ( 4591)

Hierarchy

Pascal
TIdEncoder = class(TIdBaseComponent);
Description
TIdEncoder is a TIdBaseComponent ( 266) descendant that is the ancestor for Indy classes that perform encoding operations on
String- or Stream-based values, and returns the encoded value as a String value.

Descendants of TIdEncoder include TIdEncoder3to4 ( 657) and TIdEncoderQuotedPrintable ( 665).

Applications do not normally create ( 267) instances of TIdEncoder, and instead use one of the descendant classes that
implements a specific encoding algorithm. TIdEncoder can be used an as ancestor for classes that utilize a unique encoding
algorithm and also adhere to the Indy coder framework.

See Also
TIdBaseComponent ( 266)

TIdEncoder3to4 ( 657)

TIdEncoderQuotedPrintable ( 665)

TIdEncoder Members
The following tables list the members exposed by TIdEncoder.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Encode ( 654)
Create ( 1274)

Internet Direct (Indy) Version 10.1.5 653


TIdEncoder Class Classes

Legend
Constructor
abstract
virtual
Property
read only

TIdEncoder Methods
The Methods of the TIdEncoder class are listed here.

Methods
Method Description
Encode ( 654)

Legend
Method
abstract

TIdEncoder.Encode Method
Overload List

Method Description
TIdEncoder.Encode (string) ( 655) Provides encoding for String input values.
TIdEncoder.Encode (TIdStream, Specifies the method used for encoding stream-based input values.
Integer) ( 654)

TIdEncoder.Encode Method (TIdStream, Integer)


Specifies the method used for encoding stream-based input values.

Pascal
function Encode(
ASrcStream: TIdStream;
const ABytes: Integer = MaxInt
): string; virtual; abstract; overload;
Parameters
Parameters Description
ASrcStream Stream-based values to be encoded.
ABytes Number of bytes in the input stream to be encoded. Default value is MaxInt.

Returns
string - Encoded value for the input parameter(s).

Description
Encode is an overloaded abstract virtual String function in TIdEncoder ( 653), and specifies the method used for encoding
Stream-based input values.

ASrcStream is the stream containing the un-encoded values to be encoded in the method.

ABytes indicates the number of bytes in ASrcStream to be affected by the encoding operation. When omitted, ABytes defaults to
the constant value MaxInt, and allows the method to read up to MaxInt byte values or until the end of the Stream is reached.

The stream-based Encode method must be overridden and implemented in a descendant class using the specific encoding
algorithm for the implementation.

Use the overloaded string-based variant of the Encode method to perform encoding for values specified in a string data type.

654 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoder00E Class

Use the Decode method in TIdDecoder ( 530) to reverse the encoding performed using the Encode method.

See Also
Encode

TIdStream ( 3087)

TIdDecoder.Decode ( 531)

TIdEncoder.Encode Method (string)


Provides encoding for String input values.

Pascal
function Encode(
const ASrc: string
): string; overload;
Parameters
Parameters Description
ASrc String value to be encoded.

Returns
string - Encoded value for the input parameter(s).

Description
Encode is an overloaded String function in TIdEncoder ( 653) that allows String input values in ASrc to be encoded.

ASrc contains the un-encoded values to be encoded in the method.

Encode creates a TIdMemoryStream ( 3058) object instance used store the values in ASrc by calling WriteStringToStream (
2936). The stream is repositioned to its' origin prior to calling the overloaded Encode method using the TIdMemoryStream ( 3058)
instance as an argument.

The stream-based Encode method is an abstract virtual method, and must be implemented in a descendant class using the specific
encoding algorithm for the implementation.

Use the Decode method in TIdDecoder ( 530) to decode values created using the Encode method.

See Also
Encode

TIdMemoryStream ( 3058)

WriteStringToStream ( 2936)

TIdDecoder.Decode ( 531)

TIdEncoder00E Class
Implements common encoding routines for encoders using the UUE or XXE encoding algorithms.

File
IdCoder00E ( 4592)

Hierarchy

Pascal
TIdEncoder00E = class(TIdEncoder3to4);

Internet Direct (Indy) Version 10.1.5 655


TIdEncoder00E Class Classes

Description
TIdEncoder00E is a TIdEncoder3to4 ( 657) descendant that implements the common encoding routine used for encoders using
the UUE or XXE encoding algorithms.

TIdEncoder00E implements an Encode ( 657) method that uses the table-driven encoding alphabet for the encoding algorithm.

TIdEncoder00E does not specify the contents in the table-driven encoding alphabet for the encoding algorithm. Use a descendant
class, like TIdEncoderUUE ( 667) or TIdEncoderXXE ( 668), that implements the table-driven encoding alphabet for the
encoding algorithm.

See Also
TIdEncoder3to4 ( 657) TIdEncoderUUE ( 667)

TIdEncoderXXE ( 668)

TIdEncoder00E Members
The following tables list the members exposed by TIdEncoder00E.

Properties
Property Description
CodingTable ( 660) Specifies the valid characters for the encoder alphabet.
FillChar ( 660) Character used to pad input values to the encoder.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Encode ( 657)
EncodeIdBytes ( 659) Performs the encoding algorithm for the encoder using the data specified in an array of bytes.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Encode ( 654)
Create ( 1274)

Legend
Constructor
virtual
abstract
Property
read only

TIdEncoder00E Methods
The Methods of the TIdEncoder00E class are listed here.

Methods
Method Description
Encode ( 657)

Legend
Method
virtual

656 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoder3to4 Class

TIdEncoder00E.Encode Method
Pascal
function Encode(
ASrcStream: TIdStream;
const ABytes: Integer = MaxInt
): string; override;
Parameters
Parameters Description
ASrcStream Type is TIdStream ( 3087).
ABytes Scope is const. Type is Integer. Default value is MaxInt.

Returns
string

Description
TIdEncoder00E.Encode overridden method.

TIdEncoder3to4 Class
Implements an encoder using a table-driven alphabet to produce output represented in the US-ASCII character set.

File
IdCoder3to4 ( 4593)

Hierarchy

Pascal
TIdEncoder3to4 = class(TIdEncoder);
Description
TIdEncoder3to4 is a TIdEncoder ( 653) descendant that provides encoding capabilities that represents arbitrary sequences of
byte data in a form that need not be humanly readable.

TIdEncoder3to4 is almost identical to the mechanism used in Privacy Enhanced Mail (PEM) applications, as defined in the Internet
Standards document:

RFC 1421 - Privacy Enhancement for Internet Electronic Mail, Part I: Message Encryption and Authentication Procedures

TIdEncoder3to4 contains a coding table to represent the valid characters in the encoder alphabet.

TIdEncoder3to4 represents 3-byte input values as 4 concatenated 6-bit groups, each of which is translated into a single valid
character in the encoder coding table.

Special processing is performed to ensure that data to be encoded is a multiple of 3-bytes. When fewer than 3 bytes are available,
a user-definable fill character is used to pad input data to the required length.

TIdEncoder3to4 does not specify the valid characters in the coding table. Application will generally use a descendant class, like
TIdCoderMIME or TIdCoderUUE, where the alphabet is specified.

See Also
TIdEncoder ( 653)

TIdEncoderMIME ( 664)

TIdEncoderUUE ( 667)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 657


TIdEncoder3to4 Class Classes

TIdEncoder3to4 Members
The following tables list the members exposed by TIdEncoder3to4.

Properties
Property Description
CodingTable ( 660) Specifies the valid characters for the encoder alphabet.
FillChar ( 660) Character used to pad input values to the encoder.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Encode ( 658) Implements the encoding algorithm used to represent arbitrary octet sequences in the 7-bit US-ASCII
character set.
EncodeIdBytes ( 659) Performs the encoding algorithm for the encoder using the data specified in an array of bytes.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Encode ( 654)
Create ( 1274)

Legend
Constructor
virtual
abstract
Property
read only

TIdEncoder3to4 Methods
The Methods of the TIdEncoder3to4 class are listed here.

Methods
Method Description
Encode ( 658) Implements the encoding algorithm used to represent arbitrary octet sequences in the 7-bit US-ASCII
character set.
EncodeIdBytes ( 659) Performs the encoding algorithm for the encoder using the data specified in an array of bytes.

Legend
Method
virtual

TIdEncoder3to4.Encode Method
Implements the encoding algorithm used to represent arbitrary octet sequences in the 7-bit US-ASCII character set.

Pascal
function Encode(
ASrcStream: TIdStream;
const ABytes: Integer = MaxInt
): string; override;
Parameters
Parameters Description
ASrcStream Stream containing the values to be encoded.
ABytes Number of bytes in the stream to be encoded. Default value is MaxInt.

658 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoder3to4 Class

Returns
String - Encoded values for data in the input stream.

Description
Encode is an overridden String function in TIdEncoder3to4 ( 657) that reimplements the inherited method to provide the encoding
algorithm used to represent arbitrary octet sequences in the 7-bit US-ASCII character set.

ASrcStream represents the TIdStream ( 3087) descendant that contains the values to be encoded.

ABytes is an Integer that represents the number of bytes in ASrcStream to be encoded. The default value for ABytes is MaxInt.

Encode allocates an internal buffer with the size indicted in ABytes to read values from the input stream. If ABytes is larger than
than the remaining contents in the stream, the smaller of the two values is used to determine the internal buffer size.

Encode calls the ReadBytes method in TIdStreamHelper ( 3088) read the indicated number of bytes into the internal buffer. The
EncodeIdBytes ( 659) method is called to execute the actual encoding algorithm using the internal buffer. The return value for the
method is extracted from the encoded values using BytesToString ( 2728).

Encode returns an empty string ('') when there is no remaining content in the stream as indicated by its' size and position methods.

Please note that Encode does not reset the position of the stream in ASrcStream prior to or following the process of reading values
from the stream.

See Also
TIdBytes ( 3007)

TIdStreamHelper.ReadBytes

EncodeIdBytes ( 659)

BytesToString ( 2728)

TIdEncoder3to4.EncodeIdBytes Method
Performs the encoding algorithm for the encoder using the data specified in an array of bytes.

Pascal
function EncodeIdBytes(
ABuffer: TIdBytes
): TIdBytes;
Parameters
Parameters Description
ABuffer Byte array with values to encode ( 658) .

Returns
TIdBytes ( 3007) - Byte array with encoded values.

Description
EncodeIdBytes is a TIdBytes ( 3007) function used to perform the encoding algorithm for the encoder using data specified in the
ABuffer argument.

EncodeIdBytes determines the number of bytes required for the 3-byte to 4-byte encoding and pre-allocates the size of the
TIdBytes ( 3007) data type used for the return value to the required size.

EncodeIdBytes copies the bytes from ABuffer in 3-byte chunks and converts each chunk to 4-byte return value using the
CodingTable ( 660) and the encoding algorithm. When there are not enough remaining bytes in ABuffer, the missing input bytes
are given the value 0 (zero). Missing bytes are also indicated in the results for the method by adding the required number of the
characters from the FillChar ( 660) property.

EncodeIdBytes will raise EAssertionFailed exceptions under the following circumstances:

Internet Direct (Indy) Version 10.1.5 659


TIdEncoder3to4 Class Classes

CodingTable ( 660) has not been assigned for the encoder instance.
The required length of the byte array in the result value is larger than the pre-allocated length.
The pre-allocated length of the byte array in the result value is larger than the actual number of bytes required.

EncodeIdBytes is used in the implementation of the Encode ( 658) method.

Exceptions
Exceptions Description
EAssertionFailed Raised under conditions previously described.

See Also
TIdBytes ( 3007)

Encode ( 658)

TIdEncoder3to4 Properties
The Properties of the TIdEncoder3to4 class are listed here.

Properties
Property Description
CodingTable ( 660) Specifies the valid characters for the encoder alphabet.
FillChar ( 660) Character used to pad input values to the encoder.

Legend
Property
read only

TIdEncoder3to4.CodingTable Property
Specifies the valid characters for the encoder alphabet.

Pascal
property CodingTable: string;
Description
CodingTable is a read-only String property that identifies the valid characters in the alphabet for the encoder.

TIdEncoder3to4 ( 657) does not specify the valid characters in CodingTable. Application will generally use a descendant class,
like TIdCoderMIME or TIdCoderUUE, where the alphabet is specified.

See Also
TIdEncoderMIME ( 664)

TIdEncoderUUE ( 667)

TIdEncoder3to4.FillChar Property
Character used to pad input values to the encoder.

Pascal
property FillChar: Char;
Description
FillChar is a Char property that identifiers the value to be used to pad the length of an input stream.

FillChar is used in Encode ( 658) and EncodeIdBytes ( 659) to pad the input stream to the required multiple of three for the
encoding algorithm.

660 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoderBinHex4 Class

See Also
Encode ( 658)

EncodeIdBytes ( 659)

TIdEncoderBinHex4 Class
Implements an encoder for Apple BinHex 4.0 content.

File
IdCoderBinHex4 ( 4593)

Hierarchy

Pascal
TIdEncoderBinHex4 = class(TIdEncoder3to4);
Description
TIdEncoderBinHex4 is a TIdEncoder3to4 ( 657) descendant that implements an encoder for Apple BinHex 4.0 formatted content,
as described in the Internet Standards document:

RFC 1741 - MIME Content Type for BinHex Encoded Files

TIdEncoderBinHex4 is a variant of a 4-byte-to-3-byte encoder, but it uses ASCII character 90 for sequences of repeating
characters, allowing some compression, but thereby not allowing it to be mapped in as another 3-to-4 decoder.

As per the RFC, BinHex encoded data must be encapsulated in a MIME part (it cannot be directly coded inline in an email "body"),
the part is strictly defined to have a header entry (with the appropriate "myfile.ext"):

Content-Type: application/mac-binhex40; name="myfile.ext"


After the header, the part must start with the text (not indented):

(This file must be converted with BinHex 4.0)


This allows the option and the ambiguity of identifying it by either the Content-Type or by the initial text line. However, it is also
stated that any text before the specified text line must be ignored, implying the line does not have to be the first - an apparent
contradiction. The encoded file then follows, split with CRLFs (to avoid lines that are too long for emails) that must be discarded.

The file starts with a colon (:), a header, followed by the file contents, and ending in another colon.

There is also an interesting article on the web, "BinHex 4.0 Definition by Peter N Lewis, Aug 1991", which has very useful
information on what is implemeted in practice, and seems to come with the good provenance of bitter experience.

The BinHex format

Here is a description of the Hqx7 (7 bit format as implemented in BinHex 4.0) formats for Macintosh Application and File transfers.

The main features of the format are:

• Error checking even using ASCII download


• Compression of repetitive characters
• 7-bit encoding for ASCII download
BinHex format is processed at three different levels:

• 8 bit encoding of the file:

Internet Direct (Indy) Version 10.1.5 661


TIdEncoderBinHex4 Class Classes

Data Type Description


Byte Length of the FileName (1..63)
Bytes FileName bytes (up to "Length" bytes)
Byte Version ( 269)
Long Type
Long Creator
Word Flags (And $F800)
Long Length of Data Fork
Long Length of Resource Fork
Word CRC
Bytes Data Fork ("Data Length" bytes)
Word CRC
Bytes Resource Fork ("Rsrc Length" bytes)
Word CRC

• Compression of repetitive characters. $90 is the marker, and encoding is made for 3-255 characters.
00 11 22 33 44 55 66 77 -> 00 11 22 33 44 55 66 77
11 22 22 22 22 22 22 33 -> 11 22 90 06 33
11 22 90 33 44 -> 11 22 90 00 33 44
The whole file is considered as a stream of bits. This stream will be divided in blocks of 6 bits and then converted to one of 64
characters contained in a table. The characters in this table have been chosen for maximum noise protection. The format will start
with a ":" (first character on a line) and end with a ":". There will be a maximum of 64 characters on a line. It must be preceded, by
this comment, starting in column 1 (it does not start in column 1 in this document):

(This file must be converted with BinHex 4.0)

Any text before this comment is to be ignored.

Use GBinHex4CodeTable ( 3209) to access the characters used in the encoded file format.

Implementation Notes

There are older variants referred to in RFC 1741, but I have only come across encodings in current use as separate MIME parts,
which this implementation is targetted at.

When encoding into BinHex4, you do NOT have to implement the run-length encoding (the character 90 for sequences of repeating
characters), and this encoder does not do it. The CRC values generated in the header have NOT been tested (because this
decoder ignores them).

The decoder has to allow for the run-length encoding. The decoder works irrespective of whether it is preceded by the identification
string or not (GBinHex4IdentificationString ( 3210) below). The string to be decoded must include the starting and ending colons.
It can deal with embedded CR ( 3174) and LFs. Unlike base64 and quoted-printable, we cannot decode line-by-line cleanly,
because the lines do not contain a clean number of 4-byte blocks due to the first line starting with a colon, leaving 63 bytes on that
line, plus you have the problem of dealing with the run-length encoding and stripping the header. If the attachment only has a data
fork, it is saved; if only a resource fork, it is saved; if both, only the data fork is saved. The decoder does NOT check that the CRC
values are correct.

Indy units use the content-type to decide if the part is BinHex4:

Content-Type: application/mac-binhex40; name="myfile.ext"


WARNING: This code only implements BinHex4.0 when used as a part in a MIME-encoded email. To have a part encoded, set the
value in the content transfer property for the message part:

ContentTransfer := 'binhex40'.

662 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoderBinHex4 Class

See Also
TIdEncoder3to4 ( 657)

TIdEncoderBinHex4 Members
The following tables list the members exposed by TIdEncoderBinHex4.

Properties
Property Description
CodingTable ( 660) Specifies the valid characters for the encoder alphabet.
FillChar ( 660) Character used to pad input values to the encoder.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Encode ( 658) Implements the encoding algorithm used to represent arbitrary octet sequences in the 7-bit US-ASCII
character set.
EncodeFile ( 663)
EncodeIdBytes ( 659) Performs the encoding algorithm for the encoder using the data specified in an array of bytes.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Encode ( 654)
Create ( 1274)

Legend
Constructor
virtual
abstract
Property
read only

TIdEncoderBinHex4 Methods
The Methods of the TIdEncoderBinHex4 class are listed here.

Methods
Method Description
EncodeFile ( 663)

Legend
Method

TIdEncoderBinHex4.EncodeFile Method
Pascal
procedure EncodeFile(
AFileName: string;
ASrcStream: TIdStream;
ADestStream: TIdStream
);
Parameters
Parameters Description
AFileName File name to include in the header for the encoded content.
ASrcStream Stream with the un-encoded values for the operation.
ADestStream Stream with the encoded values from the operation.

Internet Direct (Indy) Version 10.1.5 663


TIdEncoderMIME Class Classes

Description
EncodeFile is an overloaded method used to create ( 267) the BinHex 4.0-encoded format for data provided in ASrcStream.
Encoded values are written to the stream indicated in ADestStream.

AFilename indicates the file name to used in the BinHex 4.0 header, and should not exceed 255 bytes (the maximumn allowed in
the encoding format). When AFilename exceeds 255 characters, extra character are truncated.

EncodeFile does not implement optional run-length encoding for the BinHex format.

EncodeFile writes the BinHex identification string in GBinHex4IdentificationString ( 3210) and the BinHex Header that includes the
following data types:

Data Type Description


Byte Length of the FileName (1..63)
Bytes FileName bytes (up to "Length" bytes)
Byte Version ( 269)
Long Type
Long Creator
Word Flags (And $F800)
Long Length of Data Fork
Long Length of Resource Fork
Word Content CRC
Bytes Data Fork ("Data Length" bytes)
Word Data Fork CRC
Bytes Resource Fork ("Rsrc Length" bytes)
Word Resource Fork CRC

The encoded content is written following the BinHex header information, with the Colon delimiter (ASCII Decimal 58) at both the
beginning and end of the encoded data.

Use the TIdDecoderBinHex4.Decode ( 541) method to decode values created using EncodeFile.

See Also
TIdDecoderBinHex4.Decode ( 541)

TIdEncoderMIME Class
Implements an encoder for MIME content using the Base64 encoding scheme.

File
IdCoderMIME ( 4595)

Hierarchy

Pascal
TIdEncoderMIME = class(TIdEncoder3to4);
Description
TIdEncoderMIME is a TIdEncoder3to4 ( 657) descendant that implements an encoder for MIME content encoded using the
Base64 encoding algorithm. TIdEncoderMIME enhances the ancestor class by overriding the protected InitComponent method to

664 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoderQuotedPrintable Class

perform initalization that allow the encoder to utilize the Base64 alphabet identified in GBase64CodeTable ( 3208) and the special
padding character "=" in the FillChar ( 660) property.

Example
[Delphi] Encoding data in a string.
var
AEnc: TIdEncoderMime;
sInput: String;
sEncOutput: String;

...

AEnc := TIdEncoderMIME.Create(Nil);
sEncOutput := AEnc.Encode(sInput);
AEnc.Free;
[Delphi] Encoding stream-based data.
var
AEnc: TIdEncoderMime;
AStream: TIdStream;
sEncOutput: String;

...

AEnc := TIdEncoderMIME.Create(Nil);
sEncOutput := AEnc.Encode(AStream, AStream.Size);
AEnc.Free;
See Also
TIdEncoder3to4 ( 657)

TIdEncoder3to4.FillChar ( 660)

TIdEncoder3to4.CodingTable ( 660)

GBase64CodeTable ( 3208)

TIdEncoderQuotedPrintable Class
Implements an encoder for the Quoted-Printable encoding scheme.

File
IdCoderQuotedPrintable ( 4596)

Hierarchy

Pascal
TIdEncoderQuotedPrintable = class(TIdEncoder);
Description
TIdEncoderQuotedPrintable is a TIdEncoder ( 653) descendant that implements the encoding algorithm for the Quoted-Printable
encoding scheme. TIdEncoderQuotedPrintable will convert values in the manner described in the Internet Standards document:

RFC 2045 - Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies, Section 6.7
Quoted-Printable Content Transfer Encoding

Use TIdDecoderQuotedPrintable ( 545) to return Quoted-Printable values to their un-encoded state.

See Also
TIdDecoderQuotedPrintable ( 545)

Internet Direct (Indy) Version 10.1.5 665


TIdEncoderQuotedPrintable Class Classes

TIdEncoderQuotedPrintable Members
The following tables list the members exposed by TIdEncoderQuotedPrintable.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Encode ( 666) Applies the Quoted-Printable encoding scheme to values in a stream.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Encode ( 654)
Create ( 1274)

Legend
Constructor
virtual
abstract
Property
read only

TIdEncoderQuotedPrintable Methods
The Methods of the TIdEncoderQuotedPrintable class are listed here.

Methods
Method Description
Encode ( 666) Applies the Quoted-Printable encoding scheme to values in a stream.

Legend
Method
virtual

TIdEncoderQuotedPrintable.Encode Method
Applies the Quoted-Printable encoding scheme to values in a stream.

Pascal
function Encode(
ASrcStream: TIdStream;
const ABytes: integer = MaxInt
): string; override;
Parameters
Parameters Description
ASrcStream Stream contain byte values to be encoded.
ABytes Number of bytes from the stream to be encoded. Default value is MaxInt.

Returns
string - Values after applying the Quoted-Printable encoding.

Description
Encode is an overridden String function used to apply the Quoted-Printable encoding scheme to values in a stream. The
Quoted-Printable encoding scheme is described in the Internet Standards document:

666 Internet Direct (Indy) Version 10.1.5


Classes TIdEncoderUUE Class

RFC 2045, Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies, Section 6.7
Quoted-Printable Content Transfer Encoding .

ASrcStream is the stream containing the un-encoded values to be used in the encoding operation. When ASrcStream has a size of
0, no operation is performed by the Encode method.

ABytes indicates the number of bytes to read from the stream for use in the method. The default value is MaxInt, and indicates that
all remaining byte values in the stream will receive the Quoted-Printable encoding. Please note that any value in ABytes is ignored
in the current implementation.

Encode uses values starting at the current position in the stream; no stream positioning is performed prior to reading the
un-encoded values from ASrcStream.

Encode reads data from the stream indicated by ASrcStream, and applies Quoted-Printable encoding for any characters not
regarded as "Safe Characters" in the encoding scheme. The quoted-printable encoding algorithm does not perform any conversion
for the following characters in the ranges 33-60 Decimal (inclusive) or 62-126 Decimal (inclusive).

The Encode method encodes any '.' (Period)(Decimal 46) character that appears at the beginning of an encoded line to it's
quoted-printable hexidecimal representation ("=2E").

Whitespace characters (Space and TAB ( 4393)) followed by an end-of-line character (CR ( 3174) or LF ( 4341)) are converted
to their quoted-printable hexidecimal representations.

The Encode method applies line folding for individual lines of data that exceed 72 encoded characters. When the maximum line
length is reached, a line-end marker ("=" Decimal 61) is inserted in the output and encoding resumes on the following line.

The Equal Sign ("=" Decimal 61) is reserved as the quoted-printable prefix marker and line-end marker. Any occurrences of this
character found the AStream will be converted to the quoted-printable hexidecimal representation ("=3D").

Please note that Encode does not reset the position of the stream in ASrcStream after the encoding operation.

The return value for the method contains the bytes read from ASrcStream and encoded using the Quoted-Printable encoding
scheme.

Use the Decode method in TIdDecoderQuotedPrintable ( 545) to convert values to their un-encoded form.

See Also
TIdDecoderQuotedPrintable.Decode ( 546)

TIdStream ( 3087)

TIdEncoderUUE Class
Implements support for the UUENcode alphabet in the UUEncode algorithm.

File
IdCoderUUE ( 4597)

Hierarchy

Pascal
TIdEncoderUUE = class(TIdEncoder00E);
Description
TIdEncoderUUE is a TIdEncoder00E ( 655) descendant that extends the ancestor class by implementing support for the
UUEncode alphabet in the UUEncoder algorithm.

TIdEncoderUUE specifies the UUEncode alphabet using the constant GUUECodeTable ( 3216).

Internet Direct (Indy) Version 10.1.5 667


TIdEntityHeaderInfo Class Classes

See Also
TIdEncoderUUEBase

GUUECodeTable ( 3216)

TIdEncoderXXE Class
Implements support for the XXEncode alphabet and the XXEncode algorithm.

File
IdCoderXXE ( 4599)

Hierarchy

Pascal
TIdEncoderXXE = class(TIdEncoder00E);
Description
TIdEncoderXXE is a TIdEncoder00E ( 655) descendant that extends the ancestor class by implementing support for the
XXEncode alphabet in the XXEncoder algorithm. TIdEncoderXXE specifies the XXEncode alphabet using the constant
GXXECodeTable ( 3216).

See Also
TIdEncoderUUE ( 667)

GXXECodeTable ( 3216)

TIdEntityHeaderInfo Class
Specifies entity and general headers used in the HTTP protocol.

File
IdHTTPHeaderInfo ( 4663)

Hierarchy

Pascal
TIdEntityHeaderInfo = class(TIdPersistent);
Description
TIdEntityHeaderInfo is a TPersistent descendant that represents message headers from a HTTP request or response, as described
in the Internet Standards document:

RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1]

TIdEntityHeaderInfo is the ancestor class that defines the common headers used in TIdRequestHeaderInfo ( 1857) and
TIdResponseHeaderInfo ( 1865), and represents header fields that define metainformation about the entity body or, if no body is
present, about a resource associated with a request. Some of this metainformation is optional; some headers might be required
dependent on the HTTP protocol specification.

Applications will normally create ( 670) instances of TIdRequestHeaderInfo ( 1857) or TIdResponseHeaderInfo ( 1865), which
implement the contextual semantic requirements for the HTTP protocol.

668 Internet Direct (Indy) Version 10.1.5


Classes TIdEntityHeaderInfo Class

See Also
TIdRequestHeaderInfo ( 1857)

TIdResponseHeaderInfo ( 1865)

TIdEntityHeaderInfo Members
The following tables list the members exposed by TIdEntityHeaderInfo.

Properties
Property Description
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
LastModified ( 678) Indicates the date and time a server resource was modified.
Pragma ( 678) Represents HTTP server directives in a client request.
RawHeaders ( 679) Contains message header names and values in their original form.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.
Create ( 670) Constructor for the object instance.
Destroy ( 671) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdEntityHeaderInfo Methods
The Methods of the TIdEntityHeaderInfo class are listed here.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.
Create ( 670) Constructor for the object instance.
Destroy ( 671) Frees the object instance.

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 669


TIdEntityHeaderInfo Class Classes

TIdEntityHeaderInfo.Clear Method
Resets properties to their default empty values.

Pascal
procedure Clear; virtual;
Description
Clear is procedure that resets properties in the object instance to their default empty values, including:

Connection ( 673)
ContentVersion ( 676)
ContentEncoding ( 673)
ContentLanguage ( 673)
ContentType ( 675)
ContentLength ( 674)
ContentRangeStart ( 675)
ContentRangeEnd ( 674)
Date ( 676)
LastModified ( 678)
Expires ( 677)
RawHeaders ( 679)

Clears sets the default value for the ContentType ( 675) property to an empty string ('') since HTTP requests have no default
content type.

See Also
Connection ( 673)

ContentVersion ( 676)

ContentEncoding ( 673)

ContentLanguage ( 673)

ContentType ( 675)

ContentLength ( 674)

ContentRangeStart ( 675)

ContentRangeEnd ( 674)

Date ( 676)

LastModified ( 678)

Expires ( 677)

CustomHeaders ( 676)

RawHeaders ( 679)

TIdEntityHeaderInfo.Create Constructor
Constructor for the object instance.

670 Internet Direct (Indy) Version 10.1.5


Classes TIdEntityHeaderInfo Class

Pascal
constructor Create; virtual;
Description
Create is the constructor for the object instance. Create relies on the inherited constructor, and initializes the object properties
CustomHeaders ( 676) and RawHeaders ( 679) prior to calling Clear ( 670).

See Also
CustomHeaders ( 676)

RawHeaders ( 679)

Clear ( 670)

Destroy ( 671)

TIdEntityHeaderInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees the object properties CustomHeaders ( 676) and RawHeaders (
679) prior to calling the inherited Destroy method.

See Also
CustomHeaders ( 676)

RawHeaders ( 679)

TIdEntityHeaderInfo Properties
The Properties of the TIdEntityHeaderInfo class are listed here.

Properties
Property Description
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
LastModified ( 678) Indicates the date and time a server resource was modified.
Pragma ( 678) Represents HTTP server directives in a client request.
RawHeaders ( 679) Contains message header names and values in their original form.

Internet Direct (Indy) Version 10.1.5 671


TIdEntityHeaderInfo Class Classes

Legend
Property
read only

TIdEntityHeaderInfo.CacheControl Property
Specifies the HTTP Cache-Control general message header directives.

Pascal
property CacheControl: String;
Description
CacheControl is a String property that contains HTTP Cache-Control general message header directives in an HTTP request or
response. CacheControl indicates the behavior that prevents a cache from adversely interfering with the request or response, and
generally override the default caching algorithms.

Cache directives are unidirectional, and the presence of a directive in a HTTP request does not imply that the same directive will
appear in a HTTP response.

Some common values for CacheControl in a HTTP request include the following:

'no-cache'
'no-store'
'max-age=' [delta-seconds]
'max-stale=' [delta-seconds]
'min-fresh=' [delta-seconds]
'no-transform'
'only-if-cached'

Some common values for CacheControl in a HTTP response include the following:

'public'
'private'
'no-cache'
'no-store'
'no-transform'
'must-revalidate'
'proxy-revalidate'
'max-age=' [delta-seconds]
's-maxage=' [delta-seconds]
CacheControl is not normally implemented for HTTP/1.0, which might
contain a header value for storage in the the Pragma ( 678) property that
contains the value 'no-cache'.

See Also
CustomHeaders ( 676)

Pragma ( 678)

672 Internet Direct (Indy) Version 10.1.5


Classes TIdEntityHeaderInfo Class

TIdEntityHeaderInfo.Connection Property
Indicates that the connection will be closed after a response.

Pascal
property Connection: string;
Description
Connection is a String property that contains the value for the HTTP general message header that indicates the options desired for
a particular connection. The Connection header value must not be forwarded by a proxy over further connections.

For HTTP/1.1 applications, Connection may contain the value "close" to indicate that the connection will be closed after completion
of the response. HTTP/1.1 applications that do not support persistent connections must include the "close" connection option in
every message.

See Also
TIdProxyConnectionInfo ( 1795)

TIdEntityHeaderInfo.ContentEncoding Property
Indicates transformations applied to the content of an entity.

Pascal
property ContentEncoding: string;
Description
ContentEncoding is a String property used as an optional modifier to the ContentType ( 675) for an entity body. ContentEncoding
indicates the additional content encoding performed on the entity body, and the decoding mechanisms needed to obtain the
media-type referenced by ContentType ( 675).

ContentEncoding must contain a value that is registered with the Internet Assigned Numbers Authority (IANA ( 4762)), and initially
permitted the following values:

Value Meaning
gzip An encoding format produced by the file compression program "gzip" (GNU zip) as described in RFC 1952. This
format is a Lempel-Ziv coding (LZ77) with a 32 bit CRC.
compress The encoding format produced by the common UNIX ( 4539) file compression program "compress ( 2741)". This
( 2741) format is an adaptive Lempel-Ziv-Welch coding (LZW).
deflate The "zlib" format defined in RFC 1950 in combination with the "deflate ( 2765)" compression mechanism described in
( 2765) RFC 1951.
identity The default (identity) encoding; uses no transformation whatsoever. This content encoding is used only in the
AcceptEncoding header in TIdRequestHeaderInfo ( 1857), and should not be used in the ContentEncoding header.

If multiple encodings have been applied to an entity, then ContentEncoding will list the encodings in the order in which they were
applied. Additional information about encoding parameters may be provided by other entity header properties, or in ExtraHeaders.

See Also
TIdRequestHeaderInfo.AcceptEncoding ( 1861)

CustomHeaders ( 676)

TIdEntityHeaderInfo.ContentLanguage Property
Identifies the preferred language for the contents of an entity.

Internet Direct (Indy) Version 10.1.5 673


TIdEntityHeaderInfo Class Classes

Pascal
property ContentLanguage: string;
Description
ContentLanguage is a String property that identifies the preferred language for the contents of an entity. If ContentLanguage not
specified, then the content is intended for all language audiences or the default alnguage is unknown. Multiple languages may be
listed for content that is intended for multiple audiences by using a comma-delimited list of language values.

The syntax for values in ContentLanguage is defined in the Internet Standards document:

RFC 1766 - Tags for the Identification of Languages

TIdEntityHeaderInfo.ContentLength Property
Indicates the size of an entity body.

Pascal
property ContentLength: Int64;
Description
ContentLength is an Integer property that indicates the size of an entity body, as a number of octets. ContentLength reflects the
transfer length of the content after any encodings specified in ContentEncoding ( 673).

When ContentLength is given in a message where a message body is allowed, its field value must exactly match the number of
octets in the message body. ContentLength should be avaiable whenever the message length can be determined prior to being
transferred, unless this is prohibited by the HTTP protocol specification.

For compatibility with HTTP/1.0 applications, HTTP/1.1 requests containing a message body must include a valid ContentLength
header field unless the server is known to be HTTP/1.1 compliant. If a request contains a message body and ContentLength is not
given, the server should respond with 400 (bad request) if it cannot determine the length of the message, or with 411 (length
required) if it wishes to insist on receiving a valid ContentLength.

All HTTP/1.1 applications that receive entities must accept "chunked" transfers that allow retrieval of HTP entities when the
message length cannot be determined in advance.

See Also
ContentEncoding ( 673)

CustomHeaders ( 676)

TIdEntityHeaderInfo.ContentRangeEnd Property
Identifies the upper byte range in a partial request.

Pascal
property ContentRangeEnd: Int64;
Description
ContentRangeEnd is an Int64 property that identifies the upper byte range requested for a partial entity resource.
ContentRangeEnd is used with ContentRangeStart ( 675) and ContentRangeInstanceLength ( 675) to form the "Content-Range"
message header value.

All ContentRangeEnd values are expressed in bytes.

Clients cannot depend on servers to send a "416 Requested range not satisfiable" response instead of a "200 (OK ( 4359))"
response for an unsatisfiable request with ContentRangeStart ( 675) and ContentRangeEnd values, since not all servers
implement this request-header.

See Also
ContentRangeStart ( 675)

674 Internet Direct (Indy) Version 10.1.5


Classes TIdEntityHeaderInfo Class

ContentRangeInstanceLength ( 675)

TIdEntityHeaderInfo.ContentRangeInstanceLength Property
Represents the entity size for a content range request.

Pascal
property ContentRangeInstanceLength: Int64;
Description
ContentRangeInstanceLength is an Int64 property that represents the size of an entity or the maximum number of bytes available in
a "Content-Range" message header for a requested entity.

ContentRangeInstanceLength is used with values in the ContentRangeStart ( 675) and ContentRangeEnd ( 674) properties to
identify the requested byte ranges and upper limit.

In the following example, ContentRangeInstanceLength is represented by the value 102400.


content-range: bytes 1-65536/102400
content-range: bytes 1-65536/*
When the entity size is not know, is or insignificant, the value zero is used to represent the '*' in the following example:
content-range: bytes 1-65536/*
See Also
ContentRangeEnd ( 674)

ContentRangeStart ( 675)

TIdEntityHeaderInfo.ContentRangeStart Property
Identifies the beginning byte range in a partial request.

Pascal
property ContentRangeStart: Int64;
Description
ContentRangeStart is an Int64 property that identifies the beginning byte range requested for a partial entity resource.
ContentRangeStart is used with ContentRangeEnd ( 674) to form the "Content-Range" message header value.

All ContentRangeStart values are expressed in bytes.

Clients cannot depend on servers to send a "416 Requested range not satisfiable" response instead of a "200 (OK ( 4359))"
response for an unsatisfiable request with ContentRangeStart and ContentRangeEnd ( 674) values, since not all servers
implement this request-header.

See Also
ContentRangeEnd ( 674)

TIdEntityHeaderInfo.ContentType Property
Indicates the type, subtype, and attribute parameters for data in an entity body.

Pascal
property ContentType: string;
Description
ContentType is a String property that indicates the media type used to represent an entity body, and contains a registered Internet
Assigned Number Authority (IANA ( 4762)) media type. HTTP uses ContentType to provide open and extensible data typing and
type negotiation.

ContentType contains type, subtype, and parameter attribute name components significant to the processing of a media-type.

Internet Direct (Indy) Version 10.1.5 675


TIdEntityHeaderInfo Class Classes

Any HTTP/1.1 message containing an entity body should include a ContentType value defining the media type of that body. The
default value for media type should be "application/octet-stream".

TIdEntityHeaderInfo.ContentVersion Property
Identifies the version tag associated with a server resource.

Pascal
property ContentVersion: string;
Description
ContentVersion is a String property that represents the version tag associated with a rendition of an entity. ContentVersion can be
used with the "Derived-From" message header in RawHeaders ( 679) to allow access to multiple versions of the same server
resource.

See Also
TIdEntityHeaderInfo.RawHeaders ( 679)

TIdEntityHeaderInfo.CustomHeaders Property
Represents custom headers names and values for the HTTP message.

Pascal
property CustomHeaders: TIdHeaderList;
Description
CustomHeaders is a TIdHeaderList ( 1024) property that contains header names and values that have been added to an HTTP
message by the client application. CustomHeaders is used to stored header names and values that are not represented as
properties in TIdEntityHeaderInfo ( 668) and descendant classes.

CustomHeaders is initialized in the Create ( 670) constructor, and freed in Destroy ( 671).

CustomHeaders is used when TIdEntityHeaderInfo ( 668) builds the textual representation of header names and value for an
HTTP message prior to transmission. When building the textual header values, headers represented as properties in
TIdEntityHeaderInfo ( 668) are added to RawHeaders ( 679). Any values in CustomHeaders are appended to the text without
any additional processsing.

Use CustomHeaders to create ( 670) HTTP headers that are not represented as properties, since RawHeaders ( 679) is cleared
when generating headers for the HTTP message from properties and CustomHeaders.

See Also
RawHeaders ( 679)

CustomHeasders

TIdRequestHeaderInfo ( 1857)

TIdResponseHeaderInfo ( 1865)

TIdEntityHeaderInfo.Date Property
Indicates the origin date and time for an HTTP message.

Pascal
property Date: TIdDateTime;
Description
Date is a TDateTime property that indicates the origin date and time for an HTTP message. Origin servers must include a Date
value in all responses, except in the following cases:

676 Internet Direct (Indy) Version 10.1.5


Classes TIdEntityHeaderInfo Class

Response Conditions
100 (Continue) Date is an optional header field.
101 (Switching Date is an optional header field.
Protocols)
500 (Internal Server It is inconvenient or impossible to generate a valid Date. Server does not have a clock that can provide
Error) a reasonable approximation of the current time.
503 (Service It is inconvenient or impossible to generate a valid Date. Server does not have a clock that can provide
Unavailable) a reasonable approximation of the current time.

A received message without a Date header must have a Date header value constructed on the client after receipt.

A message sent by a client can contain an optional Date header value if the message has an entity body, as in HTTP PUT and
POST requests.

TIdEntityHeaderInfo.Expires Property
Represents the timestamp when an entity is considered stale.

Pascal
property Expires: TIdDateTime;
Description
Expires is a TDateTime property that represents the date and time after which the content of an entity is considered stale. A stale
cache entry may not normally be returned by a cache unless it is first validated with the origin server. The presence of an Expires
field does not imply that the original resource will change or cease to exist at, before, or after the indicated timestamp value.

Expires is read from the headers in an HTTP response, and may originally contain either an integer number of seconds for the
expiration value or an actual date and time. When the header is expressed as an integer value, the Expires property will be given a
value that corresponds to the current date and time plus the number of seconds in the header.

A response that includes a CacheControl ( 672) header with the max-age directive will override the Expires property.

See Also
CacheControl ( 672)

TIdEntityHeaderInfo.HasContentLength Property
Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.

Pascal
property HasContentLength: Boolean;
Description
HasContentLength is a read-only Boolean property that indicates if a value has been assigned to ContentLength ( 674) in the
entity headers.

HasContentLength is updated when ProcessHeaders is called to set property values from the corresponding header values.
HasContentLength is True when ContentLength ( 674) contains a non-zero positive integer value.

Assigning a value to ContentLength ( 674) will ensure that HasContentLength is also updated.

See Also
ContentLength ( 674)

Internet Direct (Indy) Version 10.1.5 677


TIdEntityHeaderInfo Class Classes

TIdEntityHeaderInfo.HasContentRange Property
Pascal
property HasContentRange: Boolean;
Description
HasContentRange is a Public read-only Boolean property

TIdEntityHeaderInfo.HasContentRangeInstance Property
Pascal
property HasContentRangeInstance: Boolean;
Description
HasContentRangeInstance is a Public read-only Boolean property

TIdEntityHeaderInfo.LastModified Property
Indicates the date and time a server resource was modified.

Pascal
property LastModified: TIdDateTime;
Description
LastModified is a TDateTime property that indicates the date and time when the origin server believes the most recent version of a
resource was modified.

An origin server must not send a LastModified date which is later than the server time of message origination in Date ( 676). An
origin server should send LastModified whenever possible.

LastModified is updated when RawHeaders ( 679) contains a 'Last-Modified' response header with a non-zero value.

See Also
TIdEntityHeaderInfo.Date ( 676)

TIdEntityHeaderInfo.RawHeaders ( 679)

TIdEntityHeaderInfo.Pragma Property
Represents HTTP server directives in a client request.

Pascal
property Pragma: string;
Description
Pragma is a string property that contains HTTP server directives, and represent optional behavior for the HTTP protocol. Pragma
normally contains the value "no-cache" and indicates that the HTTP request should be forwarded to the server even when the
request can be satisfied from the server cache.

Pragma is used in an HTTP client request, and has the same meaning as the CacheControl ( 672) property used in HTTP/1.1.
Pragma is defined to provide backward compatibility with HTTP/1.0.

Pragma may also contain implementation-specific extension values which are defined in the HTTP protocol. Pragma directives
must be passed by a proxy or gateway application, regardless of their significance to that application, since the directives might be
applicable to all recipients along the request/response chain. It is not possible to specify Pragma for a specific client. Any Pragma
directive not relevant to the client should be ignored.

Use of Pragma in a HTTP response is not defined by the HTTP protocol, and does not provide a reliable replacement for
CacheControl ( 672) in the response.

678 Internet Direct (Indy) Version 10.1.5


Classes TIdEtherAddr Class

See Also
TIdEntityHeaderInfo.CacheControl ( 672)

TIdEntityHeaderInfo.RawHeaders Property
Contains message header names and values in their original form.

Pascal
property RawHeaders: TIdHeaderList;
Description
RawHeaders is a read-only TIdHeaderList ( 1024) property that contains the message header names and values in their original
form, as received in an HTTP request or response.

RawHeaders are used as the origin for header values during processing and storage in their property representation. RawHeaders
are used as the destination for property values when generating the headers for an HTTP protocol response.

Use CustomHeaders ( 676) to create ( 670) new header values that cannot be expressed as a property in the
TIdEntityHeaderInfo ( 668) instance.

See Also
CustomHeaders ( 676)

TIdHeaderList ( 1024)

TIdRequestHeaderInfo ( 1857)

TIdResponseHeaderInfo ( 1865)

TIdEtherAddr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdEtherAddr = class(TIdStruct);
Description
TIdEtherAddr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdEtherAddr Members
The following tables list the members exposed by TIdEtherAddr.

Properties
Property Description
Data ( 682)
ether_addr_octet ( 682)

Internet Direct (Indy) Version 10.1.5 679


TIdEtherAddr Class Classes

Methods
Method Description
CopyFrom ( 680)
create ( 680)
getether_addr_octet ( 681)
ReadStruct ( 681)
SetData ( 681)
setether_addr_octet ( 681)
WriteStruct ( 682)

Legend
Method
virtual
Property

TIdEtherAddr Methods
The Methods of the TIdEtherAddr class are listed here.

Methods
Method Description
CopyFrom ( 680)
create ( 680)
getether_addr_octet ( 681)
ReadStruct ( 681)
SetData ( 681)
setether_addr_octet ( 681)
WriteStruct ( 682)

Legend
Method
virtual

TIdEtherAddr.CopyFrom Method
Pascal
procedure CopyFrom(
const ASource: TIdEtherAddr
);
Parameters
Parameters Description
ASource Scope is const. Type is TIdEtherAddr ( 679).

Description
CopyFrom is a method.

TIdEtherAddr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

680 Internet Direct (Indy) Version 10.1.5


Classes TIdEtherAddr Class

TIdEtherAddr.getether_addr_octet Method
Pascal
function getether_addr_octet(
Index: Integer
): Byte;
Parameters
Parameters Description
Index Type is Integer.

Returns
Byte

Description
getether_addr_octet is a method.

getether_addr_octet returns a Byte value.

TIdEtherAddr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdEtherAddr.SetData Method
Pascal
procedure SetData(
const Value: TIdBytes
);
Parameters
Parameters Description
Value Scope is const. Type is TIdBytes ( 3007).

Description
SetData is a method.

TIdEtherAddr.setether_addr_octet Method
Pascal
procedure setether_addr_octet(
Index: Integer;
const Value: Byte
);

Internet Direct (Indy) Version 10.1.5 681


TIdEthernetHdr Class Classes

Parameters
Parameters Description
Index Type is Integer.
Value Scope is const. Type is Byte.

Description
setether_addr_octet is a method.

TIdEtherAddr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdEtherAddr Properties
The Properties of the TIdEtherAddr class are listed here.

Properties
Property Description
Data ( 682)
ether_addr_octet ( 682)

Legend
Property

TIdEtherAddr.Data Property
Pascal
property Data: TIdBytes;
Description
Data is a Public TIdBytes ( 3007) property. Write access for the property is implemented using SetData ( 681).

TIdEtherAddr.ether_addr_octet Property
Pascal
property ether_addr_octet [Index:Integer]: Byte;
Description
ether_addr_octet is a Public Byte property. Write access for the property is implemented using setether_addr_octet ( 681).

682 Internet Direct (Indy) Version 10.1.5


Classes TIdEthernetHdr Class

TIdEthernetHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdEthernetHdr = class(TIdStruct);
Description
TIdEthernetHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdEthernetHdr Members
The following tables list the members exposed by TIdEthernetHdr.

Properties
Property Description
ether_dhost ( 685)
ether_shost ( 685)
ether_type ( 685)

Methods
Method Description
CopyFrom ( 684)
create ( 684)
Destroy ( 684)
ReadStruct ( 684)
WriteStruct ( 684)

Legend
Method
virtual
Property
read only

TIdEthernetHdr Methods
The Methods of the TIdEthernetHdr class are listed here.

Methods
Method Description
CopyFrom ( 684)
create ( 684)
Destroy ( 684)
ReadStruct ( 684)
WriteStruct ( 684)

Internet Direct (Indy) Version 10.1.5 683


TIdEthernetHdr Class Classes

Legend
Method
virtual

TIdEthernetHdr.CopyFrom Method
Pascal
procedure CopyFrom(
const ASource: TIdEthernetHdr
);
Parameters
Parameters Description
ASource Scope is const. Type is TIdEthernetHdr ( 683).

Description
CopyFrom is a method.

TIdEthernetHdr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdEthernetHdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdEthernetHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdEthernetHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer

684 Internet Direct (Indy) Version 10.1.5


Classes TIdEventSocksServer Class

); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdEthernetHdr Properties
The Properties of the TIdEthernetHdr class are listed here.

Properties
Property Description
ether_dhost ( 685)
ether_shost ( 685)
ether_type ( 685)

Legend
Property
read only

TIdEthernetHdr.ether_dhost Property
Pascal
property ether_dhost: TIdEtherAddr;
Description
ether_dhost is a Public read-only TIdEtherAddr ( 679) property.

TIdEthernetHdr.ether_shost Property
Pascal
property ether_shost: TIdEtherAddr;
Description
ether_shost is a Public read-only TIdEtherAddr ( 679) property.

TIdEthernetHdr.ether_type Property
Pascal
property ether_type: word;
Description
ether_type is a Public word property. Write access for the property is implemented using Fether_type.

TIdEventSocksServer Class
File
IdSocksServer ( 4725)

Internet Direct (Indy) Version 10.1.5 685


TIdEventSocksServer Class Classes

Hierarchy

Pascal
TIdEventSocksServer = class(TIdCustomSocksServer);
Description
TIdEventSocksServer is a TIdCustomSocksServer ( 450) descendant.

See Also
TIdCustomSocksServer ( 450)

TIdEventSocksServer Members
The following tables list the members exposed by TIdEventSocksServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowSocks4 ( 452)
AllowSocks5 ( 452)
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 452)
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
Socks5NeedsAuthentication ( 452)
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 451)
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAuthenticate ( 453)
OnBeforeBind ( 453)

686 Internet Direct (Indy) Version 10.1.5


Classes TIdExplicitTLSClient Class

OnBeforeConnect ( 453)
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandBind ( 687)
OnCommandConnect ( 687)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Event
Method
virtual
Property
read only

TIdEventSocksServer Events
The Events of the TIdEventSocksServer class are listed here.

Events
Event Description
OnCommandBind ( 687)
OnCommandConnect ( 687)

Legend
Event

TIdEventSocksServer.OnCommandBind Event
Pascal
property OnCommandBind: TIdOnCommandBind;
Description
OnCommandBind is a Published TIdOnCommandBind ( 3068) event handler property. Write access for the property is
implemented using fOnCommandBind.

TIdEventSocksServer.OnCommandConnect Event
Pascal
property OnCommandConnect: TIdOnCommandConnect;
Description
OnCommandConnect is a Published TIdOnCommandConnect ( 3069) event handler property. Write access for the property is
implemented using fOnCommandConnect.

TIdExplicitTLSClient Class
File
IdExplicitTLSClientServerBase ( 4626)

Internet Direct (Indy) Version 10.1.5 687


TIdExplicitTLSClient Class Classes

Hierarchy

Pascal
TIdExplicitTLSClient = class(TIdTCPClientCustom);
Description
TIdExplicitTLSClient is a TIdTCPClientCustom ( 2340) descendant.

See Also
TIdTCPClientCustom ( 2340)

TIdExplicitTLSClient Members
The following tables list the members exposed by TIdExplicitTLSClient.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 690)
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
Connect ( 689)
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 689)
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)

688 Internet Direct (Indy) Version 10.1.5


Classes TIdExplicitTLSClient Class

Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 691)

Legend
Method
virtual
Property
read only
Event

TIdExplicitTLSClient Methods
The Methods of the TIdExplicitTLSClient class are listed here.

Methods
Method Description
Connect ( 689)
Destroy ( 689)

Legend
Method
virtual

TIdExplicitTLSClient.Connect Method
Pascal
procedure Connect; override;
Description
Connect is a overridden method.

TIdExplicitTLSClient.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdExplicitTLSClient Properties
The Properties of the TIdExplicitTLSClient class are listed here.

Internet Direct (Indy) Version 10.1.5 689


TIdExplicitTLSClient Class Classes

Properties
Property Description
Capabilities ( 690)
SupportsTLS ( 690)

Legend
Property
read only

TIdExplicitTLSClient.Capabilities Property
Pascal
property Capabilities: TIdStrings;
Description
Capabilities is a Public read-only TIdStrings ( 3089) property.

TIdExplicitTLSClient.SupportsTLS Property
Pascal
property SupportsTLS: boolean;
Description
SupportsTLS is a Public read-only boolean property.

TIdExplicitTLSClient Events
The Events of the TIdExplicitTLSClient class are listed here.

Events
Event Description
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 691)

Legend
Event

TIdExplicitTLSClient.OnTLSHandShakeFailed Event
Pascal
property OnTLSHandShakeFailed: TIdOnTLSNegotiationFailure;
Description
OnTLSHandShakeFailed is a Public TIdOnTLSNegotiationFailure ( 3072) event handler property. Write access for the property is
implemented using FOnTLSHandShakeFailed.

TIdExplicitTLSClient.OnTLSNegCmdFailed Event
Pascal
property OnTLSNegCmdFailed: TIdOnTLSNegotiationFailure;
Description
OnTLSNegCmdFailed is a Public TIdOnTLSNegotiationFailure ( 3072) event handler property. Write access for the property is
implemented using FOnTLSNegCmdFailed.

690 Internet Direct (Indy) Version 10.1.5


Classes TIdFinger Class

TIdExplicitTLSClient.OnTLSNotAvailable Event
Pascal
property OnTLSNotAvailable: TIdOnTLSNegotiationFailure;
Description
OnTLSNotAvailable is a Public TIdOnTLSNegotiationFailure ( 3072) event handler property. Write access for the property is
implemented using FOnTLSNotAvailable.

TIdExplicitTLSServer Class
File
IdExplicitTLSClientServerBase ( 4626)

Hierarchy

Pascal
TIdExplicitTLSServer = class(TIdCmdTCPServer);
Description
TIdExplicitTLSServer is a TIdCmdTCPServer ( 326) descendant.

See Also
TIdCmdTCPServer ( 326)

TIdExtList Class
Represents an array of pointers for VCL versions prior to VCL6.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TIdExtList = class(TIdList);
Description
TIdExtList is a TIdList ( 3055) descendant that represents an array of pointers for VCL versions prior to VCL6. TIdExtList can be
used to maintain lists of objects using properties and methods.

TIdExtList is declared in the Indy library because TList has no Assign method in VCL versions prior to VCL6.

Notes
Do NOT add data members to TIdExtList in descendant classes.

Internet Direct (Indy) Version 10.1.5 691


TIdFinger Class Classes

TIdFinger Class
Implements a Finger ( 696) protocol client.

File
IdFinger ( 4627)

Hierarchy

Pascal
TIdFinger = class(TIdTCPClientCustom);
Description
The TIdFinger is a TIdTCPClientCustom ( 2340) descendant that implements a TCP-based variant of the Finger ( 696) User
Information Protocol or Finger ( 696) client, as described in the Internet Standards document:

RFC 1288 - The Finger User Information Protocol

Overview of the Finger ( 696) Protocol

The Finger ( 696) protocol is an interface for a database of information about users on a remote system. The Finger ( 696)
protocol can include information such as if a user is logged in to the system, when the user last read their E-Mail, or optional
information the user wishes to make available publicly (.plan file).

Finger ( 696) is based on the Transmission Control Protocol, using TCP port 79 decimal (117 octal). The local host opens a TCP
connection to a remote host on the Finger ( 696) port. The local host sends a one line query based upon the Finger ( 696) query
specification, and waits for the responce.

The Finger ( 696) server receives and processes the query, returns an answer, then initiates the close of the connection.

The local host receives the answer and the close signal, then proceeds closing its end of the connection.

Data format

Any data transferred MUST be in ASCII format, with no parity, and with lines ending in CRLF (ASCII 13 followed by ASCII 10). This
excludes other character formats such as EBCDIC, etc. This also means that any characters between ASCII 128 and ASCII 255
should truly be international data, not 7-bit ASCII with the parity bit set.

Finger ( 696) Query ( 698) Specifications

The Finger ( 696) query specification is defined using the following tokens and productions:

{Q1} ::= [{W}|{W}{S}{U}]{C}

{Q2} ::= [{W}{S}][{U}]{H}{C}

{U} ::= username

{H} ::= @hostname | @hostname{H}

{W} ::= /W

{S} ::= <SP> | <SP>{S}

{C} ::= <CRLF>


{H} is recursive, and means that there is no arbitrary limit on the number of @hostname tokens in the query. In examples of the
{Q2} request specification, the number of @hostname tokens is limited to two, simply for brevity.

Be aware that {Q1} and {Q2} do not refer to a user typing "finger ( 696) user@host" from an operating system prompt. It refers to
the data actually received by the handler for the finger ( 696) request on the remote server. So, if a user types "finger ( 696)
user@host<CRLF>", the RUIP on the remote host receives "user<CRLF>", which corresponds to {Q1}.

692 Internet Direct (Indy) Version 10.1.5


Classes TIdFinger Class

As with anything in the IP protocol suite, "be liberal in what you accept".

Expected Finger ( 696) Responses

For the most part, the output of a Finger ( 696) query doesn't follow a strict specification, since it is designed to be read by people
instead of programs. It should mainly strive to be informative.

Output of ANY query is subject to the security restrictions that apply the connection to the Finger ( 696) server.

{C} Query ( 698)

A query of {C} is a request for a list of all online users. The remote server must either answer or actively refuse the query. If it
answers, then it MUST provide at least the user's full name. The system administrator SHOULD be allowed to include other useful
information, such as:

• terminal location
• office location
• office phone number
• job name
• idle time (number of minutes since last typed input, or since last job activity).
{U}{C} Query ( 698)

A query of {U}{C} is a request for in-depth status of a specified user {U}. If you really want to refuse this service, you probably don't
want to be running Finger ( 696) in the first place.

An answer MUST include at least the full name of the user. If the user is logged in, at least the same amount of information returned
by {C} for that user MUST also be returned by {U}{C}.

Since this is a query for information on a specific user, the system administrator SHOULD be allowed to choose to return additional
useful information, such as:

• office location
• office phone number
• home phone number
• status of login (not logged in, logout time, etc)
• user information file
A user information file is a feature wherein a user may leave a short message that will be included in the response to Finger ( 696)
requests. (This is sometimes called a "plan" file.) This is easily implemented by (for example) having the program look for a
specially named text file in the user's home directory or some common area; the exact method is left to the implementor. The
system administrator SHOULD be allowed to specifically turn this feature on and off.

There MAY be a way for the user to run a program in response to a Finger ( 696) query. If this feature exists, the system
administrator SHOULD be allowed to specifically turn it on and off.

{U} Ambiguity

Allowable "names" in the command line MUST include "user names" or "login names" as defined by the system. If a name is
ambiguous, the system administrator SHOULD be allowed to choose whether or not all possible derivations should be returned in
some fashion.

/W query token

The token /W in the {Q1} or {Q2} query types SHOULD at best be interpreted at the last RUIP to signify a higher level of verbosity in
the user information output, or at worst be ignored.

Vending machines

Vending machines SHOULD respond to a {C} request with a list of all items currently available for purchase and possible
consumption. Vending machines SHOULD respond to a {U}{C} request with a detailed count or list of the particular product or

Internet Direct (Indy) Version 10.1.5 693


TIdFinger Class Classes

product slot. Vending machines should NEVER NEVER EVER eat money.

Implementation Security

Sound implementation of Finger ( 696) is of the utmost importance. Implementations should be tested against various forms of
attack. In particular, an server SHOULD protect itself against malformed inputs. Vendors providing Finger ( 696) with the operating
system or network software should subject their implementations to penetration testing.

Finger ( 696) is one of the avenues for direct penetration, as the Morris worm pointed out quite vividly. Like Telnet, FTP and
SMTP, Finger ( 696) is one of the protocols at the security perimeter of a host. Accordingly, the soundness of the implementation
is paramount. The implementation should receive just as much security scrutiny during design, implementation, and testing as
Telnet, FTP, or SMTP.

RUIP security

Warning!! Finger ( 696) discloses information about users; moreover, such information may be considered sensitive. Security
administrators should make explicit decisions about whether to run Finger ( 696) and what information should be provided in
responses. One existing implementation provides the time the user last logged in, the time he last read mail, whether unread mail
was waiting for him, and who the most recent unread mail was from! This makes it possible to track conversations in progress and
see where someone's attention was focused. Sites that are information-security conscious should not run Finger ( 696) without an
explicit understanding of how much information it is giving away.

Atomic Discharge

All implementations of Finger ( 696) SHOULD allow individual system administrators to tailor what atoms of information are
returned to a query. For example:

• Administrator A should be allowed to specifically choose to return office location, office phone number, home phone number, and
logged in/logout time.

• Administrator B should be allowed to specifically choose to return only office location, and office phone number.

• Administrator C should be allowed to specifically choose to return the minimum amount of required information, which is the
person's full name.
User Information Files

Allowing an RUIP to return information out of a user-modifiable file should be seen as equivalent to allowing any information about
your system to be freely distributed. That is, it is potentially the same as turning on all specifiable options. This information security
breach can be done in a number of ways, some cleverly, others straightforwardly. This should disturb the sleep of system
administrators who wish to control the returned information.

Execution of User Programs

Allowing an RUIP to run a user program in response to a Finger ( 696) query is potentially dangerous. BE CAREFUL!! -- the RUIP
MUST NOT allow system security to be compromised by that program. Implementing this feature may be more trouble than it is
worth, since there are always bugs in operating systems, which could be exploited via this type of mechanism.

{U} ambiguity

Be aware that a malicious user's clever and/or persistent use of this feature can result in a list of most of the usernames on a
system. Refusal of {U} ambiguity should be considered in the same vein as refusal of {C} requests.

Audit trails

Implementations SHOULD allow system administrators to log Finger ( 696) queries.

Client security

It is expected that there will normally be some client program that the user runs to query the initial RUIP. By default, this program
SHOULD filter any unprintable data, leaving only printable 7-bit characters (ASCII 32 through ASCII 126), tabs (ASCII 9), and
CRLFs.

694 Internet Direct (Indy) Version 10.1.5


Classes TIdFinger Class

This is to protect against people playing with terminal escape codes, changing other peoples' X window names, or committing other
dastardly or confusing deeds. Two separate user options SHOULD be considered to modify this behavior, so that users may
choose to view international or control characters:

• one to allow all characters less than ASCII 32


• another to allow all characters greater than ASCII 126
For environments that live and breathe international data, the system administrator SHOULD be given a mechanism to enable the
latter option by default for all users on a particular system. This can be done via a global environment variable or similar mechanism.

See Also
IndySupport ( 15)

TIdFinger Members
The following tables list the members exposed by TIdFinger.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
CompleteQuery ( 697) Identifies the query for the Finger ( 696) protocol.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 698) IP address of host name for the Finger ( 696) server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 698) Port number for the Finger ( 696) server.
Query ( 698) Specifies the query for the Finger ( 696) method.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
VerboseOutput ( 699) Instructs the server to provide detailed output.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

Internet Direct (Indy) Version 10.1.5 695


TIdFinger Class Classes

Finger ( 696) Perfoms a Finger query and retrieves the results.


GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdFinger Methods
The Methods of the TIdFinger class are listed here.

Methods
Method Description
Finger ( 696) Perfoms a Finger query and retrieves the results.

Legend
Method

TIdFinger.Finger Method
Perfoms a Finger query and retrieves the results.

Pascal
function Finger: String;
Returns
String - Response from the Finger query.

Description
Finger is a String function used to send the Query ( 698) to the specified Host ( 698) and Port ( 698), and to receive the
response from the finger server. Assign the IP address or host name for the server using Host ( 698) or CompleteQurey before
calling the Finger method.

Assign a value to VerboseOutput ( 699) to indicate if the server should send a detailed response for the Finger query. When
VerboseOutput ( 699) is True, the '/W' token is added to the query for the Finger server.

Finger calls Connect ( 2342) to establish both the connection and the IOHandler ( 2364) for the client.

Finger uses the IOHandler ( 2364) for the connection to write the Finger query, and attempts to read all query response data. The
return value for the method is the Finger query response data read from the server.

Finger calls Disconnect ( 2355) to close both the connection and the IOHandler ( 2364) for the client.

696 Internet Direct (Indy) Version 10.1.5


Classes TIdFinger Class

See Also
TIdFinger.Host ( 698)

TIdFinger.Port ( 698)

TIdFinger.Query ( 698)

TIdFinger.CompleteQuery ( 697)

TIdFinger.VerboseOutput ( 699)

TIdFinger Properties
The Properties of the TIdFinger class are listed here.

Properties
Property Description
CompleteQuery ( 697) Identifies the query for the Finger ( 696) protocol.
Host ( 698) IP address of host name for the Finger ( 696) server.
Port ( 698) Port number for the Finger ( 696) server.
Query ( 698) Specifies the query for the Finger ( 696) method.
VerboseOutput ( 699) Instructs the server to provide detailed output.

Legend
Property

TIdFinger.CompleteQuery Property
Identifies the query for the Finger ( 696) protocol.

Pascal
property CompleteQuery: String;
Description
CompleteQuery is a String property that represents the the entire Finger ( 696) query, such as "user@host", to be sent in the
Finger ( 696) method. The CompleteQuery property is provided as a convenience for programs which prompt for a query in this
form. CompleteQuery may contain values that permit recursive finger ( 696) queries on servers that permit this capability, such as:

test@test.com@example.com
Reading the value in CompleteQuery returns the concatenated values in Query ( 698) and Host ( 698) in the form:

query@host
Writing a value to CompleteQuery forces the right-most host name to be parsed and stored in the Host ( 698) property. If no host
name is present, or recursive hosts are used in the query, the remainder of the new value is copied to the Query ( 698) property.

Use VerboseOutput ( 699) to indicate if the server should provide detailed output in the response returned by the Finger ( 696)
method.

Example
// var AFingerL TIdFinger;

AFinger.Host := 'myisp.net';
AFinger.CompleteQuery := '/W jblogs@test.com@example.com';
// Query contains '/W jblogs@test.com'
// Host contains 'example.com'

AFinger.Host := 'myisp.net';
AFinger.CompleteQuery := 'myaccount';
// Query contains 'myaccount'
// Host contains 'myisp.net'

Internet Direct (Indy) Version 10.1.5 697


TIdFinger Class Classes

See Also
TIdFinger.Query ( 698)

TIdFinger.Host ( 698)

TIdFinger.VerboseOutput ( 699)

TIdFinger.Host Property
IP address of host name for the Finger ( 696) server.

Pascal
property Host;
Description
Host is a published String property that represents the IP address or host name for the connection to the Finger ( 696) server.

Host is also updated when one or more host names are included when assigning a value to CompleteQuery ( 697).

Host is used when establishing the client connection to the remote server in Finger ( 696).

See Also
TIdFinger.Port ( 698)

TIdFinger.CompleteQuery ( 697)

TIdFinger.Port Property
Port number for the Finger ( 696) server.

Pascal
property Port;
Description
Port is a published TIdPort ( 3076) property that represents the port number for the connection to the Finger ( 696) server.

The default value for Port is IdPORT_FINGER ( 3995), as assigned in the Create ( 267) method.

Host ( 698) and Port are used when establishing the client connection to the Finger ( 696) server in the Finger ( 696) method.

See Also
IdPORT_FINGER ( 3995)

TIdFinger.Host ( 698)

TIdFinger.Finger ( 696)

TIdFinger.Query Property
Specifies the query for the Finger ( 696) method.

Pascal
property Query: String;
Description
Query is a String property that represents the text for the query sent to the server when using the Finger ( 696) method. Values in
Query consist of Finger ( 696) query tokens excluding the final host name in a multiple host query created using CompleteQuery
( 697).

For example:

jblogs

698 Internet Direct (Indy) Version 10.1.5


Classes TIdFingerServer Class

/W jblogs
jblogs@somedomain.com
/W jblogs@somedomain.com
Use CompleteQuery ( 697) to get the query string including the final host in a multi-host query.

See Also
Finger ( 696)

CompleteQuery ( 697)

TIdFinger.VerboseOutput Property
Instructs the server to provide detailed output.

Pascal
property VerboseOutput: Boolean;
Description
VerboseOutput indicates to the server that it should give more detailed information than with a regular finger ( 696) query.

VerboseOutput is used in the Finger ( 696) method, and causes the '/W' token to be added to the Query ( 698) prior to
connection and transmission to the Finger ( 696) server.

The default value for VerboseOutput is False, as assigned in the Create ( 267) method.

Verbose output may not be supported on some finger ( 696) server implementations, and may result in the query being rejected
by the server.

See Also
TIdFinger.Query ( 698)

TIdFinger.Finger ( 696)

TIdFinger. Create ( 267)

TIdFingerServer Class
Implements a Finger protocol server.

File
IdFingerServer ( 4628)

Hierarchy

Pascal
TIdFingerServer = class(TIdCustomTCPServer);
Description
TIdFingerServer is a TIdTCPServer ( 2375) descendant that implements a server supporting the Finger User Information Protocol,
as described in the Internet Standards document:

RFC 1288 - The Finger User Information Protocol

Overview of the Finger Protocol

The Finger protocol is an interface for a database of information about users on a remote system. The Finger protocol can include
information such as if a user is logged in to the system, when the user last read their E-Mail, or optional information the user wishes
to make available publicly (.plan file).

Internet Direct (Indy) Version 10.1.5 699


TIdFingerServer Class Classes

Finger is based on the Transmission Control Protocol, using TCP port 79 decimal (117 octal). The local host opens a TCP
connection to a remote host on the Finger port. The local host sends a one line query based upon the Finger query specification,
and waits for the responce.

The Finger server receives and processes the query, returns an answer, then initiates the close of the connection.

The local host receives the answer and the close signal, then proceeds closing its end of the connection.

Data format

Any data transferred MUST be in ASCII format, with no parity, and with lines ending in CRLF (ASCII 13 followed by ASCII 10). This
excludes other character formats such as EBCDIC, etc. This also means that any characters between ASCII 128 and ASCII 255
should truly be international data, not 7-bit ASCII with the parity bit set.

Finger Query Specifications

The Finger query specification is defined using the following tokens and productions:

{Q1} ::= [{W}|{W}{S}{U}]{C}

{Q2} ::= [{W}{S}][{U}]{H}{C}

{U} ::= username

{H} ::= @hostname | @hostname{H}

{W} ::= /W

{S} ::= <SP> | <SP>{S}

{C} ::= <CRLF>


{H} is recursive, and means that there is no arbitrary limit on the number of @hostname tokens in the query. In examples of the
{Q2} request specification, the number of @hostname tokens is limited to two, simply for brevity.

Be aware that {Q1} and {Q2} do not refer to a user typing "finger user@host" from an operating system prompt. It refers to the data
actually received by the handler for the finger request on the remote server. So, if a user types "finger user@host<CRLF>", the
RUIP on the remote host receives "user<CRLF>", which corresponds to {Q1}.

As with anything in the IP protocol suite, "be liberal in what you accept".

Expected Finger Responses

For the most part, the output of a Finger query doesn't follow a strict specification, since it is designed to be read by people instead
of programs. It should mainly strive to be informative.

Output of ANY query is subject to the security restrictions that apply the connection to the Finger server.

{C} Query

A query of {C} is a request for a list of all online users. The remote server must either answer or actively refuse the query. If it
answers, then it MUST provide at least the user's full name. The system administrator SHOULD be allowed to include other useful
information, such as:

• terminal location
• office location
• office phone number
• job name
• idle time (number of minutes since last typed input, or since last job activity).
{U}{C} Query

A query of {U}{C} is a request for in-depth status of a specified user {U}. If you really want to refuse this service, you probably don't
want to be running Finger in the first place.

700 Internet Direct (Indy) Version 10.1.5


Classes TIdFingerServer Class

An answer MUST include at least the full name of the user. If the user is logged in, at least the same amount of information returned
by {C} for that user MUST also be returned by {U}{C}.

Since this is a query for information on a specific user, the system administrator SHOULD be allowed to choose to return additional
useful information, such as:

• office location
• office phone number
• home phone number
• status of login (not logged in, logout time, etc)
• user information file
A user information file is a feature wherein a user may leave a short message that will be included in the response to Finger
requests. (This is sometimes called a "plan" file.) This is easily implemented by (for example) having the program look for a
specially named text file in the user's home directory or some common area; the exact method is left to the implementor. The
system administrator SHOULD be allowed to specifically turn this feature on and off.

There MAY be a way for the user to run a program in response to a Finger query. If this feature exists, the system administrator
SHOULD be allowed to specifically turn it on and off.

{U} Ambiguity

Allowable "names" in the command line MUST include "user names" or "login names" as defined by the system. If a name is
ambiguous, the system administrator SHOULD be allowed to choose whether or not all possible derivations should be returned in
some fashion.

/W query token

The token /W in the {Q1} or {Q2} query types SHOULD at best be interpreted at the last RUIP to signify a higher level of verbosity in
the user information output, or at worst be ignored.

Vending machines

Vending machines SHOULD respond to a {C} request with a list of all items currently available for purchase and possible
consumption. Vending machines SHOULD respond to a {U}{C} request with a detailed count or list of the particular product or
product slot. Vending machines should NEVER NEVER EVER eat money.

Implementation Security

Sound implementation of Finger is of the utmost importance. Implementations should be tested against various forms of attack. In
particular, an server SHOULD protect itself against malformed inputs. Vendors providing Finger with the operating system or
network software should subject their implementations to penetration testing.

Finger is one of the avenues for direct penetration, as the Morris worm pointed out quite vividly. Like Telnet, FTP and SMTP, Finger
is one of the protocols at the security perimeter of a host. Accordingly, the soundness of the implementation is paramount. The
implementation should receive just as much security scrutiny during design, implementation, and testing as Telnet, FTP, or SMTP.

RUIP security

Warning!! Finger discloses information about users; moreover, such information may be considered sensitive. Security
administrators should make explicit decisions about whether to run Finger and what information should be provided in responses.
One existing implementation provides the time the user last logged in, the time he last read mail, whether unread mail was waiting
for him, and who the most recent unread mail was from! This makes it possible to track conversations in progress and see where
someone's attention was focused. Sites that are information-security conscious should not run Finger without an explicit
understanding of how much information it is giving away.

Atomic Discharge

All implementations of Finger SHOULD allow individual system administrators to tailor what atoms of information are returned to a
query. For example:

Internet Direct (Indy) Version 10.1.5 701


TIdFingerServer Class Classes

• Administrator A should be allowed to specifically choose to return office location, office phone number, home phone number, and
logged in/logout time.

• Administrator B should be allowed to specifically choose to return only office location, and office phone number.

• Administrator C should be allowed to specifically choose to return the minimum amount of required information, which is the
person's full name.
User Information Files

Allowing an RUIP to return information out of a user-modifiable file should be seen as equivalent to allowing any information about
your system to be freely distributed. That is, it is potentially the same as turning on all specifiable options. This information security
breach can be done in a number of ways, some cleverly, others straightforwardly. This should disturb the sleep of system
administrators who wish to control the returned information.

Execution of User Programs

Allowing an RUIP to run a user program in response to a Finger query is potentially dangerous. BE CAREFUL!! -- the RUIP MUST
NOT allow system security to be compromised by that program. Implementing this feature may be more trouble than it is worth,
since there are always bugs in operating systems, which could be exploited via this type of mechanism.

{U} ambiguity

Be aware that a malicious user's clever and/or persistent use of this feature can result in a list of most of the usernames on a
system. Refusal of {U} ambiguity should be considered in the same vein as refusal of {C} requests.

Audit trails

Implementations SHOULD allow system administrators to log Finger queries.

Client security

It is expected that there will normally be some client program that the user runs to query the initial RUIP. By default, this program
SHOULD filter any unprintable data, leaving only printable 7-bit characters (ASCII 32 through ASCII 126), tabs (ASCII 9), and
CRLFs.

This is to protect against people playing with terminal escape codes, changing other peoples' X window names, or committing other
dastardly or confusing deeds. Two separate user options SHOULD be considered to modify this behavior, so that users may
choose to view international or control characters:

• one to allow all characters less than ASCII 32


• another to allow all characters greater than ASCII 126
For environments that live and breathe international data, the system administrator SHOULD be given a mechanism to enable the
latter option by default for all users on a particular system. This can be done via a global environment variable or similar mechanism.

See Also
TIdTCPServer ( 2375)

IndySupport ( 15)

TIdFingerServer Members
The following tables list the members exposed by TIdFingerServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.

702 Internet Direct (Indy) Version 10.1.5


Classes TIdFingerServer Class

Contexts ( 462) Executable tasks for client connections to the server.


DefaultPort ( 704) Default port number for the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandFinger ( 704) Event handler for resolving Finger requests.
OnCommandVerboseFinger ( 704) Represents the event handler for resolving verbose Finger requests.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdFingerServer Properties
The Properties of the TIdFingerServer class are listed here.

Properties
Property Description
DefaultPort ( 704) Default port number for the server.

Legend
Property

Internet Direct (Indy) Version 10.1.5 703


TIdFingerServer Class Classes

TIdFingerServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdFingerServer ( 699) that identifies the default port number for the server, as described in
the Finger User Information Protocol specification.

DefaultPort indicates the port number used for listening for client connections during execution of the IdTCPServer decendant class.

The default value for DefaultPort is IdPORT_FINGER ( 3995), as assigned during initialization of the component.

See Also
IdPORT_FINGER ( 3995)

TIdFingerServer Events
The Events of the TIdFingerServer class are listed here.

Events
Event Description
OnCommandFinger ( 704) Event handler for resolving Finger requests.
OnCommandVerboseFinger ( 704) Represents the event handler for resolving verbose Finger requests.

Legend
Event

TIdFingerServer.OnCommandFinger Event
Event handler for resolving Finger requests.

Pascal
property OnCommandFinger: TIdFingerGetEvent;
Description
OnCommandFinger is a TIdFingerGetEvent ( 3026) property that represents the event handler triggered when a threaded client
connection makes a Finger request.

OnCommandFinger expects an AUserName argument that is the query the client is making. This event does not occur in the main
program thread but in the content specified for the client connection.

OnCommandFinger is used during execution of the threaded client, and allows the server to implement resolution of the Finger
query. Applications must assign a procedure to the event handler to allow responding to the event notification. The event handler
should be used to locate user information for the Finger query, and write any reponse or error messages to the client connection in
AThread.

Use OnCommandVerboseFinger ( 704) to resolve Finger queries that require verbose output.

See Also
TIdFingerGetEvent ( 3026) OnCommandVerboseFinger ( 704) TIdContext ( 376)

TIdFingerServer.OnCommandVerboseFinger Event
Represents the event handler for resolving verbose Finger requests.

704 Internet Direct (Indy) Version 10.1.5


Classes TIdFormDataField Class

Pascal
property OnCommandVerboseFinger: TIdFingerGetEvent;
Description
OnCommandVerboseFinger is a TIdFingerGetEvent ( 3026) property that represents the event handler triggered when a threaded
client connection makes a verbose Finger request.

OnCommandVerboseFinger expects an AUserName argument that is the query the client is making. This event does not occur in
the main program thread but in the specified context for the client connection.

OnCommandVerboseFinger is used during execution of the threaded client, and allows the server to implement resolution of the
Finger query using verbose output. Applications must assign a procedure to the event handler to allow responding to the event
notification. The event handler should be used to locate user information for the Finger query, and write any reponse or error
messages to the client connection context.

When OnCommandVerboseFinger is unassigned, OnCommandFinger ( 704) will be used to resolve the Finger query.

See Also
TIdFingerGetEvent ( 3026) OnCommandFinger ( 704) TIdContext ( 376)

TIdFormDataField Class
Represents a form data field in a multipart form data stream.

File
IdMultipartFormData ( 4691)

Hierarchy

Pascal
TIdFormDataField = class(TIdCollectionItem);
Description
TIdFormDataField is a TCollectionItem descendant that represents a form data field added to a TIdFormDataFields ( 710)
collection. TIdFormDataField provides access to data fields defined on a multipart form and read from a
TIdMultiPartFormDataStream ( 1657) object instance.

TIdFormDataField implements properties that allow access to the data field name and value, the file name and TStream for inputs
that represent file types, and the size of the data field.

See Also
TIdFormDataFields ( 710)

TIdMultiPartFormDataStream ( 1657)

IndySupport ( 15)

TIdFormDataField Members
The following tables list the members exposed by TIdFormDataField.

Properties
Property Description
ContentType ( 708) MIME content type header for the form data field.
FieldName ( 708) Name associated with the contents of the form data field.
FieldObject ( 708) An optional object reference with content for the form data field.

Internet Direct (Indy) Version 10.1.5 705


TIdFormDataField Class Classes

FieldSize ( 709) Size of the form data field in the multipart stream including HTTP headers.
FieldStream ( 709) TStream associated with the contents of the form data field.
FieldStrings ( 709)
FieldValue ( 710) Content values for the named form data field.
FileName ( 710) File name used to load content for the form data field.

Methods
Method Description
Create ( 706) Constructor for the object instance.
Destroy ( 707) Frees the object instance.
FormatField ( 707)

Legend
Constructor
virtual
Property
read only

TIdFormDataField Methods
The Methods of the TIdFormDataField class are listed here.

Methods
Method Description
Create ( 706) Constructor for the object instance.
Destroy ( 707) Frees the object instance.
FormatField ( 707)

Legend
Constructor
virtual

TIdFormDataField.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
Collection: TIdCollection
); override;
Parameters
Parameters Description
Collection Collection that owns the form data field.

Description
Create is the overridden constructor for the object instance. Create calls the inherited constructor using Collection as the owner of
the` form data field.

Create assigns the default blank values for string properties in the object instance, including FileName ( 710), FieldName ( 708),
and ContentType ( 708). Create assigns Nil to the FieldObject ( 708) property for the form data field, and clears the internal flag
indicating the field object has been assigned.

Use Destroy ( 707) to free the collection item.

Do not use Create to add items to a collection. Use the Add method in the TIdFormDataFields ( 710) collection to create new
items for the collection.

See Also
TIdFormDataField.FileName ( 710)

706 Internet Direct (Indy) Version 10.1.5


Classes TIdFormDataField Class

TIdFormDataField.FieldName ( 708)

TIdFormDataField.ContentType ( 708)

TIdFormDataField.Destroy ( 707)

TIdFormDataFields.Add ( 711)

TIdFormDataField.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy checks for an assigned object instance in FieldObject ( 708), and will free
and release the object instance when the internal flag is set that indicates it is managed by the collection item.

Destroy calls the inherited destructor prior to exiting from the method.

An object reference created and assigned to FieldObject ( 708) by an application are not freed in the destructor. The application
must handle that task.

See Also
TIdFormDataField.Create ( 706)

TIdFormDataField.FieldObject ( 708)

TIdFormDataField.FormatField Method
Pascal
function FormatField: string;
Returns
string

Description
FormatField returns string

TIdFormDataField Properties
The Properties of the TIdFormDataField class are listed here.

Properties
Property Description
ContentType ( 708) MIME content type header for the form data field.
FieldName ( 708) Name associated with the contents of the form data field.
FieldObject ( 708) An optional object reference with content for the form data field.
FieldSize ( 709) Size of the form data field in the multipart stream including HTTP headers.
FieldStream ( 709) TStream associated with the contents of the form data field.
FieldStrings ( 709)
FieldValue ( 710) Content values for the named form data field.
FileName ( 710) File name used to load content for the form data field.

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 707


TIdFormDataField Class Classes

TIdFormDataField.ContentType Property
MIME content type header for the form data field.

Pascal
property ContentType: string;
Description
ContentType is a string property that represents the MIME content type for the contents of the form data field. ContentType is used
when the multipart form data stream generates the formatted content for the stream including Boundary markers, content
disposition, file names, and other header values.

Changing the value in ContentType cause the form data field to calculate and update the value in FieldSize ( 709).

See Also
TIdFormDataField.FieldSize ( 709)

TIdFormDataField.FieldName Property
Name associated with the contents of the form data field.

Pascal
property FieldName: string;
Description
FieldName is a string property that represents the name to associate with values stored in the form data field. FieldName is
equivalent to the HTML ID or NAME attributes that identify an input field found in an HTML form.

Changing the value in FieldName causes the value in FieldSize ( 709) to be calculated and updated.

FieldName is used when the multipart form data stream generates the formatted values (including headers) for use in an HTTP
GET or POST request.

Use FieldValue ( 710) to specify the content to be associated with the named form data field.

See Also
TIdFormDataField.FieldSize ( 709)

TIdFormDataField.FieldValue ( 710)

TIdFormDataField.FieldObject Property
An optional object reference with content for the form data field.

Pascal
property FieldObject: TObject;
Description
FieldObject is a TObject property that optionally contains an object reference with content values for the form data field. FieldObject
normally contains a TStream descendant reflecting the contents of FileName ( 710), or a TStrings descendant with generic textual
content. Assigning a TObject reference other than TStream or TStrings to the FieldObject property will raise an
EIdInvalidObjectType ( 110) exception.

FieldObject is used when methods of TIdMultiPartFromDataStream, like AddObject and AddFile, are used to create ( 706) form
data fields. If AddObject is used (with an existing object reference), it is the applications responsibility for freeing the object
reference.

Use FieldStream ( 709) to access the TStream created for a form data field that represents a file to include in the miultipart form
data stream.

708 Internet Direct (Indy) Version 10.1.5


Classes TIdFormDataField Class

See Also
TIdFormDataField.FieldStream ( 709)

TIdFormDataField.FieldSize Property
Size of the form data field in the multipart stream including HTTP headers.

Pascal
property FieldSize: LongInt;
Description
FieldSize is a LongInt property that indicates the size of the form data field in a multipart form data stream. FieldSize includes the
MIME boundary marker from the multipart form data stream, and other HTTP headers needed to reflect the content type and
disposition for an HTTP GET or POST request.

When FieldObject ( 708) has been assigned, FieldSize includes the length of any content assigned to the TStream buffer or
TStrings lines with an additional CR ( 3174)+LF ( 4341) sequence to separate content values.

See Also
TIdFormDataField.ContentType ( 708)

TIdFormDataField.FileName ( 710)

TIdFormDataField.FieldObject ( 708)

TIdMultiPartFormDataStream.Boundary ( 1663)

TIdMultiPartFormDataStream.RequestContentType ( 1663)

TIdFormDataField.FieldStream Property
TStream associated with the contents of the form data field.

Pascal
property FieldStream: TIdStream;
Description
FieldStream is a TStream property that represents an optional stream to use for the contents of the form data field. FieldStream
accesses the object reference in FieldObject ( 708).

Reading the value in FieldStream is valid only for TStream descendants stored in the FieldObject ( 708). Accessing a TStrings
instance using FieldStream will raise an EIdInvalidObjectType ( 110) exception. When FieldObject ( 708) is unassigned, the
value in FieldStream is Nil.

Writing a value to FieldStream will store the TStream object reference in the FieldObject ( 708) property.

See Also
TIdFormDataField.FieldObject ( 708)

EIdInvalidObjectType ( 110)

TIdFormDataField.FieldStrings Property
Pascal
property FieldStrings: TIdStrings;
Description
FieldStrings is a Public TStrings property

Internet Direct (Indy) Version 10.1.5 709


TIdFormDataFields Class Classes

TIdFormDataField.FieldValue Property
Content values for the named form data field.

Pascal
property FieldValue: string;
Description
FieldValue is a string property that represents the value for the form data field identified in FieldName ( 708). Changing the value
in FieldValue causes the FieldSize ( 709) property to be calculated and updated.

Use FieldName ( 708) to get the HTML ID or NAME assiociated with the form data field.

Use FieldObject ( 708) or FieldStream ( 709) to access object references with content for the form data field.

Use ContentType ( 708) to specify the MIME content type for values in the form data field.

See Also
TIdFormDataField.FieldName ( 708)

TIdFormDataField.FieldObject ( 708)

TIdFormDataField.FieldStream ( 709)

TIdFormDataField.ContentType ( 708)

TIdFormDataField.FileName Property
File name used to load content for the form data field.

Pascal
property FileName: string;
Description
FileName is a string property that indicates the file name to use as the source of form data field contents that represent file to be
uploaded in an HTTP GET or POST request. Changing the value in FileName causes the FieldSize ( 709) property to be
recalculated and updated.

FileName is used when TIdMultiPartFomDataStream.AddFile is called to create ( 706) a new form data field.

See Also
TIdFormDataField.FileSize

TIdFormDataField.FileStream

TIdMultiPartFomDataStream.AddFile

TIdFormDataFields Class
Represents the multipart form data stream that owns the collection.

File
IdMultipartFormData ( 4691)

Hierarchy

Pascal
TIdFormDataFields = class(TIdCollection);

710 Internet Direct (Indy) Version 10.1.5


Classes TIdFormDataFields Class

Description
MultipartFormDataStream ( 713) is a read-only TIdMultiPartFormDataStream ( 1657) property that provides access to the
multipart form data stream that owns any items added to the collection. The value for MultipartFormDataStream ( 713) is provided
as an argument to the Create ( 712) constructor.

MultipartFormDataStream ( 713) is used to get access to properties of the owner stream, like Boundary. It is also used when
formatting and calculating the size of items in the collection

See Also
TIdMultiPartFormDataStream ( 1657)

TIdMultiPartFormDataStream.Boundary ( 1663)

TIdFormDataField.FieldSize ( 709)

TIdFormDataFields Members
The following tables list the members exposed by TIdFormDataFields.

Properties
Property Description
Items ( 712) Provides indexed access to items in the collection.
MultipartFormDataStream ( 713) Represents the multipart form data stream that owns the collection.

Methods
Method Description
Add ( 711) Adds a new form data field to the collection.
Create ( 712)

Legend
Method
Property
read only

TIdFormDataFields Methods
The Methods of the TIdFormDataFields class are listed here.

Methods
Method Description
Add ( 711) Adds a new form data field to the collection.
Create ( 712)

Legend
Method

TIdFormDataFields.Add Method
Adds a new form data field to the collection.

Pascal
function Add: TIdFormDataField;
Returns
TIdFormDataField ( 705) - The new form data field for the collection.

Description
Add is a TIdFormDataField ( 705) function used to add a new form data field to the collection. Add calls the inherited Add method,

Internet Direct (Indy) Version 10.1.5 711


TIdFormDataFields Class Classes

and ensures that the return value is cast to the TIdFormDataField ( 705) type maintained by the collection.

Add is called from TIdMultiPartFormDataStream ( 1657) methods like AddObject, AddFormField, and AddFile.

See Also
TIdFormDataField ( 705)

TIdMultiPartFormDataStream.AddFile ( 1659)

TIdMultiPartFormDataStream.AddFormField ( 1660)

TIdMultiPartFormDataStream.AddObject ( 1661)

TIdFormDataFields.Create Constructor
Pascal
constructor Create(
AMPStream: TIdMultiPartFormDataStream
);
Parameters
Parameters Description
AMPStream

Description
Create

TIdFormDataFields Properties
The Properties of the TIdFormDataFields class are listed here.

Properties
Property Description
Items ( 712) Provides indexed access to items in the collection.
MultipartFormDataStream ( 713) Represents the multipart form data stream that owns the collection.

Legend
Property
read only

TIdFormDataFields.Items Property
Provides indexed access to items in the collection.

Pascal
property Items [AIndex: Integer]: TIdFormDataField;
Parameters
Parameters Description
AIndex Ordinal position of an item in the collection.

Description
Items is an indexed TIdFormDataField ( 705) property that provides access to the form data field instances in the collection. Use
AIndex to access an item in the collection by it's ordinal position in the collection. Index positions in the collection start at 0, and will
not exceed the length of the collection minus 1.

When reading the value of an object instance in the collection using AIndex, the Item is cast to a TIdFormDataField ( 705) object
instance.

Items is a read-only property in TIdFormDataFields ( 710), Use Add ( 711) to create ( 712) a new form data field for the

712 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

collection.

See Also
TIdFormDataField ( 705)

TIdFormDataFields.MultipartFormDataStream Property
Represents the multipart form data stream that owns the collection.

Pascal
property MultipartFormDataStream: TIdMultiPartFormDataStream;
Description
MultipartFormDataStream is a read-only TIdMultiPartFormDataStream ( 1657) property that provides access to the multipart form
data stream that owns any items added to the collection. The value for MultipartFormDataStream is provided as an argument to the
Create ( 712) constructor.

MultipartFormDataStream is used to get access to properties of the owner stream, like Boundary. It is also used when formatting
and calculating the size of items in the collection

See Also
TIdMultiPartFormDataStream ( 1657)

TIdMultiPartFormDataStream.Boundary ( 1663)

TIdFormDataField.FieldSize ( 709)

TIdFSP Class
Implements a File Service Protocol (FSP) version ( 729) 2 client.

File
IdFSP ( 4628)

Hierarchy

Pascal
TIdFSP = class(TIdUDPClient);
Description
TIdFSP is a TIdUDPClient ( 2509) descendant that implements the File Service Protocol (FSP) version ( 729) 2, as described in
the specification document:

File Service Protocol (FSP) version 2

The File Service Protocol is also referred to using the following names:

File Sharing Protocol


File Slurping Protocol
File Sucking Protocol
Flaky Stream Protocol
FTPs' Sexier Partner

There is no official RFC for the FSP protocol, and FSP is not recognized as an Internet Standard protocol. The protocol is not

Internet Direct (Indy) Version 10.1.5 713


TIdFSP Class Classes

copyrighted and has been placed into the public domain.

FSP Protocol Design


FSP protocol was not designed to transfer data in a secure fashion. It was designed as an alternative protocol for providing
lightweight access to a collection of public files. FSP has the same user-level security as an anonymous FTP file server. FSP has
better network-level security than anonymous FTP, because it was designed to resist various denial-of-service attacks. FSP
protocol v3 will be designed to be fully secure. FSP3 will not be backward compatible with FSP2.

Passwords
Recently, password support was added to the FSP protocol. Passwords, however, are transmited in clear text over the network
which makes them a weak protection for a determined intruder.

Transport
FSP uses UDP datagrams as its' transport medium. The minimum UDP packet size (not including the size of UDP, IP and link-layer
headers) is 12 bytes. The maximum UDP packet size is 1024 bytes + 12 bytes for the FSP packet header.

FSP Packet format


Each FSP packet contains storage for header, data, and optional extra data that indicate the operation to perform and data to
transfer using the FSP protocol. The FSP packet information is represented in TIdFSP using the TIdFSPPacket ( 749) class, and
conforms to the requirements outlined in the specification document.

FSP Protocol Commands


The FSP protocol defines several commands - some of which are required in an FSP client implementation, while others are
optional. Commands are indicated in TIdFSPPacket ( 749) using the numeric value defined in the FSP protocol specification, and
include the following:

Command Description Method


CC_BYE ( 3139) Terminate an FSP session. Disconnect ( 720)
CC_DEL_DIR ( 3142) Delete ( 719) a directory. RemoveDir ( 728)
CC_DEL_FILE ( 3143) Delete ( 719) a file. Delete ( 719)
CC_ERR ( 3145) Sending an error message back to client. SendCmd
CC_GET_DIR ( 3146) Directory listings. List ( 724)
CC_GET_FILE ( 3148) File transfer. Get ( 720)
CC_GET_PRO ( 3149) Information about directory flags. GetDirInfo ( 723)
CC_INSTALL ( 3155) Close and install file open file. Put ( 726)
CC_MAKE_DIR ( 3158) Create ( 267) a directory. MakeDir ( 725)
CC_RENAME ( 3159) Rename ( 728) file or directory. Rename ( 728)
CC_STAT ( 3162) File status. GetStatInfo ( 723)
CC_UP_LOAD ( 3165) Open a file for writing. Put ( 726)
CC_VERSION ( 3167) Get ( 720) server version ( 729) and setup string. Version

The current FSP client implementation in TIdFSP does not implement the following FSP commands:

714 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

Command Description
CC_INFO ( 3153) Return server's extended info block.
CC_SET_PRO ( 3161) Set directory protection.
CC_GRAB_FILE ( 3152) Atomic get ( 720)+delete ( 719) a file.
CC_GRAB_DONE ( 3151) Atomic get ( 720)+delete ( 719) a file done.
CC_CH_PASSW ( 3140) Change password.
CC_LIMIT ( 3156) Reserved for FSP 3.
CC_TEST ( 3164) Reserved for testing of new header.

TIdFSP Client Configuration


The default port number used in the FSP client is IdPORT_FSP ( 3998) as indicated in the Port ( 734) property. Any change
required to the Port ( 734) property must be performed prior to callin Connect ( 718) to establish an FSP session.

Use ClientMaxPacketSize ( 730) to read or write the maximum client packet size to support in exchanges using the FSP client
commands. Use ServerMaxPacketSize ( 734) to determine the maximum packet size supported in exchanges with the FSP
server. Both values are used in determining the optimal payload packet size and the maximum buffer size used in FSP protocol
exchanges.

Use ServerMaxThruPut ( 734) to determine the maximum server thoughput (in bytes per second) allowed for connections to the
FSP server.

Use ThruputControl ( 738) to determine if throughput control is supported for the FSP server connection.

Details about the FSP server implmentation for the current connection read using the Version ( 729) method can be accesses in
the following properties:

Property Description
SystemDesc ( 736) Description of the server.
SystemServerLogs ( 737) Server performs logging.
SystemReadOnly ( 736) Server is read-only.
SystemReverseLookupRequired ( 737) Reverse lookups are required.
SystemPrivateMode ( 736) Server is in private mode.
SystemAcceptsExtraData ( 735) Server accepts extra data.

Using TIdFSP Client


One of the key features implemented in TIdFSP is its' ability to parse and store structured directory and status listings returned in
the List ( 724), GetDirInfo ( 723), and GetStatInfo ( 723) methods. While similiar to the features implemented in TIdFTP (
759), the content available in directory and status information is well defined in the FSP protocol.

Use the following properties to access collections containing the structured return values:

DirectoryListing ( 731)
DirInfo ( 731)
StatInfo ( 735)

Use the following methods to perform file, directory, and status operations as defined in the FSP protocol:

Internet Direct (Indy) Version 10.1.5 715


TIdFSP Class Classes

AbortCmd ( 718)
Connect ( 718)
Delete ( 719)
Disconnect ( 720)
Get ( 720)
GetDirInfo ( 723)
GetStatInfo ( 723)
List ( 724)
MakeDir ( 725)
Put ( 726)
RemoveDir ( 728)
Rename ( 728)
Version

Use the following event handlers to respond to client notifications occurring when FSP packets and/or files are sent and received:

OnWork ( 732)
OnWorkBegin ( 732)
OnWorkEnd ( 733)
OnRecv ( 738)
OnSend ( 739)

See Also
TIdUDPClient ( 2509)

TIdFSPListItems ( 745)

TIdFSPListItem ( 744)

TIdFSPStatInfo ( 756)

TIdFSPDirInfo ( 739)

TIdFSPPacket ( 749)

TIdFSPLogEvent ( 3027)

TIdFSP Members
The following tables list the members exposed by TIdFSP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
ClientMaxPacketSize ( 730) Represents the maximum size for client packets in FSP protocol exchanges.
DirectoryListing ( 731) Structured directory listing for files and directories on the FSP host.
DirInfo ( 731) Provides access to action and permission flags for a directory on the remote FSP host.
Host ( 2520) Identifies the address of the remote computer system.

716 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
IPVersion ( 2521) Identifies the IP address family supported for the UDP protocol client.
OnConnected ( 2521) Event handler signalled when establishing the UDP client session.
OnDisconnected ( 2521) Event handler signalled when closing the UDP client session.
OnWork ( 732) Event handler signalled when FSP packets containing file data are received.
OnWorkBegin ( 732) Event handler signalled prior to processing packets in an FSP protocol exchange.
OnWorkEnd ( 733) Event handler signalled after processing packets in an FSP protocol exchange.
Port ( 734) Port number used in FSP protocol exchanges.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ReceiveTimeout ( 2522) Indicates the timeout while waiting for a readable socket handle.
ServerMaxPacketSize ( 734) Represents the maximum size for packets from the server in FSP protocol exchanges.
ServerMaxThruPut ( 734) Maximum server thoughput (in bytes per second) allowed for connections to the FSP server.
StatInfo ( 735) Stores status and statistical information about a file or directory on the remote FSP host.
SystemAcceptsExtraData ( 735) Indicates if the remote FSP host accepts Extra Data values in packets for FSP protocol exchanges.
SystemDesc ( 736) Description of the remote FSP host.
SystemPrivateMode ( 736) Indicates if the remote FSP host is operating in Private mode.
SystemReadOnly ( 736) Indicates if the remote FSP host is operating in Read-Only mode.
SystemReverseLookupRequired ( 737) Indicates if a reverse-lookup is required for connections to the remote FSP host.
SystemServerLogs ( 737) Indicates if the remote FSP host performs logging operations.
ThruputControl ( 738) Indicates if the remote FSP host implements throughput control.
TransparentProxy ( 2522) Implements a transparent proxy connection for the UDP client.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
AbortCmd ( 718) Halts an executing command in the FSP client.
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
CloseProxy ( 2511) Closes the socket handle for a proxied connection for the client.
Connect ( 718) Initializes an FSP client session.
Connected ( 2512) Indicates if the socket handle for the UDP client has been allocated.
Create ( 267) Constructor for the object instance.
Delete ( 719) Deletes a specified file on the remote FSP host.
Destroy ( 719) Frees the object instance.
Disconnect ( 720) Closes an existing existing FSP session.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetStatInfo ( 723) Gets status and statistical information for a file or directory.
GetVersion ( 269) Version ( 269) number for Indy component suite.
MakeDir ( 725) Creates a new directory on the remote FSP host.
OpenProxy ( 2514) Ensures the optional transparent proxy is enabled for the client.
RemoveDir ( 728) Removes a directory on the remote FSP host.
Rename ( 728) Renames an existing file on the remote FSP host.
Send ( 2505) Transmits a datagram to a specified host and port number.
Send ( 2517) Transmits a datagram to the host and port number for the client.
CType ( 267)
Get ( 720)
GetDirInfo ( 722)
List ( 724)
Put ( 726)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)
ReceiveBuffer ( 2514)
SendBuffer ( 2518)
Version ( 729) Captures and stores information about the configuration of the remote FSP host for the session.

Internet Direct (Indy) Version 10.1.5 717


TIdFSP Class Classes

Events
Event Description
OnRecv ( 738) Event handler signalled when an FSP packet is received.
OnSend ( 739) Event handler signalled when an FSP packet is sent.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdFSP Methods
The Methods of the TIdFSP class are listed here.

Methods
Method Description
AbortCmd ( 718) Halts an executing command in the FSP client.
Connect ( 718) Initializes an FSP client session.
Delete ( 719) Deletes a specified file on the remote FSP host.
Destroy ( 719) Frees the object instance.
Disconnect ( 720) Closes an existing existing FSP session.
Get ( 720)
GetDirInfo ( 722)
GetStatInfo ( 723) Gets status and statistical information for a file or directory.
List ( 724)
MakeDir ( 725) Creates a new directory on the remote FSP host.
Put ( 726)
RemoveDir ( 728) Removes a directory on the remote FSP host.
Rename ( 728) Renames an existing file on the remote FSP host.
Version ( 729) Captures and stores information about the configuration of the remote FSP host for the session.

Legend
Method
virtual

TIdFSP.AbortCmd Method
Halts an executing command in the FSP client.

Pascal
procedure AbortCmd;
Description
AbortCmd is a procedure that implements a thread-safe mechanism used to halt an executing command in the FSP client.
AbortCmd sets a thread-safe internal flag that is examined in SendCmd, and allows an executing FSP command to be aborted
without raising an exception in a worker thread.

See Also
SendCmd

TIdFSP.Connect Method
Initializes an FSP client session.

718 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

Pascal
procedure Connect; override;
Description
Connect is an overidden procedure used initialize a session on the FSP client. The Connect method name is a bit of a misnomer;
FSP is connectionless protocol using the UDP transport. Connect does not establish a physical connection to remote host, but sets
the default values for internal member variables used during FSP protocol exchanges.

Connect sets the value of the ServerMaxPacketSize ( 734) property to the value DEF_MAXSIZE ( 3190).

Use the Version ( 729) method determine the capabilities implemented on the remote FSP connection.

Use the Disconnect ( 720) method to free any buffer space allocated for the FSP client, and to send ( 2517) the CC_BYE (
3139) command used in the FSP protocol.

Connect calls the inherited Connect method prior to exiting from the method.

See Also
ServerMaxPacketSize ( 734)

DEF_MAXSIZE ( 3190)

CC_BYE ( 3139)

Disconnect ( 720)

Version ( 729)

TIdFSP.Delete Method
Deletes a specified file on the remote FSP host.

Pascal
procedure Delete(
const AFilename: string
);
Parameters
Parameters Description
AFilename File name to delete on the remote FSP host.

Description
Delete is a procedure used to delete the file specified in AFilename on the remote FSP host. Delete calls the SendCmd method
using the FSP CC_DEL_FILE ( 3143) command and the null-terminated value in AFilename.

Delete can raise a EIdFSPProtException ( 87) exception if the file in AFilename does not represent a valid exisitng file name on
the remote FSP host.

Use Get ( 720) to retrieve a fileon the FSP host.

Use Put ( 726) to store a file on the FSP host.

See Also
SendCmd

Get ( 720)

Put ( 726)

TIdFSP.Destroy Destructor
Frees the object instance.

Internet Direct (Indy) Version 10.1.5 719


TIdFSP Class Classes

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy calls Disconnect ( 720) to free any buffer space allocated in the FSP client, and frees resources allocated to properties
and members in the object instance.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
DirInfo ( 731)

DirectoryListing ( 731)

StatInfo ( 735)

TIdFSP.Disconnect Method
Closes an existing existing FSP session.

Pascal
procedure Disconnect; override;
Description
Disconnect is an overridden procedure used to close an existing FSP session. Since FSP is a connection-less protocol based on
UDP datagrams, there is no physical connection to a remote system that needs to be closed. The FSP client does, however,
maintain an internal boolean flag that indicates if an FSP session has been initialized by calling the Connect ( 718) method.

If a previous FSP session has been established, Disconnect send ( 2517) the FSP CC_BYE ( 3139) command to signal its'
intention to the remote FSP host. Disconnect calls the inherited Disconnect method.

Disconnect clears the internal flag indicating that an FSP session has been established.

Use Connect ( 718) to establish a new FSP session for a specified remote FSP host.

See Also
Connect ( 718)

Destroy ( 719)

TIdFSP.Get Method
Overload List

Method Description
TIdFSP.Get (string, string, boolean, Retrieves a file from the remote FSP host.
Boolean) ( 721)
TIdFSP.Get (string, TIdStream, Retrieves a file from the remote FSP host.
Boolean) ( 720)

TIdFSP.Get Method (string, TIdStream, Boolean)


Retrieves a file from the remote FSP host.

Pascal
procedure Get(
const ASourceFile: string;
ADest: TIdStream;
AResume: Boolean = false

720 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

); overload;
Parameters
Parameters Description
ASourceFile File name on the remote FSP host.
ADest Stream used to store the contents of the retrieved file.
AResume The operation can be resumed from its current position.

Description
Get is an overloaded procedure used to retreive the file specified in ASourceFile from the remote FSP host.

ADest is a TIdStream ( 3087) descendant used to store the contents of the retrieved file on the local file system. The stream may
be a TFileCreateStream ( 212) instance when file content is overwritten and not resumed. The stream may be a
TAppendFileStream ( 188) instance when file content is not overwritten and resumed from its current position.

AResume indicates if the retrieval operation can be resumed from its current position in the stream (based on the exisiting contents
of the local file in ADestFile).

When AResume contains True, the current stream position is included in the packet for the FSP request. When AResume contains
False, the file position in the packet for the FSP request is set to 0 (zero).

Get constructs the TIdFSPPacket ( 749) instance required in the FSP protocol request using the optimal buffer size indicated by
the ClientMaxPacketSize ( 730) and ServerMaxPacketSize ( 734) properties (including the required 12-byte header).

Get iteratively calls SendCmd using the packet for the FSP request, and captures the packet from the FSP response. If the FSP
response packet contains data for the file, it is written to the stream specified in ADest. The process is repeated until all data is read
for the requested file.

Gets signals the OnWorkBegin ( 732), OnWork ( 732), and OnWorkEnd ( 733) event handlers during processing of response
packets in the FSP protocol exchange. OnWork ( 732) is signalled with the number of bytes from an FSP response packet that
represent actual data stored in ADest.

Use OnSend ( 739) and OnRecv ( 738) to perform actions required when FSP protocol packets are sent or received.

Use Put ( 726) to store a file found on the local file system to a specific path on the remote FSP host.

See Also
Get

Put ( 726)

TIdStream ( 3087)

TFileCreateStream ( 212)

TAppendFileStream ( 188)

TIdFSPPacket ( 749)

OnWork ( 732)

OnWorkBegin ( 732)

OnWorkEnd ( 733)

OnSend ( 739)

OnRecv ( 738)

TIdFSP.Get Method (string, string, boolean, Boolean)


Retrieves a file from the remote FSP host.

Pascal
procedure Get(
const ASourceFile: string;
const ADestFile: string;
const ACanOverwrite: boolean = false;

Internet Direct (Indy) Version 10.1.5 721


TIdFSP Class Classes

AResume: Boolean = false


); overload;
Parameters
Parameters Description
ASourceFile File name on the remote FSP host.
ADestFile File name on the local file system.
ACanOverwrite File can be overwritten on the local file system. The default value is false.
AResume The operation can be resumed from its current position. The default value is false.

Description
Get is an overloaded procedure used to retreive the file specified in ASourceFile from the remote FSP host.

ADestFile indicates the path and file name to use when storing the file on the local file system.

ACanOverwrite indicates if the file can be overwritten on the local file system. The default value is false.

AResume indicates if the retrieval operation can be resumed from its current position (based on the exisiting contents of the local
file in ADestFile). The default value is false.

Values in ACanOverwrite and AResume determine if an existing file with the name specififed in ADestFile is deleted prior to
retriveing the specified file.

Get constructs the TIdFSPPacket ( 749) instance required in the FSP protocol request using the maximum buffer size indicated by
the ClientMaxPacketSize ( 730) and ServerMaxPacketSize ( 734) properties (including the required 12-byte header).

Get creates an instance of a TIdStream ( 3087) descendant used internally to capture the content retrieved for the requested file.
The stream will be a TFileCreateStream ( 212) instance when file content is overwritten and not resumed. The stream will be a
TAppendFileStream ( 188) instance when file content is not overwritten and resumed from its current position.

Get can raise an EIdFSPFileAlreadyExists ( 86) exception ACanOverwrite and AResume both contain the value True.

Get calls the overloaded variant of the Get method using the internal TIdStream ( 3087) instance. The stream instance is freed
prior to exiting from the method.

Use Put ( 726) to store a file found on the local file system to a specific path on the remote FSP host.

Exceptions
Exceptions Description
EIdFSPFileAlreadyExists ( 86) Raised with the message RSDestinationFileAlreadyExists.

See Also
Get

Put ( 726)

TIdStream ( 3087)

TFileCreateStream ( 212)

TAppendFileStream ( 188)

EIdFSPFileAlreadyExists ( 86)

RSDestinationFileAlreadyExists

TIdFSP.GetDirInfo Method
Overload List

Method Description
TIdFSP.GetDirInfo (String) ( 723) Retrieves directory and file permissions for the specified directory.
TIdFSP.GetDirInfo (String, Retrieves directory and file permissions for the specified directory.
TIdFSPDirInfo) ( 723)

722 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

TIdFSP.GetDirInfo Method (String)


Retrieves directory and file permissions for the specified directory.

Pascal
procedure GetDirInfo(
const ADIR: String
); overload;
Parameters
Parameters Description
ADIR Directory name of the remote FSP host.

Description
GetDirInfo is an overloaded method used to get ( 720) directory and file permissions on the remote FSP host for the directory
name specified in ADir.

GetDirInfo calls the overloaded GetDirInfo method usind the TIdFSPDirInfo ( 739) instance assigned to the FSP client.

See Also
GetDirInfo

TIdFSPDirInfo ( 739)

TIdFSP.GetDirInfo Method (String, TIdFSPDirInfo)


Retrieves directory and file permissions for the specified directory.

Pascal
procedure GetDirInfo(
const ADIR: String;
ADirInfo: TIdFSPDirInfo
); overload;
Parameters
Parameters Description
ADIR Directory name of the remote FSP host.
ADirInfo Storage for the directory permission flags.

Description
GetDirInfo is an overloaded method used to access and store directory and file permissions on the remote FSP host for the
directory name specified in ADir.

ADirInfo is the TIdFSPDirInfo ( 739) instance to use for storing the permission flags retrieve in the FSP protocol exchange.

GetDirInfo calls SendCmd using the FSP CC_GET_PRO ( 3149) command, and parses the contents of the FSP response packet
to capture the values for the TIdFSPDirInfo ( 739) instance.

Please note that, at the current time, the FSP client does not implement setting directory permission flags for directories owned by
the client.

See Also
GetDirInfo

TIdFSPDirInfo ( 739)

SendCmd

TIdFSP.GetStatInfo Method
Gets status and statistical information for a file or directory.

Internet Direct (Indy) Version 10.1.5 723


TIdFSP Class Classes

Pascal
procedure GetStatInfo(
const APath: String
);
Parameters
Parameters Description
APath File name or directory path on the remote FSP host.

Description
GetStatInfo is a procedure used to get ( 720) status and statistical information about the file or directory specified in APath.

GetStatInfo calls SendCmd using the FSP CC_STAT ( 3162) command, and parses data from the FSP response packet into the
StatInfo ( 735) property for the FSP client. StatInfo ( 735) will contain information about the type of item requested (file or
directory), and optionally the file size and file modification date (in local and UTC timezones).

GetStatInfo can raise an EIdFSPFileNotFound ( 86) exception when APath represents a file that does not exist on the remote FSP
host.

Use GetDirInfo ( 723) and DirInfo ( 731) to access file and directory permissions on the remote FSP host.

Exceptions
Exceptions Description
EIdFSPFileNotFound ( 86) Raised with the message RSFSPNotFound when the requested file does not exist on the remote FSP host.

See Also
SendCmd

TIdFSPPacket ( 749)

StatInfo ( 735)

EIdFSPFileNotFound ( 86)

RSFSPNotFound

TIdFSP.List Method
Overload List

Method Description
TIdFSP.List () ( 724) Retrieves a directory listing from the remote FSP host.
TIdFSP.List (string) ( 725) Retrieves a directory listing for a specific directory from the remote FSP host.

TIdFSP.List Method ()
Retrieves a directory listing from the remote FSP host.

Pascal
procedure List; overload;
Description
List is an overloaded method used to retrieve a directory listing from the remote FSP host. List calls an overloaded variant if the
method using the root directory ('/') for the directory name.

Use the DirectoryListing ( 731) property to access the container with the structured directory listing created from values in the FSP
response packet.

See Also
List

DirectoryListing ( 731)

724 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

TIdFSP.List Method (string)


Retrieves a directory listing for a specific directory from the remote FSP host.

Pascal
procedure List(
const ASpecifier: string
); overload;
Parameters
Parameters Description
ASpecifier Directory specifier on the remote FSP host.

Description
List is an overloaded method used to retrieve a directory listing from the remote FSP host for the directory specified in ASpecifier.
ASpecifier can contain a relative path that uses UNIX ( 4539)-style path delimiters, such as:

/ (Root directory)
/pub

When ASpecifier contains an empty string (''), a default value is used that represents the root directory ('/').

List creates the TIdFSPPacket ( 749) instance representing the packet for FSP protocol request using the maximum packet size
and preferred packet payload size indicated in ClientMaxPacketSize ( 730) and ServerMaxPacketSize ( 734).

List calls SendCmd using the TIdFSPPacket ( 749) instance for the FSP CC_GET_DIR ( 3146) command.

List clears any existing entries in the DirectoryListing ( 731) property prior to and capturing and parsing one or more packets from
FSP protocol responses.

List calls the ParseEntries method for the TIdFSPListItems ( 745) collection in DirectoryListing ( 731) to perform parsing of data
in the FSP repponse packet.

Use the DirectoryListing ( 731) property to access the container with the structured directory listing created from values in the FSP
response packet.

Use StatInfo ( 735) to access status and statisical information that may be present in the FSP response packet.

See Also
List

DirectoryListing ( 731)

StatInfo ( 735)

TIdFSPPacket ( 749)

ClientMaxPacketSize ( 730)

ServerMaxPacketSize ( 734)

SendCmd

TIdFSPListItems ( 745)

TIdFSPListItem ( 744)

TIdFSP.MakeDir Method
Creates a new directory on the remote FSP host.

Pascal
procedure MakeDir(

Internet Direct (Indy) Version 10.1.5 725


TIdFSP Class Classes

const ADirName: string


);
Parameters
Parameters Description
ADirName Directory name to create ( 267) on the remote FSP host.

Description
MakeDir is a procedure used to create ( 267) a new directory with the name specified in ADirName on the remote FSP host.

MakeDir calls SendCmd using the FSP CC_MAKE_DIR ( 3158) command and the argument specified in ADirName. MakeDir
parses directory information in the FSP response packet, and stores the values in the DirInfo ( 731) property.

Use DirInfo ( 731) to access directory metadata populated using values in the FSP protocol response.

Please note that the remote FSP must include directory creation privileges for the specified directory or an EIdFSPProtException (
87) will be raised.

Use RemoveDir ( 728) to remove a directory on the remote FSP host.

Exceptions
Exceptions Description
EIdFSPProtException ( 87) Raised with the data from the FSP response packet.

See Also
Send ( 2517)

EIdProtocolResponseError

TIdFSP.Put Method
Overload List

Method Description
TIdFSP.Put (string, string) ( 727) Stores a copy of a file from the local file system on the remote FSP host.
TIdFSP.Put (TIdStream, string, Stores a copy of a file from the local file system on the remote FSP host.
TIdDateTime) ( 726)

TIdFSP.Put Method (TIdStream, string, TIdDateTime)


Stores a copy of a file from the local file system on the remote FSP host.

Pascal
procedure Put(
const ASource: TIdStream;
const ADestFile: string;
const AGMTTime: TIdDateTime = 0
); overload;
Parameters
Parameters Description
ASource Stream with the contents of a file on the local file system.
ADestFile Relative path and file name where the file will be stored on the remote FSP host.
AGMTTime Last modification timestamp in GMT for the file on the local file system. The default value is 0.

Description
Put is an overloaded method used to store a copy of a file from the local file system on the remote FSP host.

ASource is a TIdStream ( 3087) descendant with the contents of a file on the local file system. Applications must create ( 267) a
stream instance to pass an as argument when using the stream-based variant of the method.

ADestFile contains the relative path and file name where the file will be stored on the remote FSP host.

726 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

AGMTTime contains the last modification timestamp in GMT for the file on the local file system. The default value is 0, and indicates
that the last modification timestamp is ignored.

Put constructs FSP protocol packets required for the request using the maximum buffer and preferred payload sizes indicated in the
ClientMaxPacketSize ( 730) and ServerMaxPacketSize ( 734) properties. Put iteratively calls the SendCmd method using the
FSP CC_UP_LOAD ( 3165) command and values read from the stream indicated in ASource until all data in the stream has been
sent to the remote host. After passing the content of the file, Put calls SendCmd using the FSP CC_INSTALL ( 3155) command
with the values in ADestFile and AGMTTime to make the uploaded file available on the remote FSP host.

Calling Put can result in an EIdFSPProtException ( 87) exception being raised if the file specified in ADestFile already exists on
the remote FSP host.

Use Get ( 720) to retreive a file stored on the remote FSP host.

Exceptions
Exceptions Description
EIdFSPProtException ( 87) Raised with the contents of the FSP packet response when the file already exists on the remote host.

See Also
Put

SendCmd

ClientMaxPacketSize ( 730)

ServerMaxPacketSize ( 734)

EIdFSPProtException ( 87)

TIdFSPPacket ( 749)

TIdStream ( 3087)

TIdFSP.Put Method (string, string)


Stores a copy of a file from the local file system on the remote FSP host.

Pascal
procedure Put(
const ASourceFile: string;
const ADestFile: string = ''
); overload;
Parameters
Parameters Description
ASourceFile Local file path and name to store on the remote FSP host.
ADestFile Relative path and file name where the file will be stored on the remote FSP host.

Description
Put is an overloaded method used to store a copy of a file from the local file system on the remote FSP host.

ASourceFile indicates the name of the file on the local file system, and may include drive and directory information in the file name.

ADestFile is the name of file to use when storing the content on the remote FSP host, and may include a relative path in the file
name specification.

When ADestFile is omitted (or contains an empty string), the file name without drive or directory information is used as the value for
ADestFile. To store a file using a specific relative path, the value in ADestFile must be passed as an explicit argument.

Put creates a TReadFileNonExclusiveStream ( 2677) instance using the value in ASourceFile that reads the file content on the
local file system. Put calls the overloaded method using the stream instance and the file modification timestamp (expressed in the
GMT timezone) to store the file on the remote FSP host. The TReadFileNonExclusiveStream ( 2677) instance is freed prior to
exiting frm the method.

Calling Put can result in an EIdFSPProtException ( 87) exception being raised if the file specified in ADestFile already exists on
the remote FSP host.

Internet Direct (Indy) Version 10.1.5 727


TIdFSP Class Classes

Use Get ( 720) to retreive a file stored on the remote FSP host.

Exceptions
Exceptions Description
EIdFSPProtException ( 87) Raised with the contents of the FSP packet response when the file already exists on the remote host.

See Also
Get ( 720)

Put

EIdFSPProtException ( 87)

TReadFileNonExclusiveStream ( 2677)

TIdFSP.RemoveDir Method
Removes a directory on the remote FSP host.

Pascal
procedure RemoveDir(
const ADirName: string
);
Parameters
Parameters Description
ADirName Directory to delete ( 719) on the remote FSP host.

Description
RemoveDir is a procedure used to delete ( 719) or remove the directory specified in ADirName on the remote FSP host.
RemoveDir calls the SendCmd method using the FSP CC_DEL_DIR ( 3142) command and the value specified in ADirName to
peform the request.

Calling RemoveDir can result in an EIdFSPProtException ( 87) exception being raised if the specified directory does not exist on
the remote FSP host, or when the user does not have permissions to remove the directory.

Exceptions
Exceptions Description
EIdFSPProtException ( 87) Raised with the contents of the FSP packet response when the directory does not exist, or the user does not
have directory removal permissions.
Use MakeDir ( 725) to create ( 267) a directory on the remote FSP host.

See Also
EIdFSPProtException ( 87)

SendCmd

MakeDir ( 725)

TIdFSP.Rename Method
Renames an existing file on the remote FSP host.

Pascal
procedure Rename(
const ASourceFile: string;
const ADestFile: string
);
Parameters
Parameters Description
ASourceFile The existing file name on the remote FSP host.
ADestFile The new file name on the remote FSP host.

728 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

Description
Rename is a procedure used to rename an existing file on the remote FSP host.

ASourceFile contains the existing file name on the remote FSP host.

ADestFile indicates the new file name to use on the remote FSP host.

Rename calls the SendCmd method using the FSP CC_RENAME ( 3159) command and the file name arguments specified in
ASourceFile and ADestFile.

Calling Rename can result in an EIdFSPProtException ( 87) exception being raised if the rename operation using the specified file
names would result in an error; either ASourceFile does not exist on the remote FSP host, or ADestFile already exists. The
exception may also be raised if the user does not have permissions to renames files in the remote directory.

Use Delete ( 719) to remove a file on the remote FSP host.

Use Put ( 726) or Get ( 720) to send ( 2517) or receive files between the local file system and the remote FSP host.

Exceptions
Exceptions Description
EIdFSPProtException ( 87) Raised when the file names are invcalid for the operation, or the user not have permissions to renames files in
the remote directory.

See Also
EIdFSPProtException ( 87)

SendCmd

Delete ( 719)

Put ( 726)

Get ( 720)

TIdFSP.Version Method
Captures and stores information about the configuration of the remote FSP host for the session.

Pascal
procedure Version;
Description
Version is a procedure used to capture and store information about the configuration of the remote FSP host for the session. Use
the Version method after calling Connect ( 718).

Please note that some FSP do not respond to the CC_VERSION ( 3167) command; this command is used by FSP scanners and
some servers do not wishes to be detected.

Version captures and stores values from the FSP protocol response packet in properties for the client, including:

SystemDesc ( 736)
SystemServerLogs ( 737)
SystemReadOnly ( 736)
SystemReverseLookupRequired ( 737)
SystemPrivateMode ( 736)
ThruputControl ( 738)
SystemAcceptsExtraData ( 735)
ServerMaxThruPut ( 734)
ServerMaxPacketSize ( 734)

Internet Direct (Indy) Version 10.1.5 729


TIdFSP Class Classes

See Also
Connect ( 718)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

ThruputControl ( 738)

SystemAcceptsExtraData ( 735)

ServerMaxThruPut ( 734)

ServerMaxPacketSize ( 734)

TIdFSP Properties
The Properties of the TIdFSP class are listed here.

Properties
Property Description
ClientMaxPacketSize ( 730) Represents the maximum size for client packets in FSP protocol exchanges.
DirectoryListing ( 731) Structured directory listing for files and directories on the FSP host.
DirInfo ( 731) Provides access to action and permission flags for a directory on the remote FSP host.
OnWork ( 732) Event handler signalled when FSP packets containing file data are received.
OnWorkBegin ( 732) Event handler signalled prior to processing packets in an FSP protocol exchange.
OnWorkEnd ( 733) Event handler signalled after processing packets in an FSP protocol exchange.
Port ( 734) Port number used in FSP protocol exchanges.
ServerMaxPacketSize ( 734) Represents the maximum size for packets from the server in FSP protocol exchanges.
ServerMaxThruPut ( 734) Maximum server thoughput (in bytes per second) allowed for connections to the FSP server.
StatInfo ( 735) Stores status and statistical information about a file or directory on the remote FSP host.
SystemAcceptsExtraData ( 735) Indicates if the remote FSP host accepts Extra Data values in packets for FSP protocol exchanges.
SystemDesc ( 736) Description of the remote FSP host.
SystemPrivateMode ( 736) Indicates if the remote FSP host is operating in Private mode.
SystemReadOnly ( 736) Indicates if the remote FSP host is operating in Read-Only mode.
SystemReverseLookupRequired ( 737) Indicates if a reverse-lookup is required for connections to the remote FSP host.
SystemServerLogs ( 737) Indicates if the remote FSP host performs logging operations.
ThruputControl ( 738) Indicates if the remote FSP host implements throughput control.

Legend
Property
read only

TIdFSP.ClientMaxPacketSize Property
Represents the maximum size for client packets in FSP protocol exchanges.

Pascal
property ClientMaxPacketSize: Word;
Description
ClientMaxPacketSize is a Word property that represents the maximum packet size on the client to support in FSP protocol
exchanges.

ClientMaxPacketSize is used in conjunction with ServerMaxPacketSize ( 734) to determine the buffer size allocated for UDP
packets exchanged in methods implementing the various FSP commands.

730 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

ClientMaxPacketSize is also used to determine the amount of space available for the payload (non-header values) contained in
FSP packets.

The default value for ClientMaxPacketSize is DEF_MAXSIZE ( 3190), as assigned during initialization of the component.
Changing the value in ClientMaxPacketSize can result in an EIdFSPPacketTooSmall ( 87) being raised when the new property
value is smaller than 512 bytes; 500 bytes is the minimum pack set size for the client and 12 additional bytes are required for the
FSP header.

Exceptions
Exceptions Description
EIdFSPPacketTooSmall ( 87) Raised with the message RSFSPPacketTooSmall when changing the property to a value smaller than 512
bytes.

See Also
ServerMaxPacketSize ( 734)

DEF_MAXSIZE ( 3190)

EIdFSPPacketTooSmall ( 87)

TIdFSP.DirectoryListing Property
Structured directory listing for files and directories on the FSP host.

Pascal
property DirectoryListing: TIdFSPListItems;
Description
DirectoryListing is a read-only TIdFSPListItems ( 745) property used to store a structured directory listing for files on the remote
FSP host. DirectoryListing provides access to existing files on the FSP host using the indexed Items property in the collection.

The contents of the DirectoryListing property are maintained and parsed when the FSP client receives an FSP protocol response in
the List ( 724) method.

Use DirInfo ( 731) to access directory metadata populated using GetDirInfo ( 723).

Use StatInfo ( 735) to access file and directory statisical information populated using GetStatInfo ( 723).

See Also
TIdFSPListItems ( 745)

TIdFSPListItem ( 744)

List ( 724)

DirInfo ( 731)

GetDirInfo ( 723)

StatInfo ( 735)

GetStatInfo ( 723)

TIdFSP.DirInfo Property
Provides access to action and permission flags for a directory on the remote FSP host.

Pascal
property DirInfo: TIdFSPDirInfo;
Description
DirInfo is a read-only TIdFSPDirInfo ( 739) property used to access information about a directory on the remote FSP connection.
DirInfo contains boolean flags that indicate actions and access permissions allowed for a specific directory, including:

Internet Direct (Indy) Version 10.1.5 731


TIdFSP Class Classes

Flag Description
OwnsDir Client owns the directory
CanDeleteFiles Files can be deleted from this directory
CanAddFiles Files can be added to this directory
CanMakeDir New subdirectories can be created
OnlyOwnerCanReadFiles Files are NOT readable by non-owners
HasReadMe Directory contain a readme file
CanBeListed Directory can be listed
CanRenameFiles Files can be renamed in this directory

Values in DirInfo are updated when the application calls one of the overloaded GetDirInfo ( 723) methods. Data returned in the
response packet for the FSP CC_GET_PRO ( 3149) command is parsed and stored in the DirInfo object instance.

Please note that, at the present time, TIdFSP ( 713) does not implement setting DirInfo values on the remote FSP host using the
FSP CC_SET_PRO ( 3161) command.

See Also
TIdFSPDirInfo ( 739)

GetDirInfo ( 723)

TIdFSP.OnWork Event
Event handler signalled when FSP packets containing file data are received.

Pascal
property OnWork;
Description
OnWork is a published TWorkEvent ( 3121) property that represents the event handler signalled when FSP packets containing file
data are received. OnWork is signalled when the values from an FSP packet are written to the stream used for a file in the Get (
720) method.

Use OnWorkBegin ( 732) and OnWorkEnd ( 733) to respond to events triggered both before and after processing of packets in
the FSP protocol responses received in the Get ( 720) method.

Applications must assign procedures to the OnWorkBegin ( 732), OnWork, and OnWorkEnd ( 733) event handlers to allow
responding to the event notifications.

See Also
Get ( 720)

OnWorkBegin ( 732)

OnWorkEnd ( 733)

TWorkEvent ( 3121)

TIdFSP.OnWorkBegin Event
Event handler signalled prior to processing packets in an FSP protocol exchange.

Pascal
property OnWorkBegin;

732 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

Description
OnWorkBegin is a published TWorkBeginEvent ( 3120) property that represents the event handler signalled prior to processing
packets in an FSP protocol exchange.

Arguments passed to the event handler identify the FSP client and the TWorkMode ( 2990) for the event notification.

OnWorkBegin, OnWork ( 732), and OnWorkEnd ( 733) are signalled during processing of FSP packets in the Get ( 720)
method containing file data.

Use OnWorkEnd ( 733) to respond to the event notification following processing of packets in an FSP protocol exchange.

Use OnSend ( 739) and OnRecv ( 738) to respond to events triggered when raw unprocessed FSP packets are sent or received
using the FSP client.

See Also
OnWorkBegin

OnWork ( 732)

OnWorkEnd ( 733)

OnSend ( 739)

OnRecv ( 738)

Get ( 720)

TWorkBeginEvent ( 3120)

TWorkMode ( 2990)

TIdFSP.OnWorkEnd Event
Event handler signalled after processing packets in an FSP protocol exchange.

Pascal
property OnWorkEnd;
Description
OnWorkEnd is a published TWorkEndEvent ( 3121) property that represents the event handler signalled after processing packets
in an FSP protocol exchange.

Arguments passed to the event handler identify the FSP client and the TWorkMode ( 2990) for the event notification.

OnWorkBegin ( 732), OnWork ( 732), and OnWorkEnd are signalled during processing of FSP packets in the Get ( 720)
method when the response packets contain file data.

Use OnWorkEnd to respond to the event notification following processing of packets in an FSP protocol exchange.

Use OnSend ( 739) and OnRecv ( 738) to respond to events triggered when raw unprocessed FSP packets are sent or received
using the FSP client.

See Also
OnWorkBegin ( 732)

OnWork ( 732)

OnWorkEnd

OnSend ( 739)

OnRecv ( 738)

TWorkBeginEvent ( 3120)

TWorkMode ( 2990)

Get ( 720)

Internet Direct (Indy) Version 10.1.5 733


TIdFSP Class Classes

TIdFSP.Port Property
Port number used in FSP protocol exchanges.

Pascal
property Port;
Description
Port is a published property that represents the port number used in FSP protocol transmissions.

The default value for Port is IdPORT_FSP ( 3998), as assigned during initialization of the component. Application can change the
value in Port proper to calling Connect ( 718) to establish the FSP session.

See Also
IdPORT_FSP ( 3998)

Port

TIdFSP.ServerMaxPacketSize Property
Represents the maximum size for packets from the server in FSP protocol exchanges.

Pascal
property ServerMaxPacketSize: Word;
Description
ServerMaxPacketSize is a read-only Word property that represents the maximum packet size to expect from the server in FSP
protocol exchanges.

ServerMaxPacketSize is used in conjunction with ClientMaxPacketSize ( 730) to determine the buffer size allocated for UDP
packets exchanged in methods implementing the various FSP commands.

ClientMaxPacketSize ( 730) and ServerMaxPacketSize are also used to determine the amount of space available for the payload
(non-header values) contained in FSP packets.

The default value for ServerMaxPacketSize is DEF_MAXSIZE ( 3190), as assigned when establishing the FSP session in the
Connect ( 718) method. The value in ServerMaxPacketSize is updated using a value in the FSP protocol response returned in the
Version ( 729) method when ThruputControl ( 738) is enabled for the server implementation.

See Also
ClientMaxPacketSize ( 730)

SendCmd

ThruputControl ( 738)

DEF_MAXSIZE ( 3190)

TIdFSP.ServerMaxThruPut Property
Maximum server thoughput (in bytes per second) allowed for connections to the FSP server.

Pascal
property ServerMaxThruPut: Cardinal;
Description
ServerMaxThruPut is a read-only Cardinal property that indicates the maximum server thoughput (in bytes per second) allowed for
connections to the FSP server.

ServerMaxThruPut is updated after calling the Version ( 729) method using a value returned in an FSP protocol response. Both
ServerMaxThruPut and ServerMaxPacketSize ( 734) are updated when ThruputControl ( 738) is enabled on the remote FSP

734 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

server.

Please note that the current FSP client implementation does implement bandwidth throttling using the value in ServerMaxThruPut,
but it can be used for informational purposes.

See Also
ServerMaxPacketSize ( 734)

TIdFSP.StatInfo Property
Stores status and statistical information about a file or directory on the remote FSP host.

Pascal
property StatInfo: TIdFSPStatInfo;
Description
StatInfo is a read-only TIdFSPStatInfo ( 756) property used to store status and statistical information about a file or directory on
the remote FSP host.

StatInfo is populated using values returned in the FSP protocol response generated by calling the GetStatInfo ( 723) method.
StatInfo will contain information about the type of item requested (directory), and optionally the file size and file modification date (in
local and UTC timezones).

Use GetDirInfo ( 723) and DirInfo ( 731) to access file and directory permissions on the remote FSP host.

See Also
TIdFSPStatInfo ( 756)

GetStatInfo ( 723)

DirInfo ( 731)

GetDirInfo ( 723)

TIdFSP.SystemAcceptsExtraData Property
Indicates if the remote FSP host accepts Extra Data values in packets for FSP protocol exchanges.

Pascal
property SystemAcceptsExtraData: Boolean;
Description
SystemAcceptsExtraData is a read-only Boolean property that indicates if the remote FSP host accepts Extra Data values in
packets for FSP protocol exchanges.

SystemAcceptsExtraData is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

SystemAcceptsExtraData

Internet Direct (Indy) Version 10.1.5 735


TIdFSP Class Classes

TIdFSP.SystemDesc Property
Description of the remote FSP host.

Pascal
property SystemDesc: string;
Description
SystemDesc is a read-only string property that represents the description of the remote FSP host. SystemDesc generally contains
the FSP host name and version ( 729) information about the protocol and server software.

SystemDesc is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

SystemAcceptsExtraData ( 735)

TIdFSP.SystemPrivateMode Property
Indicates if the remote FSP host is operating in Private mode.

Pascal
property SystemPrivateMode: Boolean;
Description
SystemPrivateMode is a read-only Boolean property that indicates if the remote FSP host is operating in the Private mode for the
FSP protocol.

SystemPrivateMode is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode

SystemAcceptsExtraData ( 735)

TIdFSP.SystemReadOnly Property
Indicates if the remote FSP host is operating in Read-Only mode.

Pascal
property SystemReadOnly: Boolean;

736 Internet Direct (Indy) Version 10.1.5


Classes TIdFSP Class

Description
SystemReadOnly is a read-only Boolean property that indicates if the remote FSP host is operating in Read-Only mode.

SystemReadOnly is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

SystemAcceptsExtraData ( 735)

TIdFSP.SystemReverseLookupRequired Property
Indicates if a reverse-lookup is required for connections to the remote FSP host.

Pascal
property SystemReverseLookupRequired: Boolean;
Description
SystemReverseLookupRequired is a read-only Boolean property that indicates if a reverse-lookup is required for connections to the
remote FSP host.

SystemReverseLookupRequired is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired

SystemPrivateMode ( 736)

SystemAcceptsExtraData ( 735)

TIdFSP.SystemServerLogs Property
Indicates if the remote FSP host performs logging operations.

Pascal
property SystemServerLogs: Boolean;
Description
SystemServerLogs is a read-only Boolean property that indicates if the remote FSP host performs logging operations.

SystemServerLogs is updated in the Version ( 729) method to reflect the current FSP host configuration.

See Also
Version ( 729)

SystemDesc ( 736)

Internet Direct (Indy) Version 10.1.5 737


TIdFSP Class Classes

SystemServerLogs

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

SystemAcceptsExtraData ( 735)

TIdFSP.ThruputControl Property
Indicates if the remote FSP host implements throughput control.

Pascal
property ThruputControl: Boolean;
Description
ThruputControl is a read-only Boolean property that indicates if the remote FSP host implements throughput control.

ThruputControl is updated in the Version ( 729) method to reflect the current FSP host configuration. When ThruputControl
contains True, values in the ServerMaxThruPut ( 734) and ServerMaxPacketSize ( 734) properties will reflect the values from
the remote FSP host.

See Also
Version ( 729)

SystemDesc ( 736)

SystemServerLogs ( 737)

SystemReadOnly ( 736)

SystemReverseLookupRequired ( 737)

SystemPrivateMode ( 736)

SystemAcceptsExtraData ( 735)

ServerMaxThruPut ( 734)

ServerMaxPacketSize ( 734)

TIdFSP Events
The Events of the TIdFSP class are listed here.

Events
Event Description
OnRecv ( 738) Event handler signalled when an FSP packet is received.
OnSend ( 739) Event handler signalled when an FSP packet is sent.

Legend
Event

TIdFSP.OnRecv Event
Event handler signalled when an FSP packet is received.

Pascal
property OnRecv: TIdFSPLogEvent;

738 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPDirInfo Class

Description
OnRecv is a TIdFSPLogEvent ( 3027) property that represents the event handler signalled when a valid FSP packet is received
after sending a command in an FSP protocol exchange.

Arguments to the OnRecv event handler indicate the object instance for the notification and the TIdFSPPacket ( 749) instance
read during the FSP protocol exchange.

Use the OnWork ( 732), OnWorkBegin ( 732), and OnWorkEnd ( 733) event handlers to respond to events signalled when
retrieving the content of a file using the Get ( 720) method.

See Also
TIdFSPLogEvent ( 3027)

TIdFSPPacket ( 749)

OnWork ( 732)

OnWorkBegin ( 732)

OnWorkEnd ( 733)

Get ( 720)

TIdFSP.OnSend Event
Event handler signalled when an FSP packet is sent.

Pascal
property OnSend: TIdFSPLogEvent;
Description
OnSend is a TIdFSPLogEvent ( 3027) property that represents the event handler signalled after an FSP packet is sent. OnSend is
signalled when methods in the client that implement the commands in an FSP protocol exchange are called.

Arguments to the OnSend event handler indicate the object instance for the notification and the TIdFSPPacket ( 749) instance
written during the FSP protocol exchange.

Use the OnWork ( 732), OnWorkBegin ( 732), and OnWorkEnd ( 733) event handlers to respond to events signalled when
retrieving the content of a file using the Get ( 720) method.

See Also
TIdFSPLogEvent ( 3027)

TIdFSPPacket ( 749)

OnWork ( 732)

OnWorkBegin ( 732)

OnWorkEnd ( 733)

Get ( 720)

TIdFSPDirInfo Class
Represents permissions and capabilities for a directory on the remote FSP host.

File
IdFSP ( 4628)

Internet Direct (Indy) Version 10.1.5 739


TIdFSPDirInfo Class Classes

Hierarchy

Pascal
TIdFSPDirInfo = class(TObject);
Description
TIdFSPDirInfo is a TObject descendant that represents information about a directory on the remote FSP host. TIdFSPDirInfo
includes properties that indicate permissions and capabilities for the directory, including:

OwnsDir ( 743)
CanAddFiles ( 741)
CanDeleteFiles ( 741)
CanRenameFiles ( 742)
CanMakeDir ( 742)
OnlyOwnerCanReadFiles ( 743)
CanBeListed ( 741)
HasReadMe ( 742)
ReadMe ( 743)

Please note that FSP protocol server implementations prior to version 2.8.1b6 do not uses bits 6 and 7 returned in the FSP protocol
response. This allows the directory to be listable even it do not have 6th bit set.

Properties in TIdFSPDirInfo are updated when the FSP client performs commands that retrieve information for a specific directory,
or when the directory is create by the FSP client.

TIdFSPDirInfo is the type used to represent the DirInfo property in TIdFSP ( 713).

See Also
TIdFSP ( 713)

TIdFSPStatInfo ( 756)

TIdFSPDirInfo Members
The following tables list the members exposed by TIdFSPDirInfo.

Properties
Property Description
CanAddFiles ( 741) Indicates if files can be added to the directory on the remote FSP host.
CanBeListed ( 741) Indicates if files in the directory can be include in a directory listing.
CanDeleteFiles ( 741) Indicates if files in the directory on the remote FSP host can be deleted.
CanMakeDir ( 742) Indicates if new child directories can be created in the current directory on the remote FSP host.
CanRenameFiles ( 742) Indicates if files can be renamed in the directory on the remote FSP host.
HasReadMe ( 742) Indicates if the directory on the remote FSP host contains a README description.
OnlyOwnerCanReadFiles ( 743)
OwnsDir ( 743) Indicates if the FSP client owns the directory on the remote FSP host.
ReadMe ( 743) Contains descriptive information provided about a directory on the remote FSP host.

Legend
Property

740 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPDirInfo Class

TIdFSPDirInfo Properties
The Properties of the TIdFSPDirInfo class are listed here.

Properties
Property Description
CanAddFiles ( 741) Indicates if files can be added to the directory on the remote FSP host.
CanBeListed ( 741) Indicates if files in the directory can be include in a directory listing.
CanDeleteFiles ( 741) Indicates if files in the directory on the remote FSP host can be deleted.
CanMakeDir ( 742) Indicates if new child directories can be created in the current directory on the remote FSP host.
CanRenameFiles ( 742) Indicates if files can be renamed in the directory on the remote FSP host.
HasReadMe ( 742) Indicates if the directory on the remote FSP host contains a README description.
OnlyOwnerCanReadFiles ( 743)
OwnsDir ( 743) Indicates if the FSP client owns the directory on the remote FSP host.
ReadMe ( 743) Contains descriptive information provided about a directory on the remote FSP host.

Legend
Property

TIdFSPDirInfo.CanAddFiles Property
Indicates if files can be added to the directory on the remote FSP host.

Pascal
property CanAddFiles: Boolean;
Description
CanAddFiles is a Boolean property that indicates if files can be added to the directory on the remote FSP host.

Use CanDeleteFiles ( 741) and CanRenameFiles ( 742) to determine if files can be deleted or renamed in the directory on the
remote FSP host.

Use CanMakeDir ( 742) to determine if new child directories can be created in the specified directory on the remote FSP host.

See Also
CanDeleteFiles ( 741)

CanRenameFiles ( 742)

CanMakeDir ( 742)

TIdFSPDirInfo.CanBeListed Property
Indicates if files in the directory can be include in a directory listing.

Pascal
property CanBeListed: Boolean;
Description
CanBeListed is a Boolean property that indicates if files in the directory on the remote FSP host can be include in a directory listing.
When can be liste contains False, FSP clients will not be able to see any files in the directory.

TIdFSPDirInfo.CanDeleteFiles Property
Indicates if files in the directory on the remote FSP host can be deleted.

Pascal
property CanDeleteFiles: Boolean;

Internet Direct (Indy) Version 10.1.5 741


TIdFSPDirInfo Class Classes

Description
CanDeleteFiles is a Boolean property that indicates if files in the directory on the remote FSP host can be deleted.

Use CanAddFiles ( 741) and CanRenameFiles ( 742) to determine if files can be added or renamed in the directory on the
remote FSP host.

Use CanMakeDir ( 742) to determine if new child directories can be created in the specified directory on the remote FSP host.

Use OwnsDir ( 743) to determine if the directory on the remote FSP host is owned by the client.

See Also
CanAddFiles ( 741)

CanRenameFiles ( 742)

CanMakeDir ( 742)

OwnsDir ( 743)

TIdFSPDirInfo.CanMakeDir Property
Indicates if new child directories can be created in the current directory on the remote FSP host.

Pascal
property CanMakeDir: Boolean;
Description
CanMakeDir is a Boolean property that indicates if new child directories can be created in the current directory on the remote FSP
host.

Use OwnsDir ( 743) to determine the client owns the directory on the remote FSP host, and can remove it from the file system on
the FSP host.

See Also
OwnsDir ( 743)

TIdFSPDirInfo.CanRenameFiles Property
Indicates if files can be renamed in the directory on the remote FSP host.

Pascal
property CanRenameFiles: Boolean;
Description
CanRenameFiles is a Boolean property that indicates if files can be renamed in the directory on the remote FSP host.

Use CanAddFiles ( 741) and CanDeleteFiles ( 741) to determine if files can be added or deleted in the directory on the remote
FSP host.

See Also
CanAddFiles ( 741)

CanDeleteFiles ( 741)

TIdFSPDirInfo.HasReadMe Property
Indicates if the directory on the remote FSP host contains a README description.

Pascal
property HasReadMe: Boolean;

742 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPListItem Class

Description
HasReadMe is a Boolean property that indicates if the directory on the remote FSP host contains a README description. By
common convention, a readme is used to present helpful information about the contents of the directory. Use the ReadMe ( 743)
property to access the content of the description.

See Also
ReadMe ( 743)

TIdFSPDirInfo.OnlyOwnerCanReadFiles Property
Pascal
property OnlyOwnerCanReadFiles: Boolean;
Description
OnlyOwnerCanReadFiles is a Boolean property that indicates if files in the directory on the remote haost can be accessed by users
other than the owner of the directory.

When OnlyOwnerCanReadFiles contains True, and OwnDir contains false, the FSP client will not be able to access the content of
files in the directory.

See Also
OwnDir

TIdFSPDirInfo.OwnsDir Property
Indicates if the FSP client owns the directory on the remote FSP host.

Pascal
property OwnsDir: Boolean;
Description
OwnsDir is a Boolean property that indicates if the FSP client owns the directory on the remote FSP host.

OwnsDir is used to detemine file access permissions and directory removal permissions.

When OnlyOwnerCanReadFiles ( 743) contains True, and OwnDir contains false, the FSP client will not be able to access the
content of files in the directory.

When OwnDir contains false, the FSP client will not be able to remove the directory from the file system on the remote FSP host.

See Also
OnlyOwnerCanReadFiles ( 743)

TIdFSPDirInfo.ReadMe Property
Contains descriptive information provided about a directory on the remote FSP host.

Pascal
property ReadMe: String;
Description
ReadMe is a String property that represents the descriptive information provided about a directory on the remote FSP host.

ReadMe shopuld have a value when the HasReadMe ( 742) property contains True.

Internet Direct (Indy) Version 10.1.5 743


TIdFSPListItem Class Classes

TIdFSPListItem Class
Collection item for files added to the structured directory listing in the FSP client.

File
IdFSP ( 4628)

Hierarchy

Pascal
TIdFSPListItem = class(TIdFSPStatInfo);
Description
TIdFSPListItem is a TIdFSPStatInfo ( 756) descendant that implements a collection item used for files added to the structured
directory listing in the FSP client.

TIdFSPListItem extends the ancestor class by adding the FileName ( 744) property to the file size and modification information.

TIdFSPListItem is the type returned when creating or accessing entries maintained in the TIdFSPListItems ( 745) collection.

See Also
TIdFSPStatInfo ( 756)

TIdFSPListItem.FileName ( 744)

TIdFSPListItem Members
The following tables list the members exposed by TIdFSPListItem.

Properties
Property Description
FileName ( 744) Name of a file in the structured directory listing for a remote FSP host.
ItemType ( 757) Indicates the type of directory entry represented by the collection item.
ModifiedDate ( 758) Represents the last modification timestamp for the collection item.
ModifiedDateGMT ( 758) Represents the last modification timestamp for the collection item.
Size ( 759) Indicates the file size for the collection item.

Legend
Property

TIdFSPListItem Properties
The Properties of the TIdFSPListItem class are listed here.

Properties
Property Description
FileName ( 744) Name of a file in the structured directory listing for a remote FSP host.

Legend
Property

TIdFSPListItem.FileName Property
Name of a file in the structured directory listing for a remote FSP host.

744 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPListItems Class

Pascal
property FileName: string;
Description
FileName is a string property that represents a file name in the structured directory listing for a remote FSP host.

Use properties in the ancestor class to access the item type, size, and modification timestamp for an entry in the TIdFSPListItems
( 745) collection that contains the structured directory listing.

See Also
TIdFSPStatInfo ( 756)

TIdFSPListItems ( 745)

TIdFSPListItems Class
Implements a container for items that make up the structured directory listing in an FSP client.

File
IdFSP ( 4628)

Hierarchy

Pascal
TIdFSPListItems = class(TIdCollection);
Description
TIdFSPListItems is a TIdCollection ( 3011) descendant that implements a container for items that make up the structured directory
listing in an FSP client.

TIdFSPListItems provides indexed access to Items ( 748) in the collection returned as TIdFSPListItem ( 744) instances.
Additional methods are implmentetd to create ( 747) new collection Items ( 748) (Add ( 746)) and to locate a specific
TIdFSPListItem ( 744) in the collection (IndexOf ( 747)).

TIdFSPListItems also provides protected methods that implement read and write access to the Items ( 748) in the collection.

Finally, TIdFSPListItems implements the ParseEntries ( 747) method used to create ( 747) a new collection item entry using
values received in an FSP protocol response packet.

TIdFSPListItems is the type used to represent the DirectoryListing property in the TIdFSP ( 713) client.

See Also
TIdCollection ( 3011)

TIdFSPListItem ( 744)

TIdFSP.DirectoryListing ( 731)

TIdFSPListItems Members
The following tables list the members exposed by TIdFSPListItems.

Properties
Property Description
Items ( 748) Provides read and write access to items in the collection by their ordinal position.

Internet Direct (Indy) Version 10.1.5 745


TIdFSPListItems Class Classes

Methods
Method Description
Add ( 746) Creates and stores a new entry in the collection.
Create ( 747) Constructor for the collection.
IndexOf ( 747) Locates a specific collection item object instance in the collection.
ParseEntries ( 747) Create ( 747) and stores items in the collection using values received in an FSP protocol response.

Legend
Method
Property

TIdFSPListItems Methods
The Methods of the TIdFSPListItems class are listed here.

Methods
Method Description
Add ( 746) Creates and stores a new entry in the collection.
Create ( 747) Constructor for the collection.
IndexOf ( 747) Locates a specific collection item object instance in the collection.
ParseEntries ( 747) Create ( 747) and stores items in the collection using values received in an FSP protocol response.

Legend
Method

TIdFSPListItems.Add Method
Creates and stores a new entry in the collection.

Pascal
function Add: TIdFSPListItem;
Returns
TIdFSPListItem ( 744) - Item added to the collection.

Description
Add is a TIdFSPListItem ( 744) function used to create ( 747) and store a new entry in the collection.

Add calls the inherited Add method, and ensures that the return value is cast to the TIdFSPListItem ( 744) data type used for
Items ( 748) in the collection.

Assign values for properties in the collection item after calling Add.

Use the ParseEntries ( 747) method to create ( 747) and store one ore more items in the collection using the content returned in
an FSP protocol reponse.

Use IndexOf ( 747) to determine the ordinal position of a specific item in the collection.

Use Items ( 748) to access items in the collection by their ordinal position.

See Also
TIdFSPListItem ( 744)

ParseEntries ( 747)

IndexOf ( 747)

Items ( 748)

746 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPListItems Class

TIdFSPListItems.Create Constructor
Constructor for the collection.

Pascal
constructor Create; reintroduce;
Description
Create is the reintroduced constructor for the collection. Create calls the inherited constructor using TIdFSPListItem ( 744) as the
class reference for items added to the collection.

See Also
TIdFSPListItem ( 744)

TIdFSPListItems.IndexOf Method
Locates a specific collection item object instance in the collection.

Pascal
function IndexOf(
AItem: TIdFSPListItem
): Integer;
Parameters
Parameters Description
AItem Item to locate in the collection.

Returns
Integer - Ordinal position of the object instance in the collection.

Description
IndexOf is an Integer function used to locate a specific TIdFSPListItem ( 744) object instance in the Items ( 748) for the
collection.

AItem is the collection item to locate in the container.

The return value for the method is the zero-based ordinal position of the collection item, or -1 when AItem does not exist in the
Items ( 748) for the collection. The return value is determined by iterating over all of the Items ( 748) in the collection until a
match is found.

Use Items ( 748) to access the entries in the collection by their ordinal position.

See Also
Items ( 748)

TIdFSPListItem ( 744)

TIdFSPListItems.ParseEntries Method
Create ( 747) and stores items in the collection using values received in an FSP protocol response.

Pascal
function ParseEntries(
const AData: TIdBytes;
const ADataLen: Cardinal
): Boolean;
Parameters
Parameters Description
AData Bytes received in an FSP protocol response.

Internet Direct (Indy) Version 10.1.5 747


TIdFSPListItems Class Classes

ADataLen Length of the bytes received in the protocol response.

Returns
Boolean - True when the collection entries are successfully parsed from the protocol response.

Description
ParseEntries is a Boolean function used to create ( 747) and store items in the collection using values received in an FSP protocol
response.

AData is an arrayof bytes that contains values received in the FSP response. AData can contain one or more occurrances of file or
directory information returned from the remote FSP host.

ParseEntries calls the Add ( 746) method to create ( 747) a new item in the collection for each file or directory encountered in
AData.

When a file entry is detected in AData, the ItemType property in the TIdFSPListItem ( 744) instance is set to the value ditFile.
When a directory entry is detected in AData, the ItemType property in the TIdFSPListItem ( 744) instance is set to the value
ditDirectory. Other property values in the TIdListItem instance are parsed from AData, including the modification timestamp, file
size, and file name (when present).

ParseEntries returns True if all file and directory information in the FSP protocol response is successfully processed in the method.

ParseEntries is used in the List method for the FSP client to prepare the contents of its' structured DirectoryListing property.

See Also
TIdFSPListItem ( 744)

Add ( 746)

TIdBytes ( 3007)

ditFile

dirDirectory

TIdFSP.List ( 724)

TIdFSP.DirectoryListing ( 731)

TIdFSPListItems Properties
The Properties of the TIdFSPListItems class are listed here.

Properties
Property Description
Items ( 748) Provides read and write access to items in the collection by their ordinal position.

Legend
Property

TIdFSPListItems.Items Property
Provides read and write access to items in the collection by their ordinal position.

Pascal
property Items [AIndex: Integer]: TIdFSPListItem;
Description
Items is an indexed TIdFSPListItem ( 744) property that provides access to items in the collection by their zero-based ordinal
position in the container.

Items allows read and write access to the TIdFSPListItem ( 744) instances in the collection.

748 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPPacket Class

Items is the default property for the collection.

See Also
TIdFSPListItem ( 744)

TIdFSPPacket Class
Represents packets sent and received in FSP protocol exchanges.

File
IdFSP ( 4628)

Hierarchy

Pascal
TIdFSPPacket = class(TObject);
Description
TIdFSPPacket is a TObject descendant that represents packets sent and received in FSP protocol exchanges.

TIdFSPPacket includes properties that represent the command, identifier, and packet sequence for an FSP packet. Additional
propertiesrepresent the data, file position, byte count, and extra data for files sent or received using the FSP protocol.

TIdFSPPacket also includes methods need to read and write the binary values that make up an FSP packet.

Instances of TIdFSPPacket are created and used in methods in the TIdFSP ( 713) client that implement the various FSP protocol
commands.

See Also
TIdBytes ( 3007)

TIdFSPPacket Members
The following tables list the members exposed by TIdFSPPacket.

Properties
Property Description
Cmd ( 752) Command in the FSP packet.
Data ( 754) Binary contents of a packet used in an FSP protocol exchange.
DataLen ( 754) Length of the binary contents of the packet.
ExtraData ( 754) Represents the binary content for extra data used in FSP protocol exchanges.
FilePosition ( 755) Indicates the current offset into a data stream represented by the Data ( 754) in the packet.
Key ( 755) The unique identifier for the protocol response packet.
Sequence ( 756) Indicates the processing order for a packet in a multi-packet FSP protocol exchange.
Valid ( 756) Indicates if Data ( 754) in the packet is in the format required for the FSP protocol.

Methods
Method Description
Create ( 750) Constructor for the object instance.
ReadPacket ( 750) Reads property values from the binary content of a packet.
WritePacket ( 751) Forms the binary content for a packet used in an FSP protocol exchange.

Legend
Constructor
Property
read only

Internet Direct (Indy) Version 10.1.5 749


TIdFSPPacket Class Classes

TIdFSPPacket Methods
The Methods of the TIdFSPPacket class are listed here.

Methods
Method Description
Create ( 750) Constructor for the object instance.
ReadPacket ( 750) Reads property values from the binary content of a packet.
WritePacket ( 751) Forms the binary content for a packet used in an FSP protocol exchange.

Legend
Constructor

TIdFSPPacket.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the constructor for the object instance. Create calls the inherited constructor, and sets the default values for the properties
in the object instance.

TIdFSPPacket.ReadPacket Method
Reads property values from the binary content of a packet.

Pascal
procedure ReadPacket(
const AData: TIdBytes;
const ALen: Cardinal
);
Parameters
Parameters Description
AData Binary contents of the packet.
ALen Length of the binary contents of the packet.

Description
ReadPacket is a procedure used to extract values from the binary content of a packet in an FSP protocol exchange, and to store
the values in the properties for the object instance.

AData is the array of bytes that contain the Binary content for the packet.

ALen indicates the number of bytes to allocate for the buffer required to process the binary contents of the packet.

ReadPacket creates an internal TIdBuffer ( 279) instance used to process the binary packet content specified in AData.
Processing performed includes extracting values from AData that are assigned to the following properties:

Valid ( 756)
DataLen ( 754)
Cmd ( 752)
Key ( 755)
Sequence ( 756)
FilePosition ( 755)

750 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPPacket Class

Data ( 754)
ExtraData ( 754)

ReadPacket sets the value of the Valid ( 756) property to True when ALen is large enough to store the amount of Data ( 754)
indicated in the DataLen ( 754) from the packet, and the calculated checksum for values received in AData match the checksum
stored in the packet contents.

ReadPacket sets the length of the Data ( 754) property to match the value read for the DataLen ( 754) proprty.

Use WritePacket ( 751) to format the binary contents of the packet written to a remote FSP host.

See Also
Valid ( 756)

DataLen ( 754)

Cmd ( 752)

Key ( 755)

Sequence ( 756)

FilePosition ( 755)

Data ( 754)

ExtraData ( 754)

WritePacket ( 751)

TIdFSPPacket.WritePacket Method
Forms the binary content for a packet used in an FSP protocol exchange.

Pascal
function WritePacket: TIdBytes;
Returns
TIdBytes ( 3007) - Binary content of the packet formed using properties in the object instance.

Description
WritePacket is a TIdBytes ( 3007) function used to form the binary content for a packet used in an FSP protocol exchange.

WritePacket creates an internal TIdBuffer ( 279) instance used to capture the binary content in the packet, and to assign the
content top the return value for the method.

WritePacket ensures that the values in ExtraDataLen is updated to reflect the actual length of the ExtraData ( 754) property prior
to creating the binary content for the packet.

WritePacket copies the byte values for the following properties into the internal buffer for the method:

Cmd ( 752)
Key ( 755)
Sequence ( 756)
FilePosition ( 755)
DataLen ( 754)
Data ( 754)
ExtraDataLen
ExtraData ( 754)

Internet Direct (Indy) Version 10.1.5 751


TIdFSPPacket Class Classes

WritePacket calculates a checksum value for the contents of the Data ( 754) and ExtraData ( 754) properties and includes the
result in the binary content for the packet.

The bytes accumulated in the internal buffer are stored in the return value for the method, and the TIdBuffer ( 279) instance is
freed.

Use ReadPacket ( 750) to extract property values from the binary content for a packet.

See Also
Cmd ( 752)

Key ( 755)

Sequence ( 756)

FilePosition ( 755)

DataLen ( 754)

Data ( 754)

ExtraDataLen

ExtraData ( 754)

ReadPacket ( 750)

TIdFSPPacket Properties
The Properties of the TIdFSPPacket class are listed here.

Properties
Property Description
Cmd ( 752) Command in the FSP packet.
Data ( 754) Binary contents of a packet used in an FSP protocol exchange.
DataLen ( 754) Length of the binary contents of the packet.
ExtraData ( 754) Represents the binary content for extra data used in FSP protocol exchanges.
FilePosition ( 755) Indicates the current offset into a data stream represented by the Data ( 754) in the packet.
Key ( 755) The unique identifier for the protocol response packet.
Sequence ( 756) Indicates the processing order for a packet in a multi-packet FSP protocol exchange.
Valid ( 756) Indicates if Data ( 754) in the packet is in the format required for the FSP protocol.

Legend
Property
read only

TIdFSPPacket.Cmd Property
Command in the FSP packet.

Pascal
property Cmd: Byte;
Description
Cmd is a Byte property that specifies the FSP command represented in the contents of a packet used in an FSP protocol exchange.

Cmd contains one of the values defined in the FSP protocol, and represented in the Indy library using the following:

Constant Value Meaning


CC_VERSION ( 3167) $10 Get server version string and setup
CC_INFO ( 3153) $11 Return server's extended info block

752 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPPacket Class

CC_ERR ( 3145) $40 Error response from server


CC_GET_DIR ( 3146) $41 Get a directory listing
CC_GET_FILE ( 3148) $42 Get a file
CC_UP_LOAD ( 3165) $43 Open a file for writing
CC_INSTALL ( 3155) $44 Close and install file opened for writing
CC_DEL_FILE ( 3143) $45 Delete a file
CC_DEL_DIR ( 3142) $46 Delete a directory
CC_GET_PRO ( 3149) $47 Get directory protection
CC_SET_PRO ( 3161) $48 Set directory protection
CC_MAKE_DIR ( 3158) $49 Create ( 750) a directory
CC_BYE ( 3139) $4A Finish a session
CC_GRAB_FILE ( 3152) $4B Atomic get+delete a file
CC_GRAB_DONE ( $4C Atomic get+delete a file done
3151)
CC_STAT ( 3162) $4D Get information about file/directory
CC_RENAME ( 3159) $4E Rename file or directory
CC_CH_PASSW ( 3140) $4F Change password
CC_LIMIT ( 3156) $80 Commands > 0x7F will have extended header. No such extensions or commands which
uses that are known today. This header will be used in FSP protocol version 3.
CC_TEST ( 3164) $81; Reserved for testing of new header

Values in the Cmd property are assigned when the FSP client constructs the packet required for the methods that implement the
various protocol commands.

See Also
TIdFSP ( 713)

CC_VERSION ( 3167)

CC_INFO ( 3153)

CC_ERR ( 3145)

CC_GET_DIR ( 3146)

CC_GET_FILE ( 3148)

CC_UP_LOAD ( 3165)

CC_INSTALL ( 3155)

CC_DEL_FILE ( 3143)

CC_DEL_DIR ( 3142)

CC_GET_PRO ( 3149)

CC_SET_PRO ( 3161)

CC_MAKE_DIR ( 3158)

CC_BYE ( 3139)

CC_GRAB_FILE ( 3152)

CC_GRAB_DONE ( 3151)

CC_STAT ( 3162)

CC_RENAME ( 3159)

Internet Direct (Indy) Version 10.1.5 753


TIdFSPPacket Class Classes

CC_CH_PASSW ( 3140)

CC_LIMIT ( 3156)

CC_TEST ( 3164)

TIdFSPPacket.Data Property
Binary contents of a packet used in an FSP protocol exchange.

Pascal
property Data: TIdBytes;
Description
Data is a TIdBytes ( 3007) property that represents the binary content of the packet exchanged using the FSP protocol.

Values in Data are updated in methods in the FSP client that implement the various FSP commands using the formats specified in
the FSP protocol. These values are converted from properties to byte form when the WritePacket ( 751) method is called during
execution of the command on the FSP client.

Use ReadPacket ( 750) to convert byte values read in an FSP protocol response to their representation as properties in the object
instance.

See Also
TIdFSP.Get ( 720)

TIdFSP.Put ( 726)

TIdFSP.List ( 724)

TIdFSP.SendCmd

WritePacket ( 751)

ReadPacket ( 750)

TIdFSPPacket.DataLen Property
Length of the binary contents of the packet.

Pascal
property DataLen: Word;
Description
DataLen is a Cardinal property that represents the length of the binary content stored in the Data ( 754) property.

The value in DataLen is updated in methods in the FSP client that implement the various FSP commands using the formats
specified in the FSP protocol.

The value in DataLen is also used when WritePacket ( 751) is called to send the binary content of the packet to the remote FSP
host.

See Also
Data ( 754)

WritePacket ( 751)

TIdFSPPacket.ExtraData Property
Represents the binary content for extra data used in FSP protocol exchanges.

Pascal
property ExtraData: TIdBytes;

754 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPPacket Class

Description
ExtraData is a TIdBytes ( 3007) property that represents the binary content for extra data used in FSP protocol exchanges.
ExtraData generally represents values for the file size and last modification timestamp transmitted with commands that retrieve or
store files on the file system for the remote FSP host.

Values in ExtraData are used and updated in the SendCmd method on the FSP client.

Please note that ExtraData will not contains values when the remote FSP host does not implement ExtraData headers. Use the
Version method and the SystemAcceptsExtraData property in TIdFSP ( 713) to determine if values are included in the packets
exchanged with the remote FSP host.

See Also
TIdFSP.SendCmd

TIdFSP.SendCmdOnce

TIdFSP.Version ( 729)

TIdFSP.SystemAcceptsExtraData ( 735)

TIdFSPPacket.FilePosition Property
Indicates the current offset into a data stream represented by the Data ( 754) in the packet.

Pascal
property FilePosition: Cardinal;
Description
FilePosition is a Cardinal property that indicates the current offset for the Data ( 754) in the packet.

In the FSP protocol, small packet sizes are used when sending or receiving data in the FSP protocol exchange. As a result, several
packets may be required to fully transfer the content for CC_GET_FILE ( 3148), CC_GET_DIR ( 3146), CC_PUT_FILE, and
other FSP commands. FilePosition indicates the current offset into the complete data stream represented by the Data ( 754) in the
packet.

FilePosition is used in the WritePacket ( 751) and ReadPacket ( 750) methods when property values are converted to / from
their binary representations.

FilePosition is updated during execution of methods that implement the various commands using the logic specified in the FSP
protocol.

See Also
WritePacket ( 751)

ReadPacket ( 750)

TIdFSPPacket.Key Property
The unique identifier for the protocol response packet.

Pascal
property Key: Word;
Description
Key is a Word property that represents the unique identifier for the packet.

Packets sent from a remote FSP host include a vlaue in Key to prevent duplicate processing of packets in the FSP protocol
exchange.

The value in Key is read from the binary contents of the packet in the ReadPacket ( 750) method. The value in Key is written to
the binary contents of the packet in the WritePacket ( 751) method.

Internet Direct (Indy) Version 10.1.5 755


TIdFSPStatInfo Class Classes

Use Sequence ( 756) to determine the order for a packet having the specified Key received in response to an FSP command.

See Also
Cmd ( 752)

Sequence ( 756)

TIdFSPPacket.Sequence Property
Indicates the processing order for a packet in a multi-packet FSP protocol exchange.

Pascal
property Sequence: Word;
Description
Sequence is a Word property that indicate the processing order for a packet in a multi-packet FSP protocol exchange. Sequence
values originate with the value 1 (One) and increment by 1 (one) until all packets in the protocol request or response have been
transmitted.

Sequence is used to ensure that packets are received and processed in the correct order.

Use Key ( 755) to determine the unique identifier for a FSP protocol request or response.

See Also
Key ( 755)

TIdFSPPacket.Valid Property
Indicates if Data ( 754) in the packet is in the format required for the FSP protocol.

Pascal
property Valid: Boolean;
Description
Valid is a read-only Boolean property that indicates if Data ( 754) in the packet is in the format required for the FSP protocol and
matches the values tranmitted to/from the remote FSP host.

Valid contains True when the buffer used to process the packet is large enough to accomodate the DataLen ( 754) for the packet,
and when the calculated checksum for values received in Data ( 754) match the checksum stored in the packet contents.

The value in Valid is updated in the ReadPacket ( 750) method.

See Also
ReadPacket ( 750)

Data ( 754)

DataLen ( 754)

TIdFSPStatInfo Class
Implements the ancestor class for items maintained in the structured directory listing for the FSP client.

File
IdFSP ( 4628)

Hierarchy

756 Internet Direct (Indy) Version 10.1.5


Classes TIdFSPStatInfo Class

Pascal
TIdFSPStatInfo = class(TIdCollectionItem);
Description
TIdFSPStatInfo is a TIdCollectionItem ( 3011) descendant that implements the ancestor class for items maintained in the
structured directory listing for the FSP client.

TIdFSPStatInfo includes properties that indicate the type of entry (file or directory), and the size and last modification timestamp for
the directory entry.

TIdFSPStatInfo is the ancestor for the TIdFSPListItem ( 744) class used in the TIdFSPListItems ( 745) collection.

See Also
TIdCollectionItem ( 3011)

TIdFSPListItem ( 744)

TIdFSPListItems ( 745)

TIdDirItemType ( 2948)

TIdDateTime ( 4733)

TIdFSP.DirectoryListing ( 731)

TIdFSPStatInfo Members
The following tables list the members exposed by TIdFSPStatInfo.

Properties
Property Description
ItemType ( 757) Indicates the type of directory entry represented by the collection item.
ModifiedDate ( 758) Represents the last modification timestamp for the collection item.
ModifiedDateGMT ( 758) Represents the last modification timestamp for the collection item.
Size ( 759) Indicates the file size for the collection item.

Legend
Property

TIdFSPStatInfo Properties
The Properties of the TIdFSPStatInfo class are listed here.

Properties
Property Description
ItemType ( 757) Indicates the type of directory entry represented by the collection item.
ModifiedDate ( 758) Represents the last modification timestamp for the collection item.
ModifiedDateGMT ( 758) Represents the last modification timestamp for the collection item.
Size ( 759) Indicates the file size for the collection item.

Legend
Property

TIdFSPStatInfo.ItemType Property
Indicates the type of directory entry represented by the collection item.

Pascal
property ItemType: TIdDirItemType;

Internet Direct (Indy) Version 10.1.5 757


TIdFSPStatInfo Class Classes

Description
ItemType is a TIdDirItemType ( 2948) property that indicates the type of directory entry represented by the collection item.

ItemType will contains one of the following enumeration values:

Value Meaning
dirDirectory Represents a directory entry
ditFile Represents a file entry

Values in the ItemType property are updated when maintaining the structured directory listing in the FSP client following execution
of the GetStatInfo or List methods.

See Also
TIdDirItemType ( 2948)

TIdFSP.DirectoryListing ( 731)

TIdFSP.GetStatInfo ( 723)

TIdFSP.List ( 724)

TIdFSPListItems.ParseEntries ( 747)

TIdFSPStatInfo.ModifiedDate Property
Represents the last modification timestamp for the collection item.

Pascal
property ModifiedDate: TIdDateTime;
Description
ModifiedDate is a TIdDateTime ( 4733) property that represents the last modification timestamp for the collection item.

Values in the ModifiedDate property are updated when maintaining the structured directory listing in the FSP client following
execution of the GetStatInfo or List methods.

ModifiedDate is expressed in the local timezone for the client.

Use ModifiedDateGMT ( 758) to access the the last modification timestamp for the collection item expressed in the GMT timezone.

See Also
ModifiedDateGMT ( 758)

TIdFSP.DirectoryListing ( 731)

TIdFSP.GetStatInfo ( 723)

TIdFSP.List ( 724)

TIdFSPListItems.ParseEntries ( 747)

TIdFSPStatInfo.ModifiedDateGMT Property
Represents the last modification timestamp for the collection item.

Pascal
property ModifiedDateGMT: TIdDateTime;
Description
ModifiedDateGMT is a TIdDateTime ( 4733) property that represents the last modification timestamp for the collection item.

758 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Values in the ModifiedDateGMT property are updated when maintaining the structured directory listing in the FSP client following
execution of the GetStatInfo or List methods.

ModifiedDateGMT is expressed in the GMT timezone.

Use ModifiedDate ( 758) to access the the last modification timestamp for the collection item expressed in the local timezone for
the FSP client.

See Also
ModifiedDate ( 758)

TIdFSP.DirectoryListing ( 731)

TIdFSP.GetStatInfo ( 723)

TIdFSP.List ( 724)

TIdFSPListItems.ParseEntries ( 747)

TIdFSPStatInfo.Size Property
Indicates the file size for the collection item.

Pascal
property Size: Int64;
Description
Size is an Int64 property that indicates the file size for the collection item.

Values in the Size property are updated when maintaining the structured directory listing in the FSP client following execution of the
GetStatInfo or List methods.

Please note that Size is declared as an Int64 value in anticipation of FSP version 3; value passed in FSP version 2.X cannot
exceed 4GB.

TIdFTP Class
Implements a File Transfer Protocol (FTP) client.

File
IdFTP ( 4629)

Hierarchy

Pascal
TIdFTP = class(TIdExplicitTLSClient);
Description
TIdFTP is a TIdExplicitTLSClient ( 687) descendant that implements a File Transfer Protocol (FTP) client, as described in the
Internet Standards documents:

RFC 959 - File Transfer Protocol [FTP]

RFC 2228 - FTP Security Extensions

RFC 2389 - Feature negotiation mechanism for the File Transfer Protocol

RFC 2428 - FTP Extensions for IPv6 and NATs

RFC 2640 - FTP Internalization

Internet Direct (Indy) Version 10.1.5 759


TIdFTP Class Classes

IETF Draft Extensions to FTP

Deflate transmission mode for FTP

Securing FTP with TLS

FTP is a protocol that promotes sharing files, efficiently uploading and downloading files, as well as isolating differences in the file
systems for remote host computers.

TIdFTP provides an encapsulation of the FTP protocol interpreter that acts as the control channel or communication path for the
exchange of FTP commands and their specific FTP replies. Several key properties and methods are used to establish the control
channel for the FTP session, including:

Host ( 820)
Port ( 826)
Username ( 833)
Password ( 826)
ClientInfo ( 814)
ProxySettings ( 827)
UseTLS ( 833)
AutoLogin ( 813)
Connect ( 771)
Login ( 792)
Quit ( 797)

After creating the control channel connection using Connect ( 771) or Login ( 792), the following properties can be used to
examine the content of FTP replies and settings detected during the process:

Greeting ( 2364)
LoginMsg ( 822)
SystemDesc ( 829)
TZInfo ( 831)
UsingSFTP ( 834)
LastCmdResult ( 2367)
LangsSupported ( 820)

TIdFTP uses properties and methods to implement the FTP Access Control Commands, as described in RFC 959 and other related
Internet Standards documents.

FTP Command Method or Properties


USER Username ( 833) property supplied in the Login ( 792) method
PASS Password ( 826) property supplied in the Login ( 792) method
ACCT Account ( 812) method
CWD ChangeDir ( 769) method
CDUP ChangeDirUp ( 770) method
SMNT StructureMount ( 808) method
REIN Reinitialize ( 798) method

760 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

QUIT Quit ( 797) method

Internally, TIdFTP handles the interactions required for establishing and maintaining the data channel over which data is transferred
using the specified structure, mode and type. All file transfer functions are performed using the internal data channel. The data
channel connection can use the default port number for the FTP client, or may negotiate a non-default port number using the FTP
PORT command.

Data transfer commands and arguments are implemented in TIdFTP using the following properties and methods:

FTP Method or Properties


Command
PORT Uses the value in DataPort ( 816) when the data channel is opened in the Get ( 783) and Put ( 795) methods.
PASV Uses the Passive ( 825) property when the data channel is opened in the Get ( 783) and Put ( 795) methods.
TYPE Uses the TransferType ( 829) property in Login ( 792) or when the property value is changed.
STRU FileStructure ( 782) method.
MODE TransferMode ( 808) method.

TIdFTP also implements support for compression of data using the "deflate ( 2765)" transmission mode, as described in the
Internet Draft "Deflate transmission mode for FTP". In deflate ( 2765) transmission mode, data is compressed and transmitted as
a stream of octets (8 bit bytes). The sender and receiver rely on a compression engine to perform compression operations (deflate
( 2765)/inflate ( 2834)) and maintain state. The compression engine generates a unique data stream using the ZLIB compressed
data format specified in RFC 1950.

The deflate ( 2765) extension modifies the MODE command by adding the parameter "Z".

TIdFTP also supports the FTP FEAT and OPTS commands as specified in RFC 2389 to discover optional commands supported on
the FTP server. Use the Capabilities ( 690) property to examine features supported on the server. Use the SetCMDOpt ( 800)
method to send the FTP OPTS command that specifies the desired behavior of the FTP server process when a subsequent FTP
command is issued.

TIdFTP implements the common FTP Service Commands that define the file transfer or the file system function requested by the
client. FTP service commands are issued on the control channel for the client session. Data transferred in response to an FTP
service commands is always be sent over the data channel connection. TIdFTP implements the following FTP service commands
using the indicated properties and methods:

FTP Method or Properties


Command
RETR Get ( 783) method.
STOR Uses the Put ( 795) method and the Append argument.
STOU StoreUnique ( 806) method.
APPE Used in the Put ( 795) method and the Append argument.
ALLO Allocate ( 769) method.
REST Sent in the Put ( 795) and Append methods, or when the ResumeSupported ( 799) property is updated.
RNFR Used in the Rename ( 799) method.
RNTO Used in the Rename ( 799) method.
ABOR Abort ( 768) method.
DELE Delete ( 773) method.
RMD RemoveDir ( 798) method.
MKD MakeDir ( 794) method.
PWD RetrieveCurrentDir ( 800) method.

Internet Direct (Indy) Version 10.1.5 761


TIdFTP Class Classes

LIST List ( 789) method.


NLST ( 4358) List ( 789) method using the ADetails argument.
SITE Site ( 803) method or the Connect ( 771) method when SITE ZONE is supported.
SYST Used in the Connect ( 771) method to update the SystemDesc ( 829) property.
STAT Status ( 806) method.
HELP Help ( 787) method.
NOOP Noop ( 794) method.

Secure FTP using TLS


TIdFTP also supports the mechanism that can be used by FTP clients and servers to implement security and authentication using
the TLS protocol defined in RFC 2246, and the extensions to the FTP protocol defined by RFC 2228. When the FTP session control
channel is established, the client requests TLS using the value in the UseTLS ( 833) property. Data channel connections may be
secured using the Passive ( 825) and UseTLS ( 833) properties. Should the FTP client wish to make the control connection
revert back into plaintext (once the authentication phase is completed), set the value in UseCCC ( 831).

Use of TLS for control and/or data channel connections requires the use of TIdSSLIOHandlerSocketBase ( 2134), and access to
the OpenSSL (or compatible) library for the operating system or platform hosting the Indy application.

FTP Protocol Replies


Replies to File Transfer Protocol commands are devised to ensure the synchronization of requests and actions in the process of file
transfer, and to guarantee that the user process always knows the state of the Server. Every command must generate at least one
reply, although there may be more than one; in the latter case, the multiple replies must be easily distinguished. In addition, some
commands occur in sequential groups, such as USER, PASS and ACCT, or RNFR and RNTO. The replies show the existence of
an intermediate state if all preceding commands have been successful. A failure at any point in the sequence necessitates the
repetition of the entire sequence from the beginning.

FTP reply values can be accessed using the LastCmdResult ( 2367) property, and consists of a 3-digit numeric response number
followed by some arbitrary text. The response number is intended for use by automata to determine what state to enter next; the
text is intended for the human user. It is intended that the three digits contain enough encoded information that the control channel
will not need to examine the text and may either discard it or pass it on to the user, as appropriate. In particular, the text may be
server-dependent, so there are likely to be varying texts for each reply code.

The three digits of the reply each have a special significance. This is intended to allow a range of very simple to very sophisticated
responses by the user-process. The first digit denotes whether the response is good, bad or incomplete. The FTP client can
determine its next course of action by simply examining this first digit in the numeric response. For more detailed information about
a numeric response code, the FTP client may examine the second digit, reserving the third digit for the finest gradation of
information (e.g., RNTO command without a preceding RNFR).

There are five values for the first digit of the reply code:

Code Meaning
1xx Positive Preliminary reply. The requested action is being initiated, but expect another reply before proceeding with a new
command.
2xx Positive Completion reply. The requested action has been successfully completed. A new request may be initiated.
3xx Positive Intermediate reply. The command has been accepted, but the requested action is being held in abeyance, pending
receipt of further information. The user should send another command specifying this information.
4xx Transient Negative Completion reply. The command was not accepted and the requested action did not take place, but the
error condition is temporary and the action may be requested again.

762 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

5xx Permanent Negative Completion reply. The command was not accepted and the requested action did not take place. The
client is discouraged from repeating the exact request (in the same sequence).

The second digit in a numeric response code encodes the following functional groupings:

Code Meaning
x0x Syntax. These replies refer to syntax errors, syntactically correct commands that don't fit any functional category,
unimplemented or superfluous commands.
x1x Information. These are replies to requests for information, such as status ( 806) or help ( 787).
x2x Connections. Replies referring to the control and data connections.
x3x Authentication and accounting. Replies for the login ( 792) process and accounting procedures.
x4x Unspecified as yet. x5x File system. These replies indicate the status ( 806) of the Server file system for the requested
file transfer or other file system action.

The third digit in the numeric response code provides the finest gradation of meaning in each of the function categories. The text
associated with each reply is recommended, rather than mandatory, and may even change according to the command with which it
is associated. The reply codes, on the other hand, must strictly follow the specifications in the last section; that is, Server
implementations should not invent new codes for situations that are only slightly different from the ones described here, but rather
should adapt codes already defined.

The following list ( 789) indicates the numeric FTP reply codes and their suggested textual content for a typical FTP server
implementation:

Code Message
110 MARK yyyy = mmmm
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status ( 806) okay; about to open data connection.
200 Command okay.
202 Command not implemented, superfluous at this site ( 803).
211 System status ( 806), or system help ( 787) reply.
212 Directory status ( 806).
213 File status ( 806).
214 Help ( 787) message.
215 NAME system type.
220 Service ready for new user.
221 Service closing control connection.
225 Data connection open; no transfer in progress.
226 Closing data connection.
227 Entering Passive ( 825) Mode (h1,h2,h3,h4,p1,p2).
230 User logged in, proceed.
250 Requested file action okay, completed.
257 "PATHNAME" created.
331 User name okay, need password.
332 Need account for login ( 792).
350 Requested file action pending further information.

Internet Direct (Indy) Version 10.1.5 763


TIdFTP Class Classes

421 Service not available, closing control connection.


425 Can't open data connection.
426 Connection closed; transfer aborted.
450 Requested file action not taken.
451 Requested action aborted: local error in processing.
452 Requested action not taken.
500 Syntax error, command unrecognized.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken.
551 Requested action aborted: page type unknown.
552 Requested file action aborted.
553 Requested action not taken.

Directory Listings Using TIdFTP


One of the key features of the FTP protocol is the ability to access a list ( 789) of files found in a directory on the remote host
using the FTP LIST or NLST ( 4358) commands. TIdFTP implements this feature, and captures the list ( 789) of file names and
optional file details in the ListResult ( 821) property.

The FTP protocol (by design) isolated the FTP client from the nuances of host-specific file systems. In obeyance of this design goal,
it also did not specify a standard representation for the contents of a directory listing. Instead, FTP clients have historically relied on
defacto representations for the content of a directory listing as used in specific server implementations.

There are FTP extensions that have been presented to the IETF (Internet Engineering Task Force) that specifies new FTP
commands to obtain listings of remote directories in a defined format. Two commands are defined, MLST ( 4354) which provides
data about exactly the object named on its command line, and no others. MLSD on the other hand will list ( 789) the contents of a
directory if a directory is named. The MLST ( 4354) and MLSD commands are intended to standardize the file and directory
information returned by the Server FTP process. These commands differ from the LIST command in that the format of the replies is
strictly defined although extensible.

The MLST ( 4354) format is intended for machine processing, not human viewing, and as such the format is very rigid.
implementations must not vary the format by, for example, inserting extra spaces for readability, replacing spaces by tabs, including
header or title lines, or inserting blank lines, or in any other way alter this format.

In TIdFTP, the List ( 789) command can use either the FTP LIST or NLST ( 4358) commands to request the content of a
directory listing. In addition, the ExtListDir ( 775) and ExtListItem ( 776) methods can be used to invoke the FTP extenstion
commands MLST ( 4354) and MLSTD for servers supporting the features.

The Indy library recognizes these defacto standards, and makes provisions for the IETF draft standards. TIdFTP provides the
capabilitiy to parse the various formats for the textual content in the ListResult ( 821) property into a structured representation of
the directory stored in the DirectoryListing ( 818) property. At the present time, Indy offers parsers for 30 different host-specific
directory listing formats. Additional parsers are offered as new directory listing formats are encountered and codified. Use the
IdAllFTPListParser.pas unit to include and register the known directory listing parsers for the Indy library.

See Also
TIdExplicitTLSClient ( 687)

IndySupport ( 15)

764 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP Members
The following tables list the members exposed by TIdFTP.

Properties
Property Description
Account ( 812) Account information for the remote FTP Server.
AUTHCmd ( 812) Indicates the mechanism to use when performing authentication when logging into the FTPO server.
AutoLogin ( 813) Indicates the FTP client should automatically login ( 792) when the FTP server connection is opened.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
CanResume ( 814) Indicates the FTP site ( 803) supports FTP Resume operations.
Capabilities ( 690)
ClientInfo ( 814) Additional information about the FTP client software, revision, and platform for the FTP CLNT command.
Compressor ( 815) Implements a compression/decompression engine for FTP MODE Z deflate ( 2765) transmissions.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
CurrentTransferMode ( 815) Indicates the current or efective settings for the TransferMode ( 808) property during FTP protocol
exchanges.
DataPort ( 816) Indicates the port number to use when binding the data channel for the FTP client session.
DataPortMax ( 816) Indicates the upper limit for port numbers allowed when binding an active data channel for the FTP client.
DataPortMin ( 817) Indicates the lower limit for port numbers allowed when binding an active data channel for the FTP client.
DataPortProtection ( 817) Indicates the level of security required for data channel connections in the FTP client.
DirectoryListing ( 818) Container for a structured file and directory listing.
DirFormat ( 819) Identifies the directory listing format detected when parsing values in DirectoryListing ( 818).
ExternalIP ( 819) Specifies the IP address used when the client sends the FTP PORT or EPRT commands behind a NAT-based
firewall.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 820) Represents the IP address or host name for the remote FTP server.
IOHandler ( 2364) The input / output mechanism for the connection.
LangsSupported ( 820) Represents the supported languages on the server.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ListParserClass ( 821) Represents a class reference for the directory listing parser used to create ( 267) collection items in the
DirectoryListing ( 818) property.
ListResult ( 821) Textual form of the directory listing returned by an FTP server.
LoginMsg ( 822) Server response sent after authenticating the client connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnAfterClientLogin ( 822) Event handler signalled following completion of the FTP protocol exchange used to authenticate the client
connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnCustomFTPProxy ( 823) Event handler signalled to implement support for custom FTP proxy servers.
OnDirParseEnd ( 824) Event handler signalled when a textual directory listing has been parsed into its structured form.
OnDirParseStart ( 824) Event handler signalled prior to parsing a textual directory listing into its structured form.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnRetrievedDir ( 825) Event handler signalled when text for a directory listing has been retrieved from the FTP server.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Passive ( 825) Indicates the FTP data channel connection method.
Password ( 826) Authentication credentials used when logging into the FTP server.
Port ( 826) Port number for the control channel connection to the remote FTP server.
ProxySettings ( 827) Indicates the settings to use for connections opened using an FTP proxy server.
ReadTimeout ( 828) Number of milliseconds to wait for an FTP protocol response.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
SupportsVerification ( 828) Indicates if the FTP server supports one of the extensibility features for verified transfer integrity.

Internet Direct (Indy) Version 10.1.5 765


TIdFTP Class Classes

SystemDesc ( 829) Description of the remote FTP server.


TransferTimeout ( 829) Timeout value for read operations on the data channel for the FTP client.
TransferType ( 829) Indicates the file transfer type.
TryNATFastTrack ( 830) Indicates use of "fast path" connections for traversing firewalls and NATs.
TZInfo ( 831) Provides access to timezone information for the remote FTP server.
UseCCC ( 831) Indicates if use of the Clear Command Channel (CCC) command is required for the FTP client.
UseExtensionDataPort ( 832) Indicates if IPv6 extensions for Port ( 826) and Passive ( 825) settings are used in FTP protocol
exchanges.
UseMLIS ( 832) Indicates if the FTP MLST ( 4354) and MLSD commands are used for directory listings.
Username ( 833) Authentication identity used when logging in to the FTP server.
UseTLS ( 833) Indicates Transport-Level Security is used on the connection.
UsingExtDataPort ( 834) Indicates if RFC 2428 NAT Extensions are available for the FTP client session.
UsingNATFastTrack ( 834) Indicates if "fast path" connections are in use for the FTP client.
UsingSFTP ( 834) Indicates if a secure FTP connection is in use for the client session.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
Abort ( 768) Stops an FTP service operation.
Allocate ( 769) Pre-allocates space on a FTP server before you upload a file.
BeginWork ( 356) Triggers the OnBeginWork event.
ChangeDir ( 769) Changes the current directory on the FTP server file system.
ChangeDirUp ( 770) Changes to the parent directory on the FTP server.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
CombineFiles ( 771) Combines a list ( 789) of local files into a single file on the FTP server.
Connect ( 771) Opens the connection to the server for the FTP session.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
CRC ( 772) Calculates the Cyclic Redundancy Check (or CRC) for a specified file on an FTP server.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Delete ( 773) Removes a file on the FTP server file system.
Destroy ( 774) Frees the object instance.
DisconnectNotifyPeer ( 774) Closes the FTP session for the client.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
ExtListDir ( 775) Implements support for the MLSD directory listing format.
ExtractFeatFacts ( 778)
FileDate ( 782) Rtrieves the date and time a file was last modified on the remote system.
FileStructure ( 782) Defines the way data is represented in FTP data transfer operations.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Help ( 787) Requests FTP server capabilities or site ( 803)-specific implementations.
IsExtSupported ( 788) Determine if an FTP command is a supported FTP extension command for the FTP server.
IsServerMDTZAndListTForm ( 788) Indicates if the FTP server is one that supports the FTP MDTM and LIST -T commands.
KillDataChannel ( 789) Closes the data channel for the FTP client session during Abort ( 768).
Login ( 792) Authenticates a client connection to the FTP server.
MakeDir ( 794) Creates a directory on the FTP server.
Noop ( 794) Sends a Keep-Alive signal to the FTP server.
Quit ( 797) Closes the FTP client connection.
Quote ( 798) Implements execution of FTP commands not directly supported in this component.
ReInitialize ( 798) Clears the account and settings for the FTP client.
RemoveDir ( 798) Removes a directory on the FTP server.
Rename ( 799) Change the name of a file on the FTP server file system.
ResumeSupported ( 799) Indicates if the server implements the FTP REST command.
RetrieveCurrentDir ( 800) Gets the current directory name on the FTP server.
SetCMDOpt ( 800) Specifies the behavior to appply to a subsequent FTP command.
SetLang ( 801) Requests greeting and textual responses in the spcified language.
SetModTime ( 802) Sets the last modification time for the specified file.

766 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

SetModTimeGMT ( 802) Sets the last modification time for the specified file.
Site ( 803) Sends an FTP server site command.
SiteToSiteDownload ( 803) Implements site ( 803)-to-site ( 803) (or FXP) data transfers.
SiteToSiteUpload ( 804) Implements site ( 803)-to-site ( 803) (or FXP) data transfers.
Size ( 805) Gets file size information from the FTP server.
Status ( 806) Implements the FTP STAT command.
StructureMount ( 808) Mounts a file system data structure for the FTP client.
CType ( 267)
ExtListItem ( 775)
Get ( 783)
GetLoginPassword ( 786)
List ( 789)
Put ( 795)
StoreUnique ( 806)
VerifyFile ( 809)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
TransferMode ( 808) Specifies the transmission mode for the data channel.
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAfterGet ( 835) Event handler signalled following completion of data transfer in the Get ( 783) method.
OnBannerAfterLogin ( 835) Event handler signalled following completion of the FTP protocol exchange in the Login ( 792) method and
receipt of the LoginMsg ( 822) text.
OnBannerBeforeLogin ( 836) Event handler signalled after receipt of the welcome message, and before logging into the FTP server.
OnCreateFTPList ( 836) Event handler signalled for creation of the structured directory listing for the FTP client.
OnDataChannelCreate ( 837) Event handler signalled following creation of the data channel for data transfer operations.
OnDataChannelDestroy ( 838) Event handler signalled prior to freeing the data channel in the FTP client.
OnNeedAccount ( 838) Derives Account ( 812) information for the remote FTP Server.
OnStatus ( 359) Represents the current connection status event handler.
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 839) Event handler signalled when the client has failed to provide implied support for TLS (Transport Layer
Security).

Legend
Method
virtual
Property
read only
Event

TIdFTP Methods
The Methods of the TIdFTP class are listed here.

Methods
Method Description
Abort ( 768) Stops an FTP service operation.
Allocate ( 769) Pre-allocates space on a FTP server before you upload a file.
ChangeDir ( 769) Changes the current directory on the FTP server file system.
ChangeDirUp ( 770) Changes to the parent directory on the FTP server.

Internet Direct (Indy) Version 10.1.5 767


TIdFTP Class Classes

CombineFiles ( 771) Combines a list ( 789) of local files into a single file on the FTP server.
Connect ( 771) Opens the connection to the server for the FTP session.
CRC ( 772) Calculates the Cyclic Redundancy Check (or CRC) for a specified file on an FTP server.
Delete ( 773) Removes a file on the FTP server file system.
Destroy ( 774) Frees the object instance.
DisconnectNotifyPeer ( 774) Closes the FTP session for the client.
ExtListDir ( 775) Implements support for the MLSD directory listing format.
ExtListItem ( 775)
ExtractFeatFacts ( 778)
FileDate ( 782) Rtrieves the date and time a file was last modified on the remote system.
FileStructure ( 782) Defines the way data is represented in FTP data transfer operations.
Get ( 783)
GetLoginPassword ( 786)
Help ( 787) Requests FTP server capabilities or site ( 803)-specific implementations.
IsExtSupported ( 788) Determine if an FTP command is a supported FTP extension command for the FTP server.
IsServerMDTZAndListTForm ( 788) Indicates if the FTP server is one that supports the FTP MDTM and LIST -T commands.
KillDataChannel ( 789) Closes the data channel for the FTP client session during Abort ( 768).
List ( 789)
Login ( 792) Authenticates a client connection to the FTP server.
MakeDir ( 794) Creates a directory on the FTP server.
Noop ( 794) Sends a Keep-Alive signal to the FTP server.
Put ( 795)
Quit ( 797) Closes the FTP client connection.
Quote ( 798) Implements execution of FTP commands not directly supported in this component.
ReInitialize ( 798) Clears the account and settings for the FTP client.
RemoveDir ( 798) Removes a directory on the FTP server.
Rename ( 799) Change the name of a file on the FTP server file system.
ResumeSupported ( 799) Indicates if the server implements the FTP REST command.
RetrieveCurrentDir ( 800) Gets the current directory name on the FTP server.
SetCMDOpt ( 800) Specifies the behavior to appply to a subsequent FTP command.
SetLang ( 801) Requests greeting and textual responses in the spcified language.
SetModTime ( 802) Sets the last modification time for the specified file.
SetModTimeGMT ( 802) Sets the last modification time for the specified file.
Site ( 803) Sends an FTP server site command.
SiteToSiteDownload ( 803) Implements site ( 803)-to-site ( 803) (or FXP) data transfers.
SiteToSiteUpload ( 804) Implements site ( 803)-to-site ( 803) (or FXP) data transfers.
Size ( 805) Gets file size information from the FTP server.
Status ( 806) Implements the FTP STAT command.
StoreUnique ( 806)
StructureMount ( 808) Mounts a file system data structure for the FTP client.
TransferMode ( 808) Specifies the transmission mode for the data channel.
VerifyFile ( 809)

Legend
Method
virtual

TIdFTP.Abort Method
Stops an FTP service operation.

Pascal
procedure Abort; virtual;
Description
Abort is a procedure that instructs the FTP server to interrupt the current FTP service request, and any associated transfer of data.

Abort sends the FTP ABOR command to the server to halt the current operation.

Abort forces the socket allocated to the data channel for the FTP session to be disconnected by calling KillDataChannel ( 789).
Abort does not change the state in Connected ( 2353) for the control channel used in the FTP client.

768 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
KillDataChannel ( 789)

TIdFTP.Allocate Method
Pre-allocates space on a FTP server before you upload a file.

Pascal
procedure Allocate(
AAllocateBytes: Integer
);
Parameters
Parameters Description
AAllocateBytes The number of bytes that should be allocated

Description
Allocate is a procedure that pre-allocates space on a FTP server before you upload a file using the Put ( 795) method.

It is recommend to use this method before attempting to upload a file. Some servers may require this command while others do not.
If a server does not require this command, it should treat this command as if the TIdFTP.Noop ( 794) method has been called.

Allocate sends the FTP ALLO command using the value in AAllocateBytes as an argument. Allocate expects the numeric response
code 200 from the FTP server, and raises a protocol exception when any other value is encountered.

See Also
Noop ( 794)

Put ( 795)

TIdFTP.ChangeDir Method
Changes the current directory on the FTP server file system.

Pascal
procedure ChangeDir(
const ADirName: string
);
Parameters
Parameters Description
ADirName path desired on the server file system.

Description
ChangeDir is a procedure used to change the current directory on the FTP server file system to the subdirectory specified in the
ADirName parameter.

ChangeDir sends the FTP CWD command using ADirName as an argument to set the current directory to the specified value.

RFC 959 indicates that response code 250 is the success response code for the CWD command. Some server implementations (to
remain nameless) return the 200 response code to indicate successful completion of the CWD command. Indy will recognize both
response codes 200 and 250 as the success response code for the CWD command.

According to RFC 959, ChangeDir may encounter any of the following error responses in the FTP protocol:

Code Meaning
500 Syntax error, command unrecognized. (This may include errors such as command line too long.)
501 Syntax error in parameters or arguments.

Internet Direct (Indy) Version 10.1.5 769


TIdFTP Class Classes

502 Command not implemented.


421 Service not available, closing control connection. (This may be a reply to any command if the service knows it must shut
down.)
530 Not logged in.
550 Requested action not taken. File unavailable (e.g., file not found, no access).

When one of these protocol error responses is received, an EIdProtocolReplyError is raised. The ReplyErrorCode for the exception
is set to the numeric portion of the protocol response. The Message for the exception is set to the textual part of the protocol
response, and may vary based on the exact values returned from the server implementation.

An an example, if the directory in ADirName does not exist on the server file system, the EIdProtocolReplyError raised will contain
550 in the ReplyErrorCode.

Use RetrieveCurrentDir ( 800) to determine the current working directory on the server file system.

Use ChangeDirUp ( 770) to set the current directory on the FTP server to the directory one level higher in the file system hierarchy.

See Also
EIdProtocolReplyError

RetrieveCurrentDir ( 800)

ChangeDirUp ( 770)

TIdFTP.ChangeDirUp Method
Changes to the parent directory on the FTP server.

Pascal
procedure ChangeDirUp;
Description
ChangeDirUp is a procedure used to change the current directory up one level in the file system for the FTP server.

ChangeDirUp sends the FTP CDUP command to change to the parent directory on the servers file system.

RFC 959 indicates that reponse code 200 is the proper success response code for the CWUP command, but mentions that CDUP
may also returns the 250 response code permitted for CWD. Indy will recognize both response codes 200 and 250 as the success
response code for the CDUP command.

According to RFC 959, ChangeDirUp may encounter any of the following error responses in the FTP protocol:

Code Meaning
500 Syntax error, command unrecognized. (This may include errors such as command line too long.)
501 Syntax error in parameters or arguments.
502 Command not implemented.
421 Service not available, closing control connection. (This may be a reply to any command if the service knows it must shut
down.)
530 Not logged in.
550 Requested action not taken. File unavailable (e.g., file not found, no access).

When one of these protocol error responses is received, an EIdProtocolReplyError is raised. The ReplyErrorCode for the exception
is set to the numeric portion of the protocol response. The Message for the exception is set to the textual part of the protocol
response, and may vary based on the exact values returned from the server implementation.

Use the ChangeDir ( 769) method to move to a specified directory on the server file system.

770 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
EIdProtocolReplyError

ChangeDir ( 769)

TIdFTP.CombineFiles Method
Combines a list ( 789) of local files into a single file on the FTP server.

Pascal
procedure CombineFiles(
const ATargetFile: String;
AFileParts: TIdStrings
);
Parameters
Parameters Description
ATargetFile File name on the FTP server.
AFileParts Local file names to be combined into the target file name.

Description
CombineFiles is a procedure used to implement support for the FTP COMB command, which allows combining the list ( 789) of
local files in AFileParts into a single FTP server file with the name indicated in ATargetFile.

CombineFiles can be sent to FTP servers that implmejnt support for the FTP COMB extension command (as indicated in
Capabilities ( 690)). If the FTP COMB command is not supported on the server, the CombineFiles methods performs no operation.

ATargetFile indicates the file name to be used for storing the multiple file parts on the FTP server file system. ATargetFile must
include a valid qualified path when specified.

AFileParts contains the individual local files to be combined for storage on the FTP server. Entries in AFileParts must be in the
correct order, and must appear as one file name per line with no delimiter characters. If an entry in AFileParts contains an
embedded space character in the file name, the entire file name should be enclosed in Double Quote ( 798) characters ("filename
with spaces.txt").

CombineFiles sends the FTP COMB command, and expects the numeric response code 250 to indicate successful completion of
the command.

Please note that the FTP COMB is not widely supported on FTP servers at the present time. The GlobalSCAPE Secure FTP Server
does implement support for FTP COMB command, and can be used for testing the capability.

TIdFTP.Connect Method
Opens the connection to the server for the FTP session.

Pascal
procedure Connect; override;
Description
Connect is an overridden method in TIdFTP ( 759) used to perform the FTP protocol exchanges required when establishing a new
FTP client session. Connect also ensures that settings in the FTP client reflect the current state for the new FTP session.

Set values in the Host ( 820) and Port ( 826) properties prior to calling Connect.

Connect examines values in ProxySettings ( 827) to determine if an intermediate connection to a proxy server is used for the FTP
client session. When the ProxyType and Host ( 820) properties (in ProxySettings ( 827)) indicate a proxy is used, these copied
to the Host ( 820) and Port ( 826) properties for the FTP client.

Connect calls the inherited Connect method to establish the connection, optionally using TLS when UseTLS ( 833) contains
values that indicate uses on the transport.

Connect captures the inital message from the FTP server in the Greeting ( 2364) property, and causes the OnBannerBeforeLogin

Internet Direct (Indy) Version 10.1.5 771


TIdFTP Class Classes

( 836) event handler to be be triggered.

When AutoLogin ( 813) contains True, Connect will automatically execute the Login ( 792) method and trigger the OnAfterLogin
event handler. This will require values in the Username ( 833) and Password ( 826) properties to be provided prior to calling
Connect. Similar values in ProxySettings ( 827) must also be provided (when used) prior to calling Connect.

Following execution of the Login ( 792) method, values in UsingNATFAstTrack and UsingSFTP ( 834) are also updated to reflect
their current state.

Other actions performed when AutoLogin ( 813) contains True include setting the value in SystemDesc ( 829), and checking for
support of the FTP SITE ZONE feature in the Capabilities ( 690) for the server. When SITE ZONE is supported, time zone
information if captured and stored for the FTP session.

Finally, Connect triggers the OnStatus ( 359) event handler to indicate that the FTP client session is ready for use.

Any exceptions raised during processing in the Connect method will cause the Disconnect ( 2355) method to be called for the
client, and the exception is re-reaised for the application.

See Also
Disconnect ( 2355)

Host ( 820)

Port ( 826)

Username ( 833)

Password ( 826)

Login ( 792)

Capabilities ( 690)

Greeting ( 2364)

ProxySettings ( 827)

UseTLS ( 833)

OnBannerBeforeLogin ( 836)

OnAfterLogin

OnStatus ( 359)

TIdFTP.CRC Method
Calculates the Cyclic Redundancy Check (or CRC) for a specified file on an FTP server.

Pascal
function CRC(
const AFIleName: String;
const AStartPoint: Int64 = 0;
const AEndPoint: Int64 = 0
): Int64;
Parameters
Parameters Description
AFIleName File name on the server for the checksum calculation.
AStartPoint Initial position in the block of data for the checksum calculation. Default value is 0 (zero).
AEndPoint Final position in the block of data for the checksum calculation. Default value is 0 (zero).

Returns
Int64 - CRC value for the indicated file name. the FTP server.

Description
CRC is an Int64 function that returns the Cyclic Redundancy Check (or CRC) value for a range of content in a specified file on the

772 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

FTP server. CRC provides the ability for the FTP client to verify that the file has been successfully transferred to the server without
corruption.

The CRC value is a mathematical calculation on a block of data in the file specified in AFileName, and returns a number that
represents the content and organization of that data. The CRC calculation returns a unique number (or "fingerprint") that uniquely
identifies the data found in the offsets specified by a StartPoint and AEndPoint.

AStartPoint and AEndPoint indicate the initial and final positions in a block of data to be used in the CRC calculation. When
AStartPoint contains 0 (zero), both AStartPoint and AEndPoint are ignored and the entire contents of the file are used in the CRC
calculation. When AEndPoint contains 0 (zero), the length of the indicated file is assumed as the final position in the CRC
calculation.

The return value is the 64-bit integer that represents the CRC for file on the remote server for the connection. The return value can
contain the value -1 when the file does not exist or the CRC is invalid in the FTP response.

CRC can be used when the FTP server supports the FTP XCRC extension command, and after uploading the content for the file in
AFileName using the Put ( 795) method. The FTP server will perform the CRC calculation on the file ( or byte range) and return
the 8-byte 'fingerprint' for the specified file.

The client application can compare this fingerprint to the CRC fingerprint which it generates locally to determine if the file has been
modified, corrupted, or altered during its transfer to the server. Use TIdHashCRC32 ( 1013) or a comparable component to
perform the local CRC calculation for the files content.

Please note that the FTP XCRC extension commands is not widely supported in FTP server implementations at the current time.
Use the Capabilities ( 690) property to determine if the command is supported on the FTP server for the current connection.

See Also
Put ( 795)

TIdFTP.Delete Method
Removes a file on the FTP server file system.

Pascal
procedure Delete(
const AFilename: string
);
Parameters
Parameters Description
AFilename File to be deleted from the FTP server file system.

Description
Delete is a procedure used to remove the file specified in AFilename from the file system on the FTP server. Delete implements the
FTP DELE command using the value in AFilename as an argument.

Delete expects the numeric response code 250 to indicate successful completion of the FTP command. If AFilename does not
represent a valid file in the current directory on the server's file system, or contain a valid file name using a relative path, a protocol
response exception will be raised.

Please note that the FTP server may not grant delete permissions for the session based on account information specified in the
Username ( 833) and Password ( 826) properties. This is common practice for clients using Anonymous accounts.

Use Get ( 783) to retrieve a file stored on the FTP server file system.

Use Put ( 795) to store the contents of a local file onto the FTP server file system.

See Also
Username ( 833)

Password ( 826)

Put ( 795)

Internet Direct (Indy) Version 10.1.5 773


TIdFTP Class Classes

Get ( 783)

TIdFTP.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance. Destroy frees resources allocated to the following properties during
initialization of the component:

ClientInfo ( 814)
ListResult ( 821)
LoginMsg ( 822)
DirectoryListing ( 818)
LangsSupported ( 820)
ProxySettings ( 827)
TZInfo ( 831)

Please note that resources allocated to the Compressor ( 815) property are not explicitly freed in the destructor. This object
instance is created and maintained independent of the FTP client where it is used. Applications should free any resources allocated
to the Compressor ( 815) property.

Destroy calls the inherited Destroy method prior to exit.

See Also
ClientInfo ( 814)

ListResult ( 821)

LoginMsg ( 822)

DirectoryListing ( 818)

LangsSupported ( 820)

ProxySettings ( 827)

TZInfo ( 831)

Compressor ( 815)

TIdFTP.DisconnectNotifyPeer Method
Closes the FTP session for the client.

Pascal
procedure DisconnectNotifyPeer; override;
Description
DisconnectNotifyPeer is an overridden method that handles closing the FTP session for the client.

When the IOHandler ( 2364) is still connected ( 2353) to the remote FTP server, DisconnectNotifyPeer sends the FTP QUIT
command to indicate that the client will be closing the control channel for the FTP session. DisconnectNotifyPeer then waits for a
brief period (10 milliseconds) for the IOHandler ( 2364) to become readable and to handle the response for the FTP QUIT
command.

774 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Please note that the Quit ( 797) method has been deprecated in Indy 10.

Use Disconnect ( 2355) to simply close the control channel for the FTP session.

TIdFTP.ExtListDir Method
Implements support for the MLSD directory listing format.

Pascal
procedure ExtListDir(
const ADest: TIdStrings = nil;
const ADirectory: string = ''
);
Parameters
Parameters Description
ADest Storage for the textual results in the FTP response.
ADirectory Directory name for the standardized kisting format.

Description
ExtListDir is a procedure used to implement the FTP MLSD extension command for servers supporting the capability. The MLST (
4354) and MLSD commands provide a defined format for directories and files apprearing on the remote file system.

The MLSD command, supported in ExtListDir, accepts an optional directory name or relative path in Adirectory for the directory
listing. If am empty string is passed in ADirectory, the current directory is used for the directory listing operation.

MLSD returns a a listing with the contents of the named directory using the control channel for the FTP client. MLSD includes
information about files and directories found in the named or implied directory. MLSD does not include any title, header, or
summary lines, or any other formatting, and conforms to the facts indicated in the Capabilities ( 690) for the FTP server.

ADest is used to capture and store the textual results returned in the response for the MLSD command in the ListResult ( 821)
property. In addition, ExtListDir frees any existing entries and the container represented by the DirectoryListing ( 818) property.
Values in ListResult ( 821) will be parsed into item entries on the initial access to the DirectoryListing ( 818) property. TIdFTP (
759) uses the TIdFTPLPMList ( 883) list ( 789) parser to access the facts included in the ListResults property.

ExtListDir sets the value in UsedMLS to True to indicate the method used to capture the textual results in ListResults.

ExtListDir is used in the implementation of the List ( 789) method when CanUseMLS contains the value True.

Use ExtListItem ( 776) to get ( 783) a directory listing for a single file or directory entry using the FTP MLST ( 4354) command.

See Also
Capabilities ( 690)

ListResult ( 821)

DirectoryListing ( 818)

ExtListItem ( 776)

TIdFTPLPMList ( 883)

UsedMLS

CanUseMLS

TIdFTP.ExtListItem Method
Overload List

Method Description
TIdFTP.ExtListItem (TIdFTPListItems, Implements support for the FTP MLST ( 4354) extension command.
String) ( 776)

Internet Direct (Indy) Version 10.1.5 775


TIdFTP Class Classes

TIdFTP.ExtListItem (TIdStrings, string) Implements support for the FTP MLST ( 4354) extension command.
( 777)
TIdFTP.ExtListItem (TIdStrings, Implements support for the FTP MLST ( 4354) extension command.
TIdFTPListItems, string) ( 776)

TIdFTP.ExtListItem Method (TIdFTPListItems, String)


Implements support for the FTP MLST ( 4354) extension command.

Pascal
procedure ExtListItem(
AFList: TIdFTPListItems;
const AItem: String = ''
); overload;
Parameters
Parameters Description
AFList Structured directory listing used to store the values for the command.
AItem Named item to be be returned in the directory listing.

Description
ExtListItem is an overloaded procedure used to implement support for the FTP MLST ( 4354) extension command for servers
supported the capability. The MLST ( 4354) command provides a defined format for directories and files appearing on the remote
file system.

ExtListItem stores the textual response for the MLST ( 4354) command in a temporary variable. Values captured in
LastCmdResult ( 2367) are added to the temporary variable when one or more semicolon-delimited facts are found in the textual
response lines.

When AFList contains a value non-nil object instance, it is used to store the structured DirectoryListing ( 818) items parsed from
the textual response using the IdFTPListParseBase.ParseListing ( 2883) method.

AItem represents the file entry requested for the listing operation. AItem cannot contain a directory name. When AItem contains an
empty string, the textual response contains only facts for the currently selected non-root directory.

The MLST ( 4354) response does not include any title, header, or summary lines, or any other formatting, and conforms to the
facts indicated in the Capabilities ( 690) for the FTP server.

Use ExtListDir ( 775) to get ( 783) a directory listing for a file or directory using the FTP MLSD command.

See Also
ExtListItem

ExtListDir ( 775)

LastCmdResult ( 2367)

ListResult ( 821)

DirectoryListing ( 818)

Capabilities ( 690)

IdFTPListParseBase. ParseListing ( 2883)

TIdFTP.ExtListItem Method (TIdStrings, TIdFTPListItems, string)


Implements support for the FTP MLST ( 4354) extension command.

Pascal
procedure ExtListItem(
ADest: TIdStrings;
AFList: TIdFTPListItems;
const AItem: string = ''

776 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

); overload;
Parameters
Parameters Description
ADest Storage for text values returned from the MLST ( 4354) command.
AFList Structured directory listing used to store the values for the command.
AItem Named item to be be returned in the directory listing.

Description
ExtListItem is an overloaded procedure used to implement support for the FTP MLST ( 4354) extension command for servers
supported the capability. The MLST ( 4354) command provides a defined format for directories and files appearing on the remote
file system.

ExtListItem stores the textual response for the MLST ( 4354) command in the ADest argument. Existing values in the ADest
parameter are cleared prior to executing the FTP MLST ( 4354) command using AItem as an argument. Values captured in
LastCmdResult ( 2367) are added to the ADest parameter when one or more semicolon-delimited facts are found in the textual
response lines.

When AFList has been assigned, it is used to store the structured DirectoryListing ( 818) items parsed from the textual response
using the IdFTPListParseBase.ParseListing ( 2883) method.

AItem represents the file entry requested for the listing operation. AItem cannot contain a directory name. When AItem contains an
empty string, the textual response contains only facts for the currently selected non-root directory.

The MLST ( 4354) response does not include any title, header, or summary lines, or any other formatting, and conforms to the
facts indicated in the Capabilities ( 690) for the FTP server.

Use ExtListDir ( 775) to get ( 783) a directory listing for a file or directory using the FTP MLSD command.

See Also
ExtListItem

ExtListDir ( 775)

LastCmdResult ( 2367)

ListResult ( 821)

DirectoryListing ( 818)

Capabilities ( 690)

IdFTPListParseBase. ParseListing ( 2883)

TIdFTP.ExtListItem Method (TIdStrings, string)


Implements support for the FTP MLST ( 4354) extension command.

Pascal
procedure ExtListItem(
ADest: TIdStrings;
const AItem: string = ''
); overload;
Parameters
Parameters Description
ADest Storage for text values returned from the MLST ( 4354) command.
AItem Named item to be be returned in the directory listing.

Description
ExtListItem is an overloaded procedure used to implement support for the FTP MLST ( 4354) extension command for servers
supported the capability. The MLST ( 4354) command provides a defined format for directories and files appearing on the remote
file system.

ExtListItem stores the textual response for the MLST ( 4354) command in the ADest argument. Existing values in the ADest

Internet Direct (Indy) Version 10.1.5 777


TIdFTP Class Classes

parameter are cleared prior to executing the FTP MLST ( 4354) command using AItem as an argument. Values captured in
LastCmdResult ( 2367) are added to the ADest parameter when one or more semicolon-delimited facts are found in the textual
response lines.

AItem represents the file entry requested for the listing operation. AItem cannot contain a directory name. When AItem contains an
empty string, the textual response contains only facts for the currently selected non-root directory.

The MLST ( 4354) response does not include any title, header, or summary lines, or any other formatting, and conforms to the
facts indicated in the Capabilities ( 690) for the FTP server.

Use ExtListDir ( 775) to get ( 783) a directory listing for a file or directory using the FTP MLSD command.

See Also
ExtListItem

ExtListDir ( 775)

LastCmdResult ( 2367)

ListResult ( 821)

DirectoryListing ( 818)

Capabilities ( 690)

IdFTPListParseBase. ParseListing ( 2883)

TIdFTP.ExtractFeatFacts Method
Pascal
procedure ExtractFeatFacts(
const ACmd: String;
AResults: TIdStrings
);
Parameters
Parameters Description
ACmd
AResults

Description
ExtractFeatFacts is a procedure used to capture the facts associated with the Feature negotiation mechanism for the File Transfer
Protocol, as described in RFC 2389. The FTP FEAT command provides a mechanism for identifying new commands, or facilities.

Implementations of the FTP protocol cannot be assumed to all immediately implement all newly defined mechanisms. The
Capabilities ( 690) property is used to store the responses received from an FTP FEAT command, and to identify the extended
features available in the server.

One of the negotiated features available includes information about the Trivial Virtual File Store which provides file system naming
conventions modeled loosely upon those of the UNIX ( 4539)(TM) file system. That is, a tree structured file system, built of
directories, each of which can contain other directories, or other kinds of files, or both. Each file and directory has a name relative to
the directory that contains it, except for the directory at the root of the tree, which is contained in no other directory, and hence has
no name of its own.

In addition the MLST ( 4354) and MLSD commands were introduced to provide access to the values. The MLST ( 4354) and
MLSD responses including the detailed data provided by TVFS are referred to as "facts". The "facts" for a file in a reply to a MLSx
command consist of information about that file. The facts are a series of keyword=value pairs each followed by semi-colon (";")
characters. An individual fact may not contain a semi-colon in its name or value. The complete series of facts may not contain the
space character.

The following represents the facts returned when the MLST ( 4354) command is issued for a directory containing the requested
file.

C> PWD
S> 257 "/tmp" is current directory.

778 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

C> MLst cap60.pl198.tar.gz


S> 250- Listing cap60.pl198.tar.gz
S> Type=file;Size=1024990;Perm=r; /tmp/cap60.pl198.tar.gz
S> 250 End
The standard list ( 789) of facts defined for the MLST ( 4354) and MLSD commands include the following names and associated
meanings:

Name Meaning
size ( 805) Size ( 805) in octets
modify Last modification time
create ( 267) Creation time
type Entry type
unique Unique id of file/directory
perm File permissions, whether read, write, or execute is allowed for the login ( 792) id.
lang Language of the file name per IANA ( 4762)[12] registry.
media-type MIME media-type of file contents per IANA ( 4762) registry.
charset Character set per IANA ( 4762) registry (if not UTF-8)

Fact names are case-insensitive. Size ( 805), size ( 805), SIZE, and SiZe are the same fact.

Further operating system specific keywords could be specified by using the IANA ( 4762) operating system name as a prefix
(examples only):

Name Meaning
OS/2.ea OS/2 extended attributes
MACOS.rf MacIntosh resource forks
UNIX.mode Unix file modes (permissions)

Implementations may define keywords for experimental, or private use. All such keywords MUST begin with the two character
sequence "x.". As type names are case independent, "x." and "X." are equivalent.

Name Meaning
x.ver Version ( 269) information
x.desc File description
x.type File type

The Type fact is of special interest due to its in representing either a file or a directory. If the fact is for a directory, is it the current
directory, a regular directory, or a parent directory? The MLST ( 4354) specification makes this unambiguous using the type fact.
The type fact given specifies information about the object listed on the same line of the MLST ( 4354) response.

Five values are possible for the Type fact:

Value Meaning
file a file entry
cdir the current listed directory
pdir path for the parent directory
dir a directory or sub-directory in the current directory

Internet Direct (Indy) Version 10.1.5 779


TIdFTP Class Classes

OS.name=type an OS or file system dependent file type

Unique Fact
Another fact of interest is the unique fact used to present a unique identifier for a file or directory in the file system accessed via a
server process. The value of this fact should be the same for any number of pathnames that refer to the same underlying file. The
fact should have different values for names which reference distinct files. The mapping between files, and unique fact tokens should
be maintained, and remain consistent, for at least the lifetime of the control connection.

This fact would be expected to be used by servers whose host system allows things such as symbolic links so that the same file
may be represented in more than one directory on the server. The only conclusion that should be drawn is that if two different
names each have the same value for the unique fact, they refer to the same underlying object. The value of the unique fact (the
token) should be considered an opaque string for comparison purposes, and is a case dependent value. The tokens "A" and "a" do
not represent the same underlying object.

Modify Fact
The modify fact is used to determine the last time the content of the file (or directory) indicated was modified. Any change of
substance to the file should cause this value to alter. That is, if a change is made to a file such that the results of a RETR command
would differ, then the value of the modify fact should alter. FTP clients should not assume that a different modify fact value indicates
that the file contents are necessarily different than when last retrieved. Some systems may alter the value of the modify fact for
other reasons, though this is discouraged wherever possible. Also a file may alter, and then be returned to its previous content,
which would often be indicated as two incremental alterations to the value of the modify fact.

For directories, this value should alter whenever a change occurs to the directory such that different file names would (or might) be
included in MLSD output of that directory.

Create Fact
The create ( 267) fact indicates when a file, or directory, was first created. Exactly what "creation" is for this purpose is not
specified here, and may vary from server to server. About all that can be said about the value returned is that it can never indicate a
later time than the modify fact.

Implementors of this fact on UNIX ( 4539)(TM) systems should note that the unix "stat" "st_ctime" field does not give creation
time, and that unix file systems do not record creation time at all. Unix (and POSIX) implementations will normally not include this
fact.

Perm Fact
The perm fact is used to indicate access rights the current FTP user has over the object listed. Its value is always an unordered
sequence of up to ten alphabetic characters, like:

? Meaning
A Applies to objects of type=file, and indicates that the APPE (append) command may be applied to the named file.
C Applies to objects of type=dir (and type=pdir, type=cdir), and indicates that files may be created in the directory named using
STOU, STOR, APPE, and RNTO.
D Applies to all object types, and indicates that the named object may be deleted using the DELE or RMD commands.
E Applies to the directory types, and indicates the user can enter the named directory using the CWD or CDUP commands.
F Indicates that the named object named may be renamed using the RNFR command.

780 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

L Applies to the directory file types, and indicates that the LIST, NLST ( 4358), and MLSD commands can be used for the
named directory.
M Applies to directory types, and indicates that the MKD command may be used to create ( 267) a new directory in the named
directory.
P Applies to directory types, and indicates that objects in the directory may be deleted or purged using the DELE command but
not with the RMD command.
R Applies to object of type=file and indicates that the RETR command may be used to access the object.
W Applies to objects of type=file, and indicates that the STOR command may be applied to the named object.

Many permissions are meaningful only when used with a particular type of object. The indicators are case independent, "d" and "D"
are the same indicator.

Please note that when a permission indicator is set, it does not imply that the appropriate command is guaranteed to work.

The permissions are described here as they apply to FTP commands. They may not map easily into particular permissions
available on the server's operating system. Servers are expected to synthesize these permission bits from the permission
information available from operating system. For example, to correctly determine whether the "D" permission bit should be set on a
directory for a server running on the UNIX ( 4539)(TM) operating system, the server should check that the directory named is
empty, and that the user has write permission on both the directory under consideration, and its parent directory.

Lang Fact
The lang fact describes the natural language of the file name for use in display purposes. Values used here should be taken from
the language registry of the IANA ( 4762). FTP server implementations must not guess at language values. Language values
must be determined in an unambiguous way such as file system tagging of language or by user configuration. Note that the lang
fact provides no information at all about the content of a file, only about the encoding of its name.

Size Fact
The size ( 805) fact applies to non-directory file types and should always reflect the approximate size ( 805) of the file. This
should be as accurate as the server can make it, without going to extraordinary lengths, such as reading the entire file. The size (
805) is expressed in units of octets of data in the file.

Given limitations in some systems, FTP client implementations must understand this size ( 805) may not be precise and may
change between the time of a MLST ( 4354) and RETR operation.

Clients that need highly accurate size ( 805) information for some particular reason should use the SIZE command. The most
common need for this accuracy is likely to be in conjunction with the REST command. The size ( 805) fact, on the other hand,
should be used for purposes such as indicating to a human user the approximate size ( 805) of the file to be transferred, and
perhaps to give an idea of expected transfer completion time.

Media-type Fact
The media-type fact represents the IANA ( 4762) media type of the file named, and applies only to non-directory types. The list (
789) of values used must follow the guidelines set by the IANA ( 4762) registry.

FTP server implementations must not guess at media type values. Media type values must be determined in an unambiguous way
such as file system tagging of media-type or by user configuration. This fact gives information about the content of the file named.
Both the primary media type, and any appropriate subtype should be given, separated by a slash "/" as is traditional.

Charset Fact
The charset fact provides the IANA ( 4762) character set name, or alias, for the encoded pathnames in a MLSx response. The
default character set is UTF-8 unless specified otherwise. FTP implementations SHOULD use UTF-8 if possible to encourage

Internet Direct (Indy) Version 10.1.5 781


TIdFTP Class Classes

maximum inter-operability. The value of this fact applies to the pathname only, and provides no information about the contents of
the file.

Required Facts
Servers are not required to support any particular set of the available facts. However, servers should, if conceivably possible,
support at least the type, perm, size ( 805), unique, and modify facts.

TIdFTP.FileDate Method
Rtrieves the date and time a file was last modified on the remote system.

Pascal
function FileDate(
const AFileName: String;
const AsGMT: Boolean = False
): TIdDateTime;
Parameters
Parameters Description
AFileName FIle name to examine for the last modification date and time.
AsGMT Indicates if the GMT date/time value is converted to the local timezone. The default value is False.

Returns
TIdDateTime ( 4733) - Date and optional Time the file was last modified.

Description
FileDate is a TIdDateTime ( 4733) function used to implement support for the FTP MDTM extension command. FileDate allows
the FTP client to access the File Modification Time for a specified file on FTP servers that implement the MDTM feature.

Use the Capabilities ( 690) property to determine if the FTP server supports the MDTM feature, although some server may
support MDTM even when it does not support the FTP FEAT command.

FileDate sends the FTP MDTM command using the value in AFilename as an argument, and expects the numeric response code
213 to indicate successful completion of the FTP command. When 500-series numeric responses are received, the return value for
the method is set to 0.0 or the empty native TIdDateTime ( 4733) value.

File modification time values returned from the FTP server are expressed in the GMT (Greenwich Mean Time) timezone. When
AsGMT contains False, the file modification time value is converted to the local time zone for the FTP client. The return value will
include the a date/time value that includes at a minimum the Year, Month, and Day the file was last modified. On some remote
systems, the hour, minute, seconds, and milliseconds for the modification are also available.

FileDate can be used independent of values available in responses to the FTP MLST ( 4354) or MLSD commands stored in either
ListResult ( 821) or DirectoryListing ( 818). Most FTP servers will return the same value in each of these scenarios.

See Also
List ( 789)

ListResult ( 821)

DirectoryListing ( 818)

TIdFTP.FileStructure Method
Defines the way data is represented in FTP data transfer operations.

Pascal
procedure FileStructure(
AStructure: TIdFTPDataStructure
);

782 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Parameters
Parameters Description
AStructure File structure requested by the FTP client.

Description
FileStructure is a procedure used to implement support for the FTP STRU command on the FTP client. The FTP STRU command is
used to define the way in which data is represented in FTP data transfer operations. The value in AStructure indicates the
representation required for the FTP client, and can contain the following values and meanings:

Value Argument Meaning


dsFile F No internal structure is used, and the file is considered to be a continuous sequence of data bytes.
dsRecord R The file is made up of sequential records.
dsPage P The file is made up of independent indexed pages.

dsFile is the value normally used for FTP data transfers involving text or binary file content. The structure of a file may affect both
the transfer mode of a file and the interpretation and storage of the file.

With some sites being naturally file-oriented and others naturally record-oriented there may be problems if a file with one structure
is sent to a host oriented to the other. If a text file is sent with record-structure to a host which is file oriented, then that host should
apply an internal transformation to the file based on the record structure. Obviously, this transformation should be useful, but it must
also be invertible so that an identical file may be retrieved using record structure.

In the case of a file being sent with file-structure to a record-oriented host, there exists the question of what criteria the host should
use to divide the file into records which can be processed locally. If this division is necessary, the FTP implementation should use
the end-of-line sequence, CRLF for ASCII, or NL for EBCDIC text files, as the delimiter. If an FTP implementation adopts this
technique, it must be prepared to reverse the transformation if the file is retrieved with file-structure.

For more detailed information about implementing the FTP STRU command, please refer to RFC 959.

See Also
TIdFTPDataStructure ( 2950)

TransferMode ( 808)

TransferType ( 829)

TIdFTP.Get Method
Overload List

Method Description
TIdFTP.Get (string, string, boolean, Retrieves a file using the FTP protocol.
Boolean) ( 785)
TIdFTP.Get (string, TIdStream, Retrieves a file using the FTP protocol.
Boolean) ( 783)

TIdFTP.Get Method (string, TIdStream, Boolean)


Retrieves a file using the FTP protocol.

Pascal
procedure Get(
const ASourceFile: string;
ADest: TIdStream;
AResume: Boolean = false
); overload;

Internet Direct (Indy) Version 10.1.5 783


TIdFTP Class Classes

Parameters
Parameters Description
ASourceFile File name on the FTP server.
ADest Stream where file data will be written.
AResume Partial download can be completed.

Description
Get is an overloaded procedure that allows the FTP client to retrieve a file with the name specified in ASourceFile from the FTP
server using the FTP RETR command.

Values retrieved from the server are stored locally in the stream specified in ADest.

Get allows continuing a previous partial download or appending data to an existing file on the local file system when AResume is
True and CanResume ( 814) indicates that the FTP server implementation allows the FTP REST command verb.

Internal processing for the Get method will also trigger the OnStatus ( 359) event handler with the ftpTransfer status ( 806)
value, reads data from the FTP server, and signals the the OnStatus ( 359) event handler with the ftpReady status ( 806) value
on completion. OnStatus ( 359) may be triggered with the value ftpAborted if the response code from the FTP server is the
numeric values 225 or 226.

During data retrieval, Get calls methods that initialize the DataChannel for the FTP client using the connection type specificed in
Passive ( 825).

When Passive ( 825) contains True, the FTP PASV or EPSV commands are used to configure the IP address and Port ( 826)
number for the data channel. When Passive ( 825) contains False, the FTP PORT or EPRT commands are used to configure the
IP address and Port ( 826) number for the data channel using the value indicated in DataPort ( 816), DataPortMin ( 817), and
DataPortMax ( 816). UsingExtDataPort ( 834) indicates if the FTP EPORT command is required.

The OnDataChannelCreate ( 837) event handler is signaled prior to opening the data channel connection.

When both AResume and CanResume ( 814) contain True, the FTP REST command is sent using the existing length of aDestFile
as the initial position for the resumed data transfer.

A secure socket transport for the data channel is updated based on values in DataPortProtection ( 817) and UsingSFTP ( 834)
prior to tranmission of data.

The current value in TransferMode ( 808) is used to determine if ZLib compression has been applied to data during transmission.
When TransferMode ( 808) contains dmDeflate, the Compressor ( 815) object instance is used to read compressed data on the
data channel socket transport. When TransferMode ( 808) contains dmStream, data is read from the transport using the
IPOHandler for the data channel.

After completion of the retrieval process, Get signals the OnDataChannelDestroy ( 838) event handler and frees the data channel
for the FTP client.

Get also signals the OnAfterGet ( 835) event handler following completion of the data transfer.

Use Put ( 795) to transfer data from the FTP client to the FTP server.

See Also
Get

Put ( 795)

CanResume ( 814)

OnAfterGet ( 835)

OnDataChannelCreate ( 837)

OnDataChannelDestroy ( 838)

OnStatus ( 359)

Passive ( 825)

TransferMode ( 808)

784 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Compressor ( 815)

DataPortProtection ( 817)

UsingSFTP ( 834)

EIdFTPFileAlreadyExists ( 90)

TIdFTP.Get Method (string, string, boolean, Boolean)


Retrieves a file using the FTP protocol.

Pascal
procedure Get(
const ASourceFile: string;
const ADestFile: string;
const ACanOverwrite: boolean = false;
AResume: Boolean = false
); overload;
Parameters
Parameters Description
ASourceFile File name on the FTP server.
ADestFile File name and optional path on the local machine.
ACanOverwrite Overwrite an existing file with the same name.
AResume Partial download can be completed.

Description
Get is an overloaded procedure that allows the FTP client to retrieve a file with the name specified in ASourceFile from the FTP
server using the FTP RETR command.

Values retrieved from the server are stored locally in the file name specified in ADestFile.

Get allows continuing a previous partial download or appending data to an existing file on the local file system when AResume is
True and CanResume ( 814) indicates that the FTP server implementation allows the FTP REST command verb.

ACanOverwrite indicates if an existing local file with the name indicated in ADestFile should be overwritten. The local file will be
deleted and recreated when ACanOverwrite contains True and AResume contains False. When ACanOverwrite contains False and
AResume contains True, the destination file will be opened and positioned to the end of the existing file data before retrieving new
data.

An EIdFTPFileAlreadyExists ( 90) exception will be raised when the destination file in ADestFile already exists, and both
ACanOverwrite and AResume contain False.

Internal processing for the Get method will also trigger the OnStatus ( 359) event handler with the ftpTransfer status ( 806)
value, reads data from the FTP server, and signals the the OnStatus ( 359) event handler with the ftpReady status ( 806) value
on completion. OnStatus ( 359) may be triggered with the value ftpAborted if the response code from the FTP server is the
numeric values 225 or 226.

During data retrieval, Get calls methods that initialize the DataChannel for the FTP client using the connection type specificed in
Passive ( 825).

When Passive ( 825) contains True, the FTP PASV or EPSV commands are used to configure the IP address and Port ( 826)
number for the data channel. When Passive ( 825) contains False, the FTP PORT or EPRT commands are used to configure the
IP address and Port ( 826) number for the data channel using the value indicated in DataPort ( 816), DataPortMin ( 817), and
DataPortMax ( 816). UsingExtDataPort ( 834) indicates if the FTP EPORT command is required.

The OnDataChannelCreate ( 837) event handler is signaled prior to opening the data channel connection.

When both AResume and CanResume ( 814) contain True, the FTP REST command is sent using the existing length of aDestFile
as the initial position for the resumed data transfer.

A secure socket transport for the data channel is updated based on values in DataPortProtection ( 817) and UsingSFTP ( 834)
prior to tranmission of data.

The current value in TransferMode ( 808) is used to determine if ZLib compression has been applied to data during transmission.

Internet Direct (Indy) Version 10.1.5 785


TIdFTP Class Classes

When TransferMode ( 808) contains dmDeflate, the Compressor ( 815) object instance is used to read compressed data on the
data channel socket transport. When TransferMode ( 808) contains dmStream, data is read from the transport using the
IPOHandler for the data channel.

After completion of the retrieval process, Get signals the OnDataChannelDestroy ( 838) event handler and frees the data channel
for the FTP client.

Get also signals the OnAfterGet ( 835) event handler following completion of the data transfer.

Use Put ( 795) to transfer data from the FTP client to the FTP server.

See Also
Get

Put ( 795)

CanResume ( 814)

OnAfterGet ( 835)

OnDataChannelCreate ( 837)

OnDataChannelDestroy ( 838)

OnStatus ( 359)

Passive ( 825)

TransferMode ( 808)

Compressor ( 815)

DataPortProtection ( 817)

UsingSFTP ( 834)

EIdFTPFileAlreadyExists ( 90)

TIdFTP.GetLoginPassword Method
Overload List

Method Description
TIdFTP.GetLoginPassword () ( 786) Constructs the authentication credentials for the FTP session in the Login ( 792)
method.
TIdFTP.GetLoginPassword (String) ( Constructs the authentication credentials for the FTP session in the Login ( 792)
787) method.

TIdFTP.GetLoginPassword Method ()
Constructs the authentication credentials for the FTP session in the Login ( 792) method.

Pascal
function GetLoginPassword: String; overload;
Returns
String - The hashed OTP Response using the Password ( 826) for the FTP client.

Description
GetLoginPassword is an overloaded String function used to construct the authentication credentials for the FTP session in the
Login ( 792) method.

GetLoginPassword provides a mechanism for transparently supporting the One-Time-Password ( 826) (OTP) system for FTP
servers that implement the capability in the response for the FTP USER command.

786 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

GetLoginPassword uses the text in the LastCmdResult ( 2367) as the potential OTP challenge, and calls the overridden
GetLoginPassword method. If the response includes a line that begins with the characters "otp-", the hashing algorithm and the
challenge are read from the FTP response. The hashing algorithm is used to generate an OTP response using the OTP Challenge
and the value in the Password ( 826) property.

If an OTP challenge is not found in the response to the FTP USER command, the value in the Password ( 826) property is used
for the authentication credentials in the Login ( 792) method.

See Also
GetLoginPassword

Login ( 792)

TIdFTP.GetLoginPassword Method (String)


Constructs the authentication credentials for the FTP session in the Login ( 792) method.

Pascal
function GetLoginPassword(
const APrompt: String
): String; overload;
Parameters
Parameters Description
APrompt Challenge for the One-Time-Password ( 826) system.

Returns
String - The hashed OTP Response using the Password ( 826) for the FTP client.

Description
GetLoginPassword is an overloaded String function used to construct the authentication credentials for the FTP session in the
Login ( 792) method.

GetLoginPassword provides a mechanism for transparently supporting the One-Time-Password ( 826) (OTP) system for FTP
servers that implement the capability in the response for the FTP USER command. If the response includes a line that begins with
the characters "otp-", the hashing algorithm and the challenge are read from the FTP response. The hashing algorithm is used to
generate an OTP response using the OTP Challenge and the value in the Password ( 826) property.

If an OTP challenge is not found in the response to the FTP USER command, the value in the Password ( 826) property is used
for the authentication credentials in the Login ( 792) method.

See Also
GetLoginPassword

Login ( 792)

TIdFTP.Help Method
Requests FTP server capabilities or site ( 803)-specific implementations.

Pascal
procedure Help(
var AHelpContents: TIdStringList;
ACommand: String = ''
);
Parameters
Parameters Description
AHelpContents Values returned from the HELP command.
ACommand Optional argument requesting more specific information.

Internet Direct (Indy) Version 10.1.5 787


TIdFTP Class Classes

Description
Help is a procedure used to retrieve the FTP server capabilities, and other helpful information, using the FTP HELP command. The
values returned in AHelpContents will reflect information regarding its implementation status ( 806) over the control connection for
the FTP client.

Help can send the optional argument in ACommand to request more specific information about a particular command implemented
in the FTP server. The server may use this reply to specify site ( 803)-dependent parameters, e.g., in response to HELP SITE.

Please note that Help has no effect if the FTP client is not Connected ( 2353). Help can be used prior to Login ( 792) or other
forms of user authentication.

See Also
Connect ( 771)

Login ( 792)

TIdFTP.IsExtSupported Method
Determine if an FTP command is a supported FTP extension command for the FTP server.

Pascal
function IsExtSupported(
const ACmd: String
): Boolean;
Parameters
Parameters Description
ACmd FTP command to locate in the server Capabilities ( 690).

Returns
Boolean - True when the command is supported.

Description
IsExtSupported is a Boolean function used to determine if the FTP command specified in ACmd is a supported FTP extension
command for the FTP server implementation.

IsExtSupported compares the value in ACmd to the individual lines of text found in the Capabilities ( 690) property. The text
comparision is not case sensitive, so the values "MDTM", "MdTm", and "mdtm" are all considered equivalent.

Values in the Capabilities ( 690) property are stored when the FTP FEAT command is executed during execution of the Login (
792) method.

IsExtSupported returns True when the value in ACmd appears in the lines of text found in the Capabilities ( 690) property.

See Also
Capabilities ( 690)

Login ( 792)

TIdFTP.IsServerMDTZAndListTForm Method
Indicates if the FTP server is one that supports the FTP MDTM and LIST -T commands.

Pascal
function IsServerMDTZAndListTForm: Boolean;
Returns
Boolean - True when the FTP server supports MDTM commands with timezone offsets and the LIST -T command.

Description
IsServerMDTZAndListTForm is a Boolean function used to indicate if the FTP server is one that supports the FTP MDTM and LIST

788 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

-T commands, even when they are not listed in the response to the FTP FEAT command.

IsServerMDTZAndListTForm returns True when modification date and times in the format MDTM yyyymmddhhmmss[+-xxx] are
supported, and the FTP LIST -T command is also supported.

IsServerMDTZAndListTForm uses values in the initial line of the server Greeting ( 2364) to determine if the remote FTP server is
one the following special implementations:

Serv-U
BPFTP Server
TitanFTP server

TIdFTP.KillDataChannel Method
Closes the data channel for the FTP client session during Abort ( 768).

Pascal
procedure KillDataChannel; virtual;
Description
KillDataChannel is a procedure used to close the data channel for the FTP client session. When the DataChannel has been
assigned for the FTP client, the Disconnect ( 2355) method for the socket is called.

KillDataChannel is used in the Abort ( 768) method to ensure that an active data channel connection is closed following
transmission of the FTP ABOR command.

See Also
Abort ( 768)

IOHandler ( 2364)

Socket ( 2369)

TIdFTP.List Method
Overload List

Method Description
TIdFTP.List () ( 789) Retrieves a list of files and directories on the FTP server.
TIdFTP.List (string, Boolean) ( 791) Retrieves a list of files and directories on the FTP server.
TIdFTP.List (TIdStrings, string, Retrieves a list of files and directories on the FTP server.
Boolean) ( 790)

TIdFTP.List Method ()
Retrieves a list of files and directories on the FTP server.

Pascal
procedure List; overload;
Description
List is an overloaded procedure used to request a list of files or directories in the current directory on the FTP server.

Unlike overloadeed variants of the List method, no file specifier is used and file details are always returned. List calls the overloaded
List method using an Unassigned (Nil) value for the storage of the textual responses that make up the directory listing.

If CanUseMLS contains True, the ExtListDir ( 775) is called to capture and store the results of the FTP MLSD command in the

Internet Direct (Indy) Version 10.1.5 789


TIdFTP Class Classes

ADest parameter variable instead of the LIST or NLST ( 4358) commands. No additional processing is performed in the List
method under this circumstance, and the method is exited.

Prior to executing the LIST command, the TransferType ( 829) for the control channel is set to ftASCII. While this is not a
requirement of the FTP protocol, it is a common practice in most FTP clients. The previous value of the TransferType ( 829)
property is restored before exiting from the List method.

Textual responses to the FTP command are captured and stored in the ListResult ( 821) property. The value of the UsedMLS
property is set to False to indicate that the MLST ( 4354) parser should not be used on textual values in the ListResult ( 821)
property.

List will clear any existing entries found in the DirectoryListing ( 818) property, and free the collection used for the structured
directory listing. The collection is recreated and values in the ListResult ( 821) are parsed into collection items on the initial read
access to the DirectoryListing ( 818) property.

See Also
ListResult ( 821)

DirectoryListing ( 818)

List

CanUseMLS

UsedMLS

ExtListDir ( 775)

TransferType ( 829)

TIdFTP.List Method (TIdStrings, string, Boolean)


Retrieves a list of files and directories on the FTP server.

Pascal
procedure List(
ADest: TIdStrings;
const ASpecifier: string = '';
ADetails: Boolean = True
); overload;
Parameters
Parameters Description
ADest List for files and directories in the current directory.
ASpecifier File mask for the listing. Default value is ''.
ADetails Include file details. Default value is True.

Description
List is an overloaded procedure used to request a list of files or directories in the current or specified directory on the FTP server.

ADest is a TIdStringList ( 3088) argument used to store the raw text values returned from the FTP server directory listing.

ASpecifier is a String value that contains a mask indicating the files and/or directories to be included in the listing. ASpecifier can
contain common wildcard characters like '*' and '?'. Some useful masks include:

Mask Usage
All files in the current directory.
.

* All directory entries in the current directory.


*. All files regardless of extension in the current directory.
A??.txt All text files that have a 3-character name starting with the letter 'A'.

790 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Please note that the actual use and meaning of a wildcard character is dependent on the file system implmented on the remote FTP
server. There is no universal definition for any one particular wildcard character.

ADetails is a Boolean value that indicates if the list should contain details about the files and directories that match the mask in
ASpecifier.

If CanUseMLS contains True, the ExtListDir ( 775) is called to capture and store the results of the FTP MLSD command in the
ADest parameter variable instead of the LIST or NLST ( 4358) commands. No additional processing is performed in the List
method under this circumstance, and the method is exited.

When ADetails is False, only the file or directory name is returned in the ADest string list using the FTP NLST ( 4358) command.
When ADetails is True, List can return FTP server-dependent details including the file size ( 805), date modified, and file
permissions for the Owner, Group, and User using the FTP LIST command.

Prior to executing the LIST or NLST ( 4358) commands, the TransferType ( 829) for the control channel is set to ftASCII. While
this is not a requirement of the FTP protocol, it is a common practice in most FTP clients. The previous value of the TransferType
( 829) property is restored before exiting from the List method.

Textual responses to the FTP command are captured and stored in both the ADest parameter variable and the ListResult ( 821)
property. The value of the UsedMLS property is set to False to indicate that the MLST ( 4354) parser should not be used on
textual values in the ListResult ( 821) property.

List will clear any existing entries found in the DirectoryListing ( 818) property, and free the collection used for the structured
directory listing. The collection is recreated and values in the ListResult ( 821) are parsed into collection items on the initial read
access to the DirectoryListing ( 818) property.

Example
[Delphi]
AFiles := TIdStringList.Create;
AFtp.List(AFiles, '*.zip', True);

if AFtp.DirectoryListing.Count <> 0 then


begin
FillDirListView(AFtp.DirectoryListing)
end;
See Also
ListResult ( 821)

DirectoryListing ( 818)

List

CanUseMLS

UsedMLS

ExtListDir ( 775)

TransferType ( 829)

TIdFTP.List Method (string, Boolean)


Retrieves a list of files and directories on the FTP server.

Pascal
procedure List(
const ASpecifier: string;
ADetails: Boolean = True
); overload;
Parameters
Parameters Description
ASpecifier File mask for the listing. Default value is ''.
ADetails Include file details. Default value is True.

Internet Direct (Indy) Version 10.1.5 791


TIdFTP Class Classes

Description
List is an overloaded procedure used to request a list of files or directories in the current directory on the FTP server.

ASpecifier is a String value that contains a mask indicating the files and/or directories to be included in the listing. ASpecifier can
contain common wildcard characters like '*' and '?'. Some useful masks include:

Mask Usage
All files in the current directory.
.

* All directory entries in the current directory.


*. All files regardless of extension in the current directory.
A??.txt All text files that have a 3-character name starting with the letter 'A'.

ADetails is a Boolean value that indicates if the list should contain details about the files and directories that match the mask in
ASpecifier.

List calls the overloaded List method using an Unassigned (Nil) value for the storage of the textual responses that make up the
directory listing.

If CanUseMLS contains True, the ExtListDir ( 775) is called to capture and store the results of the FTP MLSD command in the
ADest parameter variable instead of the LIST or NLST ( 4358) commands. No additional processing is performed in the List
method under this circumstance, and the method is exited.

Prior to executing the LIST command, the TransferType ( 829) for the control channel is set to ftASCII. While this is not a
requirement of the FTP protocol, it is a common practice in most FTP clients. The previous value of the TransferType ( 829)
property is restored before exiting from the List method.

Textual responses to the FTP command are captured and stored in the ListResult ( 821) property. The value of the UsedMLS
property is set to False to indicate that the MLST ( 4354) parser should not be used on textual values in the ListResult ( 821)
property.

List will clear any existing entries found in the DirectoryListing ( 818) property, and free the collection used for the structured
directory listing. The collection is recreated and values in the ListResult ( 821) are parsed into collection items on the initial read
access to the DirectoryListing ( 818) property.

See Also
ListResult ( 821)

DirectoryListing ( 818)

List

CanUseMLS

UsedMLS

ExtListDir ( 775)

TransferType ( 829)

TIdFTP.Login Method
Authenticates a client connection to the FTP server.

Pascal
procedure Login;
Description
Login is a procedure used to perform FTP protocol exchanges needed to provide authentication for the FTP client connection to the
remote FTP server.

792 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP ( 759) includes support for Tranport Layer Security (or TLS) as indicated in the UseTLS ( 833) property. When UseTLS
( 833) contains a value that indicates explicit use of TLS/SSL, Login will perform the FTP commands required to handle the TLS
negotiation including the FTP AUTH command for the values indicated in the the TLS_AUTH_NAMES ( 4396) array.

Login provides support for proxied connections to the FTP server through properties and methods in ProxySettings ( 827). Set the
value in ProxySettings.ProxyType to the TIdFtpProxyType ( 2951) value desired for the connection prior to calling Connect (
771) or Login. Please note that proxied connections using the TIdFtpProxyType ( 2951) value fpcmHttpProxyWithFtp are not
implemented at this time.

Login sends the OPEN (for certain proxy settings), USER, and PASS commands as required to perform authentication using the
values in Username ( 833), Password ( 826), and the corresponding property values in ProxySettings ( 827). If the FTP server
supports the OTP (One-Time-Password ( 826)) system, the appropriate hashed values are calculated using the OTP challenge
and the Password ( 826) property.

Login stores the values in LastCmdResult ( 2367) in the LoginMsg ( 822) property, and triggers the OnBannerAfterLogin ( 835)
eent handler using the formatted reply in LoginMsg ( 822).

Login will attempt to perform optional feature negotiation for servers supporting the FTP FEAT command. The response from the
FTP FEAT command is stored in the Capabilities ( 690) property, and made available for use in other FTP client methods. When
UsingExtDataPort ( 834) is True, Login checks that the FTP EPRT and EPSV extension commands are available in the
Capabilities ( 690) property.

When ClientInfo ( 814) contains non-empty values, the FTP CLNT extension command is used to send the identification values
when the remote server include the CLNT command in its Capabilties.

Login updates the value in CanUseMLS to indicate if the MLST ( 4354) and MLSD listing formats can be used and are supported
in the server Capabilties.

Login updates the value in LangsSupported ( 820) to reflect the facts associated with the FTP feature extracted from the
Capabilities ( 690) property.

Login sends the trandfer type for the authenticated connection using the value in the TransferType ( 829) property.

Login is called by the Connect ( 771) method when AutoLogin ( 813) contains True, and can be called in an application after
using the ReInitialize ( 798) method.

Use the Account ( 812) method to provide additional information about a client connection on some FTP server implementations.

See Also
Username ( 833)

Password ( 826)

ProxySettings ( 827)

Account ( 812)

ClientInfo ( 814)

Connect ( 771)

Login

LoginMsg ( 822)

AutoLogin ( 813)

Capabilities ( 690)

LangsSupported ( 820)

CanUseMLS

UseTLS ( 833)

ReInitialize ( 798)

TransferType ( 829)

Internet Direct (Indy) Version 10.1.5 793


TIdFTP Class Classes

TIdFtpProxyType ( 2951)

TIdFTP.MakeDir Method
Creates a directory on the FTP server.

Pascal
procedure MakeDir(
const ADirName: string
);
Parameters
Parameters Description
ADirName Directory to create ( 267).

Description
MakeDir is a procedure used to create ( 267) a directory on the FTP server.

ADirName is a String that identifies the directory to be created on the FTP server. ADirName must conform to the file naming
conventions for the FTP server, or an FTP error response code and message will be returned.

MakeDir causes the directory specified in ADirName to be created as a directory (if the pathname is absolute) or as a subdirectory
of the current working directory (if the pathname is relative).

Please note that some FTP servers may not allow the user to create ( 267) new directories based on permissions set when
authentication is performed in the Login ( 792) method.

Use RemoveDir ( 798) to remove a specified directory using its absolute or relative path name.

Use ChangeDir ( 769) to change the current directory on the remote FTP server to a specific absolute or relative path.

Use RetrieveCurrentDir ( 800) to determine the present working directorty on the remote FTP server file system.

Example
[Delphi]
AFtp.MakeDir('/public/MyFiles');
AFtp.MakeDir('/public/MyOtherFiles');

AFtp.ChangeDir('/public');
AFtp.ChangeDir('MyFiles');
AFtp.ChangeDirUp;
AFtp.ChangeDir('MyOtherFiles');
AFtp.ChangeDir('/');
AFtp.RemoveDir('/public/MyOtherFiles');
See Also
ChangeDir ( 769)

ChangeDirUp ( 770)

RemoveDir ( 798)

RetrieveCurrentDir ( 800)

TIdFTP.Noop Method
Sends a Keep-Alive signal to the FTP server.

Pascal
procedure Noop;
Description
Noop is a procedure used to send a keep-alive signal to the FTP server. Noop is sometimes use to prevent the FTP server from
closing a connection which is idle for a long period of time.

794 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
Connect ( 771)

TIdFTP.Put Method
Overload List

Method Description
TIdFTP.Put (string, string, boolean) ( Uploads a file to an FTP server.
796)
TIdFTP.Put (TIdStream, string, Uploads a file to an FTP server.
boolean) ( 795)

TIdFTP.Put Method (TIdStream, string, boolean)


Uploads a file to an FTP server.

Pascal
procedure Put(
const ASource: TIdStream;
const ADestFile: string;
const AAppend: boolean = false
); overload;
Parameters
Parameters Description
ASource Stream containing data to be uploaded.
ADestFile Destination file name on the remote FTP server.
AAppend Indicates content should be appended to existing data. Default value is false.

Description
Put is an overloaded procedure used to upload the contents of a file or streak found on the local client to a specified file on the
remote FTP server.

ASource is a TIdStream ( 3087) descendant with the local content to be transferred to the remote FTP server.

ASourceFile specified a file name (with optional relative or absolute path information) for the local content to be transferred to the
remote FTP server.

ADestFile is the file name used to stored the content on the remote FTP server. ADestFile can contain path information (in either
relative or absolute form) as well as a valid file name for the remote file system. When path information is omitted, the file in
ADestFile will be created in the current working directory on the remote FTP server.

When ADestFile contains an empty string, the file name in ASourceFile (without path information) is used as the destination file
name for the data transfer.

An EIdFTPUploadFileNameCanNotBeEmpty ( 98) exception is raised if Put is called using an empty string in the ADestFile
argument.

Put triggers the OnBeforePut event handler when it has been assigned for the FTP client.

Put uses the value in the AApend argument to determine the correct FTP command to use for the data transfer. When AAppend
contains True, the FTP server will append data from the transfer to the end of a file which already exists on the FTP server. using
the FTP APPE command. When AAppend is False, the data from ASource or ASourceFile overwrites any existing values in
ADestFile using the FTP STOR command.

During execution, Put triggers execution of the OnStatus ( 359) event handler using values that indicates then the transfer is
starting, has been completed, or has been aborted.

Put creates, initializes, and maintains the data channel used to perform the data transfer based on the values in the Passive (
825), UsingExtDataPort ( 834), and TransferMode ( 808) properties.

Internet Direct (Indy) Version 10.1.5 795


TIdFTP Class Classes

When Passive ( 825) contains False, the values in DataPort ( 816), DataPortMin ( 817), and DataPortMax ( 816) are also
used to bind listen for the active server connection for the data channel.

Put triggers the OnDataChannelCreate ( 837) event handler after creating (but prior to connecting) the data channel.

During transmission, Put uses the current value in the TransferMode ( 808) property to determine if the Compressor ( 815)
property is used perfrom "Deflate" compression for values written on the IOHandler ( 2364) for the data channel. The value
dmDefalte indicates that MODE Z is used for the data transfer.

Put triggers the OnDataChannelDestroy ( 838) event handler after closing (but prior to freeing) the data channel.

Put triggers the OnAfterPut event handler when it has been assigned for the FTP client.

Use Abort ( 768) to cancel an executing data transfer request.

Use KillDataChannel ( 789) to force the data channel for the FTP session to be closed.

Exceptions
Exceptions Description
EIdFTPUploadFileNameCanNotBeEmpty ( 98) With the message RSFTPFileNameCanNotBeEmpty when the destination file name is empty.

See Also
Put

Get ( 783)

Abort ( 768)

KillDataChannel ( 789)

TIdFTP.Put Method (string, string, boolean)


Uploads a file to an FTP server.

Pascal
procedure Put(
const ASourceFile: string;
const ADestFile: string = '';
const AAppend: boolean = false
); overload;
Parameters
Parameters Description
ASourceFile File containing data to be uploaded.
ADestFile Destination file name on the remote FTP server. Default value is ''.
AAppend Indicates content should be appended to existing data. Default value is false.

Description
Put is an overloaded procedure used to upload the contents of a file or streak found on the local client to a specified file on the
remote FTP server.

ASource is a stream descendant with the local content to be transferred to the remote FTP server.

ASourceFile specified a file name (with optional relative or absolute path information) for the local content to be transferred to the
remote FTP server.

ADestFile is the file name used to stored the content on the remote FTP server. ADestFile can contain path information (in either
relative or absolute form) as well as a valid file name for the remote file system. When path information is omitted, the file in
ADestFile will be created in the current working directory on the remote FTP server.

When ADestFile contains an empty string, the file name in ASourceFile (without path information) is used as the destination file
name for the data transfer.

An EIdFTPUploadFileNameCanNotBeEmpty ( 98) exception is raised if Put is called using an empty string in the ADestFile
argument.

Put triggers the OnBeforePut event handler when it has been assigned for the FTP client.

796 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Put uses the value in the AApend argument to determine the correct FTP command to use for the data transfer. When AAppend
contains True, the FTP server will append data from the transfer to the end of a file which already exists on the FTP server. using
the FTP APPE command. When AAppend is False, the data from ASource or ASourceFile overwrites any existing values in
ADestFile using the FTP STOR command.

During execution, Put triggers execution of the OnStatus ( 359) event handler using values that indicates then the transfer is
starting, has been completed, or has been aborted.

Put creates, initializes, and maintains the data channel used to perform the data transfer based on the values in the Passive (
825), UsingExtDataPort ( 834), and TransferMode ( 808) properties.

When Passive ( 825) contains False, the values in DataPort ( 816), DataPortMin ( 817), and DataPortMax ( 816) are also
used to bind listen for the active server connection for the data channel.

Put triggers the OnDataChannelCreate ( 837) event handler after creating (but prior to connecting) the data channel.

During transmission, Put uses the current value in the TransferMode ( 808) property to determine if the Compressor ( 815)
property is used perfrom "Deflate" compression for values written on the IOHandler ( 2364) for the data channel. The value
dmDefalte indicates that MODE Z is used for the data transfer.

Put triggers the OnDataChannelDestroy ( 838) event handler after closing (but prior to freeing) the data channel.

Put triggers the OnAfterPut event handler when it has been assigned for the FTP client.

Use Abort ( 768) to cancel an executing data transfer request.

Use KillDataChannel ( 789) to force the data channel for the FTP session to be closed.

Exceptions
Exceptions Description
EIdFTPUploadFileNameCanNotBeEmpty ( 98) With the message RSFTPFileNameCanNotBeEmpty when the destination file name is empty.

See Also
Put

Get ( 783)

Abort ( 768)

KillDataChannel ( 789)

TIdFTP.Quit Method
Closes the FTP client connection.

Pascal
procedure Quit;
Description
Quit is a procedure used to close the connection to the FTP server when a file transfer operation is not in progress. Quit closes the
control channel for the FTP client.

Quit sends the FTP QUIT command when the connection to the remote FTP server is currently opened. If the client is not currently
connected ( 2353), the QUIT command is omitted.

Quit calls the Disconnect ( 2355) method to close the control channel connection for the FTP client.

An application should call Abort ( 768), when a file transfer is in progress, prior to calling the Quit method.

See Also
Abort ( 768)

Disconnect ( 2355)

Internet Direct (Indy) Version 10.1.5 797


TIdFTP Class Classes

TIdFTP.Quote Method
Implements execution of FTP commands not directly supported in this component.

Pascal
function Quote(
const ACommand: String
): SmallInt;
Parameters
Parameters Description
ACommand FTP command to be executed.

Returns
SmallInt - Result code from the FTP operation.

Description
Quote is a SmallInt function that implements execution of the literal FTP command specified in ACommand, and returns the result
code from the operation. Quote is used to allow FTP commands that are site ( 803)-specific or not implemented by the TIdFTP (
759) component.

For example, Quote is used in TIdFTP ( 759) to perform the FTP REST command.

Quote executes the string literal in ACommand using the inherited SendCmd ( 2360) method.

TIdFTP.ReInitialize Method
Clears the account and settings for the FTP client.

Pascal
procedure ReInitialize(
ADelay: Cardinal = 10
);
Parameters
Parameters Description
ADelay Default value is 10.

Description
ReInitialize is a procedure that performs the FTP REIN command for a Connected ( 2353) FTP client. ReInitialize is used to clear
the current Account ( 812) and settings for the FTP client.

All TIdFTP ( 759) properties are reset to the default values, and the control channel is left open. This is identical to the client state
immediately after the control channel is opened using Connect ( 771).

ReInitialize will pause for the number of milliseconds specified in ADelay prior to sending the FTP REIN command.

ReInitialize clears the value in the LoginMsg ( 822) property. Exisiting collection items in the DirectoryListing ( 818) collection are
cleared. Passive ( 825), TransferType ( 829), and CanResume ( 814) are reset to their default values.

ReInitialize also sets the Username ( 833) and Password ( 826) properties to empty string values. An application should
normally call the Login ( 792) method after using ReInitialize.

See Also
Connect ( 771)

Login ( 792)

TIdFTP.RemoveDir Method
Removes a directory on the FTP server.

798 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Pascal
procedure RemoveDir(
const ADirName: string
);
Parameters
Parameters Description
ADirName Directory to be removed.

Description
RemoveDir is a procedure used to request that the directory in ADirName be removed from the FTP server file hierarchy.

RemoveDir sends the FTP RMD command using the argument in ADirName to remove the requested directory.

ADirName can contain either an absolute or relative path name on the remote file system. In general, FTP server implementation
will not allow the client to remove the root directory or top-level directory on the remote file system.

Some FTP servers do not allow users to remove directory entries when their permissions are not sufficient for the operation.

Use Delete ( 773) to remove files from the FTP server file system.

See Also
Delete ( 773)

TIdFTP.Rename Method
Change the name of a file on the FTP server file system.

Pascal
procedure Rename(
const ASourceFile: string;
const ADestFile: string
);
Parameters
Parameters Description
ASourceFile Original file name.
ADestFile New file name.

Description
Rename is a procedure used to change the name of an existing file on the remote file system.

ASourceFile specifies the existing file name.

ADestFile is the new name to use for the remote file.

Both ASourceFile and ADestFile allow use of absolute or relative path names in the argument values. If path information is not
found in the argument values, the current directory on the remote file system is assumed.

Rename calls SendCmd ( 2360) using the FTP commands RNFR and RNTO in succession to perform the rename file operation.

See Also
SendCmd ( 2360)

TIdFTP.ResumeSupported Method
Indicates if the server implements the FTP REST command.

Pascal
function ResumeSupported: Boolean;
Returns
Boolean - True when restart markers are supported.

Internet Direct (Indy) Version 10.1.5 799


TIdFTP Class Classes

Description
ResumeSupported is a Boolean function used as the read access specifier for the CanResume ( 814) property, and indicates if
the FTP server implements the FTP REST command.

ResumeSupported calls the Quote ( 798) method using the FTP command literal 'REST 1' to determine if the capability is
supported in the FTP server implementation, and calls Quote ( 798) using the command 'REST 0' to disable the test.

When ResumeSupported returns True, the FTP server allows restart markers for file transfer.

ResumeSupported is examined in Get ( 783) to determine if the FTP REST command is needed to resume file retrieval at a
specified restart marker.

See Also
Get ( 783)

CanResume ( 814)

TIdFTP.RetrieveCurrentDir Method
Gets the current directory name on the FTP server.

Pascal
function RetrieveCurrentDir: string;
Returns
String - Current directory name.

Description
RetrieveCurrentDir is a String function that returns the name of the present working directory, or current directory, on the FTP
server.

RetrieveCurrentDir sends the FTP PWD command to retrieve the server response with the present working directory information.

The return value for RetrieveCurrentDir will contain the current directory name with leading and trailing quote ( 798) (") characters
removed.

Use ChangeDir ( 769) or ChangeDirUp ( 770) to select the current directory by path or relative position in the directory hierarchy.

Example
[Delphi]
AFtp.ChangeDirUp;
CurDirEdit.Text := AFtp.RetrieveCurrentDir;
AFtp.List;
See Also
ChangeDir ( 769)

ChangeDirUp ( 770)

TIdFTP.SetCMDOpt Method
Specifies the behavior to appply to a subsequent FTP command.

Pascal
procedure SetCMDOpt(
const ACMD: String;
const AOptions: String
);
Parameters
Parameters Description
ACMD Command to be affected by the options.

800 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

AOptions Options to be applied for the FTP session.

Description
SetCMDOpt is a procedure used to implement support for the FTP OPTS command, as described in the Internet Standards
document:

RFC 2389 - Feature negotiation mechanism for the File Transfer Protocol

SetCMSOpt allows the FTP client to specify the desired behavior of an FTP server when the command in ACMD is subsequently
issued. The exact behavior, and syntax, will vary with the target command indicated, and will be specified with the definition of that
command.

Where no OPTS behavior is defined for a particular command there are no options available for that command.

The OPTS command should be implemented whenever the FTP FEAT command is implemented on the remote FTP server.
Because of that, there is no indication in the Capabilities ( 690) property to indicate that the OPTS command itself is supported.

SetCMSOpts sends the FTP OPTS command using the values in ACMD and AOptions as arguments. The numeric response code
200 is exepected to indicate successful completion of the FTP command.

TIdFTP.SetLang Method
Requests greeting and textual responses in the spcified language.

Pascal
procedure SetLang(
const ALangTag: String
);
Parameters
Parameters Description
ALangTag Language tag for the FTP client.

Description
SetLang is a procedure used to implement negotiated language support for greeting and error messages on the the FTP server.
Use SetLang to indicate which language to present server greetings and the textual part of command responses.

ALangTag contains one of the language tags defined in RFC 1766. If ALangTag contains an empty string, the sever should use the
default language for the server implementation. Greetings and responses issued prior to language negotiation are also in the
server's default language.

The SetLang method affects only presentation of greeting messages and explanatory text associated with command responses. No
attempt should be made by the server to translate protocol elements (FTP commands and numeric responses) or data transmitted
over the data connection. Commands and numeric responses in the FTP protocol are unaffected by language support on the FTP
server.

SetLang sends the FTP LANG command using the value in ALabgTag as an argument.

An FTP client may issue the LANG command at any time during an FTP session. In order to gain the full benefit of this command, it
should be presented prior to authentication.

Please note that most FTP servers do not implement support for the FTP LANG command. Use the IsExtSupported ( 788) or
LangsSupported ( 820) methods to determine if language support appears the Capabilties for the remote FTP server.

See Also
Connect ( 771)

Login ( 792)

Capabilities ( 690)

IsExtSupported ( 788)

LangsSupported ( 820)

Internet Direct (Indy) Version 10.1.5 801


TIdFTP Class Classes

TIdFTP.SetModTime Method
Sets the last modification time for the specified file.

Pascal
procedure SetModTime(
const AFileName: String;
const ALocalTime: TIdDateTime
);
Parameters
Parameters Description
AFileName File name to update on the remote file system.
ALocalTime Time value to use as the last modification time.

Description
SetModTime is a procedure that implements support for the FTP extension command that updates the last modification time for the
specified file.

AFileName is the file name on the remote FTP server file system, and can contain absolute or relative path information. When path
information is omitted, the file must be located in the current directory on the remote file system.

ALocalTime is the native date and time value to use as the last modification time for the specified file. ALocalTime contains the last
modification time expressed in the timezone for the local FTP client.

SetModTime sends the FTP MFMT command using the value in ALocalTime converted to the GMT (UTC) timezone to perform the
update for the specified file name.

Some FTP servers have inappropriately implemented this capability using the MDTM command. While this is considered an abuse
of the MDTM implementation, TIdFTP ( 759) will revert to using this mechanism when the server does not implement the MFMT
extension command. In this situation, the value in TZInfo ( 831) may also be used when the MDTM implementation does not
support the MDTM YYYYMMDDHHMMSS[+-TZ ( 4765)] format.

Use SetModTimeGMT ( 802) to update the last modification time using a time value expressed in the GMT (UTC) timezone.

Use the Capabilities ( 690) property or the IsExtSupported ( 788) method to determine if the FTP MFMT or MDTM extension
commands are supported in the FTP server implementation.

See Also
SetModTimeGMT ( 802)

Capabilities ( 690)

IsExtSupported ( 788)

TIdFTP.SetModTimeGMT Method
Sets the last modification time for the specified file.

Pascal
procedure SetModTimeGMT(
const AFileName: String;
const AGMTTime: TIdDateTime
);
Parameters
Parameters Description
AFileName File name to update on the remote file system.
AGMTTime Time value to use as the last modification time.

Description
SetModTimeGMT is a procedure that implements support for the FTP extension command that updates the last modification time
for the specified file.

802 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

AFileName is the file name on the remote FTP server file system, and can contain absolute or relative path information. When path
information is omitted, the file must be located in the current directory on the remote file system.

ALocalTime is the native date and time value to use as the last modification time for the specified file. ALocalTime contains the last
modification time expressed in the GMT (UTC) timezone.

SetModTimeGMT sends the FTP MFMT command using the value in ALocalTime to perform the update for the specified file name.

Some FTP servers have inappropriately implemented this capability using the MDTM command. While this is considered an abuse
of the MDTM implementation, TIdFTP ( 759) will revert to using this mechanism when the server does not implement the MFMT
extension command. In this situation, the value in TZInfo ( 831) may also be used when the MDTM implementation does not
support the MDTM YYYYMMDDHHMMSS[+-TZ ( 4765)] format.

Use SetModTime ( 802) to update the last modification time using a time value expressed in the FTP client's timezone.

Use the Capabilities ( 690) property or the IsExtSupported ( 788) method to determine if the FTP MFMT or MDTM extension
commands are supported in the FTP server implementation.

See Also
SetModTime ( 802)

Capabilities ( 690)

IsExtSupported ( 788)

TIdFTP.Site Method
Sends an FTP server site command.

Pascal
procedure Site(
const ACommand: string
);
Parameters
Parameters Description
ACommand Command
Server site command to perform.

Description
Site is a procedure used to send a site-specific FTP command directly to the FTP server. Site is used by an FTP server to provide
services specific to the host system that are essential to file transfer, but not sufficiently universal to be included as commands in
the FTP protocol.

Site sends the FTP SITE command and the argument specified in ACommand to the server. The server response can be accessed
using the LastCmdResult ( 2367) property.

Use the FTP HELP SITE command to discover the commands and syntax requirements for the specific FTP server.

See Also
Help ( 787)

SendCmd ( 2360)

TIdFTP.SiteToSiteDownload Method
Implements site ( 803)-to-site ( 803) (or FXP) data transfers.

Pascal
procedure SiteToSiteDownload(
const AFromSite: TIdFTP;
const ASourceFile: String;
const ADestFile: String = ''
);

Internet Direct (Indy) Version 10.1.5 803


TIdFTP Class Classes

Parameters
Parameters Description
AFromSite FTP client with the connection for the sending FTP server.
ASourceFile file name on the sending FTP server.
ADestFile file name on the receiving FTP server.

Description
SiteToSiteDownload is a procedure that implements support for FTP site ( 803)-to-site ( 803) (or FXP) data transfers.

AFromSite contains the connection to the FTP server hosting the file specified in ASourceFile.

ASourceFile contains the file name on the sending FTP server, and can contain optional absolute or relative path information.

ADestFile contains the file name on the receiving FTP server, and can contain optional absolute or relative path information. When
ADestFile is omitted, the file name in ASourceFile is used as the file name on the receiving FTP server.

In SiteToSiteDownload, the FTP client is the connection to the FTP server that receives and stores the data transferred in the file
indicated by ADestFile.

SiteToSiteDownload supports the use of TLS (Transport Layer Security) when initializing the data channels in the source and
destination FTP servers.

SiteToSiteDownload uses the FTP PORT command (or EPRT when UsingExtDataPort ( 834) contains True) to instruct the
receiving FTP server to actively listen for a data channel connection from the sending FTP server in AFromSite. When Passive (
825) contains True, the actions are reversed and the receiving FTP server uses the FTP PASV command (or EPSV when
UsingExtDataPort ( 834) contains True) to accept the connection from the sending server.

During data transfer, SiteToSiteDownload uses the FTP STOR and RETR commands to begin the data transfer process on the
receiving and sending FTP servers.

Please note that not all FTP servers implement the FXP or Site ( 803)-to-Site ( 803) aspects of the FTP protocol.

Use SiteToSiteUpload ( 804) to transfer data to a specified server using an exisiting server connection.

See Also
SiteToSiteUpload ( 804)

UseTLS ( 833)

Passive ( 825)

UsingExtDataPort ( 834)

TIdFTP.SiteToSiteUpload Method
Implements site ( 803)-to-site ( 803) (or FXP) data transfers.

Pascal
procedure SiteToSiteUpload(
const AToSite: TIdFTP;
const ASourceFile: String;
const ADestFile: String = ''
);
Parameters
Parameters Description
AToSite FTP client with the connection for the receiving FTP server.
ASourceFile file name on the sending FTP server.
ADestFile file name on the receiving FTP server.

Description
SiteToSiteUpload is a procedure that implements support for FTP site ( 803)-to-site ( 803) (or FXP) data transfers.

AToSite contains the connection to the FTP server receiving the file specified in ASourceFile.

804 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

ASourceFile contains the file name on the sending FTP server, and can contain optional absolute or relative path information.

ADestFile contains the file name on the receiving FTP server, and can contain optional absolute or relative path information. When
ADestFile is omitted, the file name in ASourceFile is used as the file name on the receiving FTP server.

In SiteToSiteUpload, the FTP client is the connection to the FTP server that transfers the data in the file indicated by ASourceFile.

SiteToSiteUpload supports the use of TLS (Transport Layer Security) when initializing the data channels in the source and
destination FTP servers.

SiteToSiteUpload uses the FTP PORT command (or EPRT when UsingExtDataPort ( 834) contains True) to instruct the receiving
FTP server to actively listen for a data channel connection from the sending FTP server in AFromSite. When Passive ( 825)
contains True, the actions are reversed and the receiving FTP server uses the FTP PASV command (or EPSV when
UsingExtDataPort ( 834) contains True) to accept the connection from the sending server.

During data transfer, SiteToSiteUpload uses the FTP STOR and RETR commands to begin the data transfer process on the
receiving and sending FTP servers.

Please note that not all FTP servers implement the FXP or Site ( 803)-to-Site ( 803) aspects of the FTP protocol.

Use SiteToSiteDownload ( 803) to transfer data to a specified server using an exisiting server connection.

See Also
SiteToSiteDownload ( 803)

UseTLS ( 833)

Passive ( 825)

UsingExtDataPort ( 834)

TIdFTP.Size Method
Gets file size information from the FTP server.

Pascal
function Size(
const AFileName: String
): Int64;
Parameters
Parameters Description
AFileName The file name on the remote file system.

Returns
Integer - Size of the file, or -1 when unknown.

Description
Size is an Integer function used to retrieve file size information for the file specified in AFilename from the FTP server. Size sends
the FTP SIZE command using AFilename as an argument.

The return value for the method is -1 when file size information for the file name specified in AFilename cannot be determined.

Example
[Delphi]
AFtp.ChangeDir('/public/images');

iAvailable := GetDiskSpace('D:');
iSize := AFtp.Size('image.jpg');

if (iSize <> -1) and (iSize < iAvailable) then


begin
AFtp.Get('image.jpg', 'd:tempimage.jpg', True);
end;

Internet Direct (Indy) Version 10.1.5 805


TIdFTP Class Classes

TIdFTP.Status Method
Implements the FTP STAT command.

Pascal
procedure Status(
AStatusList: TIdStrings
);
Parameters
Parameters Description
AStatusList Optional Status response lines from the server.

Description
Status is a procedure used to get ( 783) a listing containing the status of the FTP operation in progress including transfer
parameters and connection status.

Status responses are similiar to those in the List ( 789) method, but response data is received using the Control channel instead
of the Data channel.

Status sends the the FTP STAT command, and returns the content of the server response in the AStatusList argument.

See Also
List ( 789)

TIdFTP.StoreUnique Method
Overload List

Method Description
TIdFTP.StoreUnique (string) ( 807) Transfers local data to a uniquely named file on the FTP server.
TIdFTP.StoreUnique (TIdStream) ( Transfers local data to a uniquely named file on the FTP server.
806)

TIdFTP.StoreUnique Method (TIdStream)


Transfers local data to a uniquely named file on the FTP server.

Pascal
procedure StoreUnique(
const ASource: TIdStream
); overload;
Parameters
Parameters Description
ASource Stream containing the local content for the data transfer.

Description
StoreUnique is an overloaded procedure used to upload the specified local content to a uniquely named file in the current directory
of the remote FTP file system. StoreUnique is very similar to the Put ( 795) method, but does not accept arguments related to file
naming or file append processing.

ASource is a stream descendant with the local content to be transferred to the remote FTP server.

StoreUnique sends the FTP STOU command to perform the data transfer using the specified local content.

StoreUnique triggers the OnBeforePut event handler when it has been assigned for the FTP client.

During execution, StoreUnique triggers execution of the OnStatus ( 359) event handler using values that indicates then the
transfer is starting, has been completed, or has been aborted.

806 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

StoreUnique creates, initializes, and maintains the data channel used to perform the data transfer based on the values in the
Passive ( 825), UsingExtDataPort ( 834), and TransferMode ( 808) properties.

When Passive ( 825) contains False, the values in DataPort ( 816), DataPortMin ( 817), and DataPortMax ( 816) are also
used to bind listen for the active server connection for the data channel.

StoreUnique triggers the OnDataChannelCreate ( 837) event handler after creating (but prior to connecting) the data channel.

During transmission, StoreUnique uses the current value in the TransferMode ( 808) property to determine if the Compressor (
815) property is used perfrom "Deflate" compression for values written on the IOHandler ( 2364) for the data channel. The value
dmDefalte indicates that MODE Z is used for the data transfer.

StoreUnique triggers the OnDataChannelDestroy ( 838) event handler after closing (but prior to freeing) the data channel.

StoreUnique triggers the OnAfterPut event handler when it has been assigned for the FTP client.

Use Abort ( 768) to cancel an executing data transfer request.

Use KillDataChannel ( 789) to force the data channel for the FTP session to be closed.

See Also
StoreUnique

TIdFTP.StoreUnique Method (string)


Transfers local data to a uniquely named file on the FTP server.

Pascal
procedure StoreUnique(
const ASourceFile: string
); overload;
Parameters
Parameters Description
ASourceFile File containing the local content for the data transfer.

Description
StoreUnique is an overloaded procedure used to upload the specified local content to a uniquely named file in the current directory
of the remote FTP file system. StoreUnique is very similar to the Put ( 795) method, but does not accept arguments related to file
naming or file append processing.

ASourceFile specifies a file name for the local content to be transferred to the remote FTP server.

StoreUnique sends the FTP STOU command to perform the data transfer using the specified local content.

StoreUnique triggers the OnBeforePut event handler when it has been assigned for the FTP client.

During execution, StoreUnique triggers execution of the OnStatus ( 359) event handler using values that indicates then the
transfer is starting, has been completed, or has been aborted.

StoreUnique creates, initializes, and maintains the data channel used to perform the data transfer based on the values in the
Passive ( 825), UsingExtDataPort ( 834), and TransferMode ( 808) properties.

When Passive ( 825) contains False, the values in DataPort ( 816), DataPortMin ( 817), and DataPortMax ( 816) are also
used to bind listen for the active server connection for the data channel.

StoreUnique triggers the OnDataChannelCreate ( 837) event handler after creating (but prior to connecting) the data channel.

During transmission, StoreUnique uses the current value in the TransferMode ( 808) property to determine if the Compressor (
815) property is used perfrom "Deflate" compression for values written on the IOHandler ( 2364) for the data channel. The value
dmDefalte indicates that MODE Z is used for the data transfer.

StoreUnique triggers the OnDataChannelDestroy ( 838) event handler after closing (but prior to freeing) the data channel.

StoreUnique triggers the OnAfterPut event handler when it has been assigned for the FTP client.

Use Abort ( 768) to cancel an executing data transfer request.

Internet Direct (Indy) Version 10.1.5 807


TIdFTP Class Classes

Use KillDataChannel ( 789) to force the data channel for the FTP session to be closed.

See Also
StoreUnique

TIdFTP.StructureMount Method
Mounts a file system data structure for the FTP client.

Pascal
procedure StructureMount(
APath: String
);
Parameters
Parameters Description
APath Directory or file system structure to be loaded.

Description
StructureMount is a procedure that implement the FTP SMNT command, and allows the client to mount a different file system data
structure without altering his login ( 792) or accounting information.

APath is the pathname specifying a directory or other system dependent file group designator.

StructureMount calls SendCmd ( 2360) using the SMNT command and the argument in APath to perform the requested command.

See Also
SendCmd ( 2360)

TIdFTP.TransferMode Method
Specifies the transmission mode for the data channel.

Pascal
procedure TransferMode(
ATransferMode: TIdFTPTransferMode
);
Parameters
Parameters Description
ATransferMode Transfer mode for the connection.

Description
TransferMode is a procedure used to implement support for the FTP MODE command.

TransferMode sends the FTP MODE command using the character representation of the TIdFTPTransferMode ( 2952) value
specified in ATransferMode as an argument.

TransferMode has no effecet if the client is not Connected ( 2353).

When TransferMode contains the value dmDeflate, the object instance in Compressor ( 815) is used perform "deflate ( 2765)" or
"MODE Z" compression and decompression during data transfers in Get ( 783) and Put ( 795).

Use TransferType ( 829) to indicate if the data transfer is for ASCII or binary data.

See Also
TransferType ( 829)

FileStructure ( 782)

Compressor ( 815)

808 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP.VerifyFile Method
Overload List

Method Description
TIdFTP.VerifyFile (String, String, Int64, Compares all or part of the specified local and remote files for verified transfer
Int64) ( 809) integrity.
TIdFTP.VerifyFile (TIdStream, String, Compares all or part of the specified local and remote files for verified transfer
Int64, Int64) ( 810) integrity.

TIdFTP.VerifyFile Method (String, String, Int64, Int64)


Compares all or part of the specified local and remote files for verified transfer integrity.

Pascal
function VerifyFile(
const ALocalFile: String;
const ARemoteFile: String;
const AStartPoint: Int64 = 0;
const AByteCount: Int64 = 0
): Boolean; overload;
Parameters
Parameters Description
ALocalFile Name of the file on the local file system.
ARemoteFile Name of the file on the remote FTP server.
AStartPoint Initial position for comparing the local and remote files. Default value is 0.
AByteCount Number of bytes to use for the checksum calculation. Default value is 0.

Returns
Boolean - True when the local and remote files are the same.

Description
VerifyFile is an overloaded method used to compare all or part the contents of the specified local and remote files as part of the
extensibility features for verified transfer integrity.

VerifyFile can be used to determine the integrity of a file transfer using one of the following checksum algorithms:

Algorithm Description
XSHA SHA-1 checksum
XMD5 MD5 checksum
XCRC CRC ( 772)-32 checksum

One of the algorithms must be listed in the Capabilities ( 690) for the FTP server, or VerifyFile cannot determine the checksum
value on the remote FTP server.

VerifyFile selects the algorithm using the following preferred order:

XSHA
XMD5
XCRC

Internally, VerifyFile uses an instance of TIdHashMessageDigest5 ( 1021), TIdHashSHA1 ( 1022), or TIdHashCRC32 ( 1013)
to calculate the checksum value for the contents of the local file using the ALocalFile argument.

Internet Direct (Indy) Version 10.1.5 809


TIdFTP Class Classes

AStartPoint indicates the initial position in the files to use when calculating the checksum values. When AStartPoint contains 0
(zero) or a positive Integer value, the stream in ALocalFile is positioned to to that location prior to starting the checksum calculation.

AByteCount indicates the number of bytes to include when performing the checksum calculation. The default value is 0, and
indicates that the byte count should be derived from the size ( 805) of the stream for the local file and the initial position indicated
in AStartPoint.

VerifyFile calls an overloaded variant of the method to build and send an FTP command using an algorithm name and arguments
as required for the operation. The checksum value from the remote FTP server is captured and compared to the value calculated
for the local file. VerifyFile returns True when the local checksum and the remote checksum values are the same. VerifyFile returns
False when the checksum values are not the same, or when the capability is not supported on the remote FTP server.

Use SupportsVerification ( 828) to determine if the FTP server support the extensibility feature.

See Also
VerifyFile

SupportsVerification ( 828)

Capabilities ( 690)

TIdFTP.VerifyFile Method (TIdStream, String, Int64, Int64)


Compares all or part of the specified local and remote files for verified transfer integrity.

Pascal
function VerifyFile(
ALocalFile: TIdStream;
const ARemoteFile: String;
const AStartPoint: Int64 = 0;
const AByteCount: Int64 = 0
): Boolean; overload;
Parameters
Parameters Description
ALocalFile Stream with the content for the local file.
ARemoteFile Name of the file on the remote FTP server.
AStartPoint Initial position for comparing the local and remote files. Default value is 0.
AByteCount Number of bytes to use for the checksum calculation. Default value is 0.

Returns
Boolean - True when the local and remote files are the same.

Description
VerifyFile is an overloaded method used to compare all or part the contents of the specified local and remote files as part of the
extensibility features for verified transfer integrity.

VerifyFile can be used to determine the integrity of a file transfer using one of the following checksum algorithms:

Algorithm Description
XSHA SHA-1 checksum
XMD5 MD5 checksum
XCRC CRC ( 772)-32 checksum

One of the algorithms must be listed in the Capabilities ( 690) for the FTP server, or VerifyFile cannot determine the checksum
value on the remote FTP server.

VerifyFile selects the algorithm using the following preferred order:

810 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

XSHA
XMD5
XCRC

Internally, VerifyFile uses an instance of TIdHashMessageDigest5 ( 1021), TIdHashSHA1 ( 1022), or TIdHashCRC32 ( 1013)
to calculate the checksum value for the contents of the local file using the ALocalFile argument.

AStartPoint indicates the initial position in the files to use when calculating the checksum values. When AStartPoint contains 0
(zero) or a positive Integer value, the stream in ALocalFile is positioned to to that location prior to starting the checksum calculation.

AByteCount indicates the number of bytes to include when performing the checksum calculation. The default value is 0, and
indicates that the byte count should be derived from the size ( 805) of the stream for the local file and the initial position indicated
in AStartPoint.

VerifyFile builds and sends an FTP command using an algorithm name and arguments as required for the operation. The checksum
value from the remote FTP server is captured and compared to the value calculated for the local file. VerifyFile returns True when
the local checksum and the remote checksum values are the same. VerifyFile returns False when the checksum values are not the
same, or when the capability is not supported on the remote FTP server.

Use SupportsVerification ( 828) to determine if the FTP server support the extensibility feature.

See Also
VerifyFile

SupportsVerification ( 828)

Capabilities ( 690)

TIdFTP Properties
The Properties of the TIdFTP class are listed here.

Properties
Property Description
Account ( 812) Account information for the remote FTP Server.
AUTHCmd ( 812) Indicates the mechanism to use when performing authentication when logging into the FTPO server.
AutoLogin ( 813) Indicates the FTP client should automatically login ( 792) when the FTP server connection is opened.
CanResume ( 814) Indicates the FTP site ( 803) supports FTP Resume operations.
ClientInfo ( 814) Additional information about the FTP client software, revision, and platform for the FTP CLNT command.
Compressor ( 815) Implements a compression/decompression engine for FTP MODE Z deflate ( 2765) transmissions.
CurrentTransferMode ( 815) Indicates the current or efective settings for the TransferMode ( 808) property during FTP protocol
exchanges.
DataPort ( 816) Indicates the port number to use when binding the data channel for the FTP client session.
DataPortMax ( 816) Indicates the upper limit for port numbers allowed when binding an active data channel for the FTP client.
DataPortMin ( 817) Indicates the lower limit for port numbers allowed when binding an active data channel for the FTP client.
DataPortProtection ( 817) Indicates the level of security required for data channel connections in the FTP client.
DirectoryListing ( 818) Container for a structured file and directory listing.
DirFormat ( 819) Identifies the directory listing format detected when parsing values in DirectoryListing ( 818).
ExternalIP ( 819) Specifies the IP address used when the client sends the FTP PORT or EPRT commands behind a NAT-based
firewall.
Host ( 820) Represents the IP address or host name for the remote FTP server.
LangsSupported ( 820) Represents the supported languages on the server.
ListParserClass ( 821) Represents a class reference for the directory listing parser used to create ( 267) collection items in the
DirectoryListing ( 818) property.
ListResult ( 821) Textual form of the directory listing returned by an FTP server.
LoginMsg ( 822) Server response sent after authenticating the client connection.
OnAfterClientLogin ( 822) Event handler signalled following completion of the FTP protocol exchange used to authenticate the client
connection.
OnCustomFTPProxy ( 823) Event handler signalled to implement support for custom FTP proxy servers.
OnDirParseEnd ( 824) Event handler signalled when a textual directory listing has been parsed into its structured form.

Internet Direct (Indy) Version 10.1.5 811


TIdFTP Class Classes

OnDirParseStart ( 824) Event handler signalled prior to parsing a textual directory listing into its structured form.
OnRetrievedDir ( 825) Event handler signalled when text for a directory listing has been retrieved from the FTP server.
Passive ( 825) Indicates the FTP data channel connection method.
Password ( 826) Authentication credentials used when logging into the FTP server.
Port ( 826) Port number for the control channel connection to the remote FTP server.
ProxySettings ( 827) Indicates the settings to use for connections opened using an FTP proxy server.
ReadTimeout ( 828) Number of milliseconds to wait for an FTP protocol response.
SupportsVerification ( 828) Indicates if the FTP server supports one of the extensibility features for verified transfer integrity.
SystemDesc ( 829) Description of the remote FTP server.
TransferTimeout ( 829) Timeout value for read operations on the data channel for the FTP client.
TransferType ( 829) Indicates the file transfer type.
TryNATFastTrack ( 830) Indicates use of "fast path" connections for traversing firewalls and NATs.
TZInfo ( 831) Provides access to timezone information for the remote FTP server.
UseCCC ( 831) Indicates if use of the Clear Command Channel (CCC) command is required for the FTP client.
UseExtensionDataPort ( 832) Indicates if IPv6 extensions for Port ( 826) and Passive ( 825) settings are used in FTP protocol
exchanges.
UseMLIS ( 832) Indicates if the FTP MLST ( 4354) and MLSD commands are used for directory listings.
Username ( 833) Authentication identity used when logging in to the FTP server.
UseTLS ( 833) Indicates Transport-Level Security is used on the connection.
UsingExtDataPort ( 834) Indicates if RFC 2428 NAT Extensions are available for the FTP client session.
UsingNATFastTrack ( 834) Indicates if "fast path" connections are in use for the FTP client.
UsingSFTP ( 834) Indicates if a secure FTP connection is in use for the client session.

Legend
Property
read only

TIdFTP.Account Property
Account information for the remote FTP Server.

Pascal
property Account: string;
Description
Account is a String property that represents the account information to use for the connection to the remote FTP server. Account is
used to provide additional login ( 792) information for the FTP Server, in addition to the login ( 792) information sent by the Login
( 792) and Connect ( 771) methods.

Account can be used when the FTP response codes 332 or 532 are received in a reply to an FTP commands.

Historically, Account is a Telnet string identifying the user's account. The command is not necessarily related to the USER
command, as some sites may require an account for login ( 792) and others only for specific access, such as storing files.

If account information is not required for Login ( 792), the response code is 230; and if the account information is needed for a
command issued later in the dialogue, the server should return a 332 or 532 reply depending on whether it stores (pending receipt
of the Account command) or discards the command, respectively.

Account is used as an argument when sending the FTP ACCT command for FTP servers that support the feature.

Use the OnNeedAccount ( 838) evenmt handler to derive a value for the Account property using session or context information.

See Also
Login ( 792)

Connect ( 771)

OnNeedAccount ( 838)

TIdFTP.AUTHCmd Property
Indicates the mechanism to use when performing authentication when logging into the FTPO server.

812 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Pascal
property AUTHCmd: TAuthCmd;
Description
AUTHCmd is a TAuthCmd ( 2940) property that indicates the mechanism to use when performing authentication in the Login (
792) method. The value in AUTHCmd determines the argument used with the FTP AUTH command in the TLS handshake protocol
exchange.

The default value for AUTHCmd is DEF_Id_FTP_AUTH_CMD ( 3186), as assigned during initialization of the component.

Value Meaning
tAuto TLS support is determined by trying each of the valid AUTHCmd values.
tAuthTLS Implies TLS using a clear data port.
tAuthSSL Implies TLS using a private data port.
tAuthTLSC Implies TLS using a clear data port.
tAuthTLSP Implies TLS using a private data port.

The value tAuto can be used when connecting to a server that does not allow the FTP FEAT command required for negotiated TLS
support until completion of the Login ( 792) protocol exchange. In addition, some servers use AUTH TLS while others use AUTH
SSL. So multiple AUTH commands may be tries to determine the servers level of support.

When a value other than tAuto is found in AUTHCmd, only the specified Authentication method will be tried.

TIdFTP.AutoLogin Property
Indicates the FTP client should automatically login ( 792) when the FTP server connection is opened.

Pascal
property AutoLogin: Boolean;
Description
AutoLogin is a Boolean property that indicates if the FTP client should automatically perform a login ( 792) sequence when the
FTP session is established in the Connect ( 771) method.

Any property settings required to create ( 267) the FTP session and to perform the login ( 792) sequence must be set prior to
calling Connect ( 771), and typically includes the following:

Host ( 820)
Port ( 826)
ClientInfo ( 814)
UseTLS ( 833)
ProxySettings ( 827)

The default value for AutoLogin is True, as assigned during initialization of the component. Change the value in AutoLogin to False
to allow performing login ( 792) actions for problematic or non-conformant FTP servers.

Use the Login ( 792) method to perform the login ( 792) sequence using value in Username ( 833), Password ( 826), and
ClientInfo ( 814) when AutoLogin contains False.

See Also
Connect ( 771)

Host ( 820)

Internet Direct (Indy) Version 10.1.5 813


TIdFTP Class Classes

Port ( 826)

Username ( 833)

Password ( 826)

ClientInfo ( 814)

UseTLS ( 833)

ProxySettings ( 827)

TIdFTP.CanResume Property
Indicates the FTP site ( 803) supports FTP Resume operations.

Pascal
property CanResume: Boolean;
Description
CanResume is a read-only Boolean property that indicates the FTP site ( 803) supports FTP Resume operations. When the FTP
server supports resume, you can use the Get ( 783) method to resume a previously aborted download. If the FTP server does not
support resume, the file has to be retrieved start at the beginning of the file.

CanResume is implemented using the ResumeSupported ( 799) property for read access, and will normally be updated only once
per FTP client session by testing the results of the FTP REST command.

See Also
Get ( 783)

Quote ( 798)

TIdFTP.ClientInfo Property
Additional information about the FTP client software, revision, and platform for the FTP CLNT command.

Pascal
property ClientInfo: TIdFTPClientIdentifier;
Description
ClientInfo is a TIdFTPClientIdentifier ( 845) property that represents additional information that can be provided about the FTP
client when performing authentication in the Login ( 792) method. This includes the name of the client software, and optional
software revision and platform identifiers.

Values in ClientInfo are used when the FTP server supports the extended FTP CLNT command (as indicated in the Capabilities (
690) property). ClientInfo value are sent using the FTP CLNT command in the Login ( 792) method following negotiations for TLS
security and proxy server authentication using values in ProxySettings ( 827).

Set values in ClientInfo prior to calling Connect ( 771), or using the Login ( 792) method when AutoLogin ( 813) contains False.

Resources for the ClientInfo property are allocated during initialization of the component, and freed in the Destroy ( 774) method.

See Also
TIdFTPClientIdentifier ( 845)

Capabilities ( 690) Connect ( 771)

Destroy ( 774)

Login ( 792)

ProxySettings ( 827)

UseTLS ( 833)

814 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP.Compressor Property
Implements a compression/decompression engine for FTP MODE Z deflate ( 2765) transmissions.

Pascal
property Compressor: TIdZLibCompressorBase;
Description
Compressor is a TIdZLibCompressorBase ( 2634) property that implements support for compression and decompression of data
using the "deflate ( 2765)" transmission mode, as described in the Internet Draft "Deflate transmission mode for FTP".

In deflate ( 2765) transmission mode, data is compressed and transmitted as a stream of octets (8 bit bytes). The sender and
receiver rely on a compression engine to perform compression operations (deflate ( 2765)/inflate ( 2834)) and maintain state.
The compression engine generates a unique data stream using the ZLIB compressed data format specified in RFC 1950.

FTP servers can indicate that they support use of the Deflate tramsmission mode by including "MODE Z" as part of a the FEAT
response sent during login ( 792) to the FTP sever. TIdFTP ( 759) uses the Capabilities ( 690) property to look for the FEAT
response. Please note that not all FTP server implementations support MODE Z deflate ( 2765) transmission mode.

Applications must assign a TIdZLibCompressorBase ( 2634) or descendant object instance to Compressor to allow use of the
ZLib "Deflate" transmission mode. Any resource allocated to Compressor will be freed in the destructor for the FTP client.

Compressor is used internally in the implementation of the FTP GET and PUT commands when the TransferMode ( 808) property
contains the value dmDeflate. During processing for the PUT command, data is compressed prior to transmission using the object
instance in Compressor. During processing for the GET command, data is decompressed after receipt using the object instance in
Compressor.

See Also
TIdZLibCompressorBase ( 2634)

Destroy ( 774) TransferMode ( 808)

Get ( 783)

Put ( 795)

Capabilities ( 690)

TIdFTP.CurrentTransferMode Property
Indicates the current or efective settings for the TransferMode ( 808) property during FTP protocol exchanges.

Pascal
property CurrentTransferMode: TIdFTPTransferMode;
Description
CurrentTransferMode is a TIdFTPTransferMode ( 2952) property that indicates the current transfer mode in use for the FTP client
session. During the course of an FTP session, the FTP MODE command may be used to reset the effective transfer mode for the
control channel or the data channel based on use of arguments to the FTP commands.

CurrentTransferMode tracks the current transfer mode state based on these protocol exchanges.

CurrentTransferMode is used during processing for the Get ( 783) and Put ( 795) methods to determine when streaming transfer
mode and deflate ( 2765) transfer mode (MODE Z) are required during use of the Compressor ( 815) property.

Applications do not normally assign values to CurrentTransferMode, but can read the current value to determine if FTP protocol
exchanges have altered the initial TransferMode ( 808) value.

See Also
TransferMode ( 808)

Get ( 783)

Internet Direct (Indy) Version 10.1.5 815


TIdFTP Class Classes

Put ( 795)

Compressor ( 815)

TIdFTP.DataPort Property
Indicates the port number to use when binding the data channel for the FTP client session.

Pascal
property DataPort: Integer;
Description
DataPort is an Integer property that indicates the port number to use when binding the data channel for the FTP client session.

The default value for the DataPort property is 0 (zero), and indicates that the data port is assigned when the data channel
connection is bound.

DataPort is used in internal processing for both the Get ( 783) and Put ( 795) methods to create ( 267) a data channel that
actively listens for a server connection (when Passive ( 825) contains False). FTP clients will send the FTP PORT command, or
the PBSZ and PROT commands when UsingExtDataPort ( 834) indicates extended port protection features are enabled for the
server.

Use DataPortMin ( 817) and DataPortMax ( 816) when proxy servers or firewalls require values in the DataPort property to be in
an accepted range of values.

See Also
DataPortMin ( 817)

DataPortMax ( 816)

Passive ( 825)

Get ( 783)

Put ( 795)

UsingExtDataPort ( 834)

TIdFTP.DataPortMax Property
Indicates the upper limit for port numbers allowed when binding an active data channel for the FTP client.

Pascal
property DataPortMax: Integer;
Description
DataPortMax is an Integer property that indicates the upper limit for port numbers allowed when binding the data channel for the
FTP client session.

The default value for the DataPort ( 816) property is 0 (zero), and indicates that the data port is assigned when the data channel
connection is bound.

The default value for DataPortMax is 0, as assigned during initialization of the component, and indicates that an upper limit is not
used for port selection.

Use DataPortMin ( 817) to indicate the lower limit for automatic port number selection.

Both DataPortMin ( 817) and DataPortMax are used in internal processing for the Get ( 783) and Put ( 795) methods to create
( 267) a data channel that actively listens for a server connection (when Passive ( 825) contains False). FTP clients will send the
FTP PORT command, or the PBSZ and PROT commands when UsingExtDataPort ( 834) indicates extended port protection
features are enabled for the server.

DataPortMin ( 817) and DataPortMax are useful when a proxy server, firewall, or NAT requires values in the DataPort ( 816)
property to be in an accepted range of values.

816 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
DataPort ( 816)

DataPortMin ( 817)

Get ( 783)

Put ( 795)

ProxySettings ( 827)

TIdFTP.DataPortMin Property
Indicates the lower limit for port numbers allowed when binding an active data channel for the FTP client.

Pascal
property DataPortMin: Integer;
Description
DataPortMin is an Integer property that indicates the lower limit for port numbers allowed when binding the data channel for the FTP
client session.

The default value for the DataPort ( 816) property is 0 (zero), and indicates that the data port is assigned when the data channel
connection is bound.

The default value for DataPortMin is 0, as assigned during initialization of the component, and indicates that a lower limit is not used
for port selection.

Use DataPortMax ( 816) to indicate the upper limit for automatic port number selection.

Both DataPortMin and DataPortMax ( 816) are used in internal processing for the Get ( 783) and Put ( 795) methods to create
( 267) a data channel that actively listens for a server connection (when Passive ( 825) contains False). FTP clients will send the
FTP PORT command, or the PBSZ and PROT commands when UsingExtDataPort ( 834) indicates extended port protection
features are enabled for the server.

DataPortMin and DataPortMax ( 816) are useful when a proxy server, firewall, or NAT requires values in the DataPort ( 816)
property to be in an accepted range of values.

See Also
DataPort ( 816)

DataPortMax ( 816)

Get ( 783)

Put ( 795)

ProxySettings ( 827)

TIdFTP.DataPortProtection Property
Indicates the level of security required for data channel connections in the FTP client.

Pascal
property DataPortProtection: TIdFTPDataPortSecurity;
Description
DataPortProtection is a TIdFTPDataPortSecurity ( 2950) property that indicates the level of security required for data channel
connections in the FTP client.

DataPortProtection is used during processing in the Get ( 783) and Put ( 795) methods to determine the type of IOHandler (
2364) required for the data channel that performs data transfer operations.

When DataPortProtection contains the value ftpdpsPrivate, an instance of TIdSSLIOHandlerSocketBase ( 2134) is created during

Internet Direct (Indy) Version 10.1.5 817


TIdFTP Class Classes

initializtion of the data channel to allow use of the SSL transport. For all other values in DataPortProtection, the default IOHandler
( 2364) is used for the data channel.

The default value for DataPortProtection is Id_TIdFTP_DataPortProtection ( 3820), as assigned during initialization of the
component.

See Also
Get ( 783)

Put ( 795)

IOHandler ( 2364)

KillDataChannel ( 789)

TIdSSLIOHandlerSocketBase ( 2134)

TIdFTP.DirectoryListing Property
Container for a structured file and directory listing.

Pascal
property DirectoryListing: TIdFTPListItems;
Description
DirectoryListing is a read-only TIdFTPListItems ( 857) property that implements a container for TIdFTPListItem ( 851) instances
created from the result values for the List ( 789) or Status ( 806) methods.

DirectoryListing provides a structured means of accessing data about files and directories returned from the FTP LIST, NLST (
4358), MLST ( 4354), MLSD, or STAT commands.

Items stored in the DirectoryListing container are always cleared prior to adding the values returned by the List ( 789) or Status (
806) methods, or following use of the Reinitialize ( 798) method.

Accessing values in the DirectoryListing property causes the DirectoryListing property to be initialized (if it has not previously been
assigned), and triggers the OnCreateFTPList ( 836) event handler to indicate the condition.

In addition, accessing values the DirectoryListing property causes the textual directory listing to be parsed into its corresponding
structured form.

Traditionally, the FTP protocol did not specify a standardized format for file and directory listings in FTP server implementations.
This was done to isolate file system dependencies on the FTP server, and probably contributed to the wide-spread acceptance and
implementation of the FTP protocol. But this approach also creates problems when we wish to use automated programs for
processing files and directories using the FTP protocol.

In recent years, enhancements have been proposed for the FTP protocol that allow for consistent yet extensible approach to
directory and file listing formats. This has been implemented using the FTP FEAT command, and its corresponding MLST ( 4354)
and MLSD features.

The Indy library includes support for the MLST ( 4354) and MLSD features, but also provides additional support for the defacto
standard directory listing formats.

Additional parsers are available that recognize the defacto directory listing formats used in approximately 30 different platforms and
operating systems. To include additional parsers for listing formats, the unit containing the parser must be added to the project
containing the FTP client. Each parser is automatically registered in the initialization section for the unit. Include the
IdAllFTPListParsers.pas ( 4555) unit in your application to force all known FTP directory listing parsers to be included and
registered.

Accessing values stored in DirectoryListing also causes the textual values in ListResult ( 821) to be parsed using the capabilities
of the registered parsers for the FTP client. By default, the NLST ( 4358) and MLST ( 4354) directory listing formats are
registered for TIdFTP ( 759).

Use ExtListDir ( 775) and ExtListItem ( 776) to access directory or file listings specifically generated using the FTP MLST (
4354) or MLSD commands.

818 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Use ListParserClass ( 821) to access the class reference used to parse the directory format based on values updated in the
CheckListParseCapa ( 2736) function.

Use DirFormat ( 819) to access the identifier for the listing format detected while parsing the directory or file listing.

DirectoryListing can also be used in application code to populate GUI controls, like TTreeView or TListView, that display the results
of an FTP directory operation.

See Also
TIdFTPListItems ( 857)

TIdFTPListItem ( 851)

List ( 789)

Status ( 806)

Reinitialize ( 798)

OnCreateFTPList ( 836)

ListResult ( 821)

CheckListParseCapa ( 2736)

ExtListDir ( 775)

ExtListItem ( 776)

DirFormat ( 819)

TIdFTP.DirFormat Property
Identifies the directory listing format detected when parsing values in DirectoryListing ( 818).

Pascal
property DirFormat: String;
Description
DirFormat is a read-only String property that identifies the directory listing format detected in the CheckListParseCapa ( 2736)
function. DirFormat identifies the directory format for the parser used to populated the items in the DirectoryListing ( 818) property.

Use ListParserClass ( 821) to access the class reference for the parser used to populate the values in the DirectoryListing ( 818)
property.

See Also
CheckListParseCapa ( 2736)

DirectoryListing ( 818)

ListParserClass ( 821)

TIdFTP.ExternalIP Property
Specifies the IP address used when the client sends the FTP PORT or EPRT commands behind a NAT-based firewall.

Pascal
property ExternalIP: String;
Description
ExternalIP is a String property used to specify the IP address used when the client sends the FTP PORT or EPRT commands
behind a NAT-based firewall.

ExternalIP must contain a non-empty string value when using a NAT-based firewall with the SSL transport. Set the value in
ExternalIP to the IP address exposed to the outside world, or the NAT IP address on the Internet.

Internet Direct (Indy) Version 10.1.5 819


TIdFTP Class Classes

Use DataPort ( 816), DataPortMin ( 817), and DataPortMax ( 816) to indicate the port or port range to be forwarded to the
NAT-based firewall.

See Also
DataPort ( 816)

DataPortMin ( 817)

DataPortMax ( 816)

Passive ( 825)

TIdFTP.Host Property
Represents the IP address or host name for the remote FTP server.

Pascal
property Host;
Description
Host is a Published property in TIdFTP ( 759), and represents the IP address or host name for the remote FTP server.

Values in the Host and Port ( 826) properties are used in the Connect ( 771) method to establish and initialize the connection
used as the control channel for the FTP client session. When ProxySettings ( 827) contains ProxyType and Host values, the Host
and Port ( 826) properties in ProxySettings ( 827) are used to open the initial connection for the FTP client session. After the
control channel connection is opened, the Host and Port ( 826) properties revert to their previous values.

Set values in the Host, Port ( 826), and ProxySettings ( 827) properties prior to calling the Connect ( 771) method.

Use Port ( 826) to specifiy the port number for the FTP client session.

See Also
Port ( 826)

ProxySettings ( 827)

Connect ( 771)

TIdFTP.LangsSupported Property
Represents the supported languages on the server.

Pascal
property LangsSupported: TIdStrings;
Description
LangsSupported is a read-only TIdStrings ( 3089) property that represents the supported languages extracted from the values in
the Capabilities ( 690) property during execution of the Login ( 792) method.

LangsSupported will contains the values found in the Capabilities ( 690) property that begin with the characters "LANG". The
ExtractFeatFacts ( 778) method is used to detect and extract the values in LangsSupported.

Values in the Capabilties property are updated using the response from the FTP FEAT command.

Resources allocated to the LangsSupported property are freed in the destructor for the object instance.

See Also
Capabilities ( 690)

Login ( 792)

ExtractFeatFacts ( 778)

820 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP.ListParserClass Property
Represents a class reference for the directory listing parser used to create ( 267) collection items in the DirectoryListing ( 818)
property.

Pascal
property ListParserClass: TIdFTPListParseClass;
Description
ListParserClass is a TIdFTPListParseClass ( 3028) property that represents the class used to parse the textual results in
ListResults into collection items maintained in the DirectoryListing ( 818) property. ListParserClass provides the facilities used to
prepare the structured directory listing and to identify the directory listing format used in the DirFormat ( 819) property.

The ListParserClass class reference is updated during the inital read access to the DirectortyListing property, following construction
of the DirectortyListing collection.

When ListResult ( 821) contains a positive non-zero number of text lines, the FTP client determines the list ( 789) parser class to
be used to parsed the textual reponses from the LIST, NLST ( 4358), MLSD, or MLST ( 4354) commands. When UsedMLS
contains True, the IdFTPListParseBase class is used to parse the lines in ListResult ( 821).

Under all other conditions, the CheckListParseCapa ( 2736) function is called to identify the directory listing parser class by using
the registered parsers in the GParserList variable. Each registered parsers class calls its CheckListParseCapa ( 2736) method to
determine the correct parser class required based on the format of the text lines found in ListResult ( 821).

When a valid directory listing parser class is located, the parser class instance is used to create ( 267) a collection item in the
DirectoryListing ( 818) property for each detail line found in ListResult ( 821).

The DirFormat ( 819) property is also updated to indicate the common name for the directory listing format detected in the
registered parsers list ( 789).

See Also
TIdFTPListParseClass ( 3028)

ListResult ( 821)

DirectoryListing ( 818)

DirFormat ( 819)

UsedMLS

GParserList

TIdFTP.ListResult Property
Textual form of the directory listing returned by an FTP server.

Pascal
property ListResult: TIdStrings;
Description
ListResult is a read-only TIdStrings ( 3089) property that contains the textual response captured following execution of the FTP
LIST, NLST ( 4358), MLST ( 4354), MLSD, STAT, or REIN commands. ListResult is the raw directory listing data returned by the
FTP server.

ListResult is updated in the following FTP client methods:

ExtListDir ( 775)
ExtListItem ( 776)
List ( 789)

Internet Direct (Indy) Version 10.1.5 821


TIdFTP Class Classes

Status ( 806)

Values stored in ListResult are used to create ( 267) the structured directory listing stored in the DirectoryListing ( 818). Reading
values in the DirectoryListing ( 818) property causes the values in ListResult to be parsed using a registered directory listing
parser if the collection is unassigned.

When UsedMLS contains True, the standardized MLST ( 4354) directory listing format is used on the FTP server. In this case, the
TIdFTPListParserBase class is used to parse values in ListResult into the collection items maintained in the DirectoryListing ( 818)
property.

When UsedMLS contains False, the CheckListParseCapa ( 2736) function is used to determine the correct registered directory
listing parser for parsing the directory listing. Registered parsers are found in the GParserList variable, and include parsers added
during execution of the initialization section for units added to the application.

Use ListParserClass ( 821) to access the class reference used to perform parsing of the directory listing.

Use DirFormat ( 819) to access the common name for the directory listing format detected when examining the data in ListResult.

Use properties and methods in the DirectoryListing ( 818) collection to access the structured directory listing for the FTP client.

Resources allocated to the ListResult property are freed in the destructor the object instance.

See Also
ExtListDir ( 775)

ExtListItem ( 776)

List ( 789)

Status ( 806)

UsedMLS

ListParserClass ( 821)

DirFormat ( 819)

DirectoryListing ( 818)

Destroy ( 774)

TIdFTPListParserBase

TIdFTP.LoginMsg Property
Server response sent after authenticating the client connection.

Pascal
property LoginMsg: TIdReplyFTP;
Description
LoginMsg is a read-only TIdReplyFTP ( 1842) property that represents the inital server response captured when providing the
authentication identity and credentials during execution of the Login ( 792) method.

Use OnBannerAfterLogin ( 835) to respond to the event notification performed using the formatted reply for the LoginMsg property.

TIdFTP.OnAfterClientLogin Property
Event handler signalled following completion of the FTP protocol exchange used to authenticate the client connection.

Pascal
property OnAfterClientLogin: TOnAfterClientLogin;

822 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Description
OnAfterClientLogin is a TOnAfterClientLogin ( 3101) property that represents the event handler signalled following completion of
actions in the Login ( 792) method.

OnAfterClientLogin is triggered in the Connect ( 771) method when AutoLogin ( 813) contains the value True.

OnAfterClientLogin is used to notify the application that a client connection the remote FTP server has been established, and
authentication has been performed. Applications must assign a procedure to the event handler to allow responsing to the event
notification.

Use the OnBannerBeforeLogin ( 836) event handler to respond to receipt of the Greeting ( 2364) from the remote FTP server.

Use the OnBannerAfterLogin ( 835) event handler to respond to receipt of the LoginMsg ( 822) from the remote FTP server.

See Also
TOnAfterClientLogin ( 3101)

Login ( 792)

Connect ( 771)

AutoLogin ( 813)

OnBannerBeforeLogin ( 836)

OnBannerAfterLogin ( 835)

TIdFTP.OnCustomFTPProxy Property
Event handler signalled to implement support for custom FTP proxy servers.

Pascal
property OnCustomFTPProxy: TIdNotifyEvent;
Description
OnCustomFTPProxy is a TNotifyEvent property that represents the event handler signalled to allow support for connection and
authentication using custom FTP proxy server types in the FTP client.

OnCustomFTPProxy is triggered in the Login ( 792) method when the TIdFtpProxyType ( 2951) enumeration value
fpcmCustomProxy is found in the ProxyType property in ProxySettings ( 827). If OnCustomFTPProxy has not been assigned in
this circumstance, an EIdFTPOnCustomFTPProxyRequired ( 93) exception will be raised.

Applications can use OnCustomFTPProxy to implement the complete FTP protocol exchange required to both establish the proxied
connection and to perform authentication for the client session. In general, the FTP protocol exchange should be performed using
the SendCmd ( 2360) method to allow capturing responses in the LastCmdResult ( 2367) property. Please note that the final
response in the exchange is stored in the LoginMsg ( 822) property and passed as an argument to the OnBannerAfterLogin (
835) event handler.

Use of the OnCustomFTPProxy event handler is not required if the FTP proxy server is one of the types supported in
TIdFtpProxyType ( 2951).

See Also
LastCmdResult ( 2367)

Login ( 792)

OnBannerAfterLogin ( 835)

ProxySettings ( 827)

SendCmd ( 2360)

TIdFtpProxyType ( 2951)

EIdFTPOnCustomFTPProxyRequired ( 93)

Internet Direct (Indy) Version 10.1.5 823


TIdFTP Class Classes

TIdFTP.OnDirParseEnd Property
Event handler signalled when a textual directory listing has been parsed into its structured form.

Pascal
property OnDirParseEnd: TIdNotifyEvent;
Description
OnDirParseEnd is a TNotifyEvent property that represents the event handler signalled when a textual directory listing has been
parsed into its structured form.

OnDirParseEnd is triggered when parsing of the text in ListResult ( 821) into collection items in DirectoryListing ( 818) has been
completed using the ListParserClass ( 821) instance. Parsing occurs when reading values from an uninitialized instance of the
DirectoryListing ( 818) collection.

OnDirParseEnd allows the application to perform actions need to keep the GUI interface synchronized with the actions of the FTP
client; such as reading the contents of the structured DirectoryListing ( 818) into a TListView or TTreeView in the user interface.

Use OnDirParseStart ( 824) to respond to the event notification that occurs when parsing of the directory listing is about to begin.

Use OnRetrievedDir ( 825) to respond to the event notification that occurs when the textual values in ListResults have been
updated.

See Also
DirectoryListing ( 818)

ListResult ( 821)

ListParserClass ( 821)

TIdFTP.OnDirParseStart Property
Event handler signalled prior to parsing a textual directory listing into its structured form.

Pascal
property OnDirParseStart: TIdNotifyEvent;
Description
OnDirParseStart is a TNotifyEvent property that represents the event handler signalled prior to parsing a textual directory listing into
its structured form.

OnDirParseStart is triggered when attempting to read collection items in an uninitialized DirectoryListing ( 818) collection.
OnDirParseStart is triggered prior to parsing the contents of the ListResult ( 821) property into collections items using the
ListParserClass ( 821) instance.

OnDirParseStart allows the application to perform actions need to keep the GUI interface synchronized with the actions of the FTP
client; such as clearing the contents of a TListView or TTreeView for the DirectoryListing ( 818) in the user interface.

Use OnDirParseEnd ( 824) to respond to the event notification that occurs when parsing of the directory listing has been
completed.

Use OnRetrievedDir ( 825) to respond to the event notification that occurs when the textual values in ListResults have been
updated.

See Also
DirectoryListing ( 818)

ListResult ( 821)

ListParserClass ( 821)

824 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

TIdFTP.OnRetrievedDir Property
Event handler signalled when text for a directory listing has been retrieved from the FTP server.

Pascal
property OnRetrievedDir: TIdNotifyEvent;
Description
OnRetrievedDir is a TNotifyEvent property that represents the event handler signalled when the text for a directory listing has been
retrieved in a response from the FTP server.

OnRetrievedDir is triggered in the List ( 789) and ExtListDir ( 775) methods, and allows the applications to be notified when the
contents of the ListResult ( 821) property have been updated with the values from the FTP server response. Applications must
assign a procedure to the event handler to allow responding to the event notification.

Use OnDirParseStart ( 824) and OnDirParseEnd ( 824) to respond to notifications occurring prior to and following parsing of
values in ListResult ( 821) into collection items in the DirectoryListing ( 818) collection.

Use DirectoryListing ( 818) to access the structured directory listing created using the ListParserClass ( 821) instance for the
detected directory listing format.

See Also
List ( 789)

ExtListDir ( 775)

ListResult ( 821)

DirectoryListing ( 818)

ListParserClass ( 821)

OnDirParseStart ( 824)

OnDirParseEnd ( 824)

TIdFTP.Passive Property
Indicates the FTP data channel connection method.

Pascal
property Passive: boolean;
Description
Passive is a Boolean property that indicates how the data channel connection for a File Transfer Protocol session is established.

Passive is used during processing for both the Get ( 783) and the Put ( 795) methods to determine the FTP protocol exchange
required to establish the data channel for the data transfer operation.

When Passive is True, the FTP server will listen for the FTP client to connect ( 771) on a data port specified in the response to the
FTP PASV or EPSV commands. EPSV is used when UsingExtDataPort ( 834) contains True.

Active connections (or when Passive is set to False) indicates that the FTP server will open the connection for the data channel. In
other words, the FTP client will listen for the server to open a connection for the data channel. The server is notified using the FTP
PORT or EPRT commands. EPRT is used when UsingExtDataPort ( 834) contains True.

Please note that some proxy configurations require PORT transfers, and some FTP servers do not support PASV transfers. Consult
your network administrator for details on using FTP in your network environment.

The default value for Passive is Id_TIdFTP_Passive ( 3821), as assigned during initialization of the component. Passive is also
reset to the default value in ReInitialize ( 798).

See Also
Get ( 783)

Internet Direct (Indy) Version 10.1.5 825


TIdFTP Class Classes

Put ( 795)

ReInitialize ( 798)

UsingExtDataPort ( 834)

TIdFTP.Password Property
Authentication credentials used when logging into the FTP server.

Pascal
property Password;
Description
Password is a String property that indicates the authentication credentials used when logging in to the FTP server.

Values in the Username ( 833) and Password properties are sent to the FTP server using the FTP commands USER and PASS in
the Login ( 792) method. During authentication, values in the properties are used to determine the effective permissions for FTP
client session.

TIdFTP ( 759) provides support for the One-Time-Password (OTP) system when the capability is supported on the FTP server.
During authentication processing in the Login ( 792) method, the FTP client will detect the server support for OTP by examing the
response return for the FTP USER command. When the response includes an OTP Challenge, the appropriate hashed values are
calculated using the OTP challenge and the Password property.

For FTP clients that require connection to a proxy server, the Username ( 833) and Password properties found in ProxySettings
( 827) may be used depending on the proxy server type in ProxySettings ( 827).

For anonymous file transfers, the Username ( 833) property should contain the value "anonymous". Use your email address in the
Password property when connecting for anonymous file transfers.

Use Account ( 812) to provide additional information about the FTP account when required on the FTP server implementation.

Use ClientInfo ( 814) to provide additional information about the FTP client, revision, and platform for servers implementing the
FTP CLNT extension command.

See Also
Username ( 833)

Login ( 792)

Connect ( 771)

ProxySettings ( 827)

TIdFTP.Port Property
Port number for the control channel connection to the remote FTP server.

Pascal
property Port;
Description
Port is a Published property in TIdFTP ( 759) that indicates the port number to use when opening the control channel connection
to the remote FTP server identifies in Host ( 820).

Set values in the Host ( 820) and Port properties prior to calling Connect ( 771). Values in the Username ( 833) and Password
( 826) properties are also required when AutoLogin ( 813) contains True.

Set the Port value in ProxySettings ( 827) when a proxied connection to the remote server is required.

The default value for the Port property is IDPORT_FTP, as assigned during initialization of the component.

826 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
AutoLogin ( 813)

Connect ( 771)

Login ( 792)

Host ( 820)

ProxySettings ( 827)

TIdFTP.ProxySettings Property
Indicates the settings to use for connections opened using an FTP proxy server.

Pascal
property ProxySettings: TIdFtpProxySettings;
Description
ProxySettings is a TIdFtpProxySettings ( 947) property that represent settings to use for connections opened using an FTP proxy
server. Use of ProxySettings are required only when proxied connections to the FTP server are needed.

ProxySettings contains properties that indicate the TIdFtpProxyType ( 2951) to use when establishing the proxied connection
using the Host ( 820), Port ( 826), Username ( 833), and Password ( 826) property values located in ProxySettings.

The Host ( 820) and Port ( 826) values in ProxySettings are used in Connect ( 771) to establish the control channel connection
for the FTP client when ProxySettings.ProxyType contains a value other than fpcmNone.

ProxySettings.ProxyType also indicates both the method and values used for authenticating the proxied connection to the FTP
server in Login ( 792), according to the following proxy type values and methodologies:

Value Meaning
fpcmNone Sends the Username ( 833) and optional Password ( 826) found in the FTP client.
fpcmUserSite Sends the Username ( 833) and optional Password ( 826) in ProxySettings, followed immediately by
the Username ( 833) and optional Password ( 826) found in the FTP client.
fpcmSite Sends the Username ( 833) and optional Password ( 826) in ProxySettings, the SITE command and
the value in the Host ( 820) property, and the Username ( 833) and optional Password ( 826) in the
FTP client.
fpcmOpen Sends the Username ( 833) and optional Password ( 826) in ProxySettings, sends the OPEN
command with the value in Host ( 820), and the Username ( 833) and optional Password ( 826) for
the FTP client.
fpcmUserPass Calls SendCmd ( 2360) with the command USER user@proxyuser@host, calls SendCmd ( 2360) with
the command PASS pwd@proxypwd, or optionally PASS pwd.
fpcmTransparent Sends the ProxySettings Username ( 833) and optional Password ( 826), followed immediately by the
FTP client Username ( 833) and optional password.
fpcmHttpProxyWithFtp Not implemented at this time.
fpcmCustomProxy Signals the OnCustomFTPProxy ( 823) event handler to perform the FTP protocol exchange.

Resources allocated to the ProxySettings property are freed in the Destroy ( 774) method.

See Also
TIdFtpProxySettings ( 947)

Destroy ( 774)

Connect ( 771)

Login ( 792)

Internet Direct (Indy) Version 10.1.5 827


TIdFTP Class Classes

Username ( 833)

Password ( 826)

Host ( 820)

Port ( 826)

TIdFTP.ReadTimeout Property
Number of milliseconds to wait for an FTP protocol response.

Pascal
property ReadTimeout: Integer;
Description
ReadTimeout is an Integer property that represents the number of milliseconds to wait for an FTP protocol response on the control
channel for the client. The default value for ReadTimeout is DEF_Id_FTP_READTIMEOUT ( 3187), as assigned during
initialization of the component.

Please note that some firewalls do not handle FTP control channel connections properly during long-running data transfers. Since
the control channel is inactive during the operation, a timeout condition may occur. You may need to increase the value in
ReadTimeout to an artifically large value to avoid this condition. This can result in a lengthy delay if the FTP server closes the
connection for the control channel without performing any notification to the FTP client.

Use TransferTimeout ( 829) to indicate the number of milliseconds to wait for file transfer operations that use the data channel
created for the FTP client.

Set values in the ReadTimeout and TransferTimeout ( 829) properties prior to calling the Connect ( 771) or Login ( 792)
methods, and before using method that perform file transfer or directory listing operations.

See Also
DEF_Id_FTP_READTIMEOUT ( 3187)

TransferTimeout ( 829)

TIdFTP.SupportsVerification Property
Indicates if the FTP server supports one of the extensibility features for verified transfer integrity.

Pascal
property SupportsVerification: Boolean;
Description
SupportsVerification is a read-only Boolean property that indicates if the FTP server supports one of the extensibility features for
verified transfer integrity.

SupportsVerification returns True when one of the following checksum algorithms is listed in the Capabilities ( 690) for the FTP
server:

Algorithm Description
XCRC CRC ( 772)-32 checksum
XMD5 MD5 checksum
XSHA SHA-1 checksum

When SupportsVerification returns True, use the VerifyFile ( 809) method to verify the integrity of all or part of a file transfer
operation.

828 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

See Also
Capabilities ( 690)

VerifyFile ( 809)

TIdFTP.SystemDesc Property
Description of the remote FTP server.

Pascal
property SystemDesc: string;
Description
SystemDesc is a read-only string property that contians a description for the remote FTP server.

SystemDesc normally contains the name of the operating system for the FTP server, but the value of SystemDesc can be
server-specififc.

SystemDesc is updated in the Connect ( 771) method using the value returned from the FTP SYST command. If the numeric
response 500 is received for the command, the value in SystemDesc is set to the RSFTPUnknownHost resource string.

See Also
Connect ( 771)

RSFTPUnknownHost

TIdFTP.TransferTimeout Property
Timeout value for read operations on the data channel for the FTP client.

Pascal
property TransferTimeout: Integer;
Description
TransferTimeout is an Integer property that represents the number of milliseconds to wait for data packetes when receiving data on
the data channel for the FTP client.

TransferTimeout is assigned to the ReadTimeout ( 828) property in the IOHandler ( 2364) created during initialization of the data
channel for the Get ( 783) and Put ( 795) methods.

The default value for TransferTimeout is IdDefTimeout ( 3831), as assigned during initialization of the component.

See Also
IOHandler ( 2364)

Get ( 783)

Put ( 795)

TIdFTP.TransferType Property
Indicates the file transfer type.

Pascal
property TransferType: TIdFTPTransferType;
Description
TransferType is a TIdFTPTransferType ( 2953) property that indicates the file transfer type currently in use for the FTP client, and
can contain one of the following values:

Internet Direct (Indy) Version 10.1.5 829


TIdFTP Class Classes

Value Meaning
ftBinary Binary (8 bit) file transfers
ftASCII ASCII (7 bit) file transfers

An application should use the ftBinary transfer type for transferring executables, compressed files, graphics, and multimedia files.
Use the ftASCII transfer type for 7bit ASCII files, such as text or Hypertext Markup Language.

Changing the value in TransferType causes the FTP TYPE command to be sent when an active connection is available and the
data channel is not in use. Note: If the data channel has already been assigned, changing the value in TransferType has no effect.

TransferType is automatically sent (using the default value ftBinary) when Login ( 792) is executed, and when Connect ( 771) is
called with the AutoLogin ( 813) property set to True.

The default value for TransferType is Id_TIdFTP_TransferType ( 3821), as assigned during initialization of the component.

Example
[Delphi] Setting TransferType for FTP GET operations.
IdFTP1.TransferType := ftBinary;
IdFTP1.Get('image.jpg', 'image.jpg', True, False);

IdFTP1.TransferType := ftASCII;
IdFTP1.Get('readme.txt', 'readme.txt', True, False);
[C++ Builder] Setting TransferType for FTP GET operations.
IdFTP1->TransferType = ftBinary;
IdFTP1->Get("image.jpg", "image.jpg", True, False);

IdFTP1->TransferType = ftASCII;
IdFTP1->Get("readme.txt", "readme.txt", True, False);
See Also
TIdFTPTransferType ( 2953)

Login ( 792)

Connect ( 771)

TIdFTP.TryNATFastTrack Property
Indicates use of "fast path" connections for traversing firewalls and NATs.

Pascal
property TryNATFastTrack: Boolean;
Description
TryNATFastTrack is a Boolean property that indicates if the FTP client should use "fast path" connections for traversing firewalls
and network address translators (NAT). TryNATFastTrack can enhance the performance of data transfers when the FTP EPSV
command is supported on the server implementation.

TryNATFastTrack will cause the FTP EPSV ALL command to be sent after establishing the control channel for the client connection
and performing authentication when the AutoLogin ( 813) property contains True. EPSV ALL informs Network Address Translators
that the EPRT command (as well as other data commands) will no longer be used for the client session.

After receiving an EPSV ALL command, the server must reject all data connection setup commands other than EPSV (i.e., EPRT,
PORT, PASV, et al.). This process results in the UsingNATFastTrack ( 834) property being set to True on successful completion
of the feature negotiation.

The default value for TryNATFastTrack is Id_TIdFTP_UseNATFastTrack ( 3821), as assigned during initialization of the
component.

See Also
Connect ( 771)

830 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

AutoLogin ( 813)

UsingNATFastTrack ( 834)

TIdFTP.TZInfo Property
Provides access to timezone information for the remote FTP server.

Pascal
property TZInfo: TIdFTPTZInfo;
Description
TZInfo is a TIdFTPTZInfo ( 979) property used to store timezone information for the remote FTP server. TZInfo provides access to
the offset from GMT (UTC) when its GMTOffsetAvailable property contains True.

Properties in TZInfo are updated when the control channel for the client session is established in the Connect ( 771) method. If the
server implementation supports the FTP SITE ZONE command, the server response to the command is parsed and stored in the
GMTOffset and GMTOffsetAvailable properties in TZInfo.

TZInfo is used in SetModTime ( 802) and SetModTimeGMT ( 802) when updating the last modification time for a file on the
remote file system.

Resources required for the TZInfo property are allocated in during initialization of the component, and freed in the Destroy ( 774)
destructor.

See Also
TIdFTPTZInfo ( 979)

Connect ( 771)

SetModTime ( 802)

SetModTimeGMT ( 802)

TIdFTP.UseCCC Property
Indicates if use of the Clear Command Channel (CCC) command is required for the FTP client.

Pascal
property UseCCC: Boolean;
Description
UseCCC is a Boolean property that indicates if use of the Clear Command Channel (CCC) command is supported for the FTP client
session, as described in the Internet Standards documents:

RFC 2228 - FTP Security Extensions

When UseCCC contains True, TLS integrity protection on the control channel for the session will be disabled. Changing the value in
UseCCC can result in an EIdFTPNoCCCWOEncryption ( 92) exception begin raised when UseTLS ( 833) contains the value
utNoTLSSupport.

The value in the UseCCC property is used when transmitting the initial settings for the data channel, and indicates that an
IOHandler ( 2364) using a TIdSSLIOHandlerSocketBase ( 2134) instance must set it's PassThrough property to True.

Please note that the FTP CCC extension command is not supported on all FTP server implementations.

The default value is DEF_Id_FTP_UseCCC ( 3187), as assigned during initialization of the component and during processing in
the ReInitialize ( 798) method.

See Also
UseTLS ( 833)

IOHandler ( 2364)

Internet Direct (Indy) Version 10.1.5 831


TIdFTP Class Classes

TIdSSLIOHandlerSocketBase ( 2134)

ReInitialize ( 798)

Get ( 783)

Put ( 795)

TIdFTP.UseExtensionDataPort Property
Indicates if IPv6 extensions for Port ( 826) and Passive ( 825) settings are used in FTP protocol exchanges.

Pascal
property UseExtensionDataPort: Boolean;
Description
UseExtensionDataPort is a Boolean property used to indicate if IPv6 extensions for Port ( 826) and Passive ( 825) settings
should be used in FTP protocol exchanges. The UseExtensionDataPort property prevents the FTP client from sending IPv6 values
in the FTP PORT and PASV commands, which cannot handle the IPv6 address format.

The default value for UseExtensionDataPort is DEF_Id_TIdFTP_UseExtendedData ( 3188), as assigned during initialization of the
component.

Changing the value in the UseExtensionDataPort property to False while IPVersion contains the value IPv6 will result in an
EIdFTPMustUseExtWithIPv6 ( 91) exception being raised.

Changing the value in the UseExtensionDataPort property to False while TryNATFastTrack ( 830) returns True will result in an
EIdFTPMustUseExtWithNATFastTrack ( 91) exception being raised.

UseExtensionDataPort will be set to True when a socket-based IOHandler ( 2364) is assigned for the FTP client (in the control
channel) that uses the value Id_IPv6 in its IPVersion property.

Use the value in UsingExtDataPort ( 834) to determine if the IPv6 extensions are valid after performing FTP protocol exchanges
that might alter support for the capability.

See Also
Port ( 826)

IOHandler ( 2364)

Connect ( 771)

TIdFTP.UseMLIS Property
Indicates if the FTP MLST ( 4354) and MLSD commands are used for directory listings.

Pascal
property UseMLIS: Boolean;
Description
UseMLIS is a Boolean property that indicates if the FTP client should attempt to use the FTP MLST ( 4354) and MLSD commands
for directory listings. UseMLIS indicates the FTP client preference, but can be overridden in FTP protocol exchanges when the FTP
server does not implement support for MLST ( 4354) and/or MLSD.

Set UseMLIS to True to indicate that FTP client (and the parsers used for the DirectoryListing ( 818) collection) would prefer use
of the MLST ( 4354)/MLSD directory listing format.

Use the CanUseMLS property or the IsExtSupported ( 788) method to determine if the requested directopry listing format is
supported in the Capabilities ( 690) for the remote FTP server.

The default value for UseMLIS is DEF_Id_TIdFTP_UseMIS ( 3188), as assigned during initialization of the component.

See Also
CanUseMLS

832 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Capabilities ( 690)

IsExtSupported ( 788)

DirectoryListing ( 818)

DEF_Id_TIdFTP_UseMIS ( 3188)

TIdFTP.Username Property
Authentication identity used when logging in to the FTP server.

Pascal
property Username;
Description
Username is a Published String property in TIdFTP ( 759) that represents the name of the user used as the authentication identity
when logging into the FTP server.

Values in the Username and Password ( 826) properties are sent to the FTP server using the FTP commands USER and PASS in
the Login ( 792) method. During authentication, values in the properties are used to determine the effective permissions for FTP
client session.

For FTP clients that require connection to a proxy server, the Username and Password ( 826) properties found in ProxySettings
( 827) may be used depending on the proxy server type in ProxySettings ( 827).

For anonymous file transfers, the Username property should contain the value "anonymous". Use your email address in the
Password ( 826) property when connecting for anonymous file transfers.

Use Account ( 812) to provide additional information about the FTP account when required on the FTP server implementation.

Use ClientInfo ( 814) to provide additional information about the FTP client, revision, and platform for servers implementing the
FTP CLNT extension command.

See Also
Connect ( 771)

Login ( 792)

Password ( 826)

ProxySettings ( 827)

TIdFTP.UseTLS Property
Indicates Transport-Level Security is used on the connection.

Pascal
property UseTLS;
Description
UseTLS is a Published TIdUseTLS ( 2982) property that indicates the level of Transport Layer Security (TLS) required for control
channel and data channel connections in the FTP client.

Set UseTLS to one of the TIdUseTLS ( 2982) enumeration values to indicate the TLS security needed for the FTP client
connections.

The value in UseTLS is used in the Login ( 792) method to determine if explicit TLS support is indicated for the control channel
(ExplicitTLSVals ( 3206)) before performing the authentication indicated in the AUTHCmd ( 812) property and establishing a
connection using the optional values in ProxySettings ( 827).

Changing the value in UseTLS may also alter other properties that depend on the TLS capacility. For instance, changing UseTLS to
utNoTLSSupport forces the values in the following properties to be reset to their default values:

Internet Direct (Indy) Version 10.1.5 833


TIdFTP Class Classes

DataPortProtection ( 817)
UseCCC ( 831)
AUTHCmd ( 812)

See Also
Login ( 792)

ProxySettings ( 827)

DataPortProtection ( 817)

UseCCC ( 831)

AUTHCmd ( 812)

TIdFTP.UsingExtDataPort Property
Indicates if RFC 2428 NAT Extensions are available for the FTP client session.

Pascal
property UsingExtDataPort: Boolean;
Description
UsingExtDataPort is a read-only Boolean property that indicates if RFC 2428 NAT Extensions are available for the FTP client
session.

See Also
UseExtensionDataPort ( 832)

TIdFTP.UsingNATFastTrack Property
Indicates if "fast path" connections are in use for the FTP client.

Pascal
property UsingNATFastTrack: Boolean;
Description
UsingNATFastTrack is a read-only Boolean property that indicates if "fast path" connections are in use for the FTP client.

See Also
TryNATFastTrack ( 830)

TIdFTP.UsingSFTP Property
Indicates if a secure FTP connection is in use for the client session.

Pascal
property UsingSFTP: Boolean;
Description
UsingSFTP is a read-only Boolean property that indicates if a secure FTP connection is in use for the client session.

UsingSFTP is updated at various points in an FTP protocol exchange. In Connect ( 771), UsingSFTP is set to True when UseTLS
( 833) contains a value that indicates use of TLS for the socket transport. In Login ( 792), UsingSFTP is set to False until
successful completion of the authentication process and protocol exhanges for TLS negotiation.

The value in UsingSFTP is used at various points in the FTP protocol exchange to determine if additional commands are required
to configure the control or data channels for the FTP session.

834 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

During processing in the Get ( 783) and Put ( 795) methods, UsingSFTP determines the corresponding value for the
PassThrough setting for an IOhandler that uses a secure transport.

UsingSFTP also determines if use of the SendPBSZ command is allowed on the control channel for the client session.

TIdFTP Events
The Events of the TIdFTP class are listed here.

Events
Event Description
OnAfterGet ( 835) Event handler signalled following completion of data transfer in the Get ( 783) method.
OnBannerAfterLogin ( 835) Event handler signalled following completion of the FTP protocol exchange in the Login ( 792) method and
receipt of the LoginMsg ( 822) text.
OnBannerBeforeLogin ( 836) Event handler signalled after receipt of the welcome message, and before logging into the FTP server.
OnCreateFTPList ( 836) Event handler signalled for creation of the structured directory listing for the FTP client.
OnDataChannelCreate ( 837) Event handler signalled following creation of the data channel for data transfer operations.
OnDataChannelDestroy ( 838) Event handler signalled prior to freeing the data channel in the FTP client.
OnNeedAccount ( 838) Derives Account ( 812) information for the remote FTP Server.
OnTLSNotAvailable ( 839) Event handler signalled when the client has failed to provide implied support for TLS (Transport Layer
Security).

Legend
Event

TIdFTP.OnAfterGet Event
Event handler signalled following completion of data transfer in the Get ( 783) method.

Pascal
property OnAfterGet: TIdFtpAfterGet;
Description
OnAfterGet is a TIdFtpAfterGet ( 3027) property that represents the event handler signalled following completion of data transfer
in the Get ( 783) method.

Arguments to the event handler identify the stream containing the data on the local file system.

Applications can use the OnAfterGet event handler to perform processing required to determine the actual size ( 805) of the data
transferred in the operation, creating permanent storage for the local data, or updating the GUI to indicate the status ( 806) for the
data transfer operation. Applications must assign a procedure to the event handler to allow responding to the event notification.

See Also
Get ( 783)

TIdFTP.OnBannerAfterLogin Event
Event handler signalled following completion of the FTP protocol exchange in the Login ( 792) method and receipt of the
LoginMsg ( 822) text.

Pascal
property OnBannerAfterLogin: TIdFTPBannerEvent;
Description
OnBannerAfterLogin is a TIdFTPBannerEvent ( 3028) property that represents the event handler signalled following completion of
the FTP protocol exchange in the Login ( 792) method.

Arguments to the OnBannerAfterLogin event handler include the formatted reply in the LoginMsg ( 822) property.

OnBannerAfterLogin is triggered in the Login ( 792) method after establishing the optional TLS socket transport, and performing

Internet Direct (Indy) Version 10.1.5 835


TIdFTP Class Classes

authentication for the FTP client connection.

OnBannerAfterLogin is signalled prior to performing feature negotiation using the FTP FEAT command and capturing the values
stored in the Capabilities ( 690) property.

Applications must assign a procedure to the event handler to allow responding to the event notification.

Use on OnBannerBeforeLogin ( 836) to respond to the initial welcome message from the FTP server captured and stored in
Greeting ( 2364) after opening the control channel in the Connect ( 771) method.

See Also
TIdFTPBannerEvent ( 3028)

LoginMsg ( 822)

Login ( 792)

Connect ( 771)

Greeting ( 2364)

OnBannerBeforeLogin ( 836)

TIdFTP.OnBannerBeforeLogin Event
Event handler signalled after receipt of the welcome message, and before logging into the FTP server.

Pascal
property OnBannerBeforeLogin: TIdFTPBannerEvent;
Description
OnBannerBeforeLogin is a TIdFTPBannerEvent ( 3028) property that represents the event handler signalled after receipt of the
FTP server Greeting ( 2364).

OnBannerBeforeLogin is triggered in the Connect ( 771) method after opening the connection to the remote FTP server using
values in Host ( 820), Port ( 826), and optional ProxySettings ( 827). OnBannerBeforeLogin is triggered before performing
authentication using the Login ( 792) method when AutoLogin ( 813) contains True.

Arguments to the OnBannerBeforeLogin event handler include the formatted reply in the Greeting ( 2364) property.

OnBannerBeforeLogin allows the application to gain access to the message in Greeting ( 2364) when it is received from the FTP
server. The Greeting ( 2364) message typically contains information that identifies the server and describes acceptable usage
policies. It may also contain information about scheduled downtime, or other events that will affect availability of the remote FTP
server. Applications must assign a procedure to the event handler to allow responding to the event notification.

Use on OnBannerAfterLogin ( 835) to respond to the message receive after completion of the FTP protocol exchange for
authentication in the Login ( 792) method.

See Also
TIdFTPBannerEvent ( 3028)

Connect ( 771)

Greeting ( 2364)

AutoLogin ( 813)

Login ( 792)

OnBannerAfterLogin ( 835)

TIdFTP.OnCreateFTPList Event
Event handler signalled for creation of the structured directory listing for the FTP client.

836 Internet Direct (Indy) Version 10.1.5


Classes TIdFTP Class

Pascal
property OnCreateFTPList: TIdCreateFTPList;
Description
OnCreateFTPList is a TIdCreateFTPList ( 3016) property that represents the event handler signalled when the DirectoryListing (
818) collection is created following retrieval of the text for a directory listing.

OnCreateFTPList is triggered when attempting to read the value of the DirectoryListing ( 818) property and the collection instance
has not been previously created.

OnCreateFTPList allows the application to receive notification that the DirectoryListing ( 818) container is about to be created. It
may also be used to assign an object instance to the DirectoryListing ( 818) property. Applications must assign a procedure to the
event handler to allow responding to the event notification.

Use OnRetrievedDir ( 825) to respond to receipt of the textual information in a directory listing.

Use OnDirParseStart ( 824) and OnDirParseEnd ( 824) to respond to notifications occurring proper to and following parsing of
values in ListResult ( 821) into items in the DirectoryListing ( 818) collection.

See Also
DirectoryListing ( 818)

TIdCreateFTPList ( 3016)

OnRetrievedDir ( 825)

OnDirParseStart ( 824)

OnDirParseEnd ( 824)

TIdFTP.OnDataChannelCreate Event
Event handler signalled following creation of the data channel for data transfer operations.

Pascal
property OnDataChannelCreate: TIdOnDataChannelCreate;
Description
OnDataChannelCreate is a TIdOnDataChannelCreate ( 3069) property that represents the event handler signalled following
creation of the data channel used for data transfer operations in the Get ( 783) and Put ( 795) methods.

The data channel for the client will have been initialized prior to triggering the OnDataChannelCreate event handler, and includes
the following initializations:

• Create ( 267) an IOHandler ( 2364) for the data channel.


• Sets the connect ( 771) timeout to the values used in the control.
• Copies the TransparentProxy setting from the control channel.
• TransferTimeout ( 829) uses the read timeout from the control channel.
• SendBufferSize is set to the value in the control channel.
• RecvBufferSize is set to the value in the control channel.
• The OnWorkBegin ( 2368), OnWork ( 2368), and OnWorkEnd ( 2369) event handlers are copied from the FTP client.
• IPVersion is set to match the control channel.
For active connections (where Passive ( 825) is False), this includes setting the values for the following properties:

Property Description
BoundIP ( 2345) IP address for the FTP client.

Internet Direct (Indy) Version 10.1.5 837


TIdFTP Class Classes

BoundPort ( 2345) DataPort ( 816) indicated in the FTP client.


BoundPortMin ( 2346) DataPortMin ( 817) indicated in the FTP client.
BoundPortMax ( 2346) DataPortMax ( 816) indicated in the FTP client.

Arguments passed to the event handler include FTP client and the data channel instance for the event.

OnDataChannelCreate allows the application to perform logging and maintenace required when the FTP client is about perform a
data transfer operation. Assign a procedure to the event handler to allow responding to the event notification.

Use OnDataChannelDestroy ( 838) to respond to the event notification that occurs on completion of the data transfer and prior to
freeing resources allocated to the data channel.

See Also
TIdOnDataChannelCreate ( 3069)

Get ( 783)

Put ( 795)

Passive ( 825)

OnDataChannelDestroy ( 838)

TIdFTP.OnDataChannelDestroy Event
Event handler signalled prior to freeing the data channel in the FTP client.

Pascal
property OnDataChannelDestroy: TIdOnDataChannelDestroy;
Description
OnDataChannelDestroy is a TIdOnDataChannelDestroy ( 3069) property that represents the event handler signalled prior to
freeing resource allocated to the data channel in data transfer operations.

OnDataChannelDestroy is triggered in the Get ( 783) and Put ( 795) methods when the data transfer operation has been
completed, and prior to freeing the object instance.

Arguments passed to the event handler include the FTP client and the data channel instance for the event.

OnDataChannelDestroy allows the application to perform logging and maintenace required when the FTP client is about to free the
data channel used for a data transfer operation. Assign a procedure to the event handler to allow responding to the event
notification.

Use OnDataChannelBegin to respond to the event notification that occurs on after creating and initalizing the data channel.

See Also
TIdOnDataChannelDestroy ( 3069)

Get ( 783)

Put ( 795)

Passive ( 825)

OnDataChannelCreate ( 837)

TIdFTP.OnNeedAccount Event
Derives Account ( 812) information for the remote FTP Server.

Pascal
property OnNeedAccount: TIdNeedAccountEvent;

838 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPBaseFileSystem Class

Description
OnNeedAccount is a TIdNeedAccountEvent ( 3061) property that represents the event handler signalled when account
information is required during login ( 792) for the FTP client.

OnNeedAccount allows the client to derive the information required to perform the FTP ACCT command during execution of the
Login ( 792) method. OnNeedAccount allows the client determine and set the value for the Account ( 812) property that is used
in the protocol exchange.

Applications must assign a procedure to the event handler to allow responding to the event notification, and to derive a value for the
Account ( 812) property using session or context information.

Historically, values in the Account ( 812) property are a Telnet string identifying the user's account. The command is not
necessarily related to the USER command, as some sites may require an account for login ( 792) and others only for specific
access, such as storing files.

If account information is not required for Login ( 792), the response code is 230; and if the account information is needed for a
command issued later in the dialogue, the server should return a 332 or 532 reply depending on whether it stores (pending receipt
of the Account ( 812) command) or discards the command, respectively.

See Also
Login ( 792)

Connect ( 771)

Account ( 812)

TIdFTP.OnTLSNotAvailable Event
Event handler signalled when the client has failed to provide implied support for TLS (Transport Layer Security).

Pascal
property OnTLSNotAvailable: TIdOnTLSNegotiationFailure;
Description
OnTLSNotAvailable is a Published property in TIdFTP ( 759) that represents the event handler signalled when the client has failed
to provide implied support for TLS (Transport Layer Security).

OnTLSNotAvailable allows the application to determine the action to take when a TLS negotiation has failed based on the value
used in UseTLS ( 833). Arguments to the event handler include the FTP client for the event notification, and a boolean argument
that indicates if the process should be allowed to continue. Applications can set the value of the boolean argument in the event
handler procedure.

TIdFTPBaseFileSystem Class
File
IdFTPBaseFileSystem ( 4631)

Hierarchy

Pascal
TIdFTPBaseFileSystem = class(TIdBaseComponent);
Description
TIdFTPBaseFileSystem is a TIdBaseComponent ( 266) descendant.

Internet Direct (Indy) Version 10.1.5 839


TIdFTPBaseFileSystem Class Classes

See Also
TIdBaseComponent ( 266)

TIdFTPBaseFileSystem Members
The following tables list the members exposed by TIdFTPBaseFileSystem.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ChangeDir ( 841)
CombineFiles ( 841)
Create ( 267) Constructor for the object instance.
DeleteFile ( 841)
GetCRCCalcStream ( 841)
GetFileDate ( 842)
GetFileSize ( 842)
GetVersion ( 269) Version ( 269) number for Indy component suite.
ListDirectory ( 842)
MakeDirectory ( 843)
RemoveDirectory ( 843)
RenameFile ( 843)
RetrieveFile ( 844)
SetModifiedFileDate ( 844)
StoreFile ( 844)
CType ( 267)
Create ( 1274)

Legend
Method
abstract
virtual
Property
read only

TIdFTPBaseFileSystem Methods
The Methods of the TIdFTPBaseFileSystem class are listed here.

Methods
Method Description
ChangeDir ( 841)
CombineFiles ( 841)
DeleteFile ( 841)
GetCRCCalcStream ( 841)
GetFileDate ( 842)
GetFileSize ( 842)
ListDirectory ( 842)
MakeDirectory ( 843)
RemoveDirectory ( 843)
RenameFile ( 843)
RetrieveFile ( 844)
SetModifiedFileDate ( 844)
StoreFile ( 844)

840 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPBaseFileSystem Class

Legend
Method
abstract

TIdFTPBaseFileSystem.ChangeDir Method
Pascal
procedure ChangeDir(
AContext: TIdFTPServerContextBase;
var VDirectory: string
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
VDirectory Scope is var. Type is string.

Description
ChangeDir is a abstract,virtual method.

TIdFTPBaseFileSystem.CombineFiles Method
Pascal
procedure CombineFiles(
AContext: TIdFTPServerContextBase;
const ATargetFileName: string;
AParts: TIdStrings
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
ATargetFileName Scope is const. Type is string.
AParts Type is TIdStrings ( 3089).

Description
CombineFiles is a abstract,virtual method.

TIdFTPBaseFileSystem.DeleteFile Method
Pascal
procedure DeleteFile(
AContext: TIdFTPServerContextBase;
const APathName: string
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
APathName Scope is const. Type is string.

Description
DeleteFile is a abstract,virtual method.

TIdFTPBaseFileSystem.GetCRCCalcStream Method
Pascal
procedure GetCRCCalcStream(

Internet Direct (Indy) Version 10.1.5 841


TIdFTPBaseFileSystem Class Classes

AContext: TIdFTPServerContextBase;
const AFileName: string;
var VStream: TIdStream
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFileName Scope is const. Type is string.
VStream Scope is var. Type is TIdStream ( 3087).

Description
GetCRCCalcStream is a abstract,virtual method.

TIdFTPBaseFileSystem.GetFileDate Method
Pascal
procedure GetFileDate(
AContext: TIdFTPServerContextBase;
const AFilename: string;
var VFileDate: TIdDateTime
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFilename Scope is const. Type is string.
VFileDate Scope is var. Type is TIdDateTime ( 4733).

Description
GetFileDate is a abstract,virtual method.

TIdFTPBaseFileSystem.GetFileSize Method
Pascal
procedure GetFileSize(
AContext: TIdFTPServerContextBase;
const AFilename: string;
var VFileSize: Int64
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFilename Scope is const. Type is string.
VFileSize Scope is var. Type is Int64.

Description
GetFileSize is a abstract,virtual method.

TIdFTPBaseFileSystem.ListDirectory Method
Pascal
procedure ListDirectory(
AContext: TIdFTPServerContextBase;
const APath: string;
ADirectoryListing: TIdFTPListOutput;
const ACmd: String;
const ASwitches: String
); virtual; abstract;

842 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPBaseFileSystem Class

Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
APath Scope is const. Type is string.
ADirectoryListing Type is TIdFTPListOutput ( 860).
ACmd Scope is const. Type is String.
ASwitches Scope is const. Type is String.

Description
ListDirectory is a abstract,virtual method.

TIdFTPBaseFileSystem.MakeDirectory Method
Pascal
procedure MakeDirectory(
AContext: TIdFTPServerContextBase;
var VDirectory: string
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
VDirectory Scope is var. Type is string.

Description
MakeDirectory is a abstract,virtual method.

TIdFTPBaseFileSystem.RemoveDirectory Method
Pascal
procedure RemoveDirectory(
AContext: TIdFTPServerContextBase;
var VDirectory: string
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
VDirectory Scope is var. Type is string.

Description
RemoveDirectory is a abstract,virtual method.

TIdFTPBaseFileSystem.RenameFile Method
Pascal
procedure RenameFile(
AContext: TIdFTPServerContextBase;
const ARenameToFile: string
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
ARenameToFile Scope is const. Type is string.

Description
RenameFile is a abstract,virtual method.

Internet Direct (Indy) Version 10.1.5 843


TIdFTPClientIdentifier Class Classes

TIdFTPBaseFileSystem.RetrieveFile Method
Pascal
procedure RetrieveFile(
AContext: TIdFTPServerContextBase;
const AFileName: string;
var VStream: TIdStream
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFileName Scope is const. Type is string.
VStream Scope is var. Type is TIdStream ( 3087).

Description
RetrieveFile is a abstract,virtual method.

TIdFTPBaseFileSystem.SetModifiedFileDate Method
Pascal
procedure SetModifiedFileDate(
AContext: TIdFTPServerContextBase;
const AFileName: String;
var VDateTime: TIdDateTime
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFileName Scope is const. Type is String.
VDateTime Scope is var. Type is TIdDateTime ( 4733).

Description
SetModifiedFileDate is a abstract,virtual method.

TIdFTPBaseFileSystem.StoreFile Method
Pascal
procedure StoreFile(
AContext: TIdFTPServerContextBase;
const AFileName: string;
AAppend: Boolean;
var VStream: TIdStream
); virtual; abstract;
Parameters
Parameters Description
AContext Type is TIdFTPServerContextBase ( 976).
AFileName Scope is const. Type is string.
AAppend Type is Boolean.
VStream Scope is var. Type is TIdStream ( 3087).

Description
StoreFile is a abstract,virtual method.

844 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPClientIdentifier Class

TIdFTPClientIdentifier Class
File
IdFTP ( 4629)

Hierarchy

Pascal
TIdFTPClientIdentifier = class(TIdPersistent);
Description
TIdFTPClientIdentifier is a TIdPersistent ( 3073) descendant.

See Also
TIdPersistent ( 3073)

TIdFTPClientIdentifier Members
The following tables list the members exposed by TIdFTPClientIdentifier.

Properties
Property Description
ClientName ( 846)
ClientVersion ( 846)
ClntOutput ( 846)
PlatformDescription ( 847)

Methods
Method Description
Assign ( 846)

Legend
Method
virtual
Property
read only

TIdFTPClientIdentifier Methods
The Methods of the TIdFTPClientIdentifier class are listed here.

Methods
Method Description
Assign ( 846)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 845


TIdFTPClientIdentifier Class Classes

TIdFTPClientIdentifier.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdFTPClientIdentifier Properties
The Properties of the TIdFTPClientIdentifier class are listed here.

Properties
Property Description
ClientName ( 846)
ClientVersion ( 846)
ClntOutput ( 846)
PlatformDescription ( 847)

Legend
Property
read only

TIdFTPClientIdentifier.ClientName Property
Pascal
property ClientName: String;
Description
ClientName is a Published String property. Write access for the property is implemented using SetClientName.

TIdFTPClientIdentifier.ClientVersion Property
Pascal
property ClientVersion: String;
Description
ClientVersion is a Published String property. Write access for the property is implemented using SetClientVersion.

TIdFTPClientIdentifier.ClntOutput Property
Pascal
property ClntOutput: String;
Description
ClntOutput is a Public read-only String property.

846 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListBase Class

TIdFTPClientIdentifier.PlatformDescription Property
Pascal
property PlatformDescription: String;
Description
PlatformDescription is a Published String property. Write access for the property is implemented using SetPlatformDescription.

TIdFTPLineOwnedList Class
File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPLineOwnedList = class(TIdFTPListBase);
Description
TIdFTPLineOwnedList TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPListBase Class
Implements the ancestor for structured directory listing parsers used in the Indy FTP client.

File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPListBase = class(TObject);
Description
TIdFTPListBase is a TObject descendant that implements the ancestor class for structured directory listing parsers used in the Indy
FTP client.

TIdFTPListBase implements methods that are commonly used in all parsers, such as:

CheckListing ( 848)
ParseListing ( 849)
ParseLine
GetIdent ( 849)
MakeNewItem

Internet Direct (Indy) Version 10.1.5 847


TIdFTPListBase Class Classes

These methods are normally overriden in descendant classes that recognize and parse specific directory listing formats returned by
a remote FTP server.

References to TIdFTPListBase descendants are used in the ListParserClass property in the TIdFTP ( 759) client.

Units with TIdFTPListBase descendant classes must be included in the uses clause in the source code for your application. Use the
RegisterFTPListParser ( 2893) and UnregisterFTPListParser ( 2932) routines to manage registrations for descendant classes
using the TIdFTPRegParseList ( 949) variable for the parser framework.

See Also
TIdFTPListParseClass ( 3028)

TIdFTP.ListParserClass ( 821)

RegisterFTPListParser ( 2893)

UnregisterFTPListParser ( 2932)

TIdFTPRegParseList ( 949)

GParserList

TIdFTPListBase Members
The following tables list the members exposed by TIdFTPListBase.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
GetIdent ( 849) Identifies the directory listing format supported by the parser class.
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPListBase Methods
The Methods of the TIdFTPListBase class are listed here.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
GetIdent ( 849) Identifies the directory listing format supported by the parser class.
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPListBase.CheckListing Method
Detertmines if the class recognizes the specified directory listing format.

Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; virtual;

848 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListBase Class

Parameters
Parameters Description
AListing Directory listing to examine.
ASysDescript System description from the remote FTP server. Default value is ''.
ADetails Indicates if file details are supported for the directory listing format. Default value is True.

Returns
boolean - True when the directory listing format is handled by the current parser class.

Description
CheckListing is a virtual Boolean class function used to detertmine if the class recognizes the specified directory listing format.

AListing contains the text from an FTP server response that represents the directory listing format to be examined. The parser class
uses values in AListing to determine if the specified directory listing format is supported in the current object instance.

CheckListing is essentially an abstract method and must be reimplemented in a descendant class that recognizes a specific
directory listing format.

Use ParseListing ( 849) to implement parsing of the content in the directory listing, and updating of the structured directory listing.

Use ParseLine to implement parsing of file, directory, or device information found in an individual line in the directory listing.

Use GetIdent ( 849) to access the identifier for the directory listing format supported by the current parser class.

TIdFTPListBase.GetIdent Method
Identifies the directory listing format supported by the parser class.

Pascal
class function GetIdent: String; virtual;
Returns
String - Identifier for the directory listing format.

Description
GetIdent is a virtual String class function that identifies the directory listing format supported by the parser class. GetIdent must be
overridden in a descendant class to provide the identifier for the directory listing format.

TIdFTPListBase.ParseListing Method
Parses and stores values found in a directory listing response from a remote FTP server.

Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; virtual;
Parameters
Parameters Description
AListing Text representing the directory listing response from a remote FTP server.
ADir Container for the structured directory listing.

Returns
boolean - True on success.

Description
ParseListing is a virtual Boolean class function used to parse and store values found in a directory listing response from a remote
FTP server.

ParseListing iterates over lines of text found in the AListing argument and populates the structured dirctory listing container in ADir

Internet Direct (Indy) Version 10.1.5 849


TIdFTPListBaseHeader Class Classes

using non-blank values. ParseListing calls the MakeNewItem method to create new entries in the structured directory listing
container and assigns the non-blank line of text to the Data property for the TIdFTPListItem ( 851) instance. Finally, ParseListing
calls the ParseLine method to derive values for properties in the TIdFTPListItem ( 851) instance using the textual data assigned to
the collection item.

ParseListing returns True when the method has been successfully completed.

TIdFTPListBaseHeader Class
File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPListBaseHeader = class(TIdFTPListBase);
Description
TIdFTPListBaseHeader TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPListBaseHeader Members
The following tables list the members exposed by TIdFTPListBaseHeader.

Methods
Method Description
CheckListing ( 851)
GetIdent ( 849) Identifies the directory listing format supported by the parser class.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPListBaseHeader Methods
The Methods of the TIdFTPListBaseHeader class are listed here.

Methods
Method Description
CheckListing ( 851)
ParseListing ( 851)

Legend
Method
virtual

850 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListItem Class

TIdFTPListBaseHeader.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
TIdFTPListBaseHeader.CheckListing overridden class method.

TIdFTPListBaseHeader.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
TIdFTPListBaseHeader.ParseListing overridden class method.

TIdFTPListItem Class
Represents items added to the structured directory listing collection for the Indy FTP client.

File
IdFTPList ( 4634)

Hierarchy

Pascal
TIdFTPListItem = class(TIdCollectionItem);
Description
TIdFTPListItem is a TIdCollectionItem ( 3011) descendant that represents items added to the TIdFTPListItems ( 857) structured
directory listing for the Indy FTP client.

Internet Direct (Indy) Version 10.1.5 851


TIdFTPListItem Class Classes

TIdFTPListItem contains properties that represent common information for items parsed from an FTP response and added to the
structured directory listing in TIdFTP ( 759) client. These properties include the following:

Property Description
Data ( 855) Values parsed from the FTP directory listing response and used to initialize properties in the collection item.
Size ( 857) Size ( 857) allocated for the resource on the remote FTP server.
ModifiedDate ( Last modified date and time for the resource on the remote FTP server.
856)
FileName ( 855) File name for the resource.

LocalFileName ( Suggested file name for the resopurce if stored on the local file system.
855)
ItemType ( 855) Type of item represented by the collection entry.

SizeAvail ( 857) Indicates if file size information is available for the resource on the remote FTP server.

ModifiedAvail ( Indicates if last modification date and time information is available for the resource on the remote FTP server.
856)
PermissionDisplay User-displayable representation of permissions assigned for the resource on the remote FTP server.
( 856)

Use the Assign ( 853) method to copy property values from another TIdFTPListItem instance into the current object instance.

Some remote FTP server file systems support additional values that can be detected and parsed by a registered parser in the FTP
client. For those parser implementations, TIdFTPListItem may be use as an ancestor class for the collection item that maintains
additional file system information.

See Also
TIdCollectionItem ( 3011)

TIdFTPListItems ( 857)

TIdFTP.DirectoryListing ( 818)

TIdFTPListItem Members
The following tables list the members exposed by TIdFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

852 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListItem Class

Legend
Method
virtual
Property

TIdFTPListItem Methods
The Methods of the TIdFTPListItem class are listed here.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Method
virtual

TIdFTPListItem.Assign Method
Copies property values from another structured directory listing entry.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Object with values to assign to the current object instance.

Description
Assign is an overridden method used to copy property values from the TIdFTPListItem ( 851) instance in ASource into the current
collection item.

Assign ensures that the object instance in ASource is cast to a TIdFTPListItem ( 851) object instance prior to copying values for
the following properties:

Data ( 855)
ItemType ( 855)
Size ( 857)
ModifiedDate ( 856)
FileName ( 855)

Please note that Assign does not call the inherited Assign method.

TIdFTPListItem.Create Constructor
Constructor for the collection item.

Pascal
constructor Create(
AOwner: TIdCollection
); override;

Internet Direct (Indy) Version 10.1.5 853


TIdFTPListItem Class Classes

Parameters
Parameters Description
AOwner Collection that owns the entry.

Description
Create is the overridden constructor for the collection item.

Create calls the inherited constructo using the value in AOwner as the owner of the collection item.

Creates sets the default values for properties in the collection item entry, including:

Property Default Value


Data ( 855) '' (empty string)
ItemType ( 855) ditFile
Size ( 857) 0
ModifiedDate ( 856) 0.0 (empty date/time value)
FileName ( 855) '' (empty string)
LocalFileName ( 855) '' (empty string)
SizeAvail ( 857) True
ModifiedAvail ( 856) True

Use Free to destroy ( 854) the current object instance.

See Also
Data ( 855) ItemType ( 855) Size ( 857) ModifiedDate ( 856) FileName ( 855) LocalFileName ( 855) SizeAvail ( 857)
ModifiedAvail ( 856)

TIdFTPListItem.Destroy Destructor
Frees the collection item.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the collection item. Destroy calls the inherited destructor prior to exiting from the method.

TIdFTPListItem Properties
The Properties of the TIdFTPListItem class are listed here.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

854 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListItem Class

Legend
Property

TIdFTPListItem.Data Property
Data from a directory listing response used to populate properties in the collection item.

Pascal
property Data: string;
Description
Data is a String property that represents the values from a directory listing response used to populate properties in the collection
item.

Values in the Data property are assigned when the registered ListParserClass for the FTP client calls its' ParseListing ( 2883)
method. Values assigned to the Data property are subsequently used when the ListParserClass for the FTP client calls its'
ParseLine method.

See Also
TIdFTPListBase.ParseListing ( 849)

TIdFTPListBase.ParseLine

ListParserClass

TIdFTPListItem.FileName Property
Name for a file as assigned on the remote FTP server.

Pascal
property FileName: string;
Description
FileName is a String property that represents the name for a file as assigned on the remote FTP server.

Use LocalFileName ( 855) to access a suggested filename for use when saving the file on the local system.

See Also
LocalFilename

TIdFTPListItem.ItemType Property
Indicates the type of item represented by the collection entry.

Pascal
property ItemType: TIdDirItemType;
Description
ItemType is a TIdDirItemType ( 2948) property that indicates the type of item represented by the collection entry.

Values in ItemType are assigned when the registered ListParserClass for the the FTP client is used to parse the content in the Data
( 855) property. The values used and allowed in the ItemType property are dependent on the file system capabilities implemented
on the remote FTP server in Host. In other words, not all of the enumeration values in TIdDirItemType ( 2948) are used and
supported in every TIdFTPListBase ( 847) descendant.

TIdFTPListItem.LocalFileName Property
Suggested file name to used for the local file system.

Internet Direct (Indy) Version 10.1.5 855


TIdFTPListItem Class Classes

Pascal
property LocalFileName: string;
Description
LocalFileName is a String property that represents the suggested file to use when storing a copy of the file indicated in Filename on
the local file system. LocalFileName essentially consists of the value in Filename after removing path information and any file
system specifics (like version markers in VMS).

Values in LocalFileName are assigned when the registered ListParserClass for the the FTP client is used to parse the content in the
Data ( 855) property.

TIdFTPListItem.ModifiedAvail Property
Indicates if last modification date and time values are available for the collection item.

Pascal
property ModifiedAvail: Boolean;
Description
ModifiedAvail is a Boolean property that indicates if the last modification date and time value in the ModifiedDate ( 856) property is
available for the collection item.

ModifiedAvail is updated when the registered ListParserClass for the FTP client is used to examine the content in Data ( 855) in
its' ParseLine method. ModifiedAvail will contain False when the remote file system does not provide last modification date and time
values, or when the expected listing format does not contain a recognizable marker for the value.

Use SizeAvail ( 857) to determine if file size information is available for the collection item.

See Also
ModifiedDate ( 856)

SizeAvail ( 857)

Data ( 855)

TIdFTP.ListParserClass ( 821)

TIdFTPListParserBase.ParseLine

TIdFTPListItem.ModifiedDate Property
Last modification date and time for the resource on the remote FTP server.

Pascal
property ModifiedDate: TIdDateTime;
Description
ModifiedDate is a TIdDateTime ( 4733) property that indicates the last modification date and time for the resource on the remote
FTP server.

Values in LocalFileName ( 855) are assigned when the registered ListParserClass for the the FTP client is used to parse the
content in the Data ( 855) property.

Please note that some FTP server file systems do not provide last modificiation date and time values. Use ModifiedAvail ( 856) to
determine if an actual value was received in the directory listing response from the remote FTP server.

TIdFTPListItem.PermissionDisplay Property
User-displayable representation of permissions for the collection item.

856 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListItems Class

Pascal
property PermissionDisplay: String;
Description
PermissionDisplay is a String property containing a user-displayable representation of permissions assigned to the collection item
on the remote FTP server.

Values in PermissionDisplay are assigned when the registered ListParserClass for the the FTP client is used to parse the content in
the Data ( 855) property.

Please note that some FTP server file systems do not provide permissions data in a directory listing response. In this siutation,
PermissionsDisplay will contain an empty string ('').

TIdFTPListItem.Size Property
Indicates the allocated size for the file resource on the remote FTP server.

Pascal
property Size: Int64;
Description
Size is an Int64 property that indicates the allocated size for the file resource on the remote FTP server.

Values in Size are assigned when the registered ListParserClass for the the FTP client is used to parse the content in the Data (
855) property.

Please note that some FTP server file systems do not provide file size values. Use SizeAvail ( 857) to determine if an actual value
was received in the directory listing response from the remote FTP server.

TIdFTPListItem.SizeAvail Property
Indicates if file size information is available in the Size ( 857) property for the collection item.

Pascal
property SizeAvail: Boolean;
Description
SizeAvail is a Boolean property used to indicate if file size information is available in the Size ( 857) property for the collection item.

SizeAvail is updated when the registered ListParserClass for the FTP client is used to examine the content in Data ( 855) in its'
ParseLine method. SizeAvail will contain False when the remote file system does not provide file size values, or when the expected
listing format does not contain a recognizable marker for the value.

Use ModifiedAvail ( 856) to determine if last modification date and time values are available for the collection item.

TIdFTPListItems Class
Implements a container for items used in the structured directory listing in the Indy FTP client.

File
IdFTPList ( 4634)

Hierarchy

Pascal
TIdFTPListItems = class(TIdCollection);

Internet Direct (Indy) Version 10.1.5 857


TIdFTPListItems Class Classes

Description
TIdFTPListItems is a TIdCollection ( 3011) descendant that implements a container for items used in the structured directory
listing in the Indy FTP client.

TIdFTPListItems is used to access, store, and maintain TIdFTPListItem ( 851) instances in the collection created using the Add (
859) method. TIdFTPListItems provides indexed access to the Items ( 860) in the collection by their ordinal position, and also
allows locating a specific TIdFTPListItem ( 851) object instance using the IndexOf ( 859) method.

TIdFTPListItems introduces the DirectoryName ( 860) property that can be used to identify the directory on the remote FTP server
represented by Items ( 860) in the collection.

TIdFTPListItems is the type used to implement the DirectoryListing property in the TIdFTP ( 759) client.

TIdFTPListItems instances are also passed as an argument to the ExtListItem and OnCreateFTPList methods in the FTP client.

See Also
TIdCollection ( 3011)

TIdFTPListItem ( 851)

TIdFTP.DirectoryListing ( 818)

TIdFTP.ListParserClass ( 821)

TIdFTP.ExtListItem ( 776)

TIdFTP.OnCreateFTPList ( 836)

TIdFTPListItems Members
The following tables list the members exposed by TIdFTPListItems.

Properties
Property Description
DirectoryName ( 860) Identifies the directory on the remote FTP server represented by the items in the collection.
Items ( 860) Provides indexed access to entries in the structured directory listing collection.

Methods
Method Description
Add ( 859) Creates and adds a new entry in the structured directory listing collection.
Create ( 859) Constructor for the object instance.
IndexOf ( 859) Locates a specific item in the structured directory listing collection.

Legend
Method
Property

TIdFTPListItems Methods
The Methods of the TIdFTPListItems class are listed here.

Methods
Method Description
Add ( 859) Creates and adds a new entry in the structured directory listing collection.
Create ( 859) Constructor for the object instance.
IndexOf ( 859) Locates a specific item in the structured directory listing collection.

Legend
Method

858 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListItems Class

TIdFTPListItems.Add Method
Creates and adds a new entry in the structured directory listing collection.

Pascal
function Add: TIdFTPListItem;
Returns
TIdFTPListItem ( 851) - File or directory entry added to the collection.

Description
Add is a TIdFTPListItem ( 851) function used to create ( 859) and add a new entry in the structured directory listing collection.

Add calls the inherited method and ensures that the return value is cast to a TIdFTPListItem ( 851) object instance. Use the
Delete and Clear methods inherited from TIdCollection ( 3011) to maintain the Items ( 860) in the collection.

Add is used when the ListParserClass for the FTP client needs to make a new entry in the structured directory listing after calling its'
ParseListing ( 2883) and ParseLine methods.

See Also
TIdFTPListItem ( 851)

TIdFTP.DirectoryListing ( 818)

TIdFTPListBase.MakeNewItem

TIdFTPListBase.ParseListing ( 849)

TIdFTPListBase.ParseLine

TIdFTPListItems.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; reintroduce;
Description
Create is the reintroduced constructor for the collection.

Create calls the inherited constructor using TIdFTPListItem ( 851) as the class type used for new Items ( 860) in the collection.

Use Add ( 859) to create and store new collection items in the container.

TIdFTPListItems.IndexOf Method
Locates a specific item in the structured directory listing collection.

Pascal
function IndexOf(
AItem: TIdFTPListItem
): Integer;
Parameters
Parameters Description
AItem Item to locate in the structured directory listing collection.

Returns
Integer - Ordinal position of the requested collection item.

Description
IndexOf is an Integer function used to locate the TIdFTPListItem ( 851) instance specified in AItem in the Items ( 860) for the

Internet Direct (Indy) Version 10.1.5 859


TIdFTPListOutput Class Classes

collection. IndexOf returns a zero-based value that indicates the ordinal position of AItem in the collection Items ( 860), or -1 when
AItem cannot be found in the collection Items ( 860).

IndexOf iterates over the object instances in Items ( 860) to perform the object comparision required for the method. Use the
Items ( 860) property to access the collection item in AItem using the ordinal position indicated in the retuirn value for the method.

TIdFTPListItems Properties
The Properties of the TIdFTPListItems class are listed here.

Properties
Property Description
DirectoryName ( 860) Identifies the directory on the remote FTP server represented by the items in the collection.
Items ( 860) Provides indexed access to entries in the structured directory listing collection.

Legend
Property

TIdFTPListItems.DirectoryName Property
Identifies the directory on the remote FTP server represented by the items in the collection.

Pascal
property DirectoryName: string;
Description
DirectoryName is a string property that can be used to identify the directory on the remote FTP server represented by the items in
the structured directory listing collection.

DirectoryName can be used in registered DirectoryListing parsers to store the directory name prior to parsing the FTP server
response for a directory listing. Changing the value in the DirectoryName causes all existing Items ( 860) in the container to be
cleared.

TIdFTPListItems.Items Property
Provides indexed access to entries in the structured directory listing collection.

Pascal
property Items [AIndex: Integer]: TIdFTPListItem;
Description
Items is a TIdFTPListItem ( 851) property that provides indexed access to TIdFTPListItem ( 851) instances maintained in the
structured directory listing collection.

Items provides both read and write access to collection items using their zero-based ordinal position in the collection.

Items is the default property for the TIdFTPListItems ( 857) collection.

Use IndexOf ( 859) to locate a specific object instance in the collection.

Use Add ( 859), Delete, and Clear to maintain the items in the collection.

TIdFTPListOutput Class
File
IdFTPListOutput ( 4635)

860 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListOutput Class

Hierarchy

Pascal
TIdFTPListOutput = class(TIdCollection);
Description
TIdFTPListOutput is a TIdCollection ( 3011) descendant.

See Also
TIdCollection ( 3011)

TIdFTPListOutput Members
The following tables list the members exposed by TIdFTPListOutput.

Properties
Property Description
DirFormat ( 863)
ExportTotalLine ( 864)
Items ( 864)
Output ( 864)
Switches ( 864)

Methods
Method Description
Add ( 862)
Create ( 862)
IndexOf ( 862)
LISTOutputDir ( 862)
MLISTOutputDir ( 863)
NLISTOutputDir ( 863)

Legend
Method
virtual
Property

TIdFTPListOutput Methods
The Methods of the TIdFTPListOutput class are listed here.

Methods
Method Description
Add ( 862)
Create ( 862)
IndexOf ( 862)
LISTOutputDir ( 862)
MLISTOutputDir ( 863)
NLISTOutputDir ( 863)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 861


TIdFTPListOutput Class Classes

TIdFTPListOutput.Add Method
Pascal
function Add: TIdFTPListOutputItem;
Returns
TIdFTPListOutputItem ( 864)

Description
Add is a method.

Add returns a TIdFTPListOutputItem ( 864) value.

TIdFTPListOutput.Create Constructor
Pascal
constructor Create; reintroduce;
Description
Create is a reintroduced constructor for the object instance.

TIdFTPListOutput.IndexOf Method
Pascal
function IndexOf(
AItem: TIdFTPListOutputItem
): Integer;
Parameters
Parameters Description
AItem Type is TIdFTPListOutputItem ( 864).

Returns
Integer

Description
IndexOf is a method.

IndexOf returns a Integer value.

TIdFTPListOutput.LISTOutputDir Method
Pascal
procedure LISTOutputDir(
AOutput: TIdStrings
); virtual;
Parameters
Parameters Description
AOutput Type is TIdStrings ( 3089).

Description
LISTOutputDir is a virtual method.

862 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListOutput Class

TIdFTPListOutput.MLISTOutputDir Method
Pascal
procedure MLISTOutputDir(
AOutput: TIdStrings;
AMLstOpts: TIdFTPFactOutputs
); virtual;
Parameters
Parameters Description
AOutput Type is TIdStrings ( 3089).
AMLstOpts Type is TIdFTPFactOutputs ( 3028).

Description
MLISTOutputDir is a virtual method.

TIdFTPListOutput.NLISTOutputDir Method
Pascal
procedure NLISTOutputDir(
AOutput: TIdStrings
); virtual;
Parameters
Parameters Description
AOutput Type is TIdStrings ( 3089).

Description
NLISTOutputDir is a virtual method.

TIdFTPListOutput Properties
The Properties of the TIdFTPListOutput class are listed here.

Properties
Property Description
DirFormat ( 863)
ExportTotalLine ( 864)
Items ( 864)
Output ( 864)
Switches ( 864)

Legend
Property

TIdFTPListOutput.DirFormat Property
Pascal
property DirFormat: TIdDirOutputFormat;
Description
DirFormat is a Public TIdDirOutputFormat ( 2949) property. Write access for the property is implemented using FDirFormat.

Internet Direct (Indy) Version 10.1.5 863


TIdFTPListOutputItem Class Classes

TIdFTPListOutput.ExportTotalLine Property
Pascal
property ExportTotalLine: Boolean;
Description
ExportTotalLine is a Public Boolean property. Write access for the property is implemented using FExportTotalLine.

TIdFTPListOutput.Items Property
Pascal
property Items [AIndex: Integer]: TIdFTPListOutputItem;
Description
Items is a Public TIdFTPListOutputItem ( 864) property. Write access for the property is implemented using SetItems.

Items is the default property for the object instance.

TIdFTPListOutput.Output Property
Pascal
property Output: String;
Returns
is a Public String property. Write access for the property is implemented using FOutput.

TIdFTPListOutput.Switches Property
Pascal
property Switches: String;
Description
Switches is a Public String property. Write access for the property is implemented using FSwitches.

TIdFTPListOutputItem Class
File
IdFTPListOutput ( 4635)

Hierarchy

Pascal
TIdFTPListOutputItem = class(TIdFTPListItem);
Description
TIdFTPListOutputItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

864 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListOutputItem Class

TIdFTPListOutputItem Members
The following tables list the members exposed by TIdFTPListOutputItem.

Properties
Property Description
CreationDate ( 866)
CreationDateGMT ( 866)
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
DirError ( 866)
FileName ( 855) Name for a file as assigned on the remote FTP server.
GroupName ( 866)
Inode ( 866)
ItemType ( 855) Indicates the type of item represented by the collection entry.
LastAccessDate ( 867)
LastAccessDateGMT ( 867)
LinkCount ( 867)
LinkedItemName ( 867)
LocalFileName ( 855) Suggested file name to used for the local file system.
MLISTPermissions ( 867)
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
ModifiedDateGMT ( 867)
NumberBlocks ( 867)
OwnerName ( 868)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.
UniqueID ( 868)
UnixGroupPermissions ( 868)
UnixOtherPermissions ( 868)
UnixOwnerPermissions ( 868)
WinAttribs ( 868)

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdFTPListOutputItem Properties
The Properties of the TIdFTPListOutputItem class are listed here.

Properties
Property Description
CreationDate ( 866)
CreationDateGMT ( 866)
DirError ( 866)
GroupName ( 866)
Inode ( 866)
LastAccessDate ( 867)

Internet Direct (Indy) Version 10.1.5 865


TIdFTPListOutputItem Class Classes

LastAccessDateGMT ( 867)
LinkCount ( 867)
LinkedItemName ( 867)
MLISTPermissions ( 867)
ModifiedDateGMT ( 867)
NumberBlocks ( 867)
OwnerName ( 868)
UniqueID ( 868)
UnixGroupPermissions ( 868)
UnixOtherPermissions ( 868)
UnixOwnerPermissions ( 868)
WinAttribs ( 868)

Legend
Property

TIdFTPListOutputItem.CreationDate Property
Pascal
property CreationDate: TIdDateTime;
Description
CreationDate is a Public TIdDateTime ( 4733) property. Write access for the property is implemented using FCreationDate.

TIdFTPListOutputItem.CreationDateGMT Property
Pascal
property CreationDateGMT: TIdDateTime;
Description
CreationDateGMT is a Public TIdDateTime ( 4733) property. Write access for the property is implemented using
FCreationDateGMT.

TIdFTPListOutputItem.DirError Property
Pascal
property DirError: Boolean;
Description
DirError is a Public Boolean property. Write access for the property is implemented using FDirError.

TIdFTPListOutputItem.GroupName Property
Pascal
property GroupName: string;
Description
GroupName is a Public string property. Write access for the property is implemented using FGroupName.

TIdFTPListOutputItem.Inode Property
Pascal
property Inode: Integer;
Description
Inode is a Public Integer property. Write access for the property is implemented using FInode.

866 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPListOutputItem Class

TIdFTPListOutputItem.LastAccessDate Property
Pascal
property LastAccessDate: TIdDateTime;
Description
LastAccessDate is a Public TIdDateTime ( 4733) property. Write access for the property is implemented using FLastAccessDate.

TIdFTPListOutputItem.LastAccessDateGMT Property
Pascal
property LastAccessDateGMT: TIdDateTime;
Description
LastAccessDateGMT is a Public TIdDateTime ( 4733) property. Write access for the property is implemented using
FLastAccessDateGMT.

TIdFTPListOutputItem.LinkCount Property
Pascal
property LinkCount: Integer;
Description
LinkCount is a Public Integer property. Write access for the property is implemented using FLinkCount.

TIdFTPListOutputItem.LinkedItemName Property
Pascal
property LinkedItemName: string;
Description
LinkedItemName is a Public string property. Write access for the property is implemented using FLinkedItemName.

TIdFTPListOutputItem.MLISTPermissions Property
Pascal
property MLISTPermissions: string;
Description
MLISTPermissions is a Public string property. Write access for the property is implemented using FMLISTPermissions.

TIdFTPListOutputItem.ModifiedDateGMT Property
Pascal
property ModifiedDateGMT;
Description
ModifiedDateGMT is a Public property.

TIdFTPListOutputItem.NumberBlocks Property
Pascal
property NumberBlocks: Integer;

Internet Direct (Indy) Version 10.1.5 867


TIdFTPLPAS400 Class Classes

Description
NumberBlocks is a Public Integer property. Write access for the property is implemented using FNumberBlocks.

TIdFTPListOutputItem.OwnerName Property
Pascal
property OwnerName: string;
Description
OwnerName is a Public string property. Write access for the property is implemented using FOwnerName.

TIdFTPListOutputItem.UniqueID Property
Pascal
property UniqueID: string;
Description
UniqueID is a Public string property. Write access for the property is implemented using FUniqueID.

TIdFTPListOutputItem.UnixGroupPermissions Property
Pascal
property UnixGroupPermissions: string;
Description
UnixGroupPermissions is a Public string property. Write access for the property is implemented using FUnixGroupPermissions.

TIdFTPListOutputItem.UnixOtherPermissions Property
Pascal
property UnixOtherPermissions: string;
Description
UnixOtherPermissions is a Public string property. Write access for the property is implemented using FUnixOtherPermissions.

TIdFTPListOutputItem.UnixOwnerPermissions Property
Pascal
property UnixOwnerPermissions: string;
Description
UnixOwnerPermissions is a Public string property. Write access for the property is implemented using FUnixOwnerPermissions.

TIdFTPListOutputItem.WinAttribs Property
Pascal
property WinAttribs: Cardinal;
Description
WinAttribs is a Public Cardinal property. Write access for the property is implemented using FWinAttribs.

868 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPAS400 Class

TIdFTPLPAS400 Class
File
IdFTPListParseAS400 ( 4635)

Hierarchy

Pascal
TIdFTPLPAS400 = class(TIdFTPLineOwnedList);
Description
TIdFTPLPAS400 is a TIdFTPLineOwnedList ( 847) descendant.

See Also
TIdFTPLineOwnedList ( 847)

TIdFTPLPAS400 Members
The following tables list the members exposed by TIdFTPLPAS400.

Methods
Method Description
CheckListing ( 869)
GetIdent ( 870)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPAS400 Methods
The Methods of the TIdFTPLPAS400 class are listed here.

Methods
Method Description
CheckListing ( 869)
GetIdent ( 870)

Legend
Method
virtual

TIdFTPLPAS400.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;

Internet Direct (Indy) Version 10.1.5 869


TIdFTPLPChameleonNewt Class Classes

Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPAS400.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPBaseDOS Class
File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPLPBaseDOS = class(TIdFTPListBase);
Description
TIdFTPLPBaseDOS TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPChameleonNewt Class
File
IdFTPListParseChameleonNewt ( 4637)

Hierarchy

870 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPChameleonNewt Class

Pascal
TIdFTPLPChameleonNewt = class(TIdFTPLPBaseDOS);
Description
TIdFTPLPChameleonNewt is a TIdFTPLPBaseDOS ( 870) descendant.

See Also
TIdFTPLPBaseDOS ( 870)

TIdFTPLPChameleonNewt Members
The following tables list the members exposed by TIdFTPLPChameleonNewt.

Methods
Method Description
CheckListing ( 871)
GetIdent ( 872)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPChameleonNewt Methods
The Methods of the TIdFTPLPChameleonNewt class are listed here.

Methods
Method Description
CheckListing ( 871)
GetIdent ( 872)

Legend
Method
virtual

TIdFTPLPChameleonNewt.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

Internet Direct (Indy) Version 10.1.5 871


TIdFTPLPCiscoIOS Class Classes

TIdFTPLPChameleonNewt.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPCiscoIOS Class
File
IdFTPListParseCiscoIOS ( 4637)

Hierarchy

Pascal
TIdFTPLPCiscoIOS = class(TIdFTPLPNList);
Description
TIdFTPLPCiscoIOS is a TIdFTPLPNList ( 901) descendant.

See Also
TIdFTPLPNList ( 901)

TIdFTPLPCiscoIOS Members
The following tables list the members exposed by TIdFTPLPCiscoIOS.

Methods
Method Description
CheckListing ( 873)
GetIdent ( 873)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPCiscoIOS Methods
The Methods of the TIdFTPLPCiscoIOS class are listed here.

Methods
Method Description
CheckListing ( 873)
GetIdent ( 873)

872 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPDistinctTCPIP Class

Legend
Method
virtual

TIdFTPLPCiscoIOS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPCiscoIOS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPDistinctTCPIP Class
File
IdFTPListParseDistinctTCPIP ( 4637)

Hierarchy

Pascal
TIdFTPLPDistinctTCPIP = class(TIdFTPLPBaseDOS);
Description
TIdFTPLPDistinctTCPIP is a TIdFTPLPBaseDOS ( 870) descendant.

See Also
TIdFTPLPBaseDOS ( 870)

Internet Direct (Indy) Version 10.1.5 873


TIdFTPLPDistinctTCPIP Class Classes

TIdFTPLPDistinctTCPIP Members
The following tables list the members exposed by TIdFTPLPDistinctTCPIP.

Methods
Method Description
CheckListing ( 874)
GetIdent ( 874)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPDistinctTCPIP Methods
The Methods of the TIdFTPLPDistinctTCPIP class are listed here.

Methods
Method Description
CheckListing ( 874)
GetIdent ( 874)

Legend
Method
virtual

TIdFTPLPDistinctTCPIP.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPDistinctTCPIP.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

874 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPEPLF Class

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPEPLF Class
File
IdFTPListParseEPLF ( 4638)

Hierarchy

Pascal
TIdFTPLPEPLF = class(TIdFTPListBase);
Description
TIdFTPLPEPLF is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPEPLF Members
The following tables list the members exposed by TIdFTPLPEPLF.

Methods
Method Description
CheckListing ( 875)
GetIdent ( 876)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPEPLF Methods
The Methods of the TIdFTPLPEPLF class are listed here.

Methods
Method Description
CheckListing ( 875)
GetIdent ( 876)

Legend
Method
virtual

TIdFTPLPEPLF.CheckListing Method
Pascal
class function CheckListing(

Internet Direct (Indy) Version 10.1.5 875


TIdFTPLPGOS7 Class Classes

AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPEPLF.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPGOS7 Class
File
IdFTPListParseBullGCOS7 ( 4636)

Hierarchy

Pascal
TIdFTPLPGOS7 = class(TIdFTPLineOwnedList);
Description
TIdFTPLPGOS7 is a TIdFTPLineOwnedList ( 847) descendant.

See Also
TIdFTPLineOwnedList ( 847)

TIdFTPLPGOS7 Members
The following tables list the members exposed by TIdFTPLPGOS7.

Methods
Method Description
CheckListing ( 877)

876 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPGOS8 Class

GetIdent ( 877)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPGOS7 Methods
The Methods of the TIdFTPLPGOS7 class are listed here.

Methods
Method Description
CheckListing ( 877)
GetIdent ( 877)

Legend
Method
virtual

TIdFTPLPGOS7.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPGOS7.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

Internet Direct (Indy) Version 10.1.5 877


TIdFTPLPGOS8 Class Classes

TIdFTPLPGOS8 Class
File
IdFTPListParseBullGCOS8 ( 4637)

Hierarchy

Pascal
TIdFTPLPGOS8 = class(TIdFTPListBase);
Description
TIdFTPLPGOS8 is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPGOS8 Members
The following tables list the members exposed by TIdFTPLPGOS8.

Methods
Method Description
CheckListing ( 878)
GetIdent ( 879)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPGOS8 Methods
The Methods of the TIdFTPLPGOS8 class are listed here.

Methods
Method Description
CheckListing ( 878)
GetIdent ( 879)

Legend
Method
virtual

TIdFTPLPGOS8.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;

878 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPHellSoft Class

Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPGOS8.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPGOS8ListItem Class
File
IdFTPListParseBullGCOS8 ( 4637)

Hierarchy

Pascal
TIdFTPLPGOS8ListItem = class(TIdUnixPermFTPListItem);
Description
TIdFTPLPGOS8ListItem is a TIdUnixPermFTPListItem ( 2543) descendant.

See Also
TIdUnixPermFTPListItem ( 2543)

TIdFTPLPHellSoft Class
File
IdFTPListParseHellSoft ( 4638)

Hierarchy

Internet Direct (Indy) Version 10.1.5 879


TIdFTPLPHellSoft Class Classes

Pascal
TIdFTPLPHellSoft = class(TIdFTPLPNovellNetware);
Description
TIdFTPLPHellSoft is a TIdFTPLPNovellNetware ( 902) descendant.

See Also
TIdFTPLPNovellNetware ( 902)

TIdFTPLPHellSoft Members
The following tables list the members exposed by TIdFTPLPHellSoft.

Methods
Method Description
CheckListing ( 880)
GetIdent ( 881)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 904)

Legend
Method
virtual

TIdFTPLPHellSoft Methods
The Methods of the TIdFTPLPHellSoft class are listed here.

Methods
Method Description
CheckListing ( 880)
GetIdent ( 881)

Legend
Method
virtual

TIdFTPLPHellSoft.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

880 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPKA9Q Class

CheckListing returns a boolean value.

TIdFTPLPHellSoft.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPKA9Q Class
File
IdFTPListParseKA9Q ( 4638)

Hierarchy

Pascal
TIdFTPLPKA9Q = class(TIdFTPListBaseHeader);
Description
TIdFTPLPKA9Q is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPKA9Q Members
The following tables list the members exposed by TIdFTPLPKA9Q.

Methods
Method Description
CheckListing ( 882)
GetIdent ( 882)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPKA9Q Methods
The Methods of the TIdFTPLPKA9Q class are listed here.

Methods
Method Description
CheckListing ( 882)

Internet Direct (Indy) Version 10.1.5 881


TIdFTPLPMicrowareOS9 Class Classes

GetIdent ( 882)

Legend
Method
virtual

TIdFTPLPKA9Q.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPKA9Q.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMicrowareOS9 Class
File
IdFTPListParseMicrowareOS9 ( 4638)

Hierarchy

Pascal
TIdFTPLPMicrowareOS9 = class(TIdFTPListBaseHeader);
Description
TIdFTPLPMicrowareOS9 is a TIdFTPListBaseHeader ( 850) descendant.

882 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMList Class

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPMicrowareOS9 Members
The following tables list the members exposed by TIdFTPLPMicrowareOS9.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 883)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPMicrowareOS9 Methods
The Methods of the TIdFTPLPMicrowareOS9 class are listed here.

Methods
Method Description
GetIdent ( 883)

Legend
Method
virtual

TIdFTPLPMicrowareOS9.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMList Class
File
IdFTPListParseBase ( 4636)

Hierarchy

Internet Direct (Indy) Version 10.1.5 883


TIdFTPLPMList Class Classes

Pascal
TIdFTPLPMList = class(TIdFTPListBase);
Description
TIdFTPLPMList TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPMList Members
The following tables list the members exposed by TIdFTPLPMList.

Methods
Method Description
CheckListing ( 884)
GetIdent ( 885)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPMList Methods
The Methods of the TIdFTPLPMList class are listed here.

Methods
Method Description
CheckListing ( 884)
GetIdent ( 885)

Legend
Method
virtual

TIdFTPLPMList.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
TIdFTPLPMList.CheckListing overridden class method.

884 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMPiX Class

TIdFTPLPMList.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
TIdFTPLPMList.GetIdent overridden class method.

TIdFTPLPMPiX Class
File
IdFTPListParseMPEiX ( 4639)

Hierarchy

Pascal
TIdFTPLPMPiX = class(TIdFTPLPMPiXBase);
Description
TIdFTPLPMPiX is a TIdFTPLPMPiXBase ( 886) descendant.

See Also
TIdFTPLPMPiXBase ( 886)

TIdFTPLPMPiX Members
The following tables list the members exposed by TIdFTPLPMPiX.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 886)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPMPiX Methods
The Methods of the TIdFTPLPMPiX class are listed here.

Methods
Method Description
GetIdent ( 886)

Internet Direct (Indy) Version 10.1.5 885


TIdFTPLPMPiXBase Class Classes

Legend
Method
virtual

TIdFTPLPMPiX.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMPiXBase Class
File
IdFTPListParseMPEiX ( 4639)

Hierarchy

Pascal
TIdFTPLPMPiXBase = class(TIdFTPListBaseHeader);
Description
TIdFTPLPMPiXBase is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPMPiXBase Members
The following tables list the members exposed by TIdFTPLPMPiXBase.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 887)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPMPiXBase Methods
The Methods of the TIdFTPLPMPiXBase class are listed here.

886 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMPiXWithPOSIX Class

Methods
Method Description
GetIdent ( 887)

Legend
Method
virtual

TIdFTPLPMPiXBase.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMPiXWithPOSIX Class
File
IdFTPListParseMPEiX ( 4639)

Hierarchy

Pascal
TIdFTPLPMPiXWithPOSIX = class(TIdFTPLPMPiXBase);
Description
TIdFTPLPMPiXWithPOSIX is a TIdFTPLPMPiXBase ( 886) descendant.

See Also
TIdFTPLPMPiXBase ( 886)

TIdFTPLPMPiXWithPOSIX Members
The following tables list the members exposed by TIdFTPLPMPiXWithPOSIX.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 888)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 887


TIdFTPLPMusic Class Classes

TIdFTPLPMPiXWithPOSIX Methods
The Methods of the TIdFTPLPMPiXWithPOSIX class are listed here.

Methods
Method Description
GetIdent ( 888)

Legend
Method
virtual

TIdFTPLPMPiXWithPOSIX.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMusic Class
File
IdFTPListParseMusic ( 4639)

Hierarchy

Pascal
TIdFTPLPMusic = class(TIdFTPListBaseHeader);
Description
TIdFTPLPMusic is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPMusic Members
The following tables list the members exposed by TIdFTPLPMusic.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 889)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

888 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMVS Class

Legend
Method
virtual

TIdFTPLPMusic Methods
The Methods of the TIdFTPLPMusic class are listed here.

Methods
Method Description
GetIdent ( 889)

Legend
Method
virtual

TIdFTPLPMusic.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMVS Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdFTPLPMVS = class(TIdFTPListBaseHeader);
Description
TIdFTPLPMVS is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPMVS Members
The following tables list the members exposed by TIdFTPLPMVS.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.

Internet Direct (Indy) Version 10.1.5 889


TIdFTPLPMVSJESInterface1 Class Classes

CheckListing ( 851)
GetIdent ( 890)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPMVS Methods
The Methods of the TIdFTPLPMVS class are listed here.

Methods
Method Description
GetIdent ( 890)

Legend
Method
virtual

TIdFTPLPMVS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMVSJESInterface1 Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdFTPLPMVSJESInterface1 = class(TIdFTPListBase);
Description
TIdFTPLPMVSJESInterface1 is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPMVSJESInterface1 Members
The following tables list the members exposed by TIdFTPLPMVSJESInterface1.

890 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMVSJESInterface1 Class

Methods
Method Description
CheckListing ( 891)
GetIdent ( 891)
ParseListing ( 892)

Legend
Method
virtual

TIdFTPLPMVSJESInterface1 Methods
The Methods of the TIdFTPLPMVSJESInterface1 class are listed here.

Methods
Method Description
CheckListing ( 891)
GetIdent ( 891)
ParseListing ( 892)

Legend
Method
virtual

TIdFTPLPMVSJESInterface1.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPMVSJESInterface1.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

Internet Direct (Indy) Version 10.1.5 891


TIdFTPLPMVSJESInterface2 Class Classes

GetIdent returns a String value.

TIdFTPLPMVSJESInterface1.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPMVSJESInterface2 Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdFTPLPMVSJESInterface2 = class(TIdFTPListBase);
Description
TIdFTPLPMVSJESInterface2 is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPMVSJESInterface2 Members
The following tables list the members exposed by TIdFTPLPMVSJESInterface2.

Methods
Method Description
CheckListing ( 893)
GetIdent ( 893)
ParseListing ( 893)

Legend
Method
virtual

892 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPMVSJESInterface2 Class

TIdFTPLPMVSJESInterface2 Methods
The Methods of the TIdFTPLPMVSJESInterface2 class are listed here.

Methods
Method Description
CheckListing ( 893)
GetIdent ( 893)
ParseListing ( 893)

Legend
Method
virtual

TIdFTPLPMVSJESInterface2.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPMVSJESInterface2.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPMVSJESInterface2.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;

Internet Direct (Indy) Version 10.1.5 893


TIdFTPLPMVSPartitionedDataSet Class Classes

Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPMVSPartitionedDataSet Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdFTPLPMVSPartitionedDataSet = class(TIdFTPListBaseHeader);
Description
TIdFTPLPMVSPartitionedDataSet is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPMVSPartitionedDataSet Members
The following tables list the members exposed by TIdFTPLPMVSPartitionedDataSet.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 895)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPMVSPartitionedDataSet Methods
The Methods of the TIdFTPLPMVSPartitionedDataSet class are listed here.

Methods
Method Description
GetIdent ( 895)

894 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPNCSAforDOS Class

Legend
Method
virtual

TIdFTPLPMVSPartitionedDataSet.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPNCSAforDOS Class
File
IdFTPListParseNCSAForDOS ( 4640)

Hierarchy

Pascal
TIdFTPLPNCSAforDOS = class(TIdFTPListBaseHeader);
Description
TIdFTPLPNCSAforDOS is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPNCSAforDOS Members
The following tables list the members exposed by TIdFTPLPNCSAforDOS.

Methods
Method Description
CheckListing ( 896)
GetIdent ( 896)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPNCSAforDOS Methods
The Methods of the TIdFTPLPNCSAforDOS class are listed here.

Internet Direct (Indy) Version 10.1.5 895


TIdFTPLPNCSAforMACOS Class Classes

Methods
Method Description
CheckListing ( 896)
GetIdent ( 896)

Legend
Method
virtual

TIdFTPLPNCSAforDOS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPNCSAforDOS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPNCSAforMACOS Class
File
IdFTPListParseNCSAForMACOS ( 4640)

Hierarchy

Pascal
TIdFTPLPNCSAforMACOS = class(TIdFTPLPNList);

896 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPNCSAforMACOS Class

Description
TIdFTPLPNCSAforMACOS is a TIdFTPLPNList ( 901) descendant.

See Also
TIdFTPLPNList ( 901)

TIdFTPLPNCSAforMACOS Members
The following tables list the members exposed by TIdFTPLPNCSAforMACOS.

Methods
Method Description
CheckListing ( 897)
GetIdent ( 898)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPNCSAforMACOS Methods
The Methods of the TIdFTPLPNCSAforMACOS class are listed here.

Methods
Method Description
CheckListing ( 897)
GetIdent ( 898)

Legend
Method
virtual

TIdFTPLPNCSAforMACOS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

Internet Direct (Indy) Version 10.1.5 897


TIdFTPLPNetwarePSUDos Class Classes

TIdFTPLPNCSAforMACOS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPNetwarePSUDos Class
File
IdFTPListParseNovellNetwarePSU ( 4640)

Hierarchy

Pascal
TIdFTPLPNetwarePSUDos = class(TIdFTPListBase);
Description
TIdFTPLPNetwarePSUDos is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPNetwarePSUDos Members
The following tables list the members exposed by TIdFTPLPNetwarePSUDos.

Methods
Method Description
CheckListing ( 899)
GetIdent ( 899)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPNetwarePSUDos Methods
The Methods of the TIdFTPLPNetwarePSUDos class are listed here.

Methods
Method Description
CheckListing ( 899)
GetIdent ( 899)

898 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPNetwarePSUNFS Class

Legend
Method
virtual

TIdFTPLPNetwarePSUDos.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPNetwarePSUDos.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPNetwarePSUNFS Class
File
IdFTPListParseNovellNetwarePSU ( 4640)

Hierarchy

Pascal
TIdFTPLPNetwarePSUNFS = class(TIdFTPListBase);
Description
TIdFTPLPNetwarePSUNFS is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

Internet Direct (Indy) Version 10.1.5 899


TIdFTPLPNetwarePSUNFS Class Classes

TIdFTPLPNetwarePSUNFS Members
The following tables list the members exposed by TIdFTPLPNetwarePSUNFS.

Methods
Method Description
CheckListing ( 900)
GetIdent ( 900)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPNetwarePSUNFS Methods
The Methods of the TIdFTPLPNetwarePSUNFS class are listed here.

Methods
Method Description
CheckListing ( 900)
GetIdent ( 900)

Legend
Method
virtual

TIdFTPLPNetwarePSUNFS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPNetwarePSUNFS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

900 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPNList Class

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPNList Class
File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPLPNList = class(TIdFTPListBase);
Description
TIdFTPLPNList TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPNList Members
The following tables list the members exposed by TIdFTPLPNList.

Methods
Method Description
CheckListing ( 901)
GetIdent ( 902)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPNList Methods
The Methods of the TIdFTPLPNList class are listed here.

Methods
Method Description
CheckListing ( 901)
GetIdent ( 902)

Legend
Method
virtual

TIdFTPLPNList.CheckListing Method
Pascal
class function CheckListing(

Internet Direct (Indy) Version 10.1.5 901


TIdFTPLPNovellNetware Class Classes

AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
TIdFTPLPNList.CheckListing overridden class method.

TIdFTPLPNList.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
TIdFTPLPNList.GetIdent overridden class method.

TIdFTPLPNovellNetware Class
File
IdFTPListParseNovellNetware ( 4640)

Hierarchy

Pascal
TIdFTPLPNovellNetware = class(TIdFTPListBase);
Description
TIdFTPLPNovellNetware is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPNovellNetware Members
The following tables list the members exposed by TIdFTPLPNovellNetware.

Methods
Method Description
CheckListing ( 903)
GetIdent ( 903)
ParseListing ( 904)

902 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPNovellNetware Class

Legend
Method
virtual

TIdFTPLPNovellNetware Methods
The Methods of the TIdFTPLPNovellNetware class are listed here.

Methods
Method Description
CheckListing ( 903)
GetIdent ( 903)
ParseListing ( 904)

Legend
Method
virtual

TIdFTPLPNovellNetware.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPNovellNetware.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

Internet Direct (Indy) Version 10.1.5 903


TIdFTPLPOS2 Class Classes

TIdFTPLPNovellNetware.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPOS2 Class
File
IdFTPListParseOS2 ( 4641)

Hierarchy

Pascal
TIdFTPLPOS2 = class(TIdFTPLPBaseDOS);
Description
TIdFTPLPOS2 is a TIdFTPLPBaseDOS ( 870) descendant.

See Also
TIdFTPLPBaseDOS ( 870)

TIdFTPLPOS2 Members
The following tables list the members exposed by TIdFTPLPOS2.

Methods
Method Description
CheckListing ( 905)
GetIdent ( 905)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

904 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPPCNFSD Class

TIdFTPLPOS2 Methods
The Methods of the TIdFTPLPOS2 class are listed here.

Methods
Method Description
CheckListing ( 905)
GetIdent ( 905)

Legend
Method
virtual

TIdFTPLPOS2.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPOS2.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPPCNFSD Class
File
IdFTPListParsePCNFSD ( 4641)

Internet Direct (Indy) Version 10.1.5 905


TIdFTPLPPCNFSD Class Classes

Hierarchy

Pascal
TIdFTPLPPCNFSD = class(TIdFTPListBase);
Description
TIdFTPLPPCNFSD is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPPCNFSD Members
The following tables list the members exposed by TIdFTPLPPCNFSD.

Methods
Method Description
CheckListing ( 906)
GetIdent ( 907)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPPCNFSD Methods
The Methods of the TIdFTPLPPCNFSD class are listed here.

Methods
Method Description
CheckListing ( 906)
GetIdent ( 907)

Legend
Method
virtual

TIdFTPLPPCNFSD.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

906 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPSterCommEntUx Class

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPPCNFSD.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPSterComEntBase Class
File
IdFTPListParseStercomUnixEnt ( 4642)

Hierarchy

Pascal
TIdFTPLPSterComEntBase = class(TIdFTPListBaseHeader);
Description
TIdFTPLPSterComEntBase is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPSterCommEntUx Class
File
IdFTPListParseStercomUnixEnt ( 4642)

Hierarchy

Pascal
TIdFTPLPSterCommEntUx = class(TIdFTPLPSterComEntBase);
Description
TIdFTPLPSterCommEntUx is a TIdFTPLPSterComEntBase ( 907) descendant.

See Also
TIdFTPLPSterComEntBase ( 907)

Internet Direct (Indy) Version 10.1.5 907


TIdFTPLPSterCommEntUx Class Classes

TIdFTPLPSterCommEntUx Members
The following tables list the members exposed by TIdFTPLPSterCommEntUx.

Methods
Method Description
CheckListing ( 908)
GetIdent ( 908)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPSterCommEntUx Methods
The Methods of the TIdFTPLPSterCommEntUx class are listed here.

Methods
Method Description
CheckListing ( 908)
GetIdent ( 908)

Legend
Method
virtual

TIdFTPLPSterCommEntUx.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPSterCommEntUx.GetIdent Method
Pascal
class function GetIdent: String; override;

908 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPSterCommEntUxNS Class

Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPSterCommEntUxNS Class
File
IdFTPListParseStercomUnixEnt ( 4642)

Hierarchy

Pascal
TIdFTPLPSterCommEntUxNS = class(TIdFTPLPSterComEntBase);
Description
TIdFTPLPSterCommEntUxNS is a TIdFTPLPSterComEntBase ( 907) descendant.

See Also
TIdFTPLPSterComEntBase ( 907)

TIdFTPLPSterCommEntUxNS Members
The following tables list the members exposed by TIdFTPLPSterCommEntUxNS.

Methods
Method Description
CheckListing ( 910)
GetIdent ( 910)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPSterCommEntUxNS Methods
The Methods of the TIdFTPLPSterCommEntUxNS class are listed here.

Methods
Method Description
CheckListing ( 910)
GetIdent ( 910)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 909


TIdFTPLPSterCommEntUxRoot Class Classes

TIdFTPLPSterCommEntUxNS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPSterCommEntUxNS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPSterCommEntUxRoot Class
File
IdFTPListParseStercomUnixEnt ( 4642)

Hierarchy

Pascal
TIdFTPLPSterCommEntUxRoot = class(TIdFTPLPSterComEntBase);
Description
TIdFTPLPSterCommEntUxRoot is a TIdFTPLPSterComEntBase ( 907) descendant.

See Also
TIdFTPLPSterComEntBase ( 907)

910 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPSterCommEntUxRoot Class

TIdFTPLPSterCommEntUxRoot Members
The following tables list the members exposed by TIdFTPLPSterCommEntUxRoot.

Methods
Method Description
CheckListing ( 911)
GetIdent ( 911)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPSterCommEntUxRoot Methods
The Methods of the TIdFTPLPSterCommEntUxRoot class are listed here.

Methods
Method Description
CheckListing ( 911)
GetIdent ( 911)

Legend
Method
virtual

TIdFTPLPSterCommEntUxRoot.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPSterCommEntUxRoot.GetIdent Method
Pascal
class function GetIdent: String; override;

Internet Direct (Indy) Version 10.1.5 911


TIdFTPLPSterCommExpOS390 Class Classes

Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPSterCommExpOS390 Class
File
IdFTPListParseStercomOS390Exp ( 4641)

Hierarchy

Pascal
TIdFTPLPSterCommExpOS390 = class(TIdFTPListBase);
Description
TIdFTPLPSterCommExpOS390 is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPSterCommExpOS390 Members
The following tables list the members exposed by TIdFTPLPSterCommExpOS390.

Methods
Method Description
CheckListing ( 913)
GetIdent ( 913)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPSterCommExpOS390 Methods
The Methods of the TIdFTPLPSterCommExpOS390 class are listed here.

Methods
Method Description
CheckListing ( 913)
GetIdent ( 913)

Legend
Method
virtual

912 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPStratusVOS Class

TIdFTPLPSterCommExpOS390.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPSterCommExpOS390.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPStratusVOS Class
File
IdFTPListParseStratusVOS ( 4642)

Hierarchy

Pascal
TIdFTPLPStratusVOS = class(TIdFTPListBase);
Description
TIdFTPLPStratusVOS is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

Internet Direct (Indy) Version 10.1.5 913


TIdFTPLPStratusVOS Class Classes

TIdFTPLPStratusVOS Members
The following tables list the members exposed by TIdFTPLPStratusVOS.

Methods
Method Description
CheckListing ( 914)
GetIdent ( 914)
ParseListing ( 915)

Legend
Method
virtual

TIdFTPLPStratusVOS Methods
The Methods of the TIdFTPLPStratusVOS class are listed here.

Methods
Method Description
CheckListing ( 914)
GetIdent ( 914)
ParseListing ( 915)

Legend
Method
virtual

TIdFTPLPStratusVOS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPStratusVOS.GetIdent Method
Pascal
class function GetIdent: String; override;

914 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPSuperTCP Class

Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPStratusVOS.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPSuperTCP Class
File
IdFTPListParseSuperTCP ( 4642)

Hierarchy

Pascal
TIdFTPLPSuperTCP = class(TIdFTPListBase);
Description
TIdFTPLPSuperTCP is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPSuperTCP Members
The following tables list the members exposed by TIdFTPLPSuperTCP.

Methods
Method Description
CheckListing ( 916)
GetIdent ( 916)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Internet Direct (Indy) Version 10.1.5 915


TIdFTPLPTandemGuardian Class Classes

Legend
Method
virtual

TIdFTPLPSuperTCP Methods
The Methods of the TIdFTPLPSuperTCP class are listed here.

Methods
Method Description
CheckListing ( 916)
GetIdent ( 916)

Legend
Method
virtual

TIdFTPLPSuperTCP.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPSuperTCP.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

916 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPTandemGuardian Class

TIdFTPLPTandemGuardian Class
File
IdFTPListParseTandemGuardian ( 4643)

Hierarchy

Pascal
TIdFTPLPTandemGuardian = class(TIdFTPListBaseHeader);
Description
TIdFTPLPTandemGuardian is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPTandemGuardian Members
The following tables list the members exposed by TIdFTPLPTandemGuardian.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 917)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPTandemGuardian Methods
The Methods of the TIdFTPLPTandemGuardian class are listed here.

Methods
Method Description
GetIdent ( 917)

Legend
Method
virtual

TIdFTPLPTandemGuardian.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Internet Direct (Indy) Version 10.1.5 917


TIdFTPLPTOPS20 Class Classes

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPTOPS20 Class
File
IdFTPListParseTOPS20 ( 4643)

Hierarchy

Pascal
TIdFTPLPTOPS20 = class(TIdFTPListBase);
Description
TIdFTPLPTOPS20 is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPTOPS20 Members
The following tables list the members exposed by TIdFTPLPTOPS20.

Methods
Method Description
CheckListing ( 918)
GetIdent ( 919)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPTOPS20 Methods
The Methods of the TIdFTPLPTOPS20 class are listed here.

Methods
Method Description
CheckListing ( 918)
GetIdent ( 919)

Legend
Method
virtual

TIdFTPLPTOPS20.CheckListing Method
Pascal
class function CheckListing(

918 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPTSXPlus Class

AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPTOPS20.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPTSXPlus Class
File
IdFTPListParseTSXPlus ( 4643)

Hierarchy

Pascal
TIdFTPLPTSXPlus = class(TIdFTPListBaseHeader);
Description
TIdFTPLPTSXPlus is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPTSXPlus Members
The following tables list the members exposed by TIdFTPLPTSXPlus.

Methods
Method Description
CheckListing ( 920)

Internet Direct (Indy) Version 10.1.5 919


TIdFTPLPUnisysClearPath Class Classes

GetIdent ( 920)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPTSXPlus Methods
The Methods of the TIdFTPLPTSXPlus class are listed here.

Methods
Method Description
CheckListing ( 920)
GetIdent ( 920)

Legend
Method
virtual

TIdFTPLPTSXPlus.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPTSXPlus.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

920 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPUnisysClearPath Class

TIdFTPLPUnisysClearPath Class
File
IdFTPListParseUnisysClearPath ( 4643)

Hierarchy

Pascal
TIdFTPLPUnisysClearPath = class(TIdFTPListBaseHeader);
Description
TIdFTPLPUnisysClearPath is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPUnisysClearPath Members
The following tables list the members exposed by TIdFTPLPUnisysClearPath.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 921)
ParseListing ( 922)

Legend
Method
virtual

TIdFTPLPUnisysClearPath Methods
The Methods of the TIdFTPLPUnisysClearPath class are listed here.

Methods
Method Description
GetIdent ( 921)
ParseListing ( 922)

Legend
Method
virtual

TIdFTPLPUnisysClearPath.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Internet Direct (Indy) Version 10.1.5 921


TIdFTPLPUnitree Class Classes

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPUnisysClearPath.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPUnitree Class
File
IdFTPListParseUnix ( 4644)

Hierarchy

Pascal
TIdFTPLPUnitree = class(TIdFTPLPUnix);
Description
TIdFTPLPUnitree is a TIdFTPLPUnix ( 923) descendant.

See Also
TIdFTPLPUnix ( 923)

TIdFTPLPUnitree Members
The following tables list the members exposed by TIdFTPLPUnitree.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 924)
GetIdent ( 923)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 925)

922 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPUnix Class

Legend
Method
virtual

TIdFTPLPUnitree Methods
The Methods of the TIdFTPLPUnitree class are listed here.

Methods
Method Description
GetIdent ( 923)

Legend
Method
virtual

TIdFTPLPUnitree.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPUnix Class
File
IdFTPListParseUnix ( 4644)

Hierarchy

Pascal
TIdFTPLPUnix = class(TIdFTPListBase);
Description
TIdFTPLPUnix is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPUnix Members
The following tables list the members exposed by TIdFTPLPUnix.

Methods
Method Description
CheckListing ( 924)

Internet Direct (Indy) Version 10.1.5 923


TIdFTPLPUnix Class Classes

GetIdent ( 924)
ParseListing ( 925)

Legend
Method
virtual

TIdFTPLPUnix Methods
The Methods of the TIdFTPLPUnix class are listed here.

Methods
Method Description
CheckListing ( 924)
GetIdent ( 924)
ParseListing ( 925)

Legend
Method
virtual

TIdFTPLPUnix.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPUnix.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

924 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVMBFS Class

TIdFTPLPUnix.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPVMBFS Class
File
IdFTPListParseVM ( 4644)

Hierarchy

Pascal
TIdFTPLPVMBFS = class(TIdFTPListBase);
Description
TIdFTPLPVMBFS is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVMBFS Members
The following tables list the members exposed by TIdFTPLPVMBFS.

Methods
Method Description
CheckListing ( 926)
GetIdent ( 926)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 925


TIdFTPLPVMCMS Class Classes

TIdFTPLPVMBFS Methods
The Methods of the TIdFTPLPVMBFS class are listed here.

Methods
Method Description
CheckListing ( 926)
GetIdent ( 926)

Legend
Method
virtual

TIdFTPLPVMBFS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVMBFS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVMCMS Class
File
IdFTPListParseVM ( 4644)

926 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVMCMS Class

Hierarchy

Pascal
TIdFTPLPVMCMS = class(TIdFTPListBase);
Description
TIdFTPLPVMCMS is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVMCMS Members
The following tables list the members exposed by TIdFTPLPVMCMS.

Methods
Method Description
CheckListing ( 927)
GetIdent ( 928)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVMCMS Methods
The Methods of the TIdFTPLPVMCMS class are listed here.

Methods
Method Description
CheckListing ( 927)
GetIdent ( 928)

Legend
Method
virtual

TIdFTPLPVMCMS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Internet Direct (Indy) Version 10.1.5 927


TIdFTPLPVMS Class Classes

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVMCMS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVMS Class
File
IdFTPListParseVMS ( 4644)

Hierarchy

Pascal
TIdFTPLPVMS = class(TIdFTPListBase);
Description
TIdFTPLPVMS is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVMS Members
The following tables list the members exposed by TIdFTPLPVMS.

Methods
Method Description
CheckListing ( 929)
GetIdent ( 929)
ParseListing ( 929)

Legend
Method
virtual

TIdFTPLPVMS Methods
The Methods of the TIdFTPLPVMS class are listed here.

928 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVMS Class

Methods
Method Description
CheckListing ( 929)
GetIdent ( 929)
ParseListing ( 929)

Legend
Method
virtual

TIdFTPLPVMS.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVMS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVMS.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Internet Direct (Indy) Version 10.1.5 929


TIdFTPLPVSELibrary Class Classes

Returns
boolean

Description
ParseListing is a overridden class method.

ParseListing returns a boolean value.

TIdFTPLPVSELibrary Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSELibrary = class(TIdFTPListBase);
Description
TIdFTPLPVSELibrary is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVSELibrary Members
The following tables list the members exposed by TIdFTPLPVSELibrary.

Methods
Method Description
CheckListing ( 931)
GetIdent ( 931)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVSELibrary Methods
The Methods of the TIdFTPLPVSELibrary class are listed here.

Methods
Method Description
CheckListing ( 931)
GetIdent ( 931)

Legend
Method
virtual

930 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVSEPowerQueue Class

TIdFTPLPVSELibrary.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSELibrary.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVSEPowerQueue Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSEPowerQueue = class(TIdFTPListBase);
Description
TIdFTPLPVSEPowerQueue is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

Internet Direct (Indy) Version 10.1.5 931


TIdFTPLPVSEPowerQueue Class Classes

TIdFTPLPVSEPowerQueue Members
The following tables list the members exposed by TIdFTPLPVSEPowerQueue.

Methods
Method Description
CheckListing ( 932)
GetIdent ( 932)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVSEPowerQueue Methods
The Methods of the TIdFTPLPVSEPowerQueue class are listed here.

Methods
Method Description
CheckListing ( 932)
GetIdent ( 932)

Legend
Method
virtual

TIdFTPLPVSEPowerQueue.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSEPowerQueue.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

932 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVSERootDir Class

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVSERootDir Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSERootDir = class(TIdFTPListBase);
Description
TIdFTPLPVSERootDir is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVSERootDir Members
The following tables list the members exposed by TIdFTPLPVSERootDir.

Methods
Method Description
CheckListing ( 933)
GetIdent ( 934)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVSERootDir Methods
The Methods of the TIdFTPLPVSERootDir class are listed here.

Methods
Method Description
CheckListing ( 933)
GetIdent ( 934)

Legend
Method
virtual

TIdFTPLPVSERootDir.CheckListing Method
Pascal
class function CheckListing(

Internet Direct (Indy) Version 10.1.5 933


TIdFTPLPVSESubLibrary Class Classes

AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSERootDir.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVSESubLibrary Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSESubLibrary = class(TIdFTPListBase);
Description
TIdFTPLPVSESubLibrary is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVSESubLibrary Members
The following tables list the members exposed by TIdFTPLPVSESubLibrary.

Methods
Method Description
CheckListing ( 935)

934 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVSEVSAMCatalog Class

GetIdent ( 935)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVSESubLibrary Methods
The Methods of the TIdFTPLPVSESubLibrary class are listed here.

Methods
Method Description
CheckListing ( 935)
GetIdent ( 935)

Legend
Method
virtual

TIdFTPLPVSESubLibrary.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSESubLibrary.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

Internet Direct (Indy) Version 10.1.5 935


TIdFTPLPVSEVSAMCatalog Class Classes

TIdFTPLPVSEVSAMCatalog Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSEVSAMCatalog = class(TIdFTPListBase);
Description
TIdFTPLPVSEVSAMCatalog is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVSEVSAMCatalog Members
The following tables list the members exposed by TIdFTPLPVSEVSAMCatalog.

Methods
Method Description
CheckListing ( 936)
GetIdent ( 937)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPVSEVSAMCatalog Methods
The Methods of the TIdFTPLPVSEVSAMCatalog class are listed here.

Methods
Method Description
CheckListing ( 936)
GetIdent ( 937)

Legend
Method
virtual

TIdFTPLPVSEVSAMCatalog.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;

936 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVSEVTOC Class

Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSEVSAMCatalog.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPVSEVTOC Class
File
IdFTPListParseVSE ( 4645)

Hierarchy

Pascal
TIdFTPLPVSEVTOC = class(TIdFTPListBase);
Description
TIdFTPLPVSEVTOC is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPVSEVTOC Members
The following tables list the members exposed by TIdFTPLPVSEVTOC.

Methods
Method Description
CheckListing ( 938)
GetIdent ( 938)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Internet Direct (Indy) Version 10.1.5 937


TIdFTPLPVxWorks Class Classes

Legend
Method
virtual

TIdFTPLPVSEVTOC Methods
The Methods of the TIdFTPLPVSEVTOC class are listed here.

Methods
Method Description
CheckListing ( 938)
GetIdent ( 938)

Legend
Method
virtual

TIdFTPLPVSEVTOC.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPVSEVTOC.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

938 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPVxWorks Class

TIdFTPLPVxWorks Class
File
IdFTPListParseVxWorks ( 4645)

Hierarchy

Pascal
TIdFTPLPVxWorks = class(TIdFTPListBaseHeader);
Description
TIdFTPLPVxWorks is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPVxWorks Members
The following tables list the members exposed by TIdFTPLPVxWorks.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 939)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPVxWorks Methods
The Methods of the TIdFTPLPVxWorks class are listed here.

Methods
Method Description
GetIdent ( 939)

Legend
Method
virtual

TIdFTPLPVxWorks.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Internet Direct (Indy) Version 10.1.5 939


TIdFTPLPWfFTP Class Classes

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPWfFTP Class
File
IdFTPListParseWfFTP ( 4645)

Hierarchy

Pascal
TIdFTPLPWfFTP = class(TIdFTPListBaseHeader);
Description
TIdFTPLPWfFTP is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPWfFTP Members
The following tables list the members exposed by TIdFTPLPWfFTP.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 941)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.
ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPWfFTP Methods
The Methods of the TIdFTPLPWfFTP class are listed here.

Methods
Method Description
GetIdent ( 941)

Legend
Method
virtual

940 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPWindowsNT Class

TIdFTPLPWfFTP.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPWindowsNT Class
File
IdFTPListParseWindowsNT ( 4646)

Hierarchy

Pascal
TIdFTPLPWindowsNT = class(TIdFTPListBase);
Description
TIdFTPLPWindowsNT is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPWindowsNT Members
The following tables list the members exposed by TIdFTPLPWindowsNT.

Methods
Method Description
CheckListing ( 942)
GetIdent ( 942)
ParseListing ( 942)

Legend
Method
virtual

TIdFTPLPWindowsNT Methods
The Methods of the TIdFTPLPWindowsNT class are listed here.

Methods
Method Description
CheckListing ( 942)
GetIdent ( 942)
ParseListing ( 942)

Internet Direct (Indy) Version 10.1.5 941


TIdFTPLPWindowsNT Class Classes

Legend
Method
virtual

TIdFTPLPWindowsNT.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPWindowsNT.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPWindowsNT.ParseListing Method
Pascal
class function ParseListing(
AListing: TIdStrings;
ADir: TIdFTPListItems
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ADir Type is TIdFTPListItems ( 857).

Returns
boolean

Description
ParseListing is a overridden class method.

942 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLPWinQVNet Class

ParseListing returns a boolean value.

TIdFTPLPWinQVNet Class
File
IdFTPListParseWinQVTNET ( 4646)

Hierarchy

Pascal
TIdFTPLPWinQVNet = class(TIdFTPListBase);
Description
TIdFTPLPWinQVNet is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLPWinQVNet Members
The following tables list the members exposed by TIdFTPLPWinQVNet.

Methods
Method Description
CheckListing ( 943)
GetIdent ( 944)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLPWinQVNet Methods
The Methods of the TIdFTPLPWinQVNet class are listed here.

Methods
Method Description
CheckListing ( 943)
GetIdent ( 944)

Legend
Method
virtual

TIdFTPLPWinQVNet.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;

Internet Direct (Indy) Version 10.1.5 943


TIdFTPLPXecomMicroRTOS Class Classes

Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLPWinQVNet.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLPXecomMicroRTOS Class
File
IdFTPListParseXecomMicroRTOS ( 4646)

Hierarchy

Pascal
TIdFTPLPXecomMicroRTOS = class(TIdFTPListBaseHeader);
Description
TIdFTPLPXecomMicroRTOS is a TIdFTPListBaseHeader ( 850) descendant.

See Also
TIdFTPListBaseHeader ( 850)

TIdFTPLPXecomMicroRTOS Members
The following tables list the members exposed by TIdFTPLPXecomMicroRTOS.

Methods
Method Description
CheckListing ( 848) Detertmines if the class recognizes the specified directory listing format.
CheckListing ( 851)
GetIdent ( 945)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

944 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPLVirtualReader Class

ParseListing ( 851)

Legend
Method
virtual

TIdFTPLPXecomMicroRTOS Methods
The Methods of the TIdFTPLPXecomMicroRTOS class are listed here.

Methods
Method Description
GetIdent ( 945)

Legend
Method
virtual

TIdFTPLPXecomMicroRTOS.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

TIdFTPLVirtualReader Class
File
IdFTPListParseVM ( 4644)

Hierarchy

Pascal
TIdFTPLVirtualReader = class(TIdFTPListBase);
Description
TIdFTPLVirtualReader is a TIdFTPListBase ( 847) descendant.

See Also
TIdFTPListBase ( 847)

TIdFTPLVirtualReader Members
The following tables list the members exposed by TIdFTPLVirtualReader.

Internet Direct (Indy) Version 10.1.5 945


TIdFtpProxySettings Class Classes

Methods
Method Description
CheckListing ( 946)
GetIdent ( 946)
ParseListing ( 849) Parses and stores values found in a directory listing response from a remote FTP server.

Legend
Method
virtual

TIdFTPLVirtualReader Methods
The Methods of the TIdFTPLVirtualReader class are listed here.

Methods
Method Description
CheckListing ( 946)
GetIdent ( 946)

Legend
Method
virtual

TIdFTPLVirtualReader.CheckListing Method
Pascal
class function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; override;
Parameters
Parameters Description
AListing Type is TIdStrings ( 3089).
ASysDescript Scope is const. Type is String. Default value is ''.
ADetails Scope is const. Type is Boolean. Default value is True.

Returns
boolean

Description
CheckListing is a overridden class method.

CheckListing returns a boolean value.

TIdFTPLVirtualReader.GetIdent Method
Pascal
class function GetIdent: String; override;
Returns
String

Description
GetIdent is a overridden class method.

GetIdent returns a String value.

946 Internet Direct (Indy) Version 10.1.5


Classes TIdFtpProxySettings Class

TIdFtpProxySettings Class
File
IdFTP ( 4629)

Hierarchy

Pascal
TIdFtpProxySettings = class(TIdPersistent);
Description
TIdFtpProxySettings is a TIdPersistent ( 3073) descendant.

See Also
TIdPersistent ( 3073)

TIdFtpProxySettings Members
The following tables list the members exposed by TIdFtpProxySettings.

Properties
Property Description
Host ( 948)
Password ( 948)
Port ( 948)
ProxyType ( 949)
UserName ( 949)

Methods
Method Description
Assign ( 948)

Legend
Method
virtual
Property

TIdFtpProxySettings Methods
The Methods of the TIdFtpProxySettings class are listed here.

Methods
Method Description
Assign ( 948)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 947


TIdFtpProxySettings Class Classes

TIdFtpProxySettings.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdFtpProxySettings Properties
The Properties of the TIdFtpProxySettings class are listed here.

Properties
Property Description
Host ( 948)
Password ( 948)
Port ( 948)
ProxyType ( 949)
UserName ( 949)

Legend
Property

TIdFtpProxySettings.Host Property
Pascal
property Host: String;
Description
Host is a Published String property. Write access for the property is implemented using FHost.

TIdFtpProxySettings.Password Property
Pascal
property Password: String;
Description
Password is a Published String property. Write access for the property is implemented using FPassword.

TIdFtpProxySettings.Port Property
Pascal
property Port: Integer;
Description
Port is a Published Integer property. Write access for the property is implemented using FPort.

948 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPRegParseList Class

TIdFtpProxySettings.ProxyType Property
Pascal
property ProxyType: TIdFtpProxyType;
Description
ProxyType is a Published TIdFtpProxyType ( 2951) property. Write access for the property is implemented using FProxyType.

TIdFtpProxySettings.UserName Property
Pascal
property UserName: String;
Description
UserName is a Published String property. Write access for the property is implemented using FUserName.

TIdFTPRegParseList Class
Maintains a list of registered parsers for creating structured directory listings in the Indy FTP client.

File
IdFTPListParseBase ( 4636)

Hierarchy

Pascal
TIdFTPRegParseList = class(TIdList);
Description
TIdFTPRegParseList is a TIdList ( 3055) descendant used to maintain registered parsers for creating structured directory listings
in the Indy FTP client. TIdFTPRegParseList introduces convenience methods that can be used to examine parser capabilties,
check directory listing formats, and to parse structured directory listings by calling methods in the TIdFTPListParserBase class
descendants.

A single instance of TIdFTPRegParseList is for the GParserList variable. TIdFTPRegParseList is used to register and unregister
directory listing parser classes available for use in the framework.

Use RegisterFTPListParser ( 2893) to register a specific parser class for use with the FTP client.

Use UnregisterFTPListParser ( 2932) to disable use of a specific parser class in the FTP client.

See Also
TIdList ( 3055)

TIdFTPRegParseList

GParserList

RegisterFTPListParser ( 2893)

UnregisterFTPListParser ( 2932)

TIdFTPRegParseList Members
The following tables list the members exposed by TIdFTPRegParseList.

Internet Direct (Indy) Version 10.1.5 949


TIdFTPRegParseList Class Classes

Methods
Method Description
CheckListing ( 950) Finds a registered parser class for a directory listing format.
CheckListParse ( 951) Examines and parses a structured directory listing using registered parser classes.
CheckListParseCapa ( 951) Locates a registered list parser class for a specific directory listing format and parses the structured directory
listing.
Create ( 952) Constructor for the object instance.
EnumFTPListParsers ( 952) Locates the identifiers for registered parser classes available in the parser list.
ParseListing ( 952) Parses text in a directory listing into the structured directory listing container.

Legend
Method
virtual

TIdFTPRegParseList Methods
The Methods of the TIdFTPRegParseList class are listed here.

Methods
Method Description
CheckListing ( 950) Finds a registered parser class for a directory listing format.
CheckListParse ( 951) Examines and parses a structured directory listing using registered parser classes.
CheckListParseCapa ( 951) Locates a registered list parser class for a specific directory listing format and parses the structured directory
listing.
Create ( 952) Constructor for the object instance.
EnumFTPListParsers ( 952) Locates the identifiers for registered parser classes available in the parser list.
ParseListing ( 952) Parses text in a directory listing into the structured directory listing container.

Legend
Method
virtual

TIdFTPRegParseList.CheckListing Method
Finds a registered parser class for a directory listing format.

Pascal
function CheckListing(
AListing: TIdStrings;
const ASysDescript: String = '';
const ADetails: Boolean = True
): String; virtual;
Parameters
Parameters Description
AListing Text to examine.
ASysDescript System description for the response. Default value is '' (empty string).
ADetails Indicates if details are included in the directory listing format. Default value is True.

Returns
String - Identifier for the directory listing parser used for the listing format.

Description
CheckListing is a virtual String function used to find a registered parser class for the directory listing text passed in AListing.

CheckListing returns a string value with the identifier for the parser class that can handle the directory listing format in AListing. If a
registered parser class cannot be located, the return value is an empty string ('').

Use CheckListParse ( 951) to locate a parser class and to parse values into the structured directory listing.

Use ParseListing ( 952) to text values into a structured directory listing using the parser class identifier retuened from the method.

950 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPRegParseList Class

See Also
CheckListParse ( 951)

ParseListing ( 952)

TIdFTPRegParseList.CheckListParse Method
Examines and parses a structured directory listing using registered parser classes.

Pascal
function CheckListParse(
AListing: TIdStrings;
ADir: TIdFTPListItems;
var VFormat: String;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; virtual;
Parameters
Parameters Description
AListing Text for the directory listing to examine and parse.
ADir Structured directory listing collection for parsed values.
VFormat Format identifier for parser class.
ASysDescript System description for the remote FTP server. Default value is ''.
ADetails Indicates if file and directory details are available in the structured directory listing. Default value is True.

Returns
boolean - True on success.

Description
CheckListParse is a virtual Boolean function used to examine the text for a directory listing, to locate a registered parser for the
listing format, and to create ( 952) and store values in the structured directory listing.

CheckListParse examines the textual values in AListing to locate a registered parser class in the list that support the format.
CheckListParse assignes the identifer from the registered parser class to the VFormat argument.

CheckListParse calls the ParseListing ( 952) method to create ( 952) and store the contents of the structured directory listing in
the ADir argument.

CheckListParse returns True on successful completion of the method, or False if a registered parser class cannot be located for the
directory listing format.

Use CheckListing ( 950) to locate a registered parser without parsing the content of the structured directory listing.

TIdFTPRegParseList.CheckListParseCapa Method
Locates a registered list parser class for a specific directory listing format and parses the structured directory listing.

Pascal
function CheckListParseCapa(
AListing: TIdStrings;
ADir: TIdFTPListItems;
var VFormat: String;
var VClass: TIdFTPListParseClass;
const ASysDescript: String = '';
const ADetails: Boolean = True
): boolean; virtual;
Parameters
Parameters Description
AListing Text values representing the directory listing.
ADir Structured directory listing used to store values parsed from the textual content.

Internet Direct (Indy) Version 10.1.5 951


TIdFTPRegParseList Class Classes

VFormat Identifier for the list parser class used in the method.
VClass Reference to the list parser class used for the method.
ASysDescript System description for the remote FTP server. Default value is ''.
ADetails Indicates if file and directory details are available in the structured directory listing. Default value is True.

Returns
boolean - True on success.

Description
CheckListParseCapa is a virtual Boolean function used to locate a registered list parser class for a specific directory listing and
parses the structured directory listing.

CheckListParseCapa calls the ParseListing ( 952) method in the TIdFTPListParserBase class instance located for the directory
listing format.

CheckListParseCapa clears any existing entries in the ADir structured directory listing argument.

TIdFTPRegParseList.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; overload;
Description
Create is an overloaded constructor for the object instance.

Create calls the inherited constructor priorto exiting from the method.

See Also
Create

TIdFTPRegParseList.EnumFTPListParsers Method
Locates the identifiers for registered parser classes available in the parser list.

Pascal
procedure EnumFTPListParsers(
AData: TIdStrings
);
Parameters
Parameters Description
AData List of identifiers for the registered parser classes.

Description
EnumFTPListParsers is a method used to locate the names or identifiers for registered list parser classes available in the registered
parser list.

EnumFTPListParsers clears any existing content in the AData argument proper to locating identifiers to store in the argument.

EnumFTPListParsers iterates over the object instances stored in the GParserList variable defined for the framework, and adds the
identifiers for the list parser classes to the AData argument.

TIdFTPRegParseList.ParseListing Method
Parses text in a directory listing into the structured directory listing container.

Pascal
function ParseListing(
AListing: TIdStrings;

952 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPSecurityOptions Class

ADir: TIdFTPListItems;
const AFormatID: String
): boolean; virtual;
Parameters
Parameters Description
AListing Tesxt to parse using the parser class.
ADir COntainer for the structured directory listing.
AFormatID Identifier for the list parser class.

Returns
boolean -True on success.

Description
ParseListing is a virtual Boolean function used to parse the text in a directory listing into the structured directory listing container.

ParseListing clears any existing entries in the ADir argument prior to parsing the text in AListing using the parser class specified in
AFormatID.

ParseListing calls the ParseListing method in the TIdFTPListParserBase class toperform the actual parsing of values stored in
AListing.

TIdFTPSecurityOptions Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
TIdFTPSecurityOptions = class(TIdPersistent);
Description
TIdFTPSecurityOptions is a TIdPersistent ( 3073) descendant.

See Also
TIdPersistent ( 3073)

TIdFTPSecurityOptions Members
The following tables list the members exposed by TIdFTPSecurityOptions.

Properties
Property Description
BlockAllPORTTransfers ( 955)
DisableSTATCommand ( 955)
DisableSYSTCommand ( 955)
InvalidPassDelay ( 955)
NoReservedRangePORT ( 955)
PasswordAttempts ( 956)
PermitCCC ( 956)
RequirePASVFromSameIP ( 956)
RequirePORTFromSameIP ( 956)

Internet Direct (Indy) Version 10.1.5 953


TIdFTPSecurityOptions Class Classes

Methods
Method Description
Assign ( 954)
Create ( 954)

Legend
Method
virtual
Property

TIdFTPSecurityOptions Methods
The Methods of the TIdFTPSecurityOptions class are listed here.

Methods
Method Description
Assign ( 954)
Create ( 954)

Legend
Method
virtual

TIdFTPSecurityOptions.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdFTPSecurityOptions.Create Constructor
Pascal
constructor Create; virtual;
Description
Create is a virtual constructor for the object instance.

TIdFTPSecurityOptions Properties
The Properties of the TIdFTPSecurityOptions class are listed here.

Properties
Property Description
BlockAllPORTTransfers ( 955)
DisableSTATCommand ( 955)
DisableSYSTCommand ( 955)
InvalidPassDelay ( 955)
NoReservedRangePORT ( 955)

954 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPSecurityOptions Class

PasswordAttempts ( 956)
PermitCCC ( 956)
RequirePASVFromSameIP ( 956)
RequirePORTFromSameIP ( 956)

Legend
Property

TIdFTPSecurityOptions.BlockAllPORTTransfers Property
Pascal
property BlockAllPORTTransfers: Boolean;
Description
BlockAllPORTTransfers is a Published Boolean property. Write access for the property is implemented using
FBlockAllPORTTransfers. The default value for the property is DEF_FTP_BLOCK_ALL_PORTS ( 3183).

TIdFTPSecurityOptions.DisableSTATCommand Property
Pascal
property DisableSTATCommand: Boolean;
Description
DisableSTATCommand is a Published Boolean property. Write access for the property is implemented using
FDisableSTATCommand. The default value for the property is DEF_FTP_DISABLE_STAT ( 3184).

TIdFTPSecurityOptions.DisableSYSTCommand Property
Pascal
property DisableSYSTCommand: Boolean;
Description
DisableSYSTCommand is a Published Boolean property. Write access for the property is implemented using
FDisableSYSTCommand. The default value for the property is DEF_FTP_DISABLE_SYST ( 3184).

TIdFTPSecurityOptions.InvalidPassDelay Property
Pascal
property InvalidPassDelay: Cardinal;
Description
InvalidPassDelay is a Published Cardinal property. Write access for the property is implemented using FInvalidPassDelay. The
default value for the property is DEF_FTP_INVALIDPASS_DELAY ( 3185).

TIdFTPSecurityOptions.NoReservedRangePORT Property
Pascal
property NoReservedRangePORT: Boolean;
Description
NoReservedRangePORT is a Published Boolean property. Write access for the property is implemented using
FNoReservedRangePORT. The default value for the property is DEF_FTP_NO_RESERVED_PORTS ( 3185).

Internet Direct (Indy) Version 10.1.5 955


TIdFTPServer Class Classes

TIdFTPSecurityOptions.PasswordAttempts Property
Pascal
property PasswordAttempts: Cardinal;
Description
PasswordAttempts is a Published Cardinal property. Write access for the property is implemented using FPasswordAttempts. The
default value for the property is DEF_FTP_PASSWORDATTEMPTS ( 3185).

TIdFTPSecurityOptions.PermitCCC Property
Pascal
property PermitCCC: Boolean;
Description
PermitCCC is a Published Boolean property. Write access for the property is implemented using FPermitCCC. The default value for
the property is DEF_FTP_PERMIT_CCC ( 3186).

TIdFTPSecurityOptions.RequirePASVFromSameIP Property
Pascal
property RequirePASVFromSameIP: Boolean;
Description
RequirePASVFromSameIP is a Published Boolean property. Write access for the property is implemented using
FRequirePASVFromSameIP. The default value for the property is DEF_FTP_PASV_SAME_IP ( 3185).

TIdFTPSecurityOptions.RequirePORTFromSameIP Property
Pascal
property RequirePORTFromSameIP: Boolean;
Description
RequirePORTFromSameIP is a Published Boolean property. Write access for the property is implemented using
FRequirePORTFromSameIP. The default value for the property is DEF_FTP_PORT_SAME_IP ( 3186).

TIdFTPServer Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
TIdFTPServer = class(TIdExplicitTLSServer);
Description
TIdFTPServer is a TIdExplicitTLSServer ( 691) descendant.

See Also
TIdExplicitTLSServer ( 691)

956 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer Members
The following tables list the members exposed by TIdFTPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowAnonymousLogin ( 959)
AnonymousAccounts ( 960)
AnonymousPassStrictCheck ( 960)
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
Compressor ( 960)
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
CustomSystID ( 960)
DefaultDataPort ( 960)
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
DirFormat ( 960)
EndOfHelpLine ( 961)
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
FTPFileSystem ( 961)
FTPSecurityOptions ( 961)
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
MLSDFacts ( 961)
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
PASVBoundPortMax ( 961)
PASVBoundPortMin ( 961)
PathProcessing ( 962)
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReplyUnknownSITCommand ( 962)
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
SITECommands ( 962)
SystemType ( 962)
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
UserAccounts ( 962)
UseTLS ( 962)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 959)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

Internet Direct (Indy) Version 10.1.5 957


TIdFTPServer Class Classes

GetVersion ( 269) Version ( 269) number for Indy component suite.


CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnAfterUserLogin ( 963)
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnChangeDirectory ( 964)
OnClientID ( 964)
OnCombineFiles ( 964)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnCRCFile ( 964)
OnCustomListDirectory ( 964)
OnCustomPathProcess ( 964)
OnDataPortAfterBind ( 965)
OnDataPortBeforeBind ( 965)
OnDeleteFile ( 965)
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnFileExistCheck ( 965)
OnGetFileDate ( 965)
OnGetFileSize ( 965)
OnGreeting ( 966)
OnListDirectory ( 966)
OnListenException ( 470) Event handler for an exception in a listener thread.
OnLoginFailureBanner ( 966)
OnLoginSuccessBanner ( 966)
OnMakeDirectory ( 966)
OnMD5Cache ( 966)
OnMD5Verify ( 967)
OnMLST ( 967)
OnPASVBeforeBind ( 967)
OnPASVReply ( 967)
OnQuitBanner ( 967)
OnRemoveDirectory ( 967)
OnRenameFile ( 968)
OnRetrieveFile ( 968)
OnSetATTRIB ( 968)
OnSetCreationTime ( 968)
OnSetModifiedTime ( 968)
OnSiteCHGRP ( 968)
OnSiteCHMOD ( 969)
OnSiteCHOWN ( 969)
OnSiteUMASK ( 969)
OnSiteUTIME ( 969)
OnStat ( 969)
OnStatus ( 359) Represents the current connection status event handler.
OnStoreFile ( 969)
OnUserLogin ( 970)

Legend
Method
virtual
Property
read only
Event

958 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer Methods
The Methods of the TIdFTPServer class are listed here.

Methods
Method Description
Destroy ( 959)

Legend
Destructor
virtual

TIdFTPServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdFTPServer Properties
The Properties of the TIdFTPServer class are listed here.

Properties
Property Description
AllowAnonymousLogin ( 959)
AnonymousAccounts ( 960)
AnonymousPassStrictCheck ( 960)
Compressor ( 960)
CustomSystID ( 960)
DefaultDataPort ( 960)
DirFormat ( 960)
EndOfHelpLine ( 961)
FTPFileSystem ( 961)
FTPSecurityOptions ( 961)
MLSDFacts ( 961)
PASVBoundPortMax ( 961)
PASVBoundPortMin ( 961)
PathProcessing ( 962)
ReplyUnknownSITCommand ( 962)
SITECommands ( 962)
SystemType ( 962)
UserAccounts ( 962)
UseTLS ( 962)

Legend
Property

TIdFTPServer.AllowAnonymousLogin Property
Pascal
property AllowAnonymousLogin: Boolean;
Description
AllowAnonymousLogin is a Published Boolean property. Write access for the property is implemented using

Internet Direct (Indy) Version 10.1.5 959


TIdFTPServer Class Classes

FAllowAnonymousLogin. The default value for the property is Id_DEF_AllowAnon ( 3282).

TIdFTPServer.AnonymousAccounts Property
Pascal
property AnonymousAccounts: TIdStringList;
Description
AnonymousAccounts is a Published TIdStringList ( 3088) property. Write access for the property is implemented using
SetAnonymousAccounts.

TIdFTPServer.AnonymousPassStrictCheck Property
Pascal
property AnonymousPassStrictCheck: Boolean;
Description
AnonymousPassStrictCheck is a Published Boolean property. Write access for the property is implemented using
FAnonymousPassStrictCheck. The default value for the property is Id_DEF_PassStrictCheck ( 3282).

TIdFTPServer.Compressor Property
Pascal
property Compressor: TIdZLibCompressorBase;
Description
Compressor is a Published TIdZLibCompressorBase ( 2634) property. Write access for the property is implemented using
FCompressor.

TIdFTPServer.CustomSystID Property
Pascal
property CustomSystID: String;
Description
CustomSystID is a Published String property. Write access for the property is implemented using FCustomSystID.

TIdFTPServer.DefaultDataPort Property
Pascal
property DefaultDataPort: Integer;
Description
DefaultDataPort is a Published Integer property. Write access for the property is implemented using FDefaultDataPort. The default
value for the property is IdPORT_FTP_DATA ( 4000).

TIdFTPServer.DirFormat Property
Pascal
property DirFormat: TIdFTPDirFormat;
Description
DirFormat is a Published TIdFTPDirFormat ( 2950) property. Write access for the property is implemented using FDirFormat. The
default value for the property is DEF_DIRFORMAT ( 3182).

960 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer.EndOfHelpLine Property
Pascal
property EndOfHelpLine: String;
Description
EndOfHelpLine is a Published String property. Write access for the property is implemented using FEndOfHelpLine.

TIdFTPServer.FTPFileSystem Property
Pascal
property FTPFileSystem: TIdFTPBaseFileSystem;
Description
FTPFileSystem is a Published TIdFTPBaseFileSystem ( 839) property. Write access for the property is implemented using
SetFTPFileSystem.

TIdFTPServer.FTPSecurityOptions Property
Pascal
property FTPSecurityOptions: TIdFTPSecurityOptions;
Description
FTPSecurityOptions is a Published TIdFTPSecurityOptions ( 953) property. Write access for the property is implemented using
SetFTPSecurityOptions.

TIdFTPServer.MLSDFacts Property
Pascal
property MLSDFacts: TIdMLSDAttrs;
Description
MLSDFacts is a Published TIdMLSDAttrs ( 3060) property. Write access for the property is implemented using FMLSDFacts.

TIdFTPServer.PASVBoundPortMax Property
Pascal
property PASVBoundPortMax: Integer;
Description
PASVBoundPortMax is a Published Integer property. Write access for the property is implemented using SetPASVBoundPortMax.
The default value for the property is DEF_PASV_BOUND_MAX ( 3193).

TIdFTPServer.PASVBoundPortMin Property
Pascal
property PASVBoundPortMin: Integer;
Description
PASVBoundPortMin is a Published Integer property. Write access for the property is implemented using SetPASVBoundPortMin.
The default value for the property is DEF_PASV_BOUND_MIN ( 3193).

Internet Direct (Indy) Version 10.1.5 961


TIdFTPServer Class Classes

TIdFTPServer.PathProcessing Property
Pascal
property PathProcessing: TIdFTPPathProcessing;
Description
PathProcessing is a Published TIdFTPPathProcessing ( 2951) property. Write access for the property is implemented using
FPathProcessing. The default value for the property is DEF_PATHPROCESSING ( 3193).

TIdFTPServer.ReplyUnknownSITCommand Property
Pascal
property ReplyUnknownSITCommand: TIdReply;
Description
ReplyUnknownSITCommand is a Published TIdReply ( 1836) property. Write access for the property is implemented using
SetReplyUnknownSITECommand.

TIdFTPServer.SITECommands Property
Pascal
property SITECommands: TIdCommandHandlers;
Description
SITECommands is a Published TIdCommandHandlers ( 350) property. Write access for the property is implemented using
SetSITECommands.

TIdFTPServer.SystemType Property
Pascal
property SystemType: string;
Description
SystemType is a Published string property. Write access for the property is implemented using FSystemType.

TIdFTPServer.UserAccounts Property
Pascal
property UserAccounts: TIdCustomUserManager;
Description
UserAccounts is a Published TIdCustomUserManager ( 482) property. Write access for the property is implemented using
SetUserAccounts.

TIdFTPServer.UseTLS Property
Pascal
property UseTLS;
Description
UseTLS is a Published property.

962 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer Events
The Events of the TIdFTPServer class are listed here.

Events
Event Description
OnAfterUserLogin ( 963)
OnChangeDirectory ( 964)
OnClientID ( 964)
OnCombineFiles ( 964)
OnCRCFile ( 964)
OnCustomListDirectory ( 964)
OnCustomPathProcess ( 964)
OnDataPortAfterBind ( 965)
OnDataPortBeforeBind ( 965)
OnDeleteFile ( 965)
OnFileExistCheck ( 965)
OnGetFileDate ( 965)
OnGetFileSize ( 965)
OnGreeting ( 966)
OnListDirectory ( 966)
OnLoginFailureBanner ( 966)
OnLoginSuccessBanner ( 966)
OnMakeDirectory ( 966)
OnMD5Cache ( 966)
OnMD5Verify ( 967)
OnMLST ( 967)
OnPASVBeforeBind ( 967)
OnPASVReply ( 967)
OnQuitBanner ( 967)
OnRemoveDirectory ( 967)
OnRenameFile ( 968)
OnRetrieveFile ( 968)
OnSetATTRIB ( 968)
OnSetCreationTime ( 968)
OnSetModifiedTime ( 968)
OnSiteCHGRP ( 968)
OnSiteCHMOD ( 969)
OnSiteCHOWN ( 969)
OnSiteUMASK ( 969)
OnSiteUTIME ( 969)
OnStat ( 969)
OnStoreFile ( 969)
OnUserLogin ( 970)

Legend
Event

TIdFTPServer.OnAfterUserLogin Event
Pascal
property OnAfterUserLogin: TOnAfterUserLoginEvent;
Description
OnAfterUserLogin is a Published TOnAfterUserLoginEvent ( 3102) event handler property. Write access for the property is
implemented using FOnAfterUserLogin.

Internet Direct (Indy) Version 10.1.5 963


TIdFTPServer Class Classes

TIdFTPServer.OnChangeDirectory Event
Pascal
property OnChangeDirectory: TOnDirectoryEvent;
Description
OnChangeDirectory is a Published TOnDirectoryEvent ( 3106) event handler property. Write access for the property is
implemented using FOnChangeDirectory.

TIdFTPServer.OnClientID Event
Pascal
property OnClientID: TIdOnClientID;
Description
OnClientID is a Published TIdOnClientID ( 3068) event handler property. Write access for the property is implemented using
FOnClientID.

TIdFTPServer.OnCombineFiles Event
Pascal
property OnCombineFiles: TOnCombineFiles;
Description
OnCombineFiles is a Published TOnCombineFiles ( 3103) event handler property. Write access for the property is implemented
using FOnCombineFiles.

TIdFTPServer.OnCRCFile Event
Pascal
property OnCRCFile: TOnCheckSumFile;
Description
OnCRCFile is a Published TOnCheckSumFile ( 3102) event handler property. Write access for the property is implemented using
FOnCRCFile.

TIdFTPServer.OnCustomListDirectory Event
Pascal
property OnCustomListDirectory: TOnCustomListDirectoryEvent;
Description
OnCustomListDirectory is a Published TOnCustomListDirectoryEvent ( 3104) event handler property. Write access for the
property is implemented using FOnCustomListDirectory.

TIdFTPServer.OnCustomPathProcess Event
Pascal
property OnCustomPathProcess: TOnCustomPathProcess;
Description
OnCustomPathProcess is a Published TOnCustomPathProcess ( 3105) event handler property. Write access for the property is
implemented using FOnCustomPathProcess.

964 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer.OnDataPortAfterBind Event
Pascal
property OnDataPortAfterBind: TOnDataPortBind;
Description
OnDataPortAfterBind is a Published TOnDataPortBind ( 3105) event handler property. Write access for the property is
implemented using FOnDataPortAfterBind.

TIdFTPServer.OnDataPortBeforeBind Event
Pascal
property OnDataPortBeforeBind: TOnDataPortBind;
Description
OnDataPortBeforeBind is a Published TOnDataPortBind ( 3105) event handler property. Write access for the property is
implemented using FOnDataPortBeforeBind.

TIdFTPServer.OnDeleteFile Event
Pascal
property OnDeleteFile: TOnFileEvent;
Description
OnDeleteFile is a Published TOnFileEvent ( 3106) event handler property. Write access for the property is implemented using
FOnDeleteFile.

TIdFTPServer.OnFileExistCheck Event
Pascal
property OnFileExistCheck: TOnCheckFileEvent;
Description
OnFileExistCheck is a Published TOnCheckFileEvent ( 3102) event handler property. Write access for the property is
implemented using FOnFileExistCheck.

TIdFTPServer.OnGetFileDate Event
Pascal
property OnGetFileDate: TOnGetFileDateEvent;
Description
OnGetFileDate is a Published TOnGetFileDateEvent ( 3106) event handler property. Write access for the property is implemented
using FOnGetFileDate.

TIdFTPServer.OnGetFileSize Event
Pascal
property OnGetFileSize: TOnGetFileSizeEvent;
Description
OnGetFileSize is a Published TOnGetFileSizeEvent ( 3107) event handler property. Write access for the property is implemented
using FOnGetFileSize.

Internet Direct (Indy) Version 10.1.5 965


TIdFTPServer Class Classes

TIdFTPServer.OnGreeting Event
Pascal
property OnGreeting: TIdOnBanner;
Description
OnGreeting is a Published TIdOnBanner ( 3067) event handler property. Write access for the property is implemented using
FOnGreeting.

TIdFTPServer.OnListDirectory Event
Pascal
property OnListDirectory: TOnListDirectoryEvent;
Description
OnListDirectory is a Published TOnListDirectoryEvent ( 3108) event handler property. Write access for the property is
implemented using FOnListDirectory.

TIdFTPServer.OnLoginFailureBanner Event
Pascal
property OnLoginFailureBanner: TIdOnBanner;
Description
OnLoginFailureBanner is a Published TIdOnBanner ( 3067) event handler property. Write access for the property is implemented
using FOnLoginFailureBanner.

TIdFTPServer.OnLoginSuccessBanner Event
Pascal
property OnLoginSuccessBanner: TIdOnBanner;
Description
OnLoginSuccessBanner is a Published TIdOnBanner ( 3067) event handler property. Write access for the property is
implemented using FOnLoginSuccessBanner.

TIdFTPServer.OnMakeDirectory Event
Pascal
property OnMakeDirectory: TOnDirectoryEvent;
Description
OnMakeDirectory is a Published TOnDirectoryEvent ( 3106) event handler property. Write access for the property is implemented
using FOnMakeDirectory.

TIdFTPServer.OnMD5Cache Event
Pascal
property OnMD5Cache: TOnCacheChecksum;
Description
OnMD5Cache is a Published TOnCacheChecksum ( 3102) event handler property. Write access for the property is implemented
using FOnMD5Cache.

966 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer.OnMD5Verify Event
Pascal
property OnMD5Verify: TOnVerifyChecksum;
Description
OnMD5Verify is a Published TOnVerifyChecksum ( 3115) event handler property. Write access for the property is implemented
using FOnMD5Verify.

TIdFTPServer.OnMLST Event
Pascal
property OnMLST: TIdOnMLST;
Description
OnMLST is a Published TIdOnMLST ( 3071) event handler property. Write access for the property is implemented using
FOnMLST.

TIdFTPServer.OnPASVBeforeBind Event
Pascal
property OnPASVBeforeBind: TIdOnPASV;
Description
OnPASVBeforeBind is a Published TIdOnPASV ( 3071) event handler property. Write access for the property is implemented
using FOnPASVBeforeBind.

TIdFTPServer.OnPASVReply Event
Pascal
property OnPASVReply: TIdOnPASV;
Description
OnPASVReply is a Published TIdOnPASV ( 3071) event handler property. Write access for the property is implemented using
FOnPASVReply.

TIdFTPServer.OnQuitBanner Event
Pascal
property OnQuitBanner: TIdOnBanner;
Description
OnQuitBanner is a Published TIdOnBanner ( 3067) event handler property. Write access for the property is implemented using
FOnQuitBanner.

TIdFTPServer.OnRemoveDirectory Event
Pascal
property OnRemoveDirectory: TOnDirectoryEvent;
Description
OnRemoveDirectory is a Published TOnDirectoryEvent ( 3106) event handler property. Write access for the property is
implemented using FOnRemoveDirectory.

Internet Direct (Indy) Version 10.1.5 967


TIdFTPServer Class Classes

TIdFTPServer.OnRenameFile Event
Pascal
property OnRenameFile: TOnRenameFileEvent;
Description
OnRenameFile is a Published TOnRenameFileEvent ( 3110) event handler property. Write access for the property is implemented
using FOnRenameFile.

TIdFTPServer.OnRetrieveFile Event
Pascal
property OnRetrieveFile: TOnRetrieveFileEvent;
Description
OnRetrieveFile is a Published TOnRetrieveFileEvent ( 3111) event handler property. Write access for the property is implemented
using FOnRetrieveFile.

TIdFTPServer.OnSetATTRIB Event
Pascal
property OnSetATTRIB: TOnSetATTRIB;
Description
OnSetATTRIB is a Published TOnSetATTRIB ( 3112) event handler property. Write access for the property is implemented using
FOnSetATTRIB.

TIdFTPServer.OnSetCreationTime Event
Pascal
property OnSetCreationTime: TOnSetFileDateEvent;
Description
OnSetCreationTime is a Published TOnSetFileDateEvent ( 3112) event handler property. Write access for the property is
implemented using FOnSetCreationTime.

TIdFTPServer.OnSetModifiedTime Event
Pascal
property OnSetModifiedTime: TOnSetFileDateEvent;
Description
OnSetModifiedTime is a Published TOnSetFileDateEvent ( 3112) event handler property. Write access for the property is
implemented using FOnSetModifiedTime.

TIdFTPServer.OnSiteCHGRP Event
Pascal
property OnSiteCHGRP: TOnSiteCHGRP;
Description
OnSiteCHGRP is a Published TOnSiteCHGRP ( 3113) event handler property. Write access for the property is implemented using
FOnSiteCHGRP.

968 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServer Class

TIdFTPServer.OnSiteCHMOD Event
Pascal
property OnSiteCHMOD: TOnSiteCHMOD;
Description
OnSiteCHMOD is a Published TOnSiteCHMOD ( 3113) event handler property. Write access for the property is implemented
using FOnSiteCHMOD.

TIdFTPServer.OnSiteCHOWN Event
Pascal
property OnSiteCHOWN: TOnSiteCHOWN;
Description
OnSiteCHOWN is a Published TOnSiteCHOWN ( 3113) event handler property. Write access for the property is implemented
using FOnSiteCHOWN.

TIdFTPServer.OnSiteUMASK Event
Pascal
property OnSiteUMASK: TOnSiteUMASK;
Description
OnSiteUMASK is a Published TOnSiteUMASK ( 3113) event handler property. Write access for the property is implemented using
FOnSiteUMASK.

TIdFTPServer.OnSiteUTIME Event
Pascal
property OnSiteUTIME: TOnSiteUTIME;
Description
OnSiteUTIME is a Published TOnSiteUTIME ( 3114) event handler property. Write access for the property is implemented using
FOnSiteUTIME.

TIdFTPServer.OnStat Event
Pascal
property OnStat: TIdOnFTPStatEvent;
Description
OnStat is a Published TIdOnFTPStatEvent ( 3069) event handler property. Write access for the property is implemented using
FOnStat.

TIdFTPServer.OnStoreFile Event
Pascal
property OnStoreFile: TOnStoreFileEvent;
Description
OnStoreFile is a Published TOnStoreFileEvent ( 3114) event handler property. Write access for the property is implemented using
FOnStoreFile.

Internet Direct (Indy) Version 10.1.5 969


TIdFTPServerContext Class Classes

TIdFTPServer.OnUserLogin Event
Pascal
property OnUserLogin: TOnFTPUserLoginEvent;
Description
OnUserLogin is a Published TOnFTPUserLoginEvent ( 3106) event handler property. Write access for the property is
implemented using FOnUserLogin.

TIdFTPServerContext Class
File
IdFTPServer ( 4648)

Hierarchy

Pascal
TIdFTPServerContext = class(TIdFTPServerContextBase);
Description
TIdFTPServerContext is a TIdFTPServerContextBase ( 976) descendant.

See Also
TIdFTPServerContextBase ( 976)

TIdFTPServerContext Members
The following tables list the members exposed by TIdFTPServerContext.

Properties
Property Description
ALLOSize ( 977)
Authenticated ( 977)
AuthMechanism ( 972)
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
CurrentDir ( 978)
Data ( 2332) A user-specified object with values used during execution of the task.
DataChannel ( 973)
DataMode ( 973)
DataPBSZCalled ( 973)
DataPort ( 973)
DataProtBufSize ( 973)
DataProtection ( 973)
DataStruct ( 974)
DataType ( 974)
HomeDir ( 978)
MLSOpts ( 974)
MSDOSMode ( 974)
Password ( 978)
PasswordAttempts ( 974)
PASV ( 974)
RESTPos ( 974)

970 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServerContext Class

RNFR ( 978)
Server ( 975)
SSCNOn ( 975)
UMask ( 975)
Username ( 978)
UserSecurity ( 975)
UserType ( 979)
Yarn ( 2333) Represents the thread or fiber for executing the task.
ZLibCompressionLevel ( 975)
ZLibMemLevel ( 975)
ZLibStratagy ( 976)
ZLibWindowBits ( 976)

Methods
Method Description
Binding ( 378)
Create ( 971)
Destroy ( 972)
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

TIdFTPServerContext Methods
The Methods of the TIdFTPServerContext class are listed here.

Methods
Method Description
Create ( 971)
Destroy ( 972)

Legend
Constructor
virtual

TIdFTPServerContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); override;

Internet Direct (Indy) Version 10.1.5 971


TIdFTPServerContext Class Classes

Parameters
Parameters Description
AConnection Type is TIdTCPConnection ( 2349).
AYarn Type is TIdYarn ( 2632).
AList Type is TIdThreadList ( 3093). Default value is nil.

Description
Create is a overridden constructor for the object instance.

TIdFTPServerContext.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdFTPServerContext Properties
The Properties of the TIdFTPServerContext class are listed here.

Properties
Property Description
AuthMechanism ( 972)
DataChannel ( 973)
DataMode ( 973)
DataPBSZCalled ( 973)
DataPort ( 973)
DataProtBufSize ( 973)
DataProtection ( 973)
DataStruct ( 974)
DataType ( 974)
MLSOpts ( 974)
MSDOSMode ( 974)
PasswordAttempts ( 974)
PASV ( 974)
RESTPos ( 974)
Server ( 975)
SSCNOn ( 975)
UMask ( 975)
UserSecurity ( 975)
ZLibCompressionLevel ( 975)
ZLibMemLevel ( 975)
ZLibStratagy ( 976)
ZLibWindowBits ( 976)

Legend
Property
read only

TIdFTPServerContext.AuthMechanism Property
Pascal
property AuthMechanism: String;

972 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServerContext Class

Description
AuthMechanism is a Public String property. Write access for the property is implemented using FAuthMechanism.

TIdFTPServerContext.DataChannel Property
Pascal
property DataChannel: TIdDataChannel;
Description
DataChannel is a Public read-only TIdDataChannel ( 486) property.

TIdFTPServerContext.DataMode Property
Pascal
property DataMode: TIdFTPTransferMode;
Description
DataMode is a Public TIdFTPTransferMode ( 2952) property. Write access for the property is implemented using FDataMode.

TIdFTPServerContext.DataPBSZCalled Property
Pascal
property DataPBSZCalled: Boolean;
Description
DataPBSZCalled is a Public Boolean property. Write access for the property is implemented using FDataPBSZCalled.

TIdFTPServerContext.DataPort Property
Pascal
property DataPort: Integer;
Description
DataPort is a Public read-only Integer property.

TIdFTPServerContext.DataProtBufSize Property
Pascal
property DataProtBufSize: Cardinal;
Description
DataProtBufSize is a Public Cardinal property. Write access for the property is implemented using FDataProtBufSize.

TIdFTPServerContext.DataProtection Property
Pascal
property DataProtection: TIdFTPDataPortSecurity;
Description
DataProtection is a Public TIdFTPDataPortSecurity ( 2950) property. Write access for the property is implemented using
FDataProtection.

Internet Direct (Indy) Version 10.1.5 973


TIdFTPServerContext Class Classes

TIdFTPServerContext.DataStruct Property
Pascal
property DataStruct: TIdFTPDataStructure;
Description
DataStruct is a Public TIdFTPDataStructure ( 2950) property. Write access for the property is implemented using FDataStruct.

TIdFTPServerContext.DataType Property
Pascal
property DataType: TIdFTPTransferType;
Description
DataType is a Public TIdFTPTransferType ( 2953) property. Write access for the property is implemented using FDataType.

TIdFTPServerContext.MLSOpts Property
Pascal
property MLSOpts: TIdFTPFactOutputs;
Description
MLSOpts is a Public TIdFTPFactOutputs ( 3028) property. Write access for the property is implemented using FMLSOpts.

TIdFTPServerContext.MSDOSMode Property
Pascal
property MSDOSMode: Boolean;
Description
MSDOSMode is a Public Boolean property. Write access for the property is implemented using FMSDOSMode.

TIdFTPServerContext.PasswordAttempts Property
Pascal
property PasswordAttempts: Cardinal;
Description
PasswordAttempts is a Public Cardinal property. Write access for the property is implemented using FPasswordAttempts.

TIdFTPServerContext.PASV Property
Pascal
property PASV: Boolean;
Description
PASV is a Public Boolean property. Write access for the property is implemented using FPASV.

TIdFTPServerContext.RESTPos Property
Pascal
property RESTPos: Integer;

974 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServerContext Class

Description
RESTPos is a Public Integer property. Write access for the property is implemented using FRESTPos.

TIdFTPServerContext.Server Property
Pascal
property Server: TIdFTPServer;
Description
Server is a Public TIdFTPServer ( 956) property. Write access for the property is implemented using FServer.

TIdFTPServerContext.SSCNOn Property
Pascal
property SSCNOn: Boolean;
Description
SSCNOn is a Public Boolean property. Write access for the property is implemented using FSSCNOn.

TIdFTPServerContext.UMask Property
Pascal
property UMask: Integer;
Description
UMask is a Public Integer property. Write access for the property is implemented using FUMask.

TIdFTPServerContext.UserSecurity Property
Pascal
property UserSecurity: TIdFTPSecurityOptions;
Description
UserSecurity is a Public TIdFTPSecurityOptions ( 953) property. Write access for the property is implemented using
SetUserSecurity.

TIdFTPServerContext.ZLibCompressionLevel Property
Pascal
property ZLibCompressionLevel: Integer;
Description
ZLibCompressionLevel is a Public Integer property. Write access for the property is implemented using FZLibCompressionLevel.

TIdFTPServerContext.ZLibMemLevel Property
Pascal
property ZLibMemLevel: Integer;
Description
ZLibMemLevel is a Public Integer property. Write access for the property is implemented using FZLibMemLevel.

Internet Direct (Indy) Version 10.1.5 975


TIdFTPServerContextBase Class Classes

TIdFTPServerContext.ZLibStratagy Property
Pascal
property ZLibStratagy: Integer;
Description
ZLibStratagy is a Public Integer property. Write access for the property is implemented using FZLibStratagy.

TIdFTPServerContext.ZLibWindowBits Property
Pascal
property ZLibWindowBits: Integer;
Description
ZLibWindowBits is a Public Integer property. Write access for the property is implemented using FZLibWindowBits.

TIdFTPServerContextBase Class
File
IdFTPServerContextBase ( 4650)

Hierarchy

Pascal
TIdFTPServerContextBase = class(TIdContext);
Description
TIdFTPServerContextBase is a TIdContext ( 376) descendant.

See Also
TIdContext ( 376)

TIdFTPServerContextBase Members
The following tables list the members exposed by TIdFTPServerContextBase.

Properties
Property Description
ALLOSize ( 977)
Authenticated ( 977)
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
CurrentDir ( 978)
Data ( 2332) A user-specified object with values used during execution of the task.
HomeDir ( 978)
Password ( 978)
RESTPos ( 978)
RNFR ( 978)
Username ( 978)
UserType ( 979)
Yarn ( 2333) Represents the thread or fiber for executing the task.

976 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPServerContextBase Class

Methods
Method Description
Binding ( 378)
Create ( 378)
Create ( 2330) Constructor for the object instance.
Destroy ( 378) Frees the object instance.
Destroy ( 2331) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Property
read only
Method
virtual
Event

TIdFTPServerContextBase Properties
The Properties of the TIdFTPServerContextBase class are listed here.

Properties
Property Description
ALLOSize ( 977)
Authenticated ( 977)
CurrentDir ( 978)
HomeDir ( 978)
Password ( 978)
RESTPos ( 978)
RNFR ( 978)
Username ( 978)
UserType ( 979)

Legend
Property

TIdFTPServerContextBase.ALLOSize Property
Pascal
property ALLOSize: Integer;
Description
ALLOSize is a Public Integer property. Write access for the property is implemented using FALLOSize.

TIdFTPServerContextBase.Authenticated Property
Pascal
property Authenticated: Boolean;

Internet Direct (Indy) Version 10.1.5 977


TIdFTPServerContextBase Class Classes

Description
Authenticated is a Public Boolean property. Write access for the property is implemented using FAuthenticated.

TIdFTPServerContextBase.CurrentDir Property
Pascal
property CurrentDir: string;
Description
CurrentDir is a Public string property. Write access for the property is implemented using FCurrentDir.

TIdFTPServerContextBase.HomeDir Property
Pascal
property HomeDir: string;
Description
HomeDir is a Public string property. Write access for the property is implemented using FHomeDir.

TIdFTPServerContextBase.Password Property
Pascal
property Password: string;
Description
Password is a Public string property. Write access for the property is implemented using FPassword.

TIdFTPServerContextBase.RESTPos Property
Pascal
property RESTPos: Integer;
Description
RESTPos is a Public Integer property. Write access for the property is implemented using FRESTPos.

TIdFTPServerContextBase.RNFR Property
Pascal
property RNFR: string;
Description
RNFR is a Public string property. Write access for the property is implemented using FRNFR.

TIdFTPServerContextBase.Username Property
Pascal
property Username: string;
Description
Username is a Public string property. Write access for the property is implemented using FUsername.

978 Internet Direct (Indy) Version 10.1.5


Classes TIdFTPTZInfo Class

TIdFTPServerContextBase.UserType Property
Pascal
property UserType: TIdFTPUserType;
Description
UserType is a Public TIdFTPUserType ( 2953) property. Write access for the property is implemented using FUserType.

TIdFTPTZInfo Class
File
IdFTP ( 4629)

Hierarchy

Pascal
TIdFTPTZInfo = class(TIdPersistent);
Description
TIdFTPTZInfo is a TIdPersistent ( 3073) descendant.

See Also
TIdPersistent ( 3073)

TIdFTPTZInfo Members
The following tables list the members exposed by TIdFTPTZInfo.

Properties
Property Description
GMTOffset ( 980)
GMTOffsetAvailable ( 980)

Methods
Method Description
Assign ( 980)

Legend
Method
virtual
Property

TIdFTPTZInfo Methods
The Methods of the TIdFTPTZInfo class are listed here.

Methods
Method Description
Assign ( 980)

Internet Direct (Indy) Version 10.1.5 979


TIdGeneric Class Classes

Legend
Method
virtual

TIdFTPTZInfo.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdFTPTZInfo Properties
The Properties of the TIdFTPTZInfo class are listed here.

Properties
Property Description
GMTOffset ( 980)
GMTOffsetAvailable ( 980)

Legend
Property

TIdFTPTZInfo.GMTOffset Property
Pascal
property GMTOffset: TIdDateTime;
Description
GMTOffset is a Published TIdDateTime ( 4733) property. Write access for the property is implemented using FGMTOffset.

TIdFTPTZInfo.GMTOffsetAvailable Property
Pascal
property GMTOffsetAvailable: Boolean;
Description
GMTOffsetAvailable is a Published Boolean property. Write access for the property is implemented using FGMTOffsetAvailable.

TIdGeneric Class
Implements the base class for generic textual response added to collections in the DICT Server Protocol.

File
IdDICTCommon ( 4615)

980 Internet Direct (Indy) Version 10.1.5


Classes TIdGeneric Class

Hierarchy

Pascal
TIdGeneric = class(TIdCollectionItem);
Description
TIdGeneric is a TIdCollectionItem ( 3011) descendant that implements a base class for collection items used for textual replies in
the DICT Server Protocol.

TIdGeneric is the ancestor for collection items like TIdStrategy ( 2255) and TIdDBInfo ( 526).

TIdGeneric provides the Name ( 982) and Desc ( 981) properties used to identify and represent values in the textual responses.

See Also
TIdCollectionItem ( 3011)

TIdStrategy ( 2255)

TIdDBInfo ( 526)

TIdGeneric Members
The following tables list the members exposed by TIdGeneric.

Properties
Property Description
Desc ( 981) Stores the Description for a value in a DICT protocol response.
Name ( 982) Stores the Name for a value in a DICT protocol response.

Legend
Property

TIdGeneric Properties
The Properties of the TIdGeneric class are listed here.

Properties
Property Description
Desc ( 981) Stores the Description for a value in a DICT protocol response.
Name ( 982) Stores the Name for a value in a DICT protocol response.

Legend
Property

TIdGeneric.Desc Property
Stores the Description for a value in a DICT protocol response.

Pascal
property Desc: String;
Description
Desc is a String property that represents the storage used for a

See Also
Name ( 982)

Internet Direct (Indy) Version 10.1.5 981


TIdGopher Class Classes

TIdGeneric.Name Property
Stores the Name for a value in a DICT protocol response.

Pascal
property Name: String;
Description
Name is a String property that represents the storage used for a Named found in a textual response received in DICT protocol
exchanges.

See Also
Desc ( 981)

TIdGopher Class
Implements a Gopher client.

File
IdGopher ( 4656)

Hierarchy

Pascal
TIdGopher = class(TIdTCPClientCustom);
Description
The TIdGopher is a TIdTCPClientCustom ( 2340) descendant that implements a client for the Internet Gopher protocol, as
described in the Internet Standards document:

RFC 1436- The Internet Gopher Protocol

TIdGopher also implements partial support for the Gopher+ protocol as described in the document:

Gopher+, Upward-Compatible Enhancements to the Internet Gopher protocol>

Gopher is a distributed document system developed at the University of Minnesota as an attempt to make locating information
resources intuitive for users through a series of structured menus leading to documents or pointers to other protocols such as
Telnet and TN3270. While this has been succeeded by the World Wide Web, this is still useful for accessing legacy systems and
has a low overhead due to its simplicity and structure.

See Also
TIdTCPClientCustom ( 2340)

IndySupport ( 15)

TIdGopher Members
The following tables list the members exposed by TIdGopher.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.

982 Internet Direct (Indy) Version 10.1.5


Classes TIdGopher Class

BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 986) IP Address or host name for the Gopher server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 986) Port number for the connection to the Gopher server.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetExtendedMenu ( 984) Gets the Gopher+ extended menu.
GetFile ( 984)
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetMenu ( 985) Retrieves the Gopher menu.
GetTextFile ( 985)
GetVersion ( 269) Version ( 269) number for Indy component suite.
Search ( 986) Perform a Gopher search using a query.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnMenuItem ( 987) Event handler for retrieved Gopher menu items.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property

Internet Direct (Indy) Version 10.1.5 983


TIdGopher Class Classes

read only
Event

TIdGopher Methods
The Methods of the TIdGopher class are listed here.

Methods
Method Description
GetExtendedMenu ( 984) Gets the Gopher+ extended menu.
GetFile ( 984)
GetMenu ( 985) Retrieves the Gopher menu.
GetTextFile ( 985)
Search ( 986) Perform a Gopher search using a query.

Legend
Method

TIdGopher.GetExtendedMenu Method
Gets the Gopher+ extended menu.

Pascal
function GetExtendedMenu(
ASelector: String;
AView: String = ''
): TIdGopherMenu;
Parameters
Parameters Description
ASelector the selector used to retrieve the gopher menu
AView alternative views listed for the item you are retrieving for a Gopher + server.

Returns
TIdGopherMenu ( 987) - Gopher+ extended menu or standard menu.

Description
GetExtendedMenu is a TIdGopherMenu ( 987) function that gets an extended Gopher+ menu including additional Gopher+
information. GetExtendedMenu will also retrieve the standard Gopher menu if the server does not support Gopher+.

We do not recommend that you use this procedure unless you are sure the server supports Gopher+ because a constant used in
the Gopher+ Protocol greeting will conflict with the menu item type constant IdGopherItem_Redundant ( 3842) which could
appear in the menu as a first item.

To determine if a Gopher Server supports Gopher+, use the TIdGopherMenuItem.GopherPlusItem ( 993) property from the
gopher menu which is referring to the item you want.

The application is responsible for freeing the TIdGopherMenu ( 987) returned by this function.

TIdGopher.GetFile Method
Pascal
procedure GetFile(
ASelector: String;
ADestStream: TIdStream;
IsGopherPlus: Boolean = False;
AView: String = ''
);

984 Internet Direct (Indy) Version 10.1.5


Classes TIdGopher Class

Parameters
Parameters Description
ASelector Type is String.
ADestStream Type is TIdStream ( 3087).
IsGopherPlus Type is Boolean. Default value is False.
AView Type is String.

Description
GetFile is a method.

TIdGopher.GetMenu Method
Retrieves the Gopher menu.

Pascal
function GetMenu(
ASelector: String;
IsGopherPlus: Boolean = False;
AView: String = ''
): TIdGopherMenu;
Parameters
Parameters Description
ASelector the selector for the Gopher item or an empty string to get the root item.
IsGopherPlus Server supports Gopher+. Default value is False.
AView Alternative view listed. Default value is ''.

Returns
TIdGopherMenu ( 987) - The standard Gopher menu.

Description
GetMenu is a TIdGopherMenu ( 987) function used to retrieve a Gopher Menu. ISGopherPlus should be set to true for Gopher+
servers or false for non-gopher plus servers in case a menu starts with a "+". AView is an alternative view listed for the menu you
are retrieving with Gopher+.

The application is responsible for freeing the TIdGopherMenu ( 987) returned by this function.

TIdGopher.GetTextFile Method
Pascal
procedure GetTextFile(
ASelector: String;
ADestStream: TIdStream;
IsGopherPlus: Boolean = False;
AView: String = ''
);
Parameters
Parameters Description
ASelector Type is String.
ADestStream Type is TIdStream ( 3087).
IsGopherPlus Type is Boolean. Default value is False.
AView Type is String.

Description
GetTextFile is a method.

Internet Direct (Indy) Version 10.1.5 985


TIdGopher Class Classes

TIdGopher.Search Method
Perform a Gopher search using a query.

Pascal
function Search(
ASelector: String;
AQuery: String
): TIdGopherMenu;
Parameters
Parameters Description
ASelector the selector for the gopher item.
AQuery the Gopher query string.

Returns
TIdGopherMenu ( 987) - The Gopher menu returned for the query.

Description
Search is a TIdGopherMenu ( 987) function used to perform a Gopher search with the query specified by AQuery, and returns a
Gopher Menu resulting from the search. Gopher+ syntax is not supported in AQuery.

The application is responsible for freeing the TIdGopherMenu ( 987) returned by this function.

TIdGopher Properties
The Properties of the TIdGopher class are listed here.

Properties
Property Description
Host ( 986) IP Address or host name for the Gopher server.
Port ( 986) Port number for the connection to the Gopher server.

Legend
Property

TIdGopher.Host Property
IP Address or host name for the Gopher server.

Pascal
property Host;
Description
Host is a published String property that identifies the IP address or host name to use for the client connection to the Gopher server.

TIdGopher.Port Property
Port number for the connection to the Gopher server.

Pascal
property Port;
Description
Port is a TIdPort ( 3076) property that identifies the port number used for connecting to a Gopher server.

TIdGopher ( 982) overrides the definition of the Port property to assign the default value to IdPORT_GOPHER ( 4010), as
required in the Gopher protocol specification.

986 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherMenu Class

See Also
IdPORT_GOPHER ( 4010)

TIdGopher Events
The Events of the TIdGopher class are listed here.

Events
Event Description
OnMenuItem ( 987) Event handler for retrieved Gopher menu items.

Legend
Event

TIdGopher.OnMenuItem Event
Event handler for retrieved Gopher menu items.

Pascal
property OnMenuItem: TIdGopherMenuEvent;
Description
OnMenuItem is a TIdGopherMenuEvent ( 3029) event handler that is triggered for each menu item retrieved with the GetMenu (
985), Search ( 986), and GetExtendedMenu ( 984) methods. OnMenuItem is used to display gopher menu items while the
complete menu is downloaded.

An application must assign a procedure to the event handler in order to respond to the event notification.

See Also
TIdGopher.GetMenu ( 985)

TIdGopher.Search ( 986)

TIdGopher.GetExtendedMenu ( 984)

TIdGopherMenu Class
Collection of Gopher menu items.

File
IdGopher ( 4656)

Hierarchy

Pascal
TIdGopherMenu = class(TIdCollection);
Description
TIdGopherMenu is a collection of TIdGopherMenuItem ( 989) instances, and encapsulates a Gopher menu or a Gopher +
Extended Menu. TIdGopherMenu is returned by the following Gopher methods:

TIdGopher.GetExtendedMenu ( 984)
TIdGopher.GetMenu ( 985)

Internet Direct (Indy) Version 10.1.5 987


TIdGopherMenu Class Classes

TIdGopher.Search ( 986)

See Also
TIdGopher.GetExtendedMenu ( 984)

TIdGopher.GetMenu ( 985)

TIdGopher.Search ( 986)

IndySupport ( 15)

TIdGopherMenu Members
The following tables list the members exposed by TIdGopherMenu.

Properties
Property Description
Items ( 989) Gopher menu items in the collection.

Methods
Method Description
Add ( 988) Add a new Gopher menu item.
Create ( 989) Constructor for the object instance.

Legend
Method
Property

TIdGopherMenu Methods
The Methods of the TIdGopherMenu class are listed here.

Methods
Method Description
Add ( 988) Add a new Gopher menu item.
Create ( 989) Constructor for the object instance.

Legend
Method

TIdGopherMenu.Add Method
Add a new Gopher menu item.

Pascal
function Add: TIdGopherMenuItem;
Returns
TIdGopherMenuItem ( 989) - Gopher menu item added to the collection.

Description
Add is a TIdGopherMenuItem ( 989) function that returns a new TIdGopherMenuItem ( 989), and adds it to the TIdGopherMenu
( 987) collection. Add is primarily for internal use in the TIdGopher ( 982) component.

See Also
TIdGopherMenuItem ( 989)

TIdGopherMenu ( 987)

988 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherMenuItem Class

TIdGopher ( 982)

TIdGopherMenu.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; reintroduce;
Description
Create is the constructor for the object instance, and is used by TIdGopher.GetMenu ( 985) and TIdGopher.GetExtendedMenu (
984) to create the menu for the Gopher selector.

See Also
TIdGopher.GetMenu ( 985)

TIdGopher.GetExtendedMenu ( 984)

TIdGopherMenu Properties
The Properties of the TIdGopherMenu class are listed here.

Properties
Property Description
Items ( 989) Gopher menu items in the collection.

Legend
Property

TIdGopherMenu.Items Property
Gopher menu items in the collection.

Pascal
property Items [ Index: Integer ]: TIdGopherMenuItem;
Parameters
Parameters Description
Index Position in the collection.

Description
Items is an indexed TIdGopherMenuItem ( 989) property that provides access to the individual Gopher menu items in the
collection. Index values can range from 0 to Count-1. Items is the default property for TIdGopherMenu ( 987).

TIdGopherMenuItem Class
Implements a Gopher menu item.

File
IdGopher ( 4656)

Hierarchy

Internet Direct (Indy) Version 10.1.5 989


TIdGopherMenuItem Class Classes

Pascal
TIdGopherMenuItem = class(TIdCollectionItem);
Description
TIdGopherMenuItem is a TIdCollectionItem ( 3011) descendant that implements an Internet Gopher menu item, as described in
the Internet Standards document:

RFC 1436 - The Internet Gopher Protocol

TIdGopherMenuItem also implements support for the Gopher+ item block as described in the document:

Gopher+, Upward-Compatible Enhancements to the Internet Gopher protocol

See Also
IndySupport ( 15)

TIdGopherMenuItem Members
The following tables list the members exposed by TIdGopherMenuItem.

Properties
Property Description
AAbstract ( 992) Summary for the Gopher item.
AdminEMail ( 992)
Ask ( 992)
Geog ( 992)
GopherBlock ( 993)
GopherPlusItem ( 993)
ItemType ( 993)
LastModified ( 993)
Location ( 993)
Organization ( 993)
Port ( 993)
Selector ( 994)
Server ( 994)
Title ( 994)
URL ( 994)
Views ( 994) Alternate representations of the Gopher item.

Methods
Method Description
Create ( 991) Constructor for the object instance.
Destroy ( 991)
DoneSettingInfoBlock ( 991)

Legend
Constructor
virtual
Property
read only

TIdGopherMenuItem Methods
The Methods of the TIdGopherMenuItem class are listed here.

Methods
Method Description
Create ( 991) Constructor for the object instance.

990 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherMenuItem Class

Destroy ( 991)
DoneSettingInfoBlock ( 991)

Legend
Constructor
virtual

TIdGopherMenuItem.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Owner of the collection item.

Description
Create is the constructor for the object instance, and adds the new TIdGopherMenuItem ( 989) instance to the collection specified
in the ACollection parameter.

Create is used internally in TIdGopher.GetMenu ( 985) and TIdGopher.GetExtendedMenu ( 984) methods.

See Also
TIdGopher.GetMenu ( 985)

TIdGopher.GetExtendedMenu ( 984)

TIdGopherMenuItem.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is the overridden destrucor for the object instance.

TIdGopherMenuItem.DoneSettingInfoBlock Method
Pascal
procedure DoneSettingInfoBlock; virtual;
Description
DoneSettingInfoBlock virtual

TIdGopherMenuItem Properties
The Properties of the TIdGopherMenuItem class are listed here.

Properties
Property Description
AAbstract ( 992) Summary for the Gopher item.
AdminEMail ( 992)
Ask ( 992)
Geog ( 992)
GopherBlock ( 993)

Internet Direct (Indy) Version 10.1.5 991


TIdGopherMenuItem Class Classes

GopherPlusItem ( 993)
ItemType ( 993)
LastModified ( 993)
Location ( 993)
Organization ( 993)
Port ( 993)
Selector ( 994)
Server ( 994)
Title ( 994)
URL ( 994)
Views ( 994) Alternate representations of the Gopher item.

Legend
Property
read only

TIdGopherMenuItem.AAbstract Property
Summary for the Gopher item.

Pascal
property AAbstract: TIdStringList;
Description
AAbstract is a read-only TStringList property that contains a summary for the Gopher item; e.g. "Read about our great products".
AAbstract is available when using the TIdGopher.GetExtendedMenu ( 984) method and the Gopher Server ( 994) supports the
Gopher+ protocol.

The property name AAbstract is used in the Indy library to avoid a compiler conflict with the Abstract reserved word in Delphi.

See Also
TIdGopher.GetExtendedMenu ( 984)

TIdGopherMenuItem.AdminEMail Property
Pascal
property AdminEMail: TIdEMailAddressItem;
Description
AdminEMail is a Public read-only TIdEMailAddressItem ( 641) property

TIdGopherMenuItem.Ask Property
Pascal
property Ask: TIdHeaderList;
Description
Ask is a Public read-only TIdHeaderList ( 1024) property

TIdGopherMenuItem.Geog Property
Pascal
property Geog: String;
Description
Geog is a Public read-only String property.

992 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherMenuItem Class

TIdGopherMenuItem.GopherBlock Property
Pascal
property GopherBlock: TIdHeaderList;
Description
GopherBlock is a Public read-only TIdHeaderList ( 1024) property

TIdGopherMenuItem.GopherPlusItem Property
Pascal
property GopherPlusItem: Boolean;
Description
GopherPlusItem is a Public Boolean property.

TIdGopherMenuItem.ItemType Property
Pascal
property ItemType: Char;
Description
ItemType is a Public Char property.

TIdGopherMenuItem.LastModified Property
Pascal
property LastModified: String;
Description
LastModified is a Public read-only String property.

TIdGopherMenuItem.Location Property
Pascal
property Location: String;
Description
Location is a Public read-only String property

TIdGopherMenuItem.Organization Property
Pascal
property Organization: String;
Description
Organization is a Public read-only String property

TIdGopherMenuItem.Port Property
Pascal
property Port: Integer;

Internet Direct (Indy) Version 10.1.5 993


TIdGopherServer Class Classes

Description
Port is a Public Integer property.

TIdGopherMenuItem.Selector Property
Pascal
property Selector: String;
Description
Selector is a Public String property

TIdGopherMenuItem.Server Property
Pascal
property Server: String;
Description
Server is a Public String property.

TIdGopherMenuItem.Title Property
Pascal
property Title: String;
Description
Title is a Public String property.

TIdGopherMenuItem.URL Property
Pascal
property URL: String;
Description
URL is a Public read-only String property.

TIdGopherMenuItem.Views Property
Alternate representations of the Gopher item.

Pascal
property Views: TIdStringList;
Description
Views is a read-only TStringList property that contains the Gopher views available for the Gopher item. Gopher Views are
alternative forms of a document for different languages or in different formats. Views can be used when requesting the Gopher item
with TIdGopher.GetFile ( 984) or TIdGopher.GetMenu ( 985).

Views are available if you use the TIdGopher.GetExtendedMenu ( 984) method and the Gopher Server ( 994) supports the
Gopher+ protocol.

See Also
TIdGopher.GetFile ( 984)

TIdGopher.GetMenu ( 985)

TIdGopher.GetExtendedMenu ( 984)

994 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherServer Class

TIdGopherServer Class
Implements a Gopher server.

File
IdGopherServer ( 4658)

Hierarchy

Pascal
TIdGopherServer = class(TIdCustomTCPServer);
Description
TIdGopherServer is a TIdTCPServer ( 2375) descendant that implements a server for the Internet Gopher protocol, as described
in the Internet Standards document:

RFC 1436 - The Internet Gopher Protocol

TIdGopherServer also implements partial support for the Gopher+ protocol as described in the document:

Gopher+, Upward-Compatible Enhancements to the Internet Gopher protocol

Gopher is a distributed document system developed at the University of Minnesota as an attempt to make locating information
resources intuitive for users through a series of structured menus leading to documents or pointers to other protocols such as
Telnet and TN3270.

While Gopher has been succeeded by the World Wide Web, this is still useful for accessing legacy systems and has a low
overhead due to its simplicity and structure.

See Also
TIdTCPServer ( 2375) IndySupport ( 15)

TIdGopherServer Members
The following tables list the members exposed by TIdGopherServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AdminEmail ( 999) E-Mail address of the Gopher server maintainer.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
TruncateLength ( 999) Maximum length of a Gopher menu item.
TruncateUserFriendlyName ( 999) Indicates that display text can be truncated.

Internet Direct (Indy) Version 10.1.5 995


TIdGopherServer Class Classes

Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReturnGopherItem ( 996) Formats a Gopher menu item for display.
SendDirectoryEntry ( 997) Send a Gopher menu item to the client.
SetTruncateLength ( 998) Write method for the TruncateLength ( 999) property.
SetTruncateUserFriendlyName ( 998) Write method for the UserFriendlyName property.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnPlusRequest ( 1000) Server event handler for a Gopher+ request.
OnRequest ( 1000) Server event handler for Gopher requests.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdGopherServer Methods
The Methods of the TIdGopherServer class are listed here.

Methods
Method Description
ReturnGopherItem ( 996) Formats a Gopher menu item for display.
SendDirectoryEntry ( 997) Send a Gopher menu item to the client.
SetTruncateLength ( 998) Write method for the TruncateLength ( 999) property.
SetTruncateUserFriendlyName ( 998) Write method for the UserFriendlyName property.

Legend
Method

TIdGopherServer.ReturnGopherItem Method
Formats a Gopher menu item for display.

Pascal
function ReturnGopherItem(
ItemType: Char;

996 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherServer Class

UserFriendlyName: String;
RealResourceName: String;
HostServer: String;
HostPort: Integer
): String;
Parameters
Parameters Description
ItemType Gopher item type.
UserFriendlyName Display name for the menu item.
RealResourceName Item selector or TN3270 hint.
HostServer The server hosting the Gopher menu item.
HostPort The port number for the Gopher server.

Returns
String - Display values for the Gopher menu item.

Description
ReturnGopherItem is a String function that returns a properly formatted Gopher menu item provided with the information from the
parameters.

ItemType should be one of the following constants defined in GopherConsts.

TIdGopherServer.SendDirectoryEntry Method
Send a Gopher menu item to the client.

Pascal
procedure SendDirectoryEntry(
AContext: TIdContext;
ItemType: Char;
UserFriendlyName: String;
RealResourceName: String;
HostServer: String;
HostPort: Integer
);
Parameters
Parameters Description
AContext The client connection to receive the Gopher item.
ItemType The Gopher item type constant.
UserFriendlyName Name to display on client menus.
RealResourceName Item selector or a hint for logging into a Telnet or TN3270 service.
HostServer Gopher Server hosting the item.
HostPort Port number for the host.

Description
SendDirectoryEntry is a procedure used to send a Gopher menu item to the client connection specified in AThread.

ItemType contains a constant that identifies the item type, as defined in GopherConsts.pas, and normally contains of the following
values:

Value Meaning
IdGopherItem_Document ( 3840) Item is a file
IdGopherItem_Directory ( 3840) Item is a directory
IdGopherItem_CSO ( 3839) Item is a CSO phone-book server
IdGopherItem_Error ( 3840) Error
IdGopherItem_BinHex ( 3839) Item is a BinHexed Macintosh file

Internet Direct (Indy) Version 10.1.5 997


TIdGopherServer Class Classes

IdGopherItem_BinDOS ( 3839) Item is DOS binary archive of some sort. Client must read until the TCP connection
closes. Beware.
IdGopherItem_UUE ( 3844) Item is a UNIX ( 4539) uuencoded file
IdGopherItem_Search ( 3843) Item is an Index-Search server
IdGopherItem_Telnet ( 3843) Item points to a text-based telnet session
IdGopherItem_Binary ( 3839) Item is a binary file. Client must read until the TCP connection closes. Beware.
IdGopherItem_Redundant ( 3842) Item is a redundant server
IdGopherItem_TN3270 ( 3844) Item points to a text-based tn3270 session
IdGopherItem_GIF ( 3840) Item is a GIF format graphics file
IdGopherItem_Image ( 3841) Item is some kind of image file Client decides how to display
IdGopherItem_HTML ( 3841) Website
IdGopherItem_MIME ( 3842) Mime encoded file
IdGopherItem_Information ( 3841) Not a file, just information

TIdGopherServer.SetTruncateLength Method
Write method for the TruncateLength ( 999) property.

Pascal
procedure SetTruncateLength(
length: Integer
);
Description
SetTruncateLength is a procedure that provides write acess to the TruncateLength ( 999) property, and updates the maximum
length of a Gopher menu item line.

See Also
TruncateLength ( 999)

TIdGopherServer.SetTruncateUserFriendlyName Method
Write method for the UserFriendlyName property.

Pascal
procedure SetTruncateUserFriendlyName(
truncate: Boolean
);
Description
SetTruncateUserFriendlyName is a procedure that provides write access to the TruncateUserFriendlyName ( 999) property, and
updates the value for the property.

See Also
TruncateUserFriendlyName ( 999)

TIdGopherServer Properties
The Properties of the TIdGopherServer class are listed here.

Properties
Property Description
AdminEmail ( 999) E-Mail address of the Gopher server maintainer.

998 Internet Direct (Indy) Version 10.1.5


Classes TIdGopherServer Class

TruncateLength ( 999) Maximum length of a Gopher menu item.


TruncateUserFriendlyName ( 999) Indicates that display text can be truncated.

Legend
Property

TIdGopherServer.AdminEmail Property
E-Mail address of the Gopher server maintainer.

Pascal
property AdminEmail: String;
Description
AdminEmail is a String property that identifies the name and/or email address for the maintainer of the Gopher server. For example:

TIdGopherServer.TruncateLength Property
Maximum length of a Gopher menu item.

Pascal
property TruncateLength: Integer;
Description
TruncateLength is an Integer property that identifies the maximum length of the display text for a Gopher menu item.

See Also
TIdGopherMenuItem ( 989)

TIdGopherServer.TruncateUserFriendlyName Property
Indicates that display text can be truncated.

Pascal
property TruncateUserFriendlyName: Boolean;
Description
TruncateUserFriendlyName is a Boolean property that indicates if the display text for a Gopher menu item can be truncated to the
length in TruncateLength ( 999).

See Also
TruncateLength ( 999)

TIdGopherServer Events
The Events of the TIdGopherServer class are listed here.

Events
Event Description
OnPlusRequest ( 1000) Server event handler for a Gopher+ request.
OnRequest ( 1000) Server event handler for Gopher requests.

Legend
Event

Internet Direct (Indy) Version 10.1.5 999


TIdHash Class Classes

TIdGopherServer.OnPlusRequest Event
Server event handler for a Gopher+ request.

Pascal
property OnPlusRequest: TPlusRequestEvent;
Parameters
Parameters Description
AThread Client connection making the request.
ARequest The Gopher selector for the requested item.
APlusData The Gopher+ command and additional information for the request.

Description
OnPlusRequest is a TPlusRequestEvent ( 3116) event handler that allows the server application to respond to Gopher+ requests.

APlusData can includes the Gopher+ command in the first byte and additional information such as a requested View for an item
and sometimes ASK block data sent from the client.

The command byte in APlusData can be one of the following:

TIdGopherServer.OnRequest Event
Server event handler for Gopher requests.

Pascal
property OnRequest: TRequestEvent;
Parameters
Parameters Description
AThread The client connection making the request.
ARequest The Gopher selector from the client.

Description
OnRequest is a TRequestEvent ( 3117) event handler that allows the server application to respond to Gopher requests from the
client connection in AThread.

ARequest is the selector read from the client connection.

TIdHash Class
Abstract base class for hashing algorithm ancestor classes.

File
IdHash ( 4658)

Hierarchy

Pascal
TIdHash = class(TIdBaseObject);
Description
TIdHash is a TObject descendant and the abstract ancestor for classes that implement a specific hashing algorithm to calculate a
hash value of a specific size.

TIdHash is an abstract ancestor class that does not have any properties, methods, or events.

1000 Internet Direct (Indy) Version 10.1.5


Classes TIdHash128 Class

See Also
TIdHash16 ( 1003)

TIdHash32 ( 1008)

TIdHash128 ( 1001)

TIdHash160 ( 1006)

TIdHash128 Class
Implements a class to calculate a 128-bit hash value based on string- or stream-based input values.

File
IdHash ( 4658)

Hierarchy

Pascal
TIdHash128 = class(TIdHash);
Description
TIdHash128 is a TIdHash ( 1000) descendant that implements calculation of a 128-bit hash value based on string- or
stream-based input values.

In TIdHash128, an abstract virtual method is declared for calculating the hash value for the input data from a stream. Applications
should create instances of a descendant class that implements the abstract method for calculating the hash value for the content in
a stream.

See Also
TIdHashMessageDigest ( 1016)

TIdHash128.HashValue ( 1002)

IndySupport ( 15)

TIdHash128 Members
The following tables list the members exposed by TIdHash128.

Methods
Method Description
AsHex ( 1002) Converts the hash value to it's hexadecimal representation.
HashValue ( 1002)

Legend
Method
abstract

TIdHash128 Methods
The Methods of the TIdHash128 class are listed here.

Internet Direct (Indy) Version 10.1.5 1001


TIdHash128 Class Classes

Methods
Method Description
AsHex ( 1002) Converts the hash value to it's hexadecimal representation.
HashValue ( 1002)

Legend
Method
abstract

TIdHash128.AsHex Method
Converts the hash value to it's hexadecimal representation.

Pascal
class function AsHex(
const AValue: T4x4LongWordRecord
): string;
Parameters
Parameters Description
AValue The record containg LongWord values to converted to hex.

Returns
String - Hexadecimal representation of the hash value.

Description
AsHex is String class function that converts the hash value specified in AValue to it's hexadecimal representation. AsHex allocates
a string with the length needed to represent the multiple LongWord values in AValue. AsHex allows uses of the method without an
existing instance of the TIdHash128 ( 1001) class.

AsHex is used in TIdPOP3.Connect ( 1775) when the MD5 hash value is converted to hex for used in the APOP authentication
mechanism.

Example
sHex := TIdHash128.AsHex(HashValue(sUsername + sPassword));
sAPOPDigest := Lowercase(sHex);
See Also
TIdPOP3.Connect ( 1775)

TIdHash128.HashValue Method
Overload List

Method Description
TIdHash128.HashValue (string) ( Implements calculation of a hash value for input data.
1003)
TIdHash128.HashValue (TIdStream)
( 1002)

TIdHash128.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): T4x4LongWordRecord; virtual; abstract; overload;

1002 Internet Direct (Indy) Version 10.1.5


Classes TIdHash16 Class

Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
T4x4LongWordRecord ( 2997)

Description
TIdHash128.HashValue overloaded abstract virtual method.

See Also
TIdHash128.HashValue

TIdHash128.HashValue Method (string)


Implements calculation of a hash value for input data.

Pascal
function HashValue(
const ASrc: string
): T4x4LongWordRecord; overload;
Parameters
Parameters Description
ASrc String containing data used to calculate the hash value.

Returns
T4x4LongWordRecord ( 2997) - 128-bit hash value for the input data.

Description
HashValue is an overloaded T4x4LongWordRecord ( 2997) function in TIdHash128 ( 1001) that specifies the mechanism used
to calculate the 128-bit hash value for the input data.

The string-based variant of HashValue creates a TIdStream ( 3087) instance used to calculate the hash value, and calls the
overloaded HashValue method.

The stream-based variant of HashValue is an abstract virtual function that must be reimplemented in a descendant class, like
TIdHashMessageDigest ( 1016), to support the specifics of the hashing algorithm.

See Also
TIdHash128.HashValue

TIdHashMessageDigest ( 1016)

IndySupport ( 15)

TIdHash16 Class
Implements a class to calculate a 16-bit hash value based on string- or stream-based input values.

File
IdHash ( 4658)

Hierarchy

Pascal
TIdHash16 = class(TIdHash);

Internet Direct (Indy) Version 10.1.5 1003


TIdHash16 Class Classes

Description
TIdHash16 is a TIdHash ( 1000) descendant that implements calculation of a 16-bit hash value based on string- or stream-based
input values.

TIdHash16 is a base class that specifies an abstract virtual method for calculating the hash value for the input data from a stream.
Applications should create instances of a descendant class that implements the abstract methods.

See Also
TIdHash16

TIdHashCRC16 ( 1011)

IndySupport ( 15)

TIdHash16 Members
The following tables list the members exposed by TIdHash16.

Methods
Method Description
HashByte ( 1004)
HashStart ( 1005)
HashValue ( 1005)

Legend
Method
abstract

TIdHash16 Methods
The Methods of the TIdHash16 class are listed here.

Methods
Method Description
HashByte ( 1004)
HashStart ( 1005)
HashValue ( 1005)

Legend
Method
abstract

TIdHash16.HashByte Method
Pascal
procedure HashByte(
var VRunningHash: Word;
const AByte: Byte
); virtual; abstract;
Parameters
Parameters Description
VRunningHash Scope is var. Type is Word.
AByte Scope is const. Type is Byte.

Description
abstract virtual

1004 Internet Direct (Indy) Version 10.1.5


Classes TIdHash16 Class

TIdHash16.HashStart Method
Pascal
procedure HashStart(
var VRunningHash: Word
); virtual; abstract;
Parameters
Parameters Description
VRunningHash Scope is var. Type is Word.

Description
abstract virtual

TIdHash16.HashValue Method
Overload List

Method Description
TIdHash16.HashValue (string) ( 1005)
TIdHash16.HashValue (TIdStream)
( 1005)

TIdHash16.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): Word; virtual; abstract; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
Word

Description
TIdHash16.HashValue overloaded abstract virtual method.

See Also
TIdHash16.HashValue

TIdHash16.HashValue Method (string)


Pascal
function HashValue(
const ASrc: string
): Word; overload;
Parameters
Parameters Description
ASrc String containing data used to calculate the hash value.

Returns
Word - 16-bit hash value for the input data.

Internet Direct (Indy) Version 10.1.5 1005


TIdHash160 Class Classes

Description
HashValue is an overloaded Word function in TIdHash16 ( 1003) that specifies the mechanism used to calculate the 16-bit hash
value for the input data.

The stream-based variant of HashValue is an abstract virtual function that must be reimplemented in a descendant class, like
TIdHashCRC16 ( 1011), to support the specifics of the hashing algorithm.

The string-based variant of HashValue relies on the overloaded implementation to calculate the hash value.

See Also
TIdHash16.HashValue

TIdHashCRC16 ( 1011)

IndySupport ( 15)

TIdHash160 Class
Implements a class to calculate a 160-bit hash value based on string- or stream-based input values.

File
IdHash ( 4658)

Hierarchy

Pascal
TIdHash160 = class(TIdHash);
Description
TIdHash160 is a TIdHash ( 1000) descendant that implements calculation of a 160-bit hash value based on string- or
stream-based input values.

In TIdHash160, an abstract virtual method is declared for calculating the hash value for the input data from a stream. Applications
should create instances of a descendant class that implements the abstract method for calculating the hash value for the content in
a stream.

See Also
TIdHashSHA1 ( 1022)

TIdHash160.HashValue ( 1007)

IndySupport ( 15)

TIdHash160 Members
The following tables list the members exposed by TIdHash160.

Methods
Method Description
AsHex ( 1007) Converts the hash value to it's hexadecimal representation.
HashValue ( 1007)

Legend
Method
abstract

1006 Internet Direct (Indy) Version 10.1.5


Classes TIdHash160 Class

TIdHash160 Methods
The Methods of the TIdHash160 class are listed here.

Methods
Method Description
AsHex ( 1007) Converts the hash value to it's hexadecimal representation.
HashValue ( 1007)

Legend
Method
abstract

TIdHash160.AsHex Method
Converts the hash value to it's hexadecimal representation.

Pascal
class function AsHex(
const AValue: T5x4LongWordRecord
): string;
Parameters
Parameters Description
AValue The record containg LongWord values to converted to hex.

Returns
String - Hexadecimal representation of the hash value.

Description
AsHex is String class function that converts the hash value specified in AValue to it's hexadecimal representation. AsHex allocates
a string with the length needed to represent the multiple LongWord values in AValue. AsHex allows uses of the method without an
existing instance of the TIdHash160 ( 1006) class.

AsHex calls the ToHex ( 2926) function to convert the data in AValue to it's hexadecimal representation.

See Also
ToHex ( 2926)

TIdHashSHA1 ( 1022)

TIdHash160.HashValue Method
Overload List

Method Description
TIdHash160.HashValue (string) ( Calculates a 160-bit hash value for input data.
1008)
TIdHash160.HashValue (TIdStream)
( 1007)

TIdHash160.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): T5x4LongWordRecord; virtual; abstract; overload;

Internet Direct (Indy) Version 10.1.5 1007


TIdHash32 Class Classes

Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
T5x4LongWordRecord ( 2998)

Description
TIdHash160.HashValue overloaded abstract virtual method.

See Also
TIdHash160.HashValue

TIdHash160.HashValue Method (string)


Calculates a 160-bit hash value for input data.

Pascal
function HashValue(
const ASrc: string
): T5x4LongWordRecord; overload;
Parameters
Parameters Description
ASrc String containing input data for the hash value calculation.

Returns
T5x4LongWordRecord ( 2998) - 160-Bit hash value for the calculation.

Description
HashValue is an overloaded class method used to calculate a 160-bit hash value from input data provided in parameters to the
method.

HashValue creates a TIdStream ( 3087) instance used to write the value in ASrc, and calls the overloaded Stream method.

As a class method, HashValue does not require an existing instance of TIdHash160 ( 1006) to perform the hash value calculation.

The stream-based variant of HasHValue is an abstract virtual method, and must be overridden in a descendant class that
implements the specifics of a hashing algorithm (like TIdHashSHA1 ( 1022)).

See Also
TIdHash160.HashValue

TIdHashSHA1.HashValue ( 1023)

TIdHash32 Class
Implements a class to calculate a 32-bit hash value based on string- or stream-based input values.

File
IdHash ( 4658)

Hierarchy

Pascal
TIdHash32 = class(TIdHash);

1008 Internet Direct (Indy) Version 10.1.5


Classes TIdHash32 Class

Description
TIdHash32 is a TIdHash ( 1000) descendant that implements calculation of a 32-bit hash value based on string- or stream-based
input values.

TIdHash32 is a base class that specifies an abstract virtual method for calculating the hash value for the input data from a stream.
Applications should create instances of a descendant class that implements the abstract methods.

See Also
TIdHash32.HashValue ( 1010)

TIdHashCRC32 ( 1013)

IndySupport ( 15)

TIdHash32 Members
The following tables list the members exposed by TIdHash32.

Methods
Method Description
HashByte ( 1009)
HashStart ( 1010)
HashValue ( 1010)

Legend
Method
abstract

TIdHash32 Methods
The Methods of the TIdHash32 class are listed here.

Methods
Method Description
HashByte ( 1009)
HashStart ( 1010)
HashValue ( 1010)

Legend
Method
abstract

TIdHash32.HashByte Method
Pascal
procedure HashByte(
var VRunningHash: LongWord;
const AByte: Byte
); virtual; abstract;
Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.
AByte Scope is const. Type is Byte.

Description
abstract virtual

Internet Direct (Indy) Version 10.1.5 1009


TIdHash32 Class Classes

TIdHash32.HashStart Method
Pascal
procedure HashStart(
var VRunningHash: LongWord
); virtual; abstract;
Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.

Description
abstract virtual

TIdHash32.HashValue Method
Overload List

Method Description
TIdHash32.HashValue (string) ( 1010) Implements calculation of a hash value for input data.
TIdHash32.HashValue (TIdStream)
( 1010)

TIdHash32.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): LongWord; virtual; abstract; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
LongWord

Description
TIdHash32.HashValue overloaded abstract virtual method.

See Also
TIdHash32.HashValue

TIdHash32.HashValue Method (string)


Implements calculation of a hash value for input data.

Pascal
function HashValue(
const ASrc: string
): LongWord; overload;
Parameters
Parameters Description
ASrc String containing data used to calculate the hash value.

Returns
LongWord - Hash value for the input data.

1010 Internet Direct (Indy) Version 10.1.5


Classes TIdHashCRC16 Class

Description
HashValue is an overloaded LongWord function in TIdHash32 ( 1008) that specifies the mechanism used to calculate the 32-bit
hash value for the input data.

The stream-based variant of HashValue is an abstract virtual function that must be reimplemented in a descendant class, like
TIdHashCRC32 ( 1013), to support the specifics of the hashing algorithm.

The string-based variant of HashValue relies on the overloaded implementation to calculate the hash value.

See Also
TIdHashCRC32 ( 1013)

IndySupport ( 15) TIdHash32.HashValue

TIdHashCRC16 Class
Implements methods used to calculate a 16-bit CRC value for data in an input stream.

File
IdHashCRC ( 4659)

Hierarchy

Pascal
TIdHashCRC16 = class(TIdHash16);
Description
TIdHashCRC16 is a TIdHash16 ( 1003) descendant that implements methods used to calculate a 16-bit Cyclic Redundnacy
Check (CRC) value for data in an input stream.

TIdHashCRC16 uses a pre-computed 512-byte lookup table for faster calculation of CRC values.

See Also
TIdHash16 ( 1003)

TIdHashCRC16.HashValue ( 1012)

IndySupport ( 15)

TIdHashCRC16 Members
The following tables list the members exposed by TIdHashCRC16.

Methods
Method Description
HashByte ( 1012)
HashStart ( 1012)
HashValue ( 1012)
HashValue ( 1005)

Legend
Method
virtual
abstract

Internet Direct (Indy) Version 10.1.5 1011


TIdHashCRC16 Class Classes

TIdHashCRC16 Methods
The Methods of the TIdHashCRC16 class are listed here.

Methods
Method Description
HashByte ( 1012)
HashStart ( 1012)
HashValue ( 1012)

Legend
Method
virtual

TIdHashCRC16.HashByte Method
Pascal
procedure HashByte(
var VRunningHash: Word;
const AByte: Byte
); override;
Parameters
Parameters Description
VRunningHash Scope is var. Type is Word.
AByte Scope is const. Type is Byte.

Description
HashByte is a overridden method.

TIdHashCRC16.HashStart Method
Pascal
procedure HashStart(
var VRunningHash: Word
); override;
Parameters
Parameters Description
VRunningHash Scope is var. Type is Word.

Description
HashStart is a overridden method.

TIdHashCRC16.HashValue Method
Pascal
function HashValue(
AStream: TIdStream
): Word; override;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
Word

1012 Internet Direct (Indy) Version 10.1.5


Classes TIdHashCRC32 Class

Description
HashValue is a overridden method.

HashValue returns a Word value.

TIdHashCRC32 Class
Implements methods used to calculate a 32-bit CRC value for data in an input stream.

File
IdHashCRC ( 4659)

Hierarchy

Pascal
TIdHashCRC32 = class(TIdHash32);
Description
TIdHashCRC32 is a TIdHash32 ( 1008) descendant that implements methods used to calculate a 32-bit Cyclic Redundnacy
Check (CRC) value for data in an input stream. TIdHashCRC32 uses a pre-computed 1024-byte lookup table for faster calculation
of CRC values.

See Also
TIdHash32 ( 1008)

TIdHashCRC32.HashValue ( 1014)

IndySupport ( 15)

TIdHashCRC32 Members
The following tables list the members exposed by TIdHashCRC32.

Methods
Method Description
HashByte ( 1014)
HashStart ( 1014)
HashValue ( 1014)
HashValue ( 1010)

Legend
Method
virtual
abstract

TIdHashCRC32 Methods
The Methods of the TIdHashCRC32 class are listed here.

Methods
Method Description
HashByte ( 1014)
HashStart ( 1014)
HashValue ( 1014)

Internet Direct (Indy) Version 10.1.5 1013


TIdHashElf Class Classes

Legend
Method
virtual

TIdHashCRC32.HashByte Method
Pascal
procedure HashByte(
var VRunningHash: LongWord;
const AByte: Byte
); override;
Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.
AByte Scope is const. Type is Byte.

Description
HashByte is a overridden method.

TIdHashCRC32.HashStart Method
Pascal
procedure HashStart(
var VRunningHash: LongWord
); override;
Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.

Description
HashStart is a overridden method.

TIdHashCRC32.HashValue Method
Pascal
function HashValue(
AStream: TIdStream
): LongWord; override;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
LongWord

Description
HashValue is a overridden method.

HashValue returns a LongWord value.

TIdHashElf Class
Implements a UNIX ( 4539) ELF compatible hash calculation class.

1014 Internet Direct (Indy) Version 10.1.5


Classes TIdHashElf Class

File
IdHashElf ( 4659)

Hierarchy

Pascal
TIdHashElf = class(TIdHash32);
Description
TIdHashElf is a TIdHash32 ( 1008) descendant that implements calculation of hash values using a hashing algorithm compatible
with the UNIX ( 4539) ELF object file and linker format.

See Also
TIdHashElf.HashValue ( 1016)

IndySupport ( 15)

TIdHashElf Members
The following tables list the members exposed by TIdHashElf.

Methods
Method Description
HashByte ( 1015)
HashStart ( 1016)
HashValue ( 1016)
HashValue ( 1010)

Legend
Method
virtual
abstract

TIdHashElf Methods
The Methods of the TIdHashElf class are listed here.

Methods
Method Description
HashByte ( 1015)
HashStart ( 1016)
HashValue ( 1016)

Legend
Method
virtual

TIdHashElf.HashByte Method
Pascal
procedure HashByte(
var VRunningHash: LongWord;
const AByte: Byte
); override;

Internet Direct (Indy) Version 10.1.5 1015


TIdHashMessageDigest Class Classes

Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.
AByte Scope is const. Type is Byte.

Description
HashByte is a overridden method.

TIdHashElf.HashStart Method
Pascal
procedure HashStart(
var VRunningHash: LongWord
); override;
Parameters
Parameters Description
VRunningHash Scope is var. Type is LongWord.

Description
HashStart is a overridden method.

TIdHashElf.HashValue Method
Pascal
function HashValue(
AStream: TIdStream
): LongWord; override;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
LongWord

Description
HashValue is a overridden method.

HashValue returns a LongWord value.

TIdHashMessageDigest Class
Specifies the abstract base class for Indy message digest classes.

File
IdHashMessageDigest ( 4660)

Hierarchy

Pascal
TIdHashMessageDigest = class(TIdHash128);
Description
TIdHashMessageDigest is a TIdHash128 ( 1001) descendant that acts an abstract base class for Indy classes that use a

1016 Internet Direct (Indy) Version 10.1.5


Classes TIdHashMessageDigest2 Class

message digest algorithm to produce a 128-bit "fingerprint" for arbitrary bytes values in an input stream.

Use TIdHashMessageDigest2 ( 1017), TIdHashMessageDigest4 ( 1019), or TIdHashMessageDigest5 ( 1021) descendant


classes to access a specific hashing algorithm.

See Also
TIdHash128 ( 1001)

TIdHashMessageDigest2 ( 1017)

TIdHashMessageDigest4 ( 1019)

TIdHashMessageDigest5 ( 1021)

TIdHashMessageDigest2 Class
Implements the RSA-MD2 message digest encryption algorithm.

File
IdHashMessageDigest ( 4660)

Hierarchy

Pascal
TIdHashMessageDigest2 = class(TIdHashMessageDigest);
Description
TIdHashMessageDigest2 is a TIdHashMessageDigest ( 1016) descendant that implements the RSA-MD2 encryption algorithm as
described in the Internet Standards documents:

RFC 1115 - Privacy Enhancement for Internet Electronic Mail, Part III - Algorithms, Modes, and Identifiers

RFC 1319 - The MD2 Message-Digest Algorithm

TIdHashMessageDigest2 can be used in various cryptography implementations that require the RSA-MD2 algorithm, such as:

RFC 1423 - Privacy Enhancement for Internet Electronic Mail, Part III: Algorithms, Modes, and Identifiers

RFC 1507- Distributed Authentication Security Service

RFC 1750 - Randomness Recommendations for Security

RFC 2313 - PKCS #1: RSA Encryption Version 1.5

RFC 2315 - PKCS #7: Cryptographic Message Syntax Version 1.5

RFC 2440, OpenPGP Message Format

RFC 2459- Internet X.509 Public Key Infrastructure Certificate and CRL Profile

RFC 2660 - The Secure HyperText Transfer Protocol

See Also
TIdHashMessageDigest ( 1016)

TIdHashMessageDigest4 ( 1019)

TIdHashMessageDigest5 ( 1021)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 1017


TIdHashMessageDigest2 Class Classes

TIdHashMessageDigest2 Members
The following tables list the members exposed by TIdHashMessageDigest2.

Methods
Method Description
AsHex ( 1002) Converts the hash value to it's hexadecimal representation.
HashValue ( 1002)
HashValue ( 1018)

Legend
Method
abstract
virtual

TIdHashMessageDigest2 Methods
The Methods of the TIdHashMessageDigest2 class are listed here.

Methods
Method Description
HashValue ( 1018)

Legend
Method
virtual

TIdHashMessageDigest2.HashValue Method
Overload List

Method Description
TIdHashMessageDigest2.HashValue
(TIdStream) ( 1018)
TIdHashMessageDigest2.HashValue
(TIdStream, Int64, Int64) ( 1019)

TIdHashMessageDigest2.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): T4x4LongWordRecord; override;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
T4x4LongWordRecord ( 2997)

Description
HashValue is a overridden method.

HashValue returns a T4x4LongWordRecord ( 2997) value.

1018 Internet Direct (Indy) Version 10.1.5


Classes TIdHashMessageDigest4 Class

TIdHashMessageDigest2.HashValue Method (TIdStream, Int64, Int64)


Pascal
function HashValue(
AStream: TIdStream;
const ABeginPos: Int64;
const AEndPos: Int64
): T4x4LongWordRecord; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).
ABeginPos Scope is const. Type is Int64.
AEndPos Scope is const. Type is Int64.

Returns
T4x4LongWordRecord ( 2997)

Description
HashValue is a overloaded method.

HashValue returns a T4x4LongWordRecord ( 2997) value.

See Also
TIdHashMessageDigest2.HashValue

TIdHashMessageDigest4 Class
Implements the MD4 message digest encryption algorithm.

File
IdHashMessageDigest ( 4660)

Hierarchy

Pascal
TIdHashMessageDigest4 = class(TIdHashMessageDigest);
Description
TIdHashMessageDigest4 is a TIdHashMessageDigest ( 1016) descendant that implements the RSA-MD4 encryption algorithm as
described in the Internet Standards document:

RFC 1186 - MD4 Message Digest Algorithm

TIdHashMessageDigest4 can be used in various cryptography implementations that require the RSA-MD4 algorithm. The
RSA-MD4 algorithm takes an input message of an arbitrary length and produces a 128-bit "fingerprint" or "message digest" of the
input.

The MD4 algorithm is used for digital signature applications, where a large file must be "compressed" in a secure manner before
being signed with the RSA public-key cryptosystem.

The MD4 algorithm has been placed in the public domain.

See Also
TIdHashMessageDigest ( 1016)

TIdHashMessageDigest2 ( 1017)

TIdHashMessageDigest5 ( 1021)

Internet Direct (Indy) Version 10.1.5 1019


TIdHashMessageDigest4 Class Classes

IndySupport ( 15)

TIdHashMessageDigest4 Members
The following tables list the members exposed by TIdHashMessageDigest4.

Methods
Method Description
AsHex ( 1002) Converts the hash value to it's hexadecimal representation.
HashValue ( 1002)
HashValue ( 1020)

Legend
Method
abstract
virtual

TIdHashMessageDigest4 Methods
The Methods of the TIdHashMessageDigest4 class are listed here.

Methods
Method Description
HashValue ( 1020)

Legend
Method
virtual

TIdHashMessageDigest4.HashValue Method
Overload List

Method Description
TIdHashMessageDigest4.HashValue
(TIdStream) ( 1020)
TIdHashMessageDigest4.HashValue
(TIdStream, Int64, Int64) ( 1021)

TIdHashMessageDigest4.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): T4x4LongWordRecord; override;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
T4x4LongWordRecord ( 2997)

Description
HashValue is a overridden method.

HashValue returns a T4x4LongWordRecord ( 2997) value.

1020 Internet Direct (Indy) Version 10.1.5


Classes TIdHashMessageDigest5 Class

TIdHashMessageDigest4.HashValue Method (TIdStream, Int64, Int64)


Pascal
function HashValue(
AStream: TIdStream;
const ABeginPos: Int64;
const AEndPos: Int64
): T4x4LongWordRecord; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).
ABeginPos Scope is const. Type is Int64.
AEndPos Scope is const. Type is Int64.

Returns
T4x4LongWordRecord ( 2997)

Description
HashValue is a overloaded method.

HashValue returns a T4x4LongWordRecord ( 2997) value.

See Also
TIdHashMessageDigest4.HashValue

TIdHashMessageDigest5 Class
Implements the MD5 message digest encryption algorithm.

File
IdHashMessageDigest ( 4660)

Hierarchy

Pascal
TIdHashMessageDigest5 = class(TIdHashMessageDigest4);
Description
TIdHashMessageDigest5 is a TIdHashMessageDigest ( 1016) descendant that implements the RSA-MD5 encryption algorithm as
described in the Internet Standards document:

RFC 1321 - The MD5 Message-Digest Algorithm

TIdHashMessageDigest5 implements the MD5 algorithm used for digital signature applications, where a large file must be
"compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.
The RSA-MD5 algorithm takes an input message of an arbitrary length and produces a 128-bit "fingerprint" or "message digest" of
the input.

The MD5 algorithm is an extension of the MD4 message-digest algorithm. MD5 is slightly slower than MD4, but is more
"conservative" in design. MD5 exists to compensate for potential security holes that exist in MD4. The MD5 algorithm differs from
MD4 in the following ways:

A fourth round operation is added to the algorithm. Each step now has a unique additive constant. Rounding in second step of the
algorithm has been made less symmetrical than it's MD4 predecessor. Each step accumulates the result of the previous step
promoting an "avalanche effect". The input word order in rounds 2 and 3 is changed to make these patterns less predictable and
repetitive. The shift amounts in each round have been approximately optimized, to yield a faster "avalanche effect." The shifts in

Internet Direct (Indy) Version 10.1.5 1021


TIdHashSHA1 Class Classes

each of the rounds is distinct.

TIdHashMessageDigest5 can be used in various cryptography implementations that require the RSA-MD5 algorithm. Some MD5
implementations are described in the following documents:

RFC 1828 - IP Authentication using Keyed MD5

RFC 1864 - The Content-MD5 Header Field

RFC 2082 - RIP-2 MD5 Authentication

RFC 2085 - HMAC-MD5 IP Authentication with Replay Prevention

RFC 2385 - Protection of BGP Sessions via the TCP MD5 Signature Option

RFC 2537 - RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)

The MD5 algorithm has been placed in the public domain.

See Also
TIdHashMessageDigest ( 1016)

TIdHashMessageDigest2 ( 1017)

TIdHashMessageDigest4 ( 1019)

IndySupport ( 15)

TIdHashSHA1 Class
Implements a hashing class for the Secure Hash Algorithm 1 (SHA1).

File
IdHashSHA1 ( 4660)

Hierarchy

Pascal
TIdHashSHA1 = class(TIdHash160);
Description
TIdHashSHA1 is a TIdHash160 ( 1006) descendant that implements the Secure Hash Algorithm 1 (SHA1), as described in the
Internet Standards documents:

RFC 3174 - US Secure Hash Algorithm 1 (SHA1)

TIdHashSHA1 is based on principles similar to those used by Professor Ronald L. Rivest of MIT when designing the MD4 message
digest algorithm, as described in the Internet Standards documents:

RFC 1320 - The MD4 Message-Digest Algorithm

RFC 1321 - The MD5 Message-Digest Algorithm

TIdHashSHA1 implements the Secure Hash Algorithm 1 (SHA1) which computes a condensed representation of a message or a
data file, and produces a 160-bit output called a message digest. The message digest be input to a signature algorithm which
generates or verifies the signature for a message.

SHA1 is called secure because it is computationally infeasible to find a message which corresponds to a given message digest, or
to find two different messages which produce the same message digest. Any change to a message in transit will, with very high
probability, result in a different message digest, and the signature will fail to verify.

TIdHashSHA1 extends the ancestor class by providing an overridden HashValue ( 1023) method that implements the SHA1
algorithm. TIdHashSHA1 also includes protected members and methods required to manage the buffer and checksum values

1022 Internet Direct (Indy) Version 10.1.5


Classes TIdHashSHA1 Class

required for the algorithm.

See Also
TIdHash160 ( 1006)

TIdHashSHA1 Members
The following tables list the members exposed by TIdHashSHA1.

Methods
Method Description
AsHex ( 1007) Converts the hash value to it's hexadecimal representation.
HashValue ( 1007)
HashValue ( 1023)

Legend
Method
abstract
virtual

TIdHashSHA1 Methods
The Methods of the TIdHashSHA1 class are listed here.

Methods
Method Description
HashValue ( 1023)

Legend
Method
virtual

TIdHashSHA1.HashValue Method
Overload List

Method Description
TIdHashSHA1.HashValue
(TIdStream) ( 1023)
TIdHashSHA1.HashValue (TIdStream,
Int64, Int64) ( 1024)

TIdHashSHA1.HashValue Method (TIdStream)


Pascal
function HashValue(
AStream: TIdStream
): T5x4LongWordRecord; override; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).

Returns
T5x4LongWordRecord ( 2998)

Internet Direct (Indy) Version 10.1.5 1023


TIdHeaderList Class Classes

Description
HashValue is a overridden,overloaded method.

HashValue returns a T5x4LongWordRecord ( 2998) value.

See Also
TIdHashSHA1.HashValue

TIdHashSHA1.HashValue Method (TIdStream, Int64, Int64)


Pascal
function HashValue(
AStream: TIdStream;
const ABeginPos: Int64;
const AEndPos: Int64
): T5x4LongWordRecord; overload;
Parameters
Parameters Description
AStream Type is TIdStream ( 3087).
ABeginPos Scope is const. Type is Int64.
AEndPos Scope is const. Type is Int64.

Returns
T5x4LongWordRecord ( 2998)

Description
HashValue is a overloaded method.

HashValue returns a T5x4LongWordRecord ( 2998) value.

See Also
TIdHashSHA1.HashValue

TIdHeaderList Class
Implements a collection of header names and values.

File
IdHeaderList ( 4661)

Hierarchy

Pascal
TIdHeaderList = class(TIdStringList);
Description
TIdHeaderList is a TIdStringList ( 3088) descendant that implements a collection of header names and values, and facilitates the
processing of headers used in many protocols such as Gopher+, HTTP, NNTP, POP3, SMTP, and in the storage of RFC-compliant
messages.

Features include the use of a ":" instead of a comma or equal sign ("=") for separating field names from values (this can be changed
with the NameValueSeparator ( 1030) property), and optional header folding and unfolding.

TIdHeaderList provides facilities provide for use of RFC-compliant header names and values as the internal storage for values in
the header list.

1024 Internet Direct (Indy) Version 10.1.5


Classes TIdHeaderList Class

See Also
TIdMessage ( 1521)

TIdHTTP ( 1041)

IndySupport ( 15)

TIdHeaderList Members
The following tables list the members exposed by TIdHeaderList.

Properties
Property Description
CaseSensitive ( 1028) Indicates if case-sensitivity is used when comparing a header name to a value stored in Names ( 1029).
FoldLength ( 1029) Indicates the Maximum length of a header line before folding occurs.
FoldLines ( 1029) Indicates line folding is used when writing header values.
Names ( 1029)
NameValueSeparator ( 1030) Delimiter(s) used to separate header names and header values.
UnfoldLines ( 1030) Indicates that header lines should be unfolded.
Values ( 1030) Allows access to header values by name.

Methods
Method Description
AddStdValues ( 1025) Converts text line in NAME=VALUE form to their TIdHeaderLIst ( 1024) representation.
ConvertToStdValues ( 1026) Converts headers using a specific separator to NAME=VALUE form.
Create ( 1026) Constructor for the object instance.
Extract ( 1027) Finds and stores all values for the given header name.
IndexOfName ( 1027) Index position in the list for the header with the specified name.

Legend
Method
Property
read only

TIdHeaderList Methods
The Methods of the TIdHeaderList class are listed here.

Methods
Method Description
AddStdValues ( 1025) Converts text line in NAME=VALUE form to their TIdHeaderLIst ( 1024) representation.
ConvertToStdValues ( 1026) Converts headers using a specific separator to NAME=VALUE form.
Create ( 1026) Constructor for the object instance.
Extract ( 1027) Finds and stores all values for the given header name.
IndexOfName ( 1027) Index position in the list for the header with the specified name.

Legend
Method

TIdHeaderList.AddStdValues Method
Converts text line in NAME=VALUE form to their TIdHeaderLIst ( 1024) representation.

Pascal
procedure AddStdValues(
ASrc: TIdStrings
);

Internet Direct (Indy) Version 10.1.5 1025


TIdHeaderList Class Classes

Parameters
Parameters Description
ASrc Header valuesd in NAME=VALUE form.

Description
AddStdValues is a procedure used to convert text values in the TIdStrings ( 3089) container ASrc to their TIdHeaderList ( 1024)
representation using NameValueSeparator ( 1030).

ASrc contains text representing header names and values in NAME=VALUE form. AddStdValues replaces the '=' character in each
text line with the NameValueSeparator ( 1030) character(s) for their header representation.

Use ConvertToStdValues ( 1026) to convert header name and values to their NAME=VALUE form.

See Also
TIdHeaderList.ConvertToStdValues ( 1026)

TIdHeaderList.NameValueSeparator ( 1030)

TIdHeaderList.ConvertToStdValues Method
Converts headers using a specific separator to NAME=VALUE form.

Pascal
procedure ConvertToStdValues(
ADest: TIdStrings
);
Parameters
Parameters Description
ADest Storage for header values in NAME=VALUE form.

Description
ConvertToStdValues is a procedure used to convert text values in TIdHeaderList ( 1024) to a NAME=VALUE representation in the
TIdStrings ( 3089) instance in ADest.

ConvertToStdValues replaces the NameValueSeparator ( 1030) character(s) in each line in TIdHeaderList ( 1024) with the '='
character used by TIdStrings ( 3089) descendants.

Use AddStdValues ( 1025) to add text lines in NAME=VALUE form to a TIdHeaderList ( 1024).

See Also
TIdHeaderList.AddStdValues ( 1025)

TIdHeaderList.NameValueSeparator ( 1030)

TIdHeaderList.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the constructor for the object instance, and relies on the inherited Create method to initialize the object.

Create sets the default values for the following properties:

Property Value
NameValueSeparator ( 1030) ': '

1026 Internet Direct (Indy) Version 10.1.5


Classes TIdHeaderList Class

CaseSensitive ( 1028) False


UnfoldLines ( 1030) True
FoldLines ( 1029) True
FoldLength ( 1029) 78

See Also
TIdHeaderList.NameValueSeparator ( 1030)

TIdHeaderList.CaseSensitive ( 1028)

TIdHeaderList.UnfoldLines ( 1030)

TIdHeaderList.FoldLines ( 1029)

TIdHeaderList.FoldLength ( 1029)

TIdHeaderList.Extract Method
Finds and stores all values for the given header name.

Pascal
procedure Extract(
const AName: string;
ADest: TIdStrings
);
Parameters
Parameters Description
AName Header name to be located and stored.
ADest Stores all located header values.

Description
Extract is a procedure that is used to search the header list for all occurrences of the header in AName. When the header in AName
is located, the value of the header is added to ADest. ADest can, as a result, contain multiple values for the named header, with
one value per line.

When ADest is unassigned, no action is performed in the method.

Set CaseSensitive ( 1028) to indicate if case-sensitivity is important when comparing AName to header names in the object
instance.

Extract iterates over header Names ( 1029) and Values ( 1030), and adds Values ( 1030) matching AName to ADest.

ADest is not cleared prior to use in Extract. Any existing values in ADest are unaffected.

See Also
TIdHeaderList.CaseSensitive ( 1028)

TIdHeaderList.Names ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList.IndexOfName Method
Index position in the list for the header with the specified name.

Pascal
function IndexOfName(
const AName: string
): Integer; reintroduce;

Internet Direct (Indy) Version 10.1.5 1027


TIdHeaderList Class Classes

Parameters
Parameters Description
AName Header name to locate in the list.

Returns
Integer - Position of the named header in the list, or -1 when not found.

Description
IndexOfName is an Integer function that returns the index position of the header with the name indicated in AName in the header
list. IndexOfName work like Borland's TStrings.IndexOfName, but uses the delimiters defined in NameValueSeparator ( 1030),
and respects the case sensitivity flag in the CaseSensitive ( 1028) property.

IndexOfName ignores header Values ( 1030) when locating the index position.

IndexOfName can return -1 when the header in Name does not exist in the header list.

See Also
TIdHeaderList.NameValueSeparator ( 1030)

TIdHeaderList.Names ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList Properties
The Properties of the TIdHeaderList class are listed here.

Properties
Property Description
CaseSensitive ( 1028) Indicates if case-sensitivity is used when comparing a header name to a value stored in Names ( 1029).
FoldLength ( 1029) Indicates the Maximum length of a header line before folding occurs.
FoldLines ( 1029) Indicates line folding is used when writing header values.
Names ( 1029)
NameValueSeparator ( 1030) Delimiter(s) used to separate header names and header values.
UnfoldLines ( 1030) Indicates that header lines should be unfolded.
Values ( 1030) Allows access to header values by name.

Legend
Property
read only

TIdHeaderList.CaseSensitive Property
Indicates if case-sensitivity is used when comparing a header name to a value stored in Names ( 1029).

Pascal
property CaseSensitive: Boolean;
Description
CaseSensitive is a Boolean property that indicates if case-sensitivity is used when comparing a header name to a value stored in
Names ( 1029). The default value for CaseSensitive is False, as assigned in the Create ( 1026) constructor.

CaseSensitive is used in Extract ( 1027) and IndexOfName ( 1027), and when accessing the indexed Names ( 1029) and
Values ( 1030) properties.

When CaseSensitive is False, the Name portion of a header is converted to uppercase prior to any comparision using the value.

See Also
TIdHeaderList.Extract ( 1027)

1028 Internet Direct (Indy) Version 10.1.5


Classes TIdHeaderList Class

TIdHeaderList.IndexOfName ( 1027)

TIdHeaderList.Names ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList.FoldLength Property
Indicates the Maximum length of a header line before folding occurs.

Pascal
property FoldLength: Integer;
Description
FoldLength is an Integer property used to indicate the maximum length of a header line where folding occurs. The default value for
FoldLength is 78, as assigned in the Create ( 1026) constructor.

FoldLength is used when accessing a header value in Values ( 1030).

When FoldLines ( 1029) is True, FoldLength is used to perform wrapping of text in the header line when writing to Values (
1030).

When UnfoldLines ( 1030) is True, FoldLength is used to perform wrapping of text in the header line when reading to Values (
1030).

See Also
TIdHeaderList.FoldLines ( 1029)

TIdHeaderList.UnfoldLines ( 1030)

TIdHeaderList.Names ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList.FoldLines Property
Indicates line folding is used when writing header values.

Pascal
property FoldLines: Boolean;
Description
FoldLines is a Boolean property used to indicate if the header value is separated into one or moe lines using the value in
FoldLength ( 1029). The default value for FoldLines is True as assigned in the Create ( 1026) constructor.

FoldLines is used when writing a new value to Values ( 1030), and forces the value in the header to be wrapped at the number of
characters indicated in FoldLength ( 1029).

Set UnfoldLines ( 1030) to indicate the line folding is used when reading a header in Values ( 1030).

See Also
TIdHeaderList.FoldLength ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList.Names Property
Pascal
property Names [Index: Integer]: string;

Internet Direct (Indy) Version 10.1.5 1029


TIdHeaderList Class Classes

TIdHeaderList.NameValueSeparator Property
Delimiter(s) used to separate header names and header values.

Pascal
property NameValueSeparator: String;
Description
NameValueSeparator is a String property that represents the characters used as a delimiter between the header name and the
header value in the textual representation of headers.

The default value for NameValueSeparator is ': ', as assigned in the Create ( 1026) constructor, and represents the delimiter
normally used in RFC-compliant header values.

NameValueSeparator is used when reading and writing to Values ( 1030) in the header list using their native representation.

Use ConvertToStdValues ( 1026) to get the header list using the native TStrings representation for Names ( 1029) and Values
( 1030).

Use AddStdValues ( 1025) to store items in the header list using the native TStrings representation for Names ( 1029) and
Values ( 1030).

See Also
TIdHeaderList.Names ( 1029)

TIdHeaderList.Values ( 1030)

TIdHeaderList.ConvertToStdValues ( 1026)

TIdHeaderList.AddStdValues ( 1025)

TIdHeaderList.UnfoldLines Property
Indicates that header lines should be unfolded.

Pascal
property UnfoldLines: Boolean;
Description
UnfoldLines is a Boolean property that indicates if Values ( 1030) should be interpreted with line unfolding.

Setting UnfoldLines to False will cause reading an item in Values ( 1030) to not prform line unfolding. Setting UnfoldLines to True
causes header lines with continuation characters to be returned with the preceding header line.

Use FoldLines ( 1029) to control line folding when writing an item to Values ( 1030).

See Also
TIdHeaderList.Values ( 1030)

TIdHeaderList.FoldLines ( 1029)

TIdHeaderList.Values Property
Allows access to header values by name.

Pascal
property Values [const Name: string]: string;
Parameters
Parameters Description
Name Header name to be retrieved. Return Value:
String Header value for the header name.

1030 Internet Direct (Indy) Version 10.1.5


Classes TIdHL7 Class

Description
Values is an Indexed String property that works like Borland's TStrings.Values except it uses the delimiter defined in
NameValueSeparator ( 1030) as the seperator between the header name and value.

Case sensitivity is set with the CaseSensitive ( 1028) property, and if UnfoldLines ( 1030) is True, lines will be unfolded.

Thus if UnfoldLines ( 1030) is set to true, the value in following Example for Values['Subject'] would be "This is a line which is
folded. This is on another line." If UnfoldLines ( 1030) is set to False, the Value['Subject'] would equal = "This is a line which is
folded."

Subject: This is a line which is folded.


This is on another line.

TIdHellSoftFTPListItem Class
File
IdFTPListParseHellSoft ( 4638)

Hierarchy

Pascal
TIdHellSoftFTPListItem = class(TIdNovellNetwareFTPListItem);
Description
TIdHellSoftFTPListItem is a TIdNovellNetwareFTPListItem ( 1755) descendant.

See Also
TIdNovellNetwareFTPListItem ( 1755)

TIdHL7 Class
File
IdHL7 ( 4661)

Hierarchy

Pascal
TIdHL7 = class(TIdBaseComponent);
Description
TIdHL7 TIdBaseComponent ( 266) descendant

See Also
TIdBaseComponent ( 266)

TIdHL7 Members
The following tables list the members exposed by TIdHL7.

Internet Direct (Indy) Version 10.1.5 1031


TIdHL7 Class Classes

Properties
Property Description
Address ( 1037)
CommunicationMode ( 1037)
ConnectionLimit ( 1037)
IPMask ( 1037)
IPRestriction ( 1038)
IsListener ( 1038)
IsServer ( 1038)
ObjTag ( 1038)
OnConnect ( 1038)
OnDisconnect ( 1038)
Port ( 1038)
ReceiveTimeout ( 1039)
ReconnectDelay ( 1039)
Status ( 1039)
StatusDesc ( 1039)
TimeOut ( 1039)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AsynchronousSend ( 1033)
CheckSynchronousSendResult ( 1033)
Connected ( 1034)
Create ( 267) Constructor for the object instance.
Destroy ( 1034)
EnforceWaitReplyTimeout ( 1034)
GetMessage ( 1034)
GetReply ( 1034)
GetVersion ( 269) Version ( 269) number for Indy component suite.
Going ( 1035)
PreStop ( 1035)
SendMessage ( 1035)
SendReply ( 1035)
Start ( 1036)
Stop ( 1036)
SynchronousSend ( 1036)
CType ( 267)
Create ( 1274)
WaitForConnection ( 1036)

Events
Event Description
OnConnCountChange ( 1040)
OnMessageArrive ( 1040)
OnReceiveError ( 1040)
OnReceiveMessage ( 1040)

Legend
Method
virtual
Property
read only
Event

1032 Internet Direct (Indy) Version 10.1.5


Classes TIdHL7 Class

TIdHL7 Methods
The Methods of the TIdHL7 class are listed here.

Methods
Method Description
AsynchronousSend ( 1033)
CheckSynchronousSendResult ( 1033)
Connected ( 1034)
Destroy ( 1034)
EnforceWaitReplyTimeout ( 1034)
GetMessage ( 1034)
GetReply ( 1034)
Going ( 1035)
PreStop ( 1035)
SendMessage ( 1035)
SendReply ( 1035)
Start ( 1036)
Stop ( 1036)
SynchronousSend ( 1036)
WaitForConnection ( 1036)

Legend
Method
virtual

TIdHL7.AsynchronousSend Method
Pascal
function AsynchronousSend(
AMsg: String
): TSendResponse;
Parameters
Parameters Description
AMsg

Returns
TSendResponse ( 2988)

Description
AsynchronousSend returns TSendResponse ( 2988)

TIdHL7.CheckSynchronousSendResult Method
Pascal
procedure CheckSynchronousSendResult(
AResult: TSendResponse;
AMsg: String
);
Parameters
Parameters Description
AResult
AMsg

Description
CheckSynchronousSendResult

Internet Direct (Indy) Version 10.1.5 1033


TIdHL7 Class Classes

TIdHL7.Connected Method
Pascal
function Connected: Boolean;
Returns
Boolean

Description
Connected returns Boolean

TIdHL7.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden

TIdHL7.EnforceWaitReplyTimeout Method
Pascal
procedure EnforceWaitReplyTimeout;
Description
EnforceWaitReplyTimeout

TIdHL7.GetMessage Method
Pascal
function GetMessage(
var VMsg: String
): TObject;
Parameters
Parameters Description
VMsg

Returns
TObject

Description
GetMessage returns TObject

TIdHL7.GetReply Method
Pascal
function GetReply(
var VReply: String
): TSendResponse;
Parameters
Parameters Description
VReply

1034 Internet Direct (Indy) Version 10.1.5


Classes TIdHL7 Class

Returns
TSendResponse ( 2988)

Description
GetReply returns TSendResponse ( 2988)

TIdHL7.Going Method
Pascal
function Going: Boolean;
Returns
Boolean

Description
Going returns Boolean

TIdHL7.PreStop Method
Pascal
procedure PreStop;
Description
PreStop

TIdHL7.SendMessage Method
Pascal
procedure SendMessage(
AMsg: String
);
Parameters
Parameters Description
AMsg

Description
SendMessage

TIdHL7.SendReply Method
Pascal
procedure SendReply(
AMsgHnd: TObject;
AReply: String
);
Parameters
Parameters Description
AMsgHnd
AReply

Description
SendReply

Internet Direct (Indy) Version 10.1.5 1035


TIdHL7 Class Classes

TIdHL7.Start Method
Pascal
procedure Start;
Description
Start

TIdHL7.Stop Method
Pascal
procedure Stop;
Description
Stop

TIdHL7.SynchronousSend Method
Pascal
function SynchronousSend(
AMsg: String;
var VReply: String
): TSendResponse;
Parameters
Parameters Description
AMsg
VReply

Returns
TSendResponse ( 2988)

Description
SynchronousSend returns TSendResponse ( 2988)

TIdHL7.WaitForConnection Method
Pascal
procedure WaitForConnection(
AMaxLength: Integer
);
Parameters
Parameters Description
AMaxLength

Description
WaitForConnection

TIdHL7 Properties
The Properties of the TIdHL7 class are listed here.

Properties
Property Description
Address ( 1037)

1036 Internet Direct (Indy) Version 10.1.5


Classes TIdHL7 Class

CommunicationMode ( 1037)
ConnectionLimit ( 1037)
IPMask ( 1037)
IPRestriction ( 1038)
IsListener ( 1038)
IsServer ( 1038)
ObjTag ( 1038)
OnConnect ( 1038)
OnDisconnect ( 1038)
Port ( 1038)
ReceiveTimeout ( 1039)
ReconnectDelay ( 1039)
Status ( 1039)
StatusDesc ( 1039)
TimeOut ( 1039)

Legend
Property
read only

TIdHL7.Address Property
Pascal
property Address: String;
Description
Address is a Published String property

TIdHL7.CommunicationMode Property
Pascal
property CommunicationMode: THL7CommunicationMode;
Description
CommunicationMode is a Published THL7CommunicationMode ( 2944) property default value is DEFAULT_COMM_MODE (
3199)

TIdHL7.ConnectionLimit Property
Pascal
property ConnectionLimit: Word;
Description
ConnectionLimit is a Published Word property default value is DEFAULT_CONN_LIMIT ( 3199)

TIdHL7.IPMask Property
Pascal
property IPMask: String;
Description
IPMask is a Published String property

Internet Direct (Indy) Version 10.1.5 1037


TIdHL7 Class Classes

TIdHL7.IPRestriction Property
Pascal
property IPRestriction: String;
Description
IPRestriction is a Published String property

TIdHL7.IsListener Property
Pascal
property IsListener: Boolean;
Description
IsListener is a Published Boolean property default value is DEFAULT_IS_LISTENER ( 3199)

TIdHL7.IsServer Property
Pascal
property IsServer: Boolean;
Description
IsServer is a Public read-only Boolean property

TIdHL7.ObjTag Property
Pascal
property ObjTag: TObject;
Description
ObjTag is a Public TObject property

TIdHL7.OnConnect Property
Pascal
property OnConnect: TIdNotifyEvent;
Description
OnConnect is a Published TNotifyEventevent property

TIdHL7.OnDisconnect Property
Pascal
property OnDisconnect: TIdNotifyEvent;
Description
OnDisconnect is a Published TNotifyEventevent property

TIdHL7.Port Property
Pascal
property Port: Word;

1038 Internet Direct (Indy) Version 10.1.5


Classes TIdHL7 Class

Description
Port is a Published Word property default value is DEFAULT_PORT ( 3200)

TIdHL7.ReceiveTimeout Property
Pascal
property ReceiveTimeout: Cardinal;
Description
ReceiveTimeout is a Published Cardinal property default value is DEFAULT_RECEIVE_TIMEOUT ( 3200)

TIdHL7.ReconnectDelay Property
Pascal
property ReconnectDelay: Cardinal;
Description
ReconnectDelay is a Published Cardinal property default value is DEFAULT_RECONNECT_DELAY ( 3200)

TIdHL7.Status Property
Pascal
property Status: TIdHL7Status;
Description
Status is a Public read-only TIdHL7Status ( 2954) property

TIdHL7.StatusDesc Property
Pascal
property StatusDesc: String;
Description
StatusDesc is a Public read-only String property

TIdHL7.TimeOut Property
Pascal
property TimeOut: Cardinal;
Description
TimeOut is a Published Cardinal property default value is DEFAULT_TIMEOUT ( 3200)

TIdHL7 Events
The Events of the TIdHL7 class are listed here.

Events
Event Description
OnConnCountChange ( 1040)
OnMessageArrive ( 1040)
OnReceiveError ( 1040)
OnReceiveMessage ( 1040)

Internet Direct (Indy) Version 10.1.5 1039


TIdHL7ClientThread Class Classes

Legend
Event

TIdHL7.OnConnCountChange Event
Pascal
property OnConnCountChange: TIdHL7ConnCountEvent;
Description
OnConnCountChange is a Published TIdHL7ConnCountEventevent property

TIdHL7.OnMessageArrive Event
Pascal
property OnMessageArrive: TMessageArriveEvent;
Description
OnMessageArrive is a Public TMessageArriveEventevent property

TIdHL7.OnReceiveError Event
Pascal
property OnReceiveError: TReceiveErrorEvent;
Description
OnReceiveError is a Published TReceiveErrorEventevent property

TIdHL7.OnReceiveMessage Event
Pascal
property OnReceiveMessage: TMessageReceiveEvent;
Description
OnReceiveMessage is a Public TMessageReceiveEventevent property

TIdHL7ClientThread Class
File
IdHL7 ( 4661)

Hierarchy

Pascal
TIdHL7ClientThread = class(TIdNativeThread);
Description
TIdHL7ClientThread TThread descendant

See Also
TThread

1040 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

TIdHL7ClientThread Members
The following tables list the members exposed by TIdHL7ClientThread.

Methods
Method Description
Create ( 1041)
Destroy ( 1041)

Legend
Constructor
virtual

TIdHL7ClientThread Methods
The Methods of the TIdHL7ClientThread class are listed here.

Methods
Method Description
Create ( 1041)
Destroy ( 1041)

Legend
Constructor
virtual

TIdHL7ClientThread.Create Constructor
Pascal
constructor Create(
aOwner: TIdHL7
);
Parameters
Parameters Description
aOwner

Description
Create

TIdHL7ClientThread.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden

TIdHTTP Class
Implements an HTTP client.

Internet Direct (Indy) Version 10.1.5 1041


TIdHTTP Class Classes

File
IdHTTP ( 4662)

Hierarchy

Pascal
TIdHTTP = class(TIdCustomHTTP);
Description
TIdHTTP is a TIdCustomHTTP ( 404) descendant that is a client implementation of the Hypertext Transfer Protocol (HTTP) as
described in the Internet Standards documents:

RFC 1945 - Hypertext Transfer Protocol version 1.0 [HTTP/1.0]

RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1]

TIdHTTP publishes properties and event handlers on the ancestor classes to allow access from the client application, and the VCL
streaming mechanism.

TIdHTTP provides support for both HTTP 1.0 and HTTP 1.1 protocols. Note: Post ( 412) is restricted to support for the HTTP 1.0
protocol due to limited HTTP server support for the HTTP 1.1 specification.

TIdHTTP also provides a CookieManager ( 1045) that implements an HTTP State Management mechanism as specified in the
Internet Standards documents, and reference materials:

RFC 2109 - HTTP State Management Mechanism

RFC 2965 - HTTP State Management Mechanism

Netscape Persistent Client State - HTTP Cookies

TIdHTTP also supports the Secure Hypertext Transport protocol (HTTPS) as described in the Internet Standards document:

RFC 2660 - The Secure HyperText Transfer Protocol

You must install the Indy OpenSSL support .DLL's available at the Intelicom web site , or a third party SSL library to enable Secure
Socket ( 2369) Layer support.

Assign an instance of TIdSSLIOHandlerSocketBase ( 2134) (or a descendant class) to the IOHandler ( 2364) property to allow
use of the HTTPS protocol in HTTP requests.

See Also
TIdCustomHTTP ( 404)

TIdCookieManager ( 382)

TIdSSLIOHandlerSocketBase ( 2134)

IndySupport ( 15)

TIdHTTP Members
The following tables list the members exposed by TIdHTTP.

Properties
Property Description
AllowCookies ( 1044) Indicates if the HTTP client accepts Cookies in response headers.
AuthenticationManager ( 421) Maintains authentication mechanisms, parameters, and URL ( 431) for HTTP client requests.
AuthProxyRetries ( 421) Number of proxy authentication requests attempted for the client connection.
AuthRetries ( 422) Current number of authentication requests attempted for the client connection.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.

1042 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Compressor ( 1045) Decodes the contents for "deflate ( 2765)" or "gzip" content encodings.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
CookieManager ( 1045) Maintains client persistent state information using Cookies.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
HandleRedirects ( 1046) Indicates if the HTTP client can handle redirections to an alternate resource location.
HTTPOptions ( 1047) Indicates the HTTP protocol options ( 411) applied to the client connection.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
MaxAuthRetries ( 1047) Maximum number of authentication requests allowed for the client connection.
MaxHeaderLines ( 425) Maximum number of header lines allowed in an HTTP response.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ProtocolVersion ( 1047) Specifies the HTTP version.
ProxyParams ( 1048) Represents connection and user authorization values used for a Proxied client connection.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
RedirectCount ( 426) Indicates the number of redirects encountered in the last request for the HTTP client.
RedirectMaximum ( 1049) Specifies the maximum number of redirects for the HTTP client.
Request ( 1049) Specifies the header values to send to the HTTP server.
Response ( 428) Specifies the header values received from the HTTP server.
ResponseCode ( 428) Specifies the response code received from a HTTP server.
ResponseText ( 429) Specifies the text for a response received from a HTTP server.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
URL ( 431) Represents the attributes of a resource accessed by an HTTP request.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 407) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Head ( 410) Requests header values for a resource.
Options ( 411) Retrieves options and capabilities for a server resource.
CType ( 267)
Get ( 408)
Post ( 411)
Put ( 417)
Trace ( 419)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)

Internet Direct (Indy) Version 10.1.5 1043


TIdHTTP Class Classes

Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAuthorization ( 1050) Event handler for authentication of an HTTP connection.
OnHeadersAvailable ( 1050) Allows the client to decide if response processing should be continued based on headers returned in the
HTTP response.
OnProxyAuthorization ( 1050) Event handler for selecting the HTTP client authentication mechanism for a proxy connection.
OnRedirect ( 1051) Event handler triggered for redirect requests.
OnSelectAuthorization ( 1051) Event handler triggered when the client selects an authentication mechanism for the connection.
OnSelectProxyAuthorization ( 1052) Event handler triggered when the client selects an authentication mechanism for the Proxied connection.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdHTTP Properties
The Properties of the TIdHTTP class are listed here.

Properties
Property Description
AllowCookies ( 1044) Indicates if the HTTP client accepts Cookies in response headers.
Compressor ( 1045) Decodes the contents for "deflate ( 2765)" or "gzip" content encodings.
CookieManager ( 1045) Maintains client persistent state information using Cookies.
HandleRedirects ( 1046) Indicates if the HTTP client can handle redirections to an alternate resource location.
HTTPOptions ( 1047) Indicates the HTTP protocol options ( 411) applied to the client connection.
MaxAuthRetries ( 1047) Maximum number of authentication requests allowed for the client connection.
ProtocolVersion ( 1047) Specifies the HTTP version.
ProxyParams ( 1048) Represents connection and user authorization values used for a Proxied client connection.
RedirectMaximum ( 1049) Specifies the maximum number of redirects for the HTTP client.
Request ( 1049) Specifies the header values to send to the HTTP server.

Legend
Property

TIdHTTP.AllowCookies Property
Indicates if the HTTP client accepts Cookies in response headers.

Pascal
property AllowCookies: Boolean;
Description
AllowCookies is a published Boolean property in TIdHTTP ( 1041), and indicates if the HTTP client allows use of persistent state
information using TIdCookie instances handled by CookieManager ( 1045). AllowCookies is used when an HTTP client retrieves
headers for an HTTP Response ( 428), and processes Response ( 428) headers and cookie values.

When AllowCookies is True, the HTTP client will ensure that CookieManager ( 1045) is instantiated prior to adding any
TIdCookieRFC2109 ( 388) or TIdCookieRFC2965 ( 391) cookie instances detected in Response ( 428) headers.

1044 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

The default value for AllowCookies is True, as assigned in the Create ( 267) constructor.

See Also
TIdCustomHTTP.CookieManager ( 422)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

TIdHTTP.Compressor Property
Decodes the contents for "deflate ( 2765)" or "gzip" content encodings.

Pascal
property Compressor: TIdZLibCompressorBase;
Description
Compressor is a TIdZLibCompressorBase ( 2634) property that represents the ZLib compression library object for use for HTTP
responses having "deflate ( 2765)" or "gzip" encoding for its content. Compressor is used, when assigned, when reading an HTTP
response with the desired ContentEncoding in Response ( 428).

Applications must assign a TIdZLibCompressorBase ( 2634) (or descendant) class instance to the property to allow decoding of
the content stream for the HTTP response. When Compressor is unassigned, the content stream for the response remains in its
encoded content transfer encoding.

Compressor is not available on the .Net platform.

See Also
TIdZLibCompressorBase ( 2634)

TIdHTTPResponse ( 1085)

TIdHTTP.CookieManager Property
Maintains client persistent state information using Cookies.

Pascal
property CookieManager: TIdCookieManager;
Description
CookieManager is a published TIdCookieManager ( 382) property in TIdHTTP ( 1041), and enables maintenance of persistent
state information using Cookies for the HTTP Client connection. CookieManager is accessed when Cookies are detected during
processing of headers in an HTTP response, or when preparing headers for an HTTP request.

CookieManager is used by the HTTP client when AllowCookies ( 1044) is True.

The client will ensure that CookieManager is instantiated prior to adding TIdCookieRFC2109 ( 388) or TIdCookieRFC2965 (
391) class instances to the collection maintained in CookieManager. CookieManager is freed in the Destroy ( 407) method.

See Also
TIdCookieManager ( 382)

TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

TIdCustomHTTP ( 404)

TIdCustomHTTP.DoRequest

TIdCustomHTTP.Destroy ( 407)

Internet Direct (Indy) Version 10.1.5 1045


TIdHTTP Class Classes

TIdCustomHTTP.AllowCookies ( 420)

TIdHTTP.HandleRedirects Property
Indicates if the HTTP client can handle redirections to an alternate resource location.

Pascal
property HandleRedirects: Boolean;
Description
HandleRedirects is a published Boolean property in TIdHTTP ( 1041), and indicates if the HTTP client should handle redirects in a
response from the HTTP server. Redirects are indicated by the HTTP Response ( 428) having a ResponseCode ( 428) in the
range 300 to 307, and requires further action by the HTTP Client to fulfill the request.

Redirection Response ( 428) codes include the following:

Code Meaning
300 Multiple Choices. The request can be fulfilled with one of a set of resources, each with its own specific location. The HTTP
client can select a preferred representation and redirect its request to that location.
301 Moved Permanently. The requested resource has been assigned a new permanent URI and any future references to this
resource should use the new location specified in the Response ( 428).
302 Found. The requested resource resides temporarily under a different URI. Since the redirection might be altered on
occasion, the client should continue to use the URI in the Request ( 1049) for future requests.
304 Not Modified. If the client has performed a conditional GET request and access is allowed, but the document has not been
modified, the server should respond with this status code. The 304 response should not contain a message body, and is
always terminated by the first empty line after the header fields, and must include a Date header.
305 Use Proxy. The requested resource must be accessed through the proxy given by the Location header in the HTTP
Response ( 428) containing the URI of the Proxy.
307 Temporary Redirect. The requested resource resides temporarily under a different URI. Since the redirection may be
altered on occasion, the HTTP client should continue to use the URI in the RequestI for future requests.

HandleRedirects is used with RedirectMaximum ( 1049) in DoRequest to detect and prevent infinite redirection loops, by limiting
the number of active redirections for the client to the value specified in RedirectMaximum ( 1049).

When HandleRedirects is True, the HTTP Client will trigger the OnRedirect ( 1051) event handler to determine if the client can
accept the redirection location found in an HTTP response. When accepted, the redirect causes a new HTTP request with the new
location to be issued to fulfill the original request.

When HandleRedirects is False, the OnRedirect ( 1051) event handler will be triggered, and an EIdProtocolReplyError exception
will be raised when the redirect cannot be handled by the HTTP client.

See Also
TIdCustomHTTP.HandleRedirects ( 423)

TIdCustomHTTP.ResponseCode ( 428)

TIdCustomHTTP.ResponseText ( 429)

TIdCustomHTTP. Create ( 267)

TIdHTTP.RedirectMaximum ( 1049)

TIdHTTP.OnRedirect ( 1051)

EIdProtocolReplyError

Id_TIdHTTP_HandleRedirects ( 3821)

1046 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

TIdHTTP.HTTPOptions Property
Indicates the HTTP protocol options ( 411) applied to the client connection.

Pascal
property HTTPOptions: TIdHTTPOptions;
Description
HTTPOptions is a published TIdHTTPOptions ( 3031) property that represents the TIdHTTPOption ( 2954) protocol options (
411) in use for an HTTP client.

HTTPOptions is used at various times when the client or the HTTP protocol handler needs to perform some action, including
processing HTTP responses, preparing request parameters, and authentication of the client connection to a server or proxy.

HTTPOptions can contain 0 (zero), 1, or more of the options ( 411) values defined by TIdHTTPOption ( 2954).

See Also
TIdHTTPOptions ( 3031)

TIdHTTPOption ( 2954)

TIdHTTPProtocol ( 1064)

TIdCustomHTTP.DoRequest

TIdHTTP.ProtocolVersion ( 1047)

TIdHTTP.Request ( 1049)

TIdHTTP.MaxAuthRetries Property
Maximum number of authentication requests allowed for the client connection.

Pascal
property MaxAuthRetries: Integer;
Description
MaxAuthRetries is an Integer property that represents the maximum number of retries permitted when performing authentication for
the TIdHTTP ( 1041) client connection.

MaxAuthRetries is used when an HTTP protocol handler for the client connection attempts to process a protocol response code that
indicates authentication or proxy authentication is required (401 or 407).

MaxAuthRetries is compared to the current number of authentication requests issued in AuthRetries ( 422) (or AuthProxyRetries
( 421)) to determine if additional authentication requests are allowed. When permitted, the request is performed using the
OnAuthorization ( 1050) event handler.

The default value for MaxAuthRetries is Id_TIdHTTP_MaxAuthRetries ( 3822) as assigned during initialization of the component
instance.

See Also
AuthRetries ( 422)

AuthProxyRetries ( 421)

OnAuthorization ( 1050)

TIdHTTPProtocol ( 1064)

TIdHTTP.ProtocolVersion Property
Specifies the HTTP version.

Internet Direct (Indy) Version 10.1.5 1047


TIdHTTP Class Classes

Pascal
property ProtocolVersion: TIdHTTPProtocolVersion;
Description
ProtocolVersion is a published TIdHTTPProtocolVersion ( 2955) property in TIdHTTP ( 1041), and specifies the HTTP version
used for Get ( 408), Head ( 410), and Post ( 412) methods for the HTTP client.

ProtocolVersion allows the following values and associated meanings:

Value Meaning
pv1_0 HTTP 1.0
pv1_1 HTTP 1.1

The default value for ProtocolVersion is Id_TIdHTTP_ProtocolVersion ( 3822).

See Also
TIdCustomHTTP.Create ( 267)

TIdCustomHTTP.Get ( 408)

TIdCustomHTTP.Head ( 410)

TIdCustomHTTP.Post ( 412)

TIdCustomHTTP.Options ( 411)

TIdCustomHTTP.Trace ( 419)

TIdCustomHTTP.Put ( 417)

TIdHTTPProtocolVersion ( 2955)

TIdHTTP.ProxyParams Property
Represents connection and user authorization values used for a Proxied client connection.

Pascal
property ProxyParams: TIdProxyConnectionInfo;
Description
ProxyParams is a published TIdProxyConnectionInfo ( 1795) property in TIdHTTP ( 1041), and represents values used in an
HTTP request that requires a Proxy connection.

ProxyParams contains properties that relect the Server, Port, Username, and Password used to open and authorize a connection to
a Proxy server. ProxyParams also indicates if authentication uses the Basic Authentication algorithm.

ProxyParams is used when TIdHTTP ( 1041) attempts to set the Host and Port number for the client connection, and when
OnProxyAuthorization ( 1050) is triggered for the client connection. The Header representation for ProxyParams is used when the
HTTP Protocol handler builds the HTTP request packet and tranmits its content to the host server.

The Authetication mechanism in ProxyParams is reset when the OnDisconnected ( 2367) event handler is triggered for the HTTP
client connection.

See Also
TIdProxyConnectionInfo ( 1795)

TIdHTTPProtocol ( 1064)

TIdAuthentication ( 253)

TIdHTTP.OnProxyAuthorization ( 1050)

1048 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

TIdHTTP.RedirectMaximum Property
Specifies the maximum number of redirects for the HTTP client.

Pascal
property RedirectMaximum: Integer;
Description
RedirectMaximum is a published Integer property in TIdHTTP ( 1041), and specifies the maximum number of redirects that should
be handled by the HTTP client. The default value for RedirectMaximum is 15.

RedirectMaximum is provided to limit the effect of web-sites that perform numerous redirects, and to prevent stack overflow due to
recursion. RedirectMaximum is used when HandleRedirects ( 1046) is True, otherwise it has no effect.

RedirectMaximum is used with the internally maintained redirect count to determine when redirect handling is deferred to the
application. When the redirect count exceeds the value of RedirectMaximum, DoRequest will signal the OnRedirect ( 1051) event
handler to allow the application to respond to the redirect request.

If the redirect is not handled by the application, an EIdProtocolReplyError exception will be raised.

See Also
TIdHTTP.HandleRedirects ( 1046)

EIdProtocolReplyError

TIdHTTP.Request Property
Specifies the header values to send to the HTTP server.

Pascal
property Request: TIdHTTPRequest;
Description
Request is a published TIdHTTPRequest ( 1072) property in TIdHTTP ( 1041), and is used to specify the header values to send
to the HTTP server. Request headers allow the HTTP client to pass additional information about the request, or the request client,
to the HTTP server.

Request may contain the textual representation of Cookie values from the HTTP client, Host and Port information for a proxied
connection, as well as values from TIdHTTP ( 1041) properties transmitted as message headers.

Request is used in DoRequest to perform the HTTP transfer.

Use Response ( 428) to examine header values received in an HTTP protocol response from the server.

See Also
TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

TIdCustomHTTP.Response ( 428)

TIdHTTP Events
The Events of the TIdHTTP class are listed here.

Events
Event Description
OnAuthorization ( 1050) Event handler for authentication of an HTTP connection.
OnHeadersAvailable ( 1050) Allows the client to decide if response processing should be continued based on headers returned in the
HTTP response.
OnProxyAuthorization ( 1050) Event handler for selecting the HTTP client authentication mechanism for a proxy connection.

Internet Direct (Indy) Version 10.1.5 1049


TIdHTTP Class Classes

OnRedirect ( 1051) Event handler triggered for redirect requests.


OnSelectAuthorization ( 1051) Event handler triggered when the client selects an authentication mechanism for the connection.
OnSelectProxyAuthorization ( 1052) Event handler triggered when the client selects an authentication mechanism for the Proxied connection.

Legend
Event

TIdHTTP.OnAuthorization Event
Event handler for authentication of an HTTP connection.

Pascal
property OnAuthorization: TIdOnAuthorization;
Parameters
Parameters Description
Sender HTTP Client generating the event notification.
VUserName User identity for the HTTP request.
VPassword User credentials for the HTTP request.
Handled Indicates if the authentication attempt was successful.

Description
OnAuthorization is a published TIdOnAuthorization ( 3067) property in TIdHTTP ( 1041), and represents the event handler
signalled when an HTTP client connection needs to provide authentication data as part of an HTTP request / response protocol
exchange.

VUserName and VPassword are the authentication credentials found in the HTTP Request ( 1049), and can be updated in the
event handler.

Handled indicates if the event handler has successfully authenticated using the client account credentials and method.

See Also
TIdCustomHTTP.OnAuthorization ( 431)

TIdHTTP.OnHeadersAvailable Event
Allows the client to decide if response processing should be continued based on headers returned in the HTTP response.

Pascal
property OnHeadersAvailable: TIdHTTPOnHeadersAvailable;
Description
OnHeadersAvailable is a TIdHTTPOnHeadersAvailable ( 3031) property that represents the event handler signalled when
processing a response received by the HTTP client. OnHeadersAvailable allows the client to decide if response processing should
be continued based on headers returned in the HTTP response.

Applications must assign a procedure to the event handler to allow responding to the event notification. Set the value in the
VContinue argument to False if the response should not be accepted and processed. This also causes a persistent connection
(indicated in the KeepALive property in the Response ( 428)) to be closed. Use the values in the TIdHeaderList ( 1024)
argument to the event handler to examine header values received for in the Response ( 428).

TIdHTTP.OnProxyAuthorization Event
Event handler for selecting the HTTP client authentication mechanism for a proxy connection.

Pascal
property OnProxyAuthorization: TIdOnAuthorization;

1050 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTP Class

Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnProxyAuthorization is a published TIdProxyOnAuthorization property in TIdHTTP ( 1041), and represents the event handler
signalled when an HTTP client selects an authentication class to be used when session or proxy authentication is required for a
connection.

OnProxyAuthorization is used when the ResponseCode ( 428) for the HTTP request is 407, indicating that proxy authentication is
required.

OnProxyAuthorization is signalled prior to triggering the OnAuthorization ( 1050) event handler.

AuthenticationClass is the class instance to be used to perform authentication for the mechanisms required in an HTTP request.

AuthInfo is the header values to be be used in the HTTP response that includes the authentication results.

TIdHTTP.OnRedirect Event
Event handler triggered for redirect requests.

Pascal
property OnRedirect: TIdHTTPOnRedirectEvent;
Parameters
Parameters Description
Sender Client triggering the event.
dest URL ( 431) for the new resource location.
NumRedirect An accumulator for the number of redirection requests.
Handled Indicated that redirects should be handled.
VMethod HTTP method to be used to fulfill the redirect.

Description
OnRedirect is a published TIdHTTPOnRedirectEvent ( 3031) property in TIdHTTP ( 1041), and represents the event handler
signalled when the HTTP client receives a redirection ResponseCode ( 428) in the Response ( 428) for an HTTP Request (
1049).

OnRedirect is signalled during handling of an HTTP Response ( 428) in the DoRequest method when the ResponseCode ( 428)
contains a value in the range 300-307, and the Response ( 428) contains a Location header.

When HandleRedirects ( 1046) is True, and the number of active redirects does not exceed RedirectMaximum ( 1049), the event
handler is signalled to allow the HTTP client to handle any processing required for the Location, Method, or current number of
redirection requests.

If the client is not Disconnected, the pending redirection request is automatically executed using a nested call to DoRequest.

When HandleRedirects ( 1046) is False, the event handler is signalled to allow the HTTP client to handle all aspects of the
redirection request. If the redirection request is not handled, an EIdProtocolReplyError exception will be raised.

An Application must assign a procedure to the event handler in order to respond to the event notification. The event handler
procedure can used to alter the redirection location specified in Dest, or to change the HTTP method for a pending redirection
request. The event handler procedure should also set Handled to True to indicate that the redirection request can/should be
allowed for the client.

TIdHTTP.OnSelectAuthorization Event
Event handler triggered when the client selects an authentication mechanism for the connection.

Internet Direct (Indy) Version 10.1.5 1051


TIdHTTPCustomSessionList Class Classes

Pascal
property OnSelectAuthorization: TIdOnSelectAuthorization;
Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnSelectAuthorization is a published TIdOnSelectAuthorization ( 3071) property in TIdHTTP ( 1041), and represents the event
handler triggered when the HTTP client chooses an Authentication method and class for authorizing a connection.

OnSelectAuthorization is triggered when a Request ( 1049) needs Authentication using a supported Authentication method for the
WWWAuthenticate headers found in Response ( 428). OnSelectAuthorization can be used to set the class instance in Auth used
for authenticating the client Request ( 1049) based on header values found in AuthInfo.

OnSelectAuthorization is used prior to triggering the OnAuthorization ( 1050) event handler for the client connection.

TIdHTTP.OnSelectProxyAuthorization Event
Event handler triggered when the client selects an authentication mechanism for the Proxied connection.

Pascal
property OnSelectProxyAuthorization: TIdOnSelectAuthorization;
Parameters
Parameters Description
Sender HTTP client generating the event notification.
AuthenticationClass Authentication class to use for the connection.
AuthInfo Header values to use in authectication.

Description
OnSelectProxyAuthorization is a published TIdOnSelectAuthorization ( 3071) property in TIdHTTP ( 1041), and represents the
event handler triggered when the HTTP client chooses an Authentication method and class for authorizing a proxied connection.

OnSelectProxyAuthorization is triggered when a Request ( 1049) needs Authentication using a supported Authentication method
for the Proxy headers found in Response ( 428). OnSelectProxyAuthorization can be used to set the class instance in Auth used
for authenticating the client Request ( 1049) based on header values found in AuthInfo.

OnSelectProxyAuthorization is used prior to triggering the OnProxyAuthorization ( 1050) event handler for the client connection.

TIdHTTPCustomSessionList Class
Specifies an abstract container for persistent HTTP sessions.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdHTTPCustomSessionList = class(TIdBaseComponent);
Description
TIdHTTPCustomSessionList is a TIdComponent ( 355) descendant that specifies a pure virtual class that provides the container

1052 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPCustomSessionList Class

framework for HTTP sessions in a TIdCustomHTTPServer ( 434) implementation.

TIdHTTPCustomSessionList declares procedures and methods needed to add ( 1054) an create ( 267) TIdHTTPSession (
1105) persistent session objects, retrieve session objects by an identifier and remote IP address, and clear ( 1054) sessions from
the container.

All methods in TIdHTTPCustomSessionList are declared as virtual abstract procedures and functions, and must be overridden in a
descendant class to provide the session management capabilities required.

TIdHTTPCustomSessionList is used as the ancestor for Indy classes, like TIdHTTPDefaultSessionList ( 1059), that manage
persistent session information using TIdHTTPSession ( 1105) object instances.

TIdHTTPCustomSessionList also implements properties and event handlers needed to specify the default timeout value for
sessions in the container, and to respond to events triggered when a persistent session is started or completed.

TIdHTTPCustomSessionList is the type used to represent the TIdHTTPSession.Owner property established during initialization of
the session object.

See Also
TIdHTTPDefaultSessionList ( 1059)

TIdHTTPSession.Owner

TIdHTTPCustomSessionList Members
The following tables list the members exposed by TIdHTTPCustomSessionList.

Properties
Property Description
SessionTimeout ( 1057) Specifies the time-to-live for a HTTP session.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Add ( 1054) Specifies the mechanism used to add an HTTP session to the session list.
Clear ( 1054) Specifies the mechanism used to free HTTP sessions in the session list.
Create ( 267) Constructor for the object instance.
CreateSession ( 1055) Specifies the mechanism used to create ( 267) a new HTTP session.
CreateUniqueSession ( 1055) Specifies the mechanism used to create ( 267) a new HTTP asession with a unique session ID for its remote
IP address.
GetSession ( 1056) Retrieves a HTTP session from the session list.
GetVersion ( 269) Version ( 269) number for Indy component suite.
PurgeStaleSessions ( 1057) Removes expired sessions from the session list.
CType ( 267)
Create ( 1274)

Events
Event Description
OnSessionEnd ( 1058) Specifies the event handler for a terminating HTTP session.
OnSessionStart ( 1058) Specifies the event handler for a terminating HTTP session.

Legend
Method
abstract
virtual
Property
read only
Event

Internet Direct (Indy) Version 10.1.5 1053


TIdHTTPCustomSessionList Class Classes

TIdHTTPCustomSessionList Methods
The Methods of the TIdHTTPCustomSessionList class are listed here.

Methods
Method Description
Add ( 1054) Specifies the mechanism used to add an HTTP session to the session list.
Clear ( 1054) Specifies the mechanism used to free HTTP sessions in the session list.
CreateSession ( 1055) Specifies the mechanism used to create ( 267) a new HTTP session.
CreateUniqueSession ( 1055) Specifies the mechanism used to create ( 267) a new HTTP asession with a unique session ID for its remote
IP address.
GetSession ( 1056) Retrieves a HTTP session from the session list.
PurgeStaleSessions ( 1057) Removes expired sessions from the session list.

Legend
Method
abstract

TIdHTTPCustomSessionList.Add Method
Specifies the mechanism used to add an HTTP session to the session list.

Pascal
procedure Add(
ASession: TIdHTTPSession
); virtual; abstract;
Parameters
Parameters Description
ASession HTTP session to add to the container.

Description
Add is an abstract virtual method that specifies the method used to add the HTTP session in ASession to the session list.

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism for sessions in the container.

Use CreateSession ( 1055) or CreateUniqueSession ( 1055) to initialize a new session maintained in the session list.

Use Clear ( 1054) to remove all sessions stored in the list.

See Also
TIdHTTPDefaultSessionList.Add ( 1060)

CreateSession ( 1055)

CreateUniqueSession ( 1055)

Clear ( 1054)

TIdHTTPCustomSessionList.Clear Method
Specifies the mechanism used to free HTTP sessions in the session list.

Pascal
procedure Clear; virtual; abstract;
Description
Clear is an abstract virtual procedure that specifies the mechanism used to remove all TIdHTTPSession ( 1105) objects in the
session list.

1054 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPCustomSessionList Class

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism for sessions in the container.

Use Add ( 1054) to store a HTTP session in the session list.

Use CreateSession ( 1055) or CreateUniqueSession ( 1055) to initialize a new session maintained in the session list.

See Also
TIdHTTPDefaultSessionList.Clear ( 1061)

CreateSession ( 1055)

CreateUniqueSession ( 1055)

TIdHTTPCustomSessionList.CreateSession Method
Specifies the mechanism used to create ( 267) a new HTTP session.

Pascal
function CreateSession(
const RemoteIP: String;
const SessionID: String
): TIdHTTPSession; virtual; abstract;
Parameters
Parameters Description
RemoteIP The peer IP address for the session.
SessionID The identifier for the session.

Returns
TIdHTTPSession ( 1105) - The session object created.

Description
CreateSession is an abstract virtual TIdHTTPSession ( 1105) function that specifies the mechanism used to create ( 267) a new
HTTP session, and add ( 1054) the new session to the session list.

RemoteIP is the IP address of the remote computer system that is the endpoint for the HTTP session.

SessionID is the session identifier for the new HTTP session.

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism used for the session list.

Use CreateUniqueSession ( 1055) to ensure only one instance of a session exists when using state-persistent session in an
HTTP server.

See Also
TIdHTTPDefaultSessionList.CreateSession ( 1061)

CreateUniqueSession ( 1055)

Add ( 1054)

GetSession ( 1056)

TIdHTTPCustomSessionList.CreateUniqueSession Method
Specifies the mechanism used to create ( 267) a new HTTP asession with a unique session ID for its remote IP address.

Pascal
function CreateUniqueSession(
const RemoteIP: String
): TIdHTTPSession; virtual; abstract;

Internet Direct (Indy) Version 10.1.5 1055


TIdHTTPCustomSessionList Class Classes

Returns
TIdHTTPSession ( 1105) - new HTTP session created for a client connection.

Description
CreateUniqueSession is an abstract virtual TIdHTTPSession ( 1105) function that specifies the mechanism used to ensure that a
new session identifier is used for a client connection having the remote IP address specified in RemoteIP.

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism used for the session list.

See Also
TIdHTTPDefaultSessionList.CreateUniqueSession ( 1062)

CreateSession ( 1055)

GetSession ( 1056)

Add ( 1054)

TIdHTTPCustomSessionList.GetSession Method
Retrieves a HTTP session from the session list.

Pascal
function GetSession(
const SessionID: string;
const RemoteIP: string
): TIdHTTPSession; virtual; abstract;
Parameters
Parameters Description
SessionID The identifier for the session.
RemoteIP The remote IP address for the session.

Returns
TIdHTTPSession ( 1105) - The session object reference, or Nil.

Description
GetSession is an abstract virtual TIdHTTPSessionList function that specifies the mechanism used to retrieve an existing HTTP
session from the session list.

SessionID is the session identifier for the HTTP session to be located in the session list.

RemoteIP is the IP address for the remote endpoint of the HTTP session. Use a empty string ('') to indicate that any IP address
having the requested session identifier is a valid session.

GetSession should implement some mechanism to prevent a session from becoming stale, and being removed by
PurgeStaleSessions ( 1057), when it has been accessed using GetSession.

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism in the session list.

See Also
TIdHTTPDefaultSessionList.GetSession ( 1062)

CreateUniqueSession ( 1055)

PurgeStaleSessions ( 1057)

SessionTimeout ( 1057)

TIdHTTPSession.LastTimeStamp ( 1110)

1056 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPCustomSessionList Class

TIdHTTPCustomSessionList.PurgeStaleSessions Method
Removes expired sessions from the session list.

Pascal
procedure PurgeStaleSessions(
PurgeAll: Boolean = false
); virtual; abstract;
Parameters
Parameters Description
PurgeAll Indicates all stale sessions are to be removed.

Description
PurgeStaleSessions is an abstract virtual procedure that specifies the mechanism used to remove a HTTP session where the
LastTimeStamp for the session and the SessionTimeout ( 1057) properties indicate that the session has expired.
PurgeStaleSessions is used (in a thread) for HTTP server implementation that maintain persistent sessions.

All methods in TIdHTTPCustomSessionList ( 1052) are declared as virtual abstract procedures and functions, and must be
overridden in a descendant class to provide access to the storage mechanism used for the session list.

See Also
TIdHTTPDefaultSessionList.PurgeStaleSessions ( 1063)

SessionTimeout ( 1057)

TIdHTTPSession.LastTimeStamp ( 1110)

TIdCustomHTTPServer.SessionState ( 442)

TIdHTTPCustomSessionList Properties
The Properties of the TIdHTTPCustomSessionList class are listed here.

Properties
Property Description
SessionTimeout ( 1057) Specifies the time-to-live for a HTTP session.

Legend
Property

TIdHTTPCustomSessionList.SessionTimeout Property
Specifies the time-to-live for a HTTP session.

Pascal
property SessionTimeout: Integer;
Description
SessionTimeout is an Integer property that specifies the time-to-live for a persistent HTTP session. SessionTimeout is expressed as
a number of milliseconds.

SessionTimeout is used to determine when a TIdHTTPSession ( 1105) is stale (the LastTimeStamp indicates that the
SessionTimeOut has elapsed) in a HTTP server implementation that maintain persistent sessions.

See Also
GetSession ( 1056)

PurgeStaleSessions ( 1057)

TIdCustomHTTPServer.SessionState ( 442)

Internet Direct (Indy) Version 10.1.5 1057


TIdHTTPCustomSessionList Class Classes

TIdHTTPCustomSessionList Events
The Events of the TIdHTTPCustomSessionList class are listed here.

Events
Event Description
OnSessionEnd ( 1058) Specifies the event handler for a terminating HTTP session.
OnSessionStart ( 1058) Specifies the event handler for a terminating HTTP session.

Legend
Event

TIdHTTPCustomSessionList.OnSessionEnd Event
Specifies the event handler for a terminating HTTP session.

Pascal
property OnSessionEnd: TOnSessionEndEvent;
Parameters
Parameters Description
Sender HTTP session for the event notification.

Description
OnSessionEnd is a TOnSessionEndEvent ( 3111) property that represents the event handler signalled when an HTTP session will
be terminated. OnSessionEnd allows the session to notify its Owner (the session list) that it is closing, and should be removed from
the session list.

Applications must assign a procedure to the event handler to respond to the event notification. OnSessionEnd normally receives the
event handler procedure in the TIdCustomHTTPServer.OnSessionEnd ( 444) property when the HTTP server becomes active.

See Also
TIdCustomHTTPServer.OnSessionEnd ( 444)

TOnSessionEndEvent ( 3111)

TIdHTTPCustomSessionList.OnSessionStart Event
Specifies the event handler for a terminating HTTP session.

Pascal
property OnSessionStart: TOnSessionStartEvent;
Parameters
Parameters Description
Sender HTTP session for the event notification.

Description
OnSessionStart is a TOnSessionStartEvent ( 3112) property that represents the event handler signalled when an HTTP session
will be activated. OnSessionStart allows the session to notify its Owner (the session list) that it is has been created, and should be
added to the session list.

Applications must assign a procedure to the event handler to respond to the event notification. OnSessionStart normally receives
the event handler procedure in the TIdCustomHTTPServer.OnSessionStart ( 444) property when the HTTP server becomes
active.

See Also
TIdCustomHTTPServer.OnSessionStart ( 444)

1058 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPDefaultSessionList Class

TOnSessionStartEvent ( 3112)

TIdHTTPDefaultSessionList Class
Implements a thread-safe container for persistent HTTP sessions.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdHTTPDefaultSessionList = class(TIdHTTPCustomSessionList);
Description
TIdHTTPDefaultSessionList is a TIdHTTPCustomSessionList ( 1052) descendant that implements the container framework
declared in the ancestor class. TIdHTTPDefaultSessionList provides an implementation that uses a TThreadList to store and
manage TIdHTPSession object instances.

TIdHTTPDefaultSessionList overrides abstract virtual methods from the ancestor class to implement the operations needed to
maintain the session list, including:

Add ( 1060)
Clear ( 1061)
CreateSession ( 1061)
CreateUniqueSession ( 1062)
GetSession ( 1062)
PurgeStaleSessions ( 1063)
RemoveSession

TIdHTTPDefaultSessionList extends the ancestor by including the internal RemoveSessionFromLockedList method to provide
thread-safe removal of a persistent session object from the internal TThreadList.

TIdHTTPDefaultSessionList is the type used to represent the TIdHTTPServer.SessionList ( 1064) property in an HTTP server
implementation.

See Also
TIdHTTPCustomSessionList ( 1052)

TIdCustomHTTPServer.SessionList ( 441)

TIdHTTPDefaultSessionList Members
The following tables list the members exposed by TIdHTTPDefaultSessionList.

Properties
Property Description
SessionList ( 1064)
SessionTimeout ( 1057) Specifies the time-to-live for a HTTP session.
Version ( 269) Identifies the version number for the Indy component suite.

Internet Direct (Indy) Version 10.1.5 1059


TIdHTTPDefaultSessionList Class Classes

Methods
Method Description
Add ( 1060) Adds a persistent HTTP session to the thread-safe container.
Clear ( 1061) Removes all HTTP sessions from the thread-safe session list.
Create ( 267) Constructor for the object instance.
CreateSession ( 1061) Adds a new HTTP session to the thread-safe container.
CreateUniqueSession ( 1062) Creates a new HTTP asession with a unique session ID and remote IP address.
Destroy ( 1062) Destructor for the object instance.
GetSession ( 1062) Retrieves a persistent HTTP session having the specified ID and remote IP address.
GetVersion ( 269) Version ( 269) number for Indy component suite.
PurgeStaleSessions ( 1063) Removes one or more expired sessions from the session list.
CType ( 267)
Create ( 1274)

Events
Event Description
OnSessionEnd ( 1058) Specifies the event handler for a terminating HTTP session.
OnSessionStart ( 1058) Specifies the event handler for a terminating HTTP session.

Legend
Method
virtual
Property
read only
Event

TIdHTTPDefaultSessionList Methods
The Methods of the TIdHTTPDefaultSessionList class are listed here.

Methods
Method Description
Add ( 1060) Adds a persistent HTTP session to the thread-safe container.
Clear ( 1061) Removes all HTTP sessions from the thread-safe session list.
CreateSession ( 1061) Adds a new HTTP session to the thread-safe container.
CreateUniqueSession ( 1062) Creates a new HTTP asession with a unique session ID and remote IP address.
Destroy ( 1062) Destructor for the object instance.
GetSession ( 1062) Retrieves a persistent HTTP session having the specified ID and remote IP address.
PurgeStaleSessions ( 1063) Removes one or more expired sessions from the session list.

Legend
Method
virtual

TIdHTTPDefaultSessionList.Add Method
Adds a persistent HTTP session to the thread-safe container.

Pascal
procedure Add(
ASession: TIdHTTPSession
); override;
Parameters
Parameters Description
ASession HTTP session to be added to the container.

Description
Add is an overridden procedure in TIdHTTPDefaultSessionList ( 1059), and adds the persistent HTTP session specified in

1060 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPDefaultSessionList Class

ASession to the thread-safe container.

Add calls the Add method for the internal TThreadList to store persistent sessions in the session list.

Use GetSession ( 1062) to retrieve a session added to the container using Add.

Use RemoveSession to delete a session from the container.

Use CreateSession ( 1061) or CreateUniqueSession ( 1062) to create ( 267) a new session and Add it to the session list.

See Also
GetSession ( 1062)

RemoveSession

CreateSession ( 1061)

CreateUniqueSession ( 1062)

TIdHTTPDefaultSessionList.Clear Method
Removes all HTTP sessions from the thread-safe session list.

Pascal
procedure Clear; override;
Description
Clear is an overridden procedure used to remove all TIdHTTPSession ( 1105) objects in the thread-safe session list.

Clear ensures that the internal thread list is locked prior to triggering the OnSessionEnd ( 1058) event handler for the session,
clearing the session owner, and freeing the TIdHTTPSession ( 1105) instance from the list.

Clear unlocks the internal thread list prior to exiting from the method.

See Also
TIdHTTPSession ( 1105)

TIdHTTPSession. OnSessionEnd ( 1058)

TIdHTTPDefaultSessionList.CreateSession Method
Adds a new HTTP session to the thread-safe container.

Pascal
function CreateSession(
const RemoteIP: String;
const SessionID: String
): TIdHTTPSession; override;
Parameters
Parameters Description
RemoteIP The peer IP address for the session.
SessionID The identifier for the session.

Returns
TIdHTTPSession ( 1105) - The session object reference.

Description
CreateSession is an overridden TIdHTTPSession ( 1105) function used to create ( 267) a new persistent HTTP session, and
add ( 1060) the new session to the internal storage for the session list.

CreateSession constructs a new TIdHTTPSession ( 1105) instance using the values specified in RemoteIP and SessionID.

RemoteIP is the IP address of the remote computer system that is the endpoint for the HTTP session.

Internet Direct (Indy) Version 10.1.5 1061


TIdHTTPDefaultSessionList Class Classes

SessionID is the identifier for the new HTTP session.

CreateSession is used by TIdHTTPServer ( 1102) to retrieve a new HTTP session when a new client connection is established.

Use CreateUniqueSession ( 1062) to ensure that a previous persistent session is used for a new client connection to a HTTP
server implementation.

See Also
CreateUniqueSession ( 1062)

TIdHTTPSession ( 1105)

TIdHTTPDefaultSessionList.CreateUniqueSession Method
Creates a new HTTP asession with a unique session ID and remote IP address.

Pascal
function CreateUniqueSession(
const RemoteIP: String
): TIdHTTPSession; override;
Parameters
Parameters Description
RemoteIP IP address or host name for the remote connection.

Returns
TIdHTTPSession ( 1105) - new HTTP session created for a client connection.

Description
CreateUniqueSession is an overridden TIdHTTPSession ( 1105) function used to ensure a new HTTP session is created for a
client connection having the remote IP address specified in RemoteIP.

CreateUniqueSession generates a random value for the session identifier used in the HTTP session, and calls CreateSession (
1061) when the RemoteIP and SessionID combination is guaranteed to be unique.

See Also
CreateSession ( 1061)

TIdHTTPDefaultSessionList.Destroy Destructor
Destructor for the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing and releasing resource allocated to the internal
thread-safe session list for the container in Create ( 267).

Destroy calls the inherited Destroy method prior to exiting.

See Also
Create ( 267)

TIdHTTPDefaultSessionList.GetSession Method
Retrieves a persistent HTTP session having the specified ID and remote IP address.

Pascal
function GetSession(
const SessionID: string;

1062 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPDefaultSessionList Class

const RemoteIP: string


): TIdHTTPSession; override;
Parameters
Parameters Description
SessionID Session identifier to be located.
RemoteIP Optional remote IP address for the session.

Returns
TIdHTTPSession ( 1105) - Persistent session retrieved from the container.

Description
GetSession is an overridden TIdHTTPSession ( 1105) function used to retrieve a persistent HTTP session having the remote IP
address and session identifier specified in SessionID and RemoteIP.

GetSession ensures that the internal thread list is locked prior to accessing sessions in the container.

GetSession will iteratively search through all sessions in the container until a session is located with the specified SessionID and
RemoteIP. If RemoteIP contains an empty string, the first session with the same session identifier is used.

When a session is located for the session identifier and remote IP address, the session is time-stamped for last access to prevent
purging as a stale session in PurgeStaleSessions ( 1063).

The return value for GetSession can contain Nil when a session cannot be located with the specified values.

GetSession will unlock the internal thread list prior to exiting from the method.

See Also
TIdHTTPSession ( 1105)

PurgeStaleSessions ( 1063)

TIdHTTPDefaultSessionList.PurgeStaleSessions Method
Removes one or more expired sessions from the session list.

Pascal
procedure PurgeStaleSessions(
PurgeAll: Boolean = false
); override;
Parameters
Parameters Description
PurgeAll Clear ( 1061) one or all stale sessions. Default value is False.

Description
PurgeStaleSessions is an overridden procedure used to remove persistent HTTP sessions where the last access timestamp in
TIdHTTPSession ( 1105) and the session timeout in TIdCustomHTTPServer ( 434) indicate that the session has expired.

PurgeStaleSessions can be used to remove one or more session that have expired, as indicated in the PurgeAll argument.

PurgeStaleSessions will iteratively call the internal RemoveSessionFromLockedList method to remove the expired session(s).
When Purge all contains True, all sessions will be purged regardless of the settings in the persistent TIdHTTPSession ( 1105)
item.

PurgeStaleSessions ensures that the session list is locked prior to removing stale sessions, and is unlocked prior to exiting from the
method.

See Also
GetSession ( 1062)

TIdHTTPSession ( 1105)

TIdHTTPSession.LastTimeStamp ( 1110)

Internet Direct (Indy) Version 10.1.5 1063


TIdHTTPProtocol Class Classes

TIdCustomHTTPServer. SessionTimeout ( 1057)

TIdHTTPDefaultSessionList Properties
The Properties of the TIdHTTPDefaultSessionList class are listed here.

Properties
Property Description
SessionList ( 1064)

Legend
Property
read only

TIdHTTPDefaultSessionList.SessionList Property
Pascal
property SessionList: TIdThreadList;
Description
SessionList is a read-only TIdThreadList ( 3093) property.

TIdHTTPProtocol Class
Implements a HTTP protocol handler for connection and request/response processing.

File
IdHTTP ( 4662)

Hierarchy

Pascal
TIdHTTPProtocol = class(TObject);
Description
TIdHTTPProtocol is a TObject decendant that implements a HTTP protocol handler for an HTTP Request ( 1069) or HTTP
Response ( 1069).

TIdHTTPProtocol is the type used to represent the internal protocol handler for TIdHTTP ( 1041), and allows the client to perform
state-dependant protocol exchanges used during client connection and servicing of the request/response chain.

See Also
TIdHTTP ( 1041)

TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

IndySupport ( 15)

TIdHTTPProtocol Members
The following tables list the members exposed by TIdHTTPProtocol.

1064 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPProtocol Class

Properties
Property Description
Request ( 1069) Represents HTTP request items used by the HTTP protocol handler.
Response ( 1069) Represents HTTP response values captured by the HTTP protocol handler.
ResponseCode ( 1070) Indicates the numeric reponse code received in an HTTP response.

Methods
Method Description
BuildAndSendRequest ( 1066) Constructs and sends a HTTP request message using headers and cookies.
Create ( 1066) Constructor for the object instance.
Destroy ( 1067) Frees the object instance.
ProcessResponse ( 1067) Handles the state-dependent processing of requests and responses for an HTTP client.
RetrieveHeaders ( 1068) Captures and processes headers in an HTTP response.

Legend
Data Member
Method
virtual
Property
read only

TIdHTTPProtocol Fields
The Fields of the TIdHTTPProtocol class are listed here.

Legend
Data Member

TIdHTTPProtocol.FHTTP Field
Pascal
FHTTP: TIdCustomHTTP;
Description
FHTTP is a TIdCustomHTTP ( 404) class variable.

TIdHTTPProtocol.FRequest Field
Pascal
FRequest: TIdHTTPRequest;
Description
FRequest is a TIdHTTPRequest ( 1072) class variable.

TIdHTTPProtocol.FResponse Field
Pascal
FResponse: TIdHTTPResponse;
Description
FResponse is a TIdHTTPResponse ( 1085) class variable.

Internet Direct (Indy) Version 10.1.5 1065


TIdHTTPProtocol Class Classes

TIdHTTPProtocol.FResponseCode Field
Pascal
FResponseCode: Integer;
Description
FResponseCode is a Integer class variable.

TIdHTTPProtocol Methods
The Methods of the TIdHTTPProtocol class are listed here.

Methods
Method Description
BuildAndSendRequest ( 1066) Constructs and sends a HTTP request message using headers and cookies.
Create ( 1066) Constructor for the object instance.
Destroy ( 1067) Frees the object instance.
ProcessResponse ( 1067) Handles the state-dependent processing of requests and responses for an HTTP client.
RetrieveHeaders ( 1068) Captures and processes headers in an HTTP response.

Legend
Method
virtual

TIdHTTPProtocol.BuildAndSendRequest Method
Constructs and sends a HTTP request message using headers and cookies.

Pascal
procedure BuildAndSendRequest(
AURI: TIdURI
);
Parameters
Parameters Description
AURI Optional Universal Resource Locator for the request.

Description
BuildAndSendRequest is a procedure that allows the protocol handler to set header values for the HTTP request, and to send the
request to the HTTP server.

BuildAndSendRequest will ensure that ProxyParams is updated from the raw headers in Request ( 1069), and sets cookie values
for the optional domain in AURI.

BuildAndSendRequest also generates the HTTP request message packet, including header values, and writes the values using the
connection for the TIdHTTP ( 1041) client.

BuildAndSendRequest is called when the HTTP client connects to the host server for the HTTP request.

See Also
TIdCustomHTTP.ProxyParams ( 426)

TIdHTTPRequest ( 1072)

TIdHTTPProtocol.Create Constructor
Constructor for the object instance.

1066 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPProtocol Class

Pascal
constructor Create(
AConnection: TIdCustomHTTP
);
Parameters
Parameters Description
AConnection HTTP client connection for the protocol handler.

Description
Create is the constructor for the object instance, and calls the inherited Create method to initialize the object instance.

Create sets the internal member used to represent the TIdHTTP ( 1041) connection for the protocol handler to the value indicated
in AConnection.

Create allocates the resources used to represent the Request ( 1069) and Response ( 1069) headers generated during HTTP
protocol exchanges.

Use Destroy ( 1067) to free the objet instance.

See Also
TIdHTTPProtocol.Destroy ( 1067)

TIdHTTPProtocol.Request ( 1069)

TIdHTTPProtocol.Response ( 1069)

TIdHTTP ( 1041)

TIdHTTPProtocol.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy frees resources allocted in the Create ( 1066) constructor, including Request ( 1069) and Response ( 1069).

Destroy calls the inherited Destroy method prior to exiting.

See Also
TIdHTTPProtocol.Create ( 1066)

TIdHTTPProtocol.Request ( 1069)

TIdHTTPProtocol.Response ( 1069)

TIdHTTP ( 1041)

TIdHTTPProtocol.ProcessResponse Method
Handles the state-dependent processing of requests and responses for an HTTP client.

Pascal
function ProcessResponse(
AIgnoreReplies: array of SmallInt
): TIdHTTPWhatsNext;
Returns
TIdHTTPWhatsNext ( 2956) - Next step to perform for the protocol handler.

Internet Direct (Indy) Version 10.1.5 1067


TIdHTTPProtocol Class Classes

Description
ProcessResponse is a TIdHTTPWhatsNext ( 2956) function that allows the HTTP protocol handler to perform state-dependent
protocol exchanges using the Request ( 1069) and Response ( 1069) properties. ProcessResponse is, in essence, the state
machine used to control actions of a TIdHTTP ( 1041) client during connection and request/response processing.

ProcessResponse allows the protocol handler to detect and respond to various conditions that include:

• Header processing.
• Redirection in a HTTP response.
• Use of Keep-Alive for Secure Socket Layer transport.
• HTTP Server and Proxy Server authorization.
• Response ( 1069) content stream handling.
• Exception ( 4733) processing.
ProcessResponse is used when the HTTP client attempts to connect to the remote server to perform an HTTP request or receive
an HTTP response. The TIdHTTPWhatsNext ( 2956) return value for ProcessResponse is updated often during execution of the
method based on the numeric HTTP result codes.

Use OnHeadersAvailable to determine if response processing can be continued on the client based on header values found in the
HTTP response.

ProcessResponse detects and handles redirection responses (when HandleRedirects contains True in the HTTP client), as well as
incrementing the value in the RedirectCount property.

When the HTTP response indicates that Authentication is required for the Server or Proxy Server, ProcessResponse triggers the
OnAuthorization and OnProxyAuthorization event handlers when HTTPOptions contains the value hoInProcessAuth.

ProcessResponse also implements a work-around for buggy HTTP 1.1 servers which do not return a response body for a 302
response code. It uses a 4 second timout when reading the content for the HTTP response. The value in the ReadTimeout property
for the IOHandler is unaffected by this operation.

Exceptions
Exceptions Description
EIdHTTPProtocolException ( 100) Raised when a protocol response code indicates an error has occurred.

See Also
TIdHTTPRequest ( 1072)

TIdHTTPResponse ( 1085)

TIdHTTP.OnRedirect ( 1051)

TIdHTTP.OnAuthorization ( 1050)

TIdHTTP.OnProxyAuthorization ( 1050)

TIdHTTPProtocol.RetrieveHeaders Method
Captures and processes headers in an HTTP response.

Pascal
procedure RetrieveHeaders(
AMaxHeaderCount: integer
);
Description
RetrieveHeaders is a procedure that allows the HTTP protocol handler to read header values in an HTTP Response ( 1069), and
to store the raw headers in the Response ( 1069) for the protocol handler.

RetrieveHeaders clears all headers in Response ( 1069) prior to reading new values.

1068 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPProtocol Class

RetrieveHeaders repeatedly calls the ReadLn method in the IOHandler for the HTTP client until no more header data is available on
the HTTP client connection, or an EIdConnClosedGracefully ( 69) is raised.

If an exception is raised, the HTTP client connection is closed.

When all headers have been read from the client, RetrieveHeaders causes the header values to be moved to their corresponding
properties in Response ( 1069).

See Also
TIdHTTPResponse ( 1085)

TIdHTTP. Response ( 1069)

EIdConnClosedGracefully ( 69)

TIdHTTPProtocol Properties
The Properties of the TIdHTTPProtocol class are listed here.

Properties
Property Description
Request ( 1069) Represents HTTP request items used by the HTTP protocol handler.
Response ( 1069) Represents HTTP response values captured by the HTTP protocol handler.
ResponseCode ( 1070) Indicates the numeric reponse code received in an HTTP response.

Legend
Property
read only

TIdHTTPProtocol.Request Property
Represents HTTP request items used by the HTTP protocol handler.

Pascal
property Request: TIdHTTPRequest;
Description
Request is a read-only TIdHTTPRequest ( 1072) property that represents the client connection and connection type, the HTTP
method, the URL, and the input stream used by the HTTP protocol handler.

The Request property is used in TIdHTTP.SetHeaders and TIdHTTP.SetCookies, and allows the protocol handler to provide the
values used in a generated HTTP request to various event handlers in the TIdHTTP ( 1041) client.

See Also
TIdHTTPRequest ( 1072)

TIdHTTP.OnRedirect ( 1051)

TIdHTTP.OnSelectAuthorization ( 1051)

TIdHTTP.OnSelectProxyAuthorization ( 1052)

TIdHTTP.OnAuthorization ( 1050)

TIdHTTP.OnProxyAuthorization ( 1050)

TIdHTTPProtocol.Response Property
Represents HTTP response values captured by the HTTP protocol handler.

Pascal
property Response: TIdHTTPResponse;

Internet Direct (Indy) Version 10.1.5 1069


TIdHTTPProxyServer Class Classes

Description
Response is a read-only TIdHTTPResponse ( 1085) property that represents the HTTP client connection and connection flags,
the numeric reponse code and text, and the content stream used by the HTTP protocol handler.

The Response property is used in GetResponseHeaders, and allows the protocol handler to provide the values received in a HTTP
response.

Values in the Response property are updated using the RetrieveHeaders ( 1068) method when connecting to the HTTP host and
when the request is executed for the HTTP client.

See Also
TIdHTTPResponse ( 1085)

TIdHTTPProtocol.ResponseCode Property
Indicates the numeric reponse code received in an HTTP response.

Pascal
property ResponseCode: Integer;
Description
ResponseCode is a read-only Integer property that indicates the numeric reponse code received in an HTTP response. The value
in ResponseCode is parsed from the value in ResponseText, and may contain -1 if the textual response did not contain a valid
numeric value.

Values in ResponseCode and ResponseText are used often during processing for an HTTP request in both the HTTP client and the
HTTP protocol handler.

See Also
TIdHTTPProtocol ( 1064)

TIdCustomHTTP.ConnectToHost

TIdCustomHTTP.OnAuthorization ( 431)

TIdCustomHTTP.OnProxyAuthorization ( 432)

TIdHTTPProxyServer Class
File
IdHTTPProxyServer ( 4664)

Hierarchy

Pascal
TIdHTTPProxyServer = class(TIdCmdTCPServer);
Description
TIdHTTPProxyServer is a TIdCmdTCPServer ( 326) descendant.

See Also
TIdCmdTCPServer ( 326)

1070 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPProxyServer Class

TIdHTTPProxyServer Members
The following tables list the members exposed by TIdHTTPProxyServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1072)
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 330) Frees the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnHTTPDocument ( 1072)
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Internet Direct (Indy) Version 10.1.5 1071


TIdHTTPRequest Class Classes

Legend
Property
read only
Event
Method
virtual

TIdHTTPProxyServer Properties
The Properties of the TIdHTTPProxyServer class are listed here.

Properties
Property Description
DefaultPort ( 1072)

Legend
Property

TIdHTTPProxyServer.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_HTTPProxy ( 4023).

TIdHTTPProxyServer Events
The Events of the TIdHTTPProxyServer class are listed here.

Events
Event Description
OnHTTPDocument ( 1072)

Legend
Event

TIdHTTPProxyServer.OnHTTPDocument Event
Pascal
property OnHTTPDocument: TOnHTTPDocument;
Description
OnHTTPDocument is a Published TOnHTTPDocument ( 3107) event handler property. Write access for the property is
implemented using FOnHTTPDocument.

TIdHTTPRequest Class
Provides access to headers and properties for an HTTP request.

File
IdHTTP ( 4662)

1072 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequest Class

Hierarchy

Pascal
TIdHTTPRequest = class(TIdRequestHeaderInfo);
Description
TIdHTTPRequest is a TIdRequestHeaderInfo ( 1857) descendant that provides properties and methods use to define and
manipulate header values used in an HTTP request.

TIdHTTPRequest is the type used to represent the TIdHTTP.Request ( 1049) property, and is used when TIdHTTP ( 1041)
prepares the request by generating request header values that reflect the relative URL ( 1076), user authentication, host, options,
protocol version, and content length for the URL ( 1076) and source stream in the HTTP request.

A prepared TIdHTTPRequest instance is provided as an argument to TIdHTTP ( 1041) event handlers that use or update values
in the HTTP request, including OnRedirect, OnSelectAuthorization, OnSelectProxyAuthorization, OnAuthorization,
OnProxyAuthorization.

TIdHTTPRequest is the type used to represent the TIdHTTPProtocol.Request ( 1069) property, and allows the protocol handler to
store a reference to the request used in HTTP protocol exchanges.

See Also
TIdRequestHeaderInfo ( 1857)

TIdHTTPProtocol.Request ( 1069)

TIdHTTP.Request ( 1049)

TIdHTTP.OnRedirect ( 1051)

TIdHTTP.OnSelectAuthorization ( 1051)

TIdHTTP.OnSelectProxyAuthorization ( 1052)

TIdHTTP.OnAuthorization ( 1050)

TIdHTTP.OnProxyAuthorization ( 1050)

TIdHTTPRequest Members
The following tables list the members exposed by TIdHTTPRequest.

Properties
Property Description
Accept ( 1860) Specifies the media types accepted in a HTTP response.
AcceptCharSet ( 1860) Indicates the character sets accepted in a HTTP response.
AcceptEncoding ( 1861) Indicates the content encodings accepted in a HTTP response.
AcceptLanguage ( 1861) Indicates languages accepted in a HTTP response.
Authentication ( 1861) Used to calculate HTTP Access Authentication credentials.
BasicAuthentication ( 1862) Indicates that HTTP Basic Access authentication should be used.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.

Internet Direct (Indy) Version 10.1.5 1073


TIdHTTPRequest Class Classes

Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
From ( 1862) Indicates the email address for the requesting user.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
Host ( 1862) Represents the Internet host name or address for the resource accessed by the HTTP request.
IPVersion ( 1075) IP version for an address and/or port number in the URL ( 1076).
LastModified ( 678) Indicates the date and time a server resource was modified.
Method ( 1075) Indicates the HTTP method to use for the request.
Password ( 1863) Represents the password used in construction of authorization credentials.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyConnection ( 1863) Indicates the action to perform for a proxied connection.
Range ( 1864)
RawHeaders ( 679) Contains message header names and values in their original form.
Referer ( 1864) Specifies the address where a request URI was obtained.
Source ( 1076) Represents the input stream for HTTP Put or Post requests.
URL ( 1076) Represents the Universal Resource Locator for the HTTP request.
UseProxy ( 1076) Indicates the connectionm type and headers for the HTTP request.
UserAgent ( 1864) Identifies the user agent (program) issuing the HTTP request.
Username ( 1865) Represents the Username used in construction of authorization credentials.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.
Clear ( 1859) Resets request headers to their default values.
Create ( 1074) Constructor for the object instance.
Destroy ( 671) Frees the object instance.
Destroy ( 1859) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdHTTPRequest Methods
The Methods of the TIdHTTPRequest class are listed here.

Methods
Method Description
Create ( 1074) Constructor for the object instance.

Legend
Constructor
virtual

TIdHTTPRequest.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AHTTP: TIdCustomHTTP
); virtual; reintroduce;

1074 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequest Class

Parameters
Parameters Description
AHTTP HTTP client that owns the request.

Description
Create is the constructor for the object instance, and calls the inherited Create method to initialize the object instance.

Create stores AHTTP to the private member that represents the HTTP client for the request, and sets UseProxy ( 1076) to its
default value (ctNormal).

Use Destroy ( 1859) to free the object instance.

See Also
Destroy ( 1859) UseProxy ( 1076)

TIdHTTPRequest Properties
The Properties of the TIdHTTPRequest class are listed here.

Properties
Property Description
IPVersion ( 1075) IP version for an address and/or port number in the URL ( 1076).
Method ( 1075) Indicates the HTTP method to use for the request.
Source ( 1076) Represents the input stream for HTTP Put or Post requests.
URL ( 1076) Represents the Universal Resource Locator for the HTTP request.
UseProxy ( 1076) Indicates the connectionm type and headers for the HTTP request.

Legend
Property
read only

TIdHTTPRequest.IPVersion Property
IP version for an address and/or port number in the URL ( 1076).

Pascal
property IPVersion: TIdIPversion;
Description
IPVersion is a Public TIdIPversion property that represents the IP version used in the URL ( 1076) for the HTTP request.

The default value for IPVersion is Id_IPv4, but may be updated when an IP address (and optional port number) is found in the URL
( 1076) during preparation of the request for the HTTP client.

See Also
URL ( 1076) TIdIPversion Id_IPv4

TIdHTTPRequest.Method Property
Indicates the HTTP method to use for the request.

Pascal
property Method: TIdHTTPMethod;
Description
Method is a TIdHTTPMethod ( 3030) property that represents the HTTP command to use for the URL ( 1076) in the HTTP
request.

Method is used when TIdHTTP ( 1041) needs to prepares a request, and during execution using the TIdHTTPProtocol ( 1064)

Internet Direct (Indy) Version 10.1.5 1075


TIdHTTPRequest Class Classes

protocol handler.

Method allows the HTTP client to determine if additional properties or headers are required to connect to the HTTP host or perform
the HTTP request.

Method also indicates if the HTTP client should include any values from the content stream in Source ( 1076) in the HTTP
protocol exchange.

See Also
TIdHTTPMethod ( 3030)

TIdHTTPProtocol.Request ( 1069)

TIdHTTPProtocol.BuildAndSendRequest ( 1066)

TIdHTTPRequest.Source Property
Represents the input stream for HTTP Put or Post requests.

Pascal
property Source: TIdStream;
Description
Source is a TStream property that represents the input stream containing data used during execution of the HTTP request using the
selected Method ( 1075).

Source is also used by the TIdHTTPProtocol ( 1064) protocol handler for a TIdHTTP ( 1041) client to determine the content
length for a request.

See Also
TIdHTTPProtocol ( 1064)

TIdHTTPRequest.URL Property
Represents the Universal Resource Locator for the HTTP request.

Pascal
property URL: string;
Description
URL is a String property that represents the Universal Resource Locator to use for the HTTP request.

URL is used when TIdHTTP ( 1041) prepares a request for execution using the TIdHTTPProtocol ( 1064) prtocol handler, and
contains the URL value prior to URL- or parameter-encoding for the host, path, document, or queries.

See Also
TIdHTTP.Get TIdHTTP.Put

TIdHTTPRequest.UseProxy Property
Indicates the connectionm type and headers for the HTTP request.

Pascal
property UseProxy: TIdHTTPConnectionType;
Description
UseProxy is a read-only TIdHTTPConnectionType ( 2954) property that indicates the connection type returned when TIdHTTP (
1041) establishes a connection to the host for the request URL ( 1076).

UseProxy will indicate if the HTTP request should contain values for 'Keep-Alive' or 'No-Cache' headers in the request.

1076 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequestInfo Class

See Also
TIdHTTPConnectionType ( 2954)

TIdHTTPRequestInfo Class
Implements a HTTP Request object.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdHTTPRequestInfo = class(TIdRequestHeaderInfo);
Description
TIdHTTPRequestInfo is a TIdRequestHeaderInfo ( 1857) descendant that encapsulates information for an HTTP request, and
publishes properties to provide access to their values.

The properties include the HTTP session, authentication parameters, the remote computer addresses, HTTP headers, cookies, the
HTTP command and version, optional PostStream ( 1083) with ContentLength ( 674), and the document URL for the request.

TIdHTTPRequestInfo is used by TIdHTTPServer ( 1102) to capture values found in an HTTP request, and to store a reference to
the persistent HTTP session in the session list.

See Also
TIdRequestHeaderInfo ( 1857)

TIdHTTPServer ( 1102)

TIdHTTPSession ( 1105)

TIdHTTPDefaultSessionList ( 1059)

IndySupport ( 15)

TIdHTTPRequestInfo Members
The following tables list the members exposed by TIdHTTPRequestInfo.

Properties
Property Description
Accept ( 1860) Specifies the media types accepted in a HTTP response.
AcceptCharSet ( 1860) Indicates the character sets accepted in a HTTP response.
AcceptEncoding ( 1861) Indicates the content encodings accepted in a HTTP response.
AcceptLanguage ( 1861) Indicates languages accepted in a HTTP response.
Authentication ( 1861) Used to calculate HTTP Access Authentication credentials.
AuthExists ( 1080) Indicates that an authorization header is used in the HTTP request.
AuthPassword ( 1080) Specifies the authorization password for a HTTP request.
AuthUsername ( 1081) Specifies the authorization user name for the HTTP request.
BasicAuthentication ( 1862) Indicates that HTTP Basic Access authentication should be used.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Command ( 1081) Represents the HTTP command in the request.
CommandType ( 1081) Represent the enumeration value for the command used in the HTTP request.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.

Internet Direct (Indy) Version 10.1.5 1077


TIdHTTPRequestInfo Class Classes

ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
Cookies ( 1082) Represents cookies for the request.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Document ( 1082) Specifies the path and document name for a HTTP request.
Expires ( 677) Represents the timestamp when an entity is considered stale.
FormParams ( 1082) Contains a string representing values from the request post stream.
From ( 1862) Indicates the email address for the requesting user.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
Host ( 1862) Represents the Internet host name or address for the resource accessed by the HTTP request.
LastModified ( 678) Indicates the date and time a server resource was modified.
Params ( 1083) Represents the HTTP header values as ASCII characters.
Password ( 1863) Represents the password used in construction of authorization credentials.
PostStream ( 1083) Stream used to pass data from a client POST request.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyConnection ( 1863) Indicates the action to perform for a proxied connection.
QueryParams ( 1083) Represents the query and optional parameters in an HTTP request.
Range ( 1864)
RawHeaders ( 679) Contains message header names and values in their original form.
RawHTTPCommand ( 1084) Text data containing the HTTP Command ( 1081) received in an HTTP request.
Referer ( 1864) Specifies the address where a request URI was obtained.
RemoteIP ( 1084) Identifies the remote computer for the HTTP request.
Session ( 1084) Represents the HTTP session for the request.
UnparsedParams ( 1084) Represents the HTTP header as URL-encoded values.
UserAgent ( 1864) Identifies the user agent (program) issuing the HTTP request.
Username ( 1865) Represents the Username used in construction of authorization credentials.
Version ( 1085) Specifies the HTTP version for the request.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.
Clear ( 1859) Resets request headers to their default values.
Create ( 1079) Constructor for the object instance.
Destroy ( 1079) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdHTTPRequestInfo Methods
The Methods of the TIdHTTPRequestInfo class are listed here.

Methods
Method Description
Create ( 1079) Constructor for the object instance.
Destroy ( 1079) Frees the object instance.

1078 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequestInfo Class

Legend
Constructor
virtual

TIdHTTPRequestInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the constructor for the object instance. Create calls the inherited Create constructor.

Create allocates resources required for the Params ( 1083) and Cookies ( 1082) properties.

Create sets the default values for the following properties:

Property Value
CommandType ( 1081) hcUnknown
ContentLength ( 674) -1

Use Destroy ( 1079) to free the object instance.

See Also
Destroy ( 1079)

Params ( 1083)

Cookies ( 1082)

Destroy ( 1079)

TIdHTTPRequestInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance. Destroy is responsible for freeing resource allocated to the Headers,
Params ( 1083), and Cookies ( 1082) properties in the Create ( 1079) method.

Destroy calls the inherited Destroy method to complete destruction of the object instance.

See Also
Create ( 1079)

Params ( 1083)

Cookies ( 1082)

TIdHTTPRequestInfo Properties
The Properties of the TIdHTTPRequestInfo class are listed here.

Internet Direct (Indy) Version 10.1.5 1079


TIdHTTPRequestInfo Class Classes

Properties
Property Description
AuthExists ( 1080) Indicates that an authorization header is used in the HTTP request.
AuthPassword ( 1080) Specifies the authorization password for a HTTP request.
AuthUsername ( 1081) Specifies the authorization user name for the HTTP request.
Command ( 1081) Represents the HTTP command in the request.
CommandType ( 1081) Represent the enumeration value for the command used in the HTTP request.
Cookies ( 1082) Represents cookies for the request.
Document ( 1082) Specifies the path and document name for a HTTP request.
FormParams ( 1082) Contains a string representing values from the request post stream.
Params ( 1083) Represents the HTTP header values as ASCII characters.
PostStream ( 1083) Stream used to pass data from a client POST request.
QueryParams ( 1083) Represents the query and optional parameters in an HTTP request.
RawHTTPCommand ( 1084) Text data containing the HTTP Command ( 1081) received in an HTTP request.
RemoteIP ( 1084) Identifies the remote computer for the HTTP request.
Session ( 1084) Represents the HTTP session for the request.
UnparsedParams ( 1084) Represents the HTTP header as URL-encoded values.
Version ( 1085) Specifies the HTTP version for the request.

Legend
Property
read only

TIdHTTPRequestInfo.AuthExists Property
Indicates that an authorization header is used in the HTTP request.

Pascal
property AuthExists: Boolean;
Description
AuthExists is a read-only Boolean property that indicates an authorization header is used in the HTTP request. AuthExists is set to
True when the AuthUsername ( 1081) and AuthPassword ( 1080) properties have non-blank values during execution of the an
HTTP client session.

AuthExists is updated when TIdCustomHTTPServer ( 434) executes the session for the HTTP client, and is used to determine
when a TIdDecoderMIME ( 542) needs to be constructed for decoding AuthUsername ( 1081) and AuthPassword ( 1080)
values from the request header.

See Also
AuthUsername ( 1081)

AuthPassword ( 1080)

TIdCustomHTTPServer ( 434)

TIdDecoderMIME ( 542)

TIdHTTPRequestInfo.AuthPassword Property
Specifies the authorization password for a HTTP request.

Pascal
property AuthPassword: string;
Description
AuthPassword is a read-only String property that specifies the password from the HTTP header "Authorization:" in the HTTP
request.

AuthPassword is used with AuthUsername ( 1081) to determine the full content of the basic authorization header value.

1080 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequestInfo Class

Use AuthExists ( 1080) to determine if the AuthUsername ( 1081) and AuthPassword properties are used in the HTTP request.

See Also
AuthUsername ( 1081)

AuthExists ( 1080)

TIdHTTPRequestInfo.AuthUsername Property
Specifies the authorization user name for the HTTP request.

Pascal
property AuthUsername: string;
Description
AuthUsername is a read-only String property that specifies the user name from the HTTP "Authorization:" header in the HTTP
request.

AuthUsername is used with AuthPassword ( 1080) to determine the full content of the basic authorization header value.

Use AuthExists ( 1080) to determine if the AuthUsername and AuthPassword ( 1080) properties are used in the HTTP request.

See Also
AuthPassword ( 1080)

AuthExists ( 1080)

TIdHTTPRequestInfo.Command Property
Represents the HTTP command in the request.

Pascal
property Command: string;
Description
Command is a read-only String property that represents the HTTP command received in the HTTP request, like "GET", "POST", or
"HEAD".

Use RawHHTTPCommand to access the entire HTTP command in it's original form.

Command is updated when TIdCustomHTTPServer ( 434) reads the HTTP request from an executing HTTP client session.
Command can be used in TIdCustomHTTPServer ( 434) event handlers, like OnCommandGet and OnCommandOther, to
determine the HTTP command that originated the request.

See Also
TIdCustomHTTPServer ( 434)

TIdHTTPServer ( 1102)

RawHTTPCommand ( 1084)

TIdHTTPRequestInfo.CommandType Property
Represent the enumeration value for the command used in the HTTP request.

Pascal
property CommandType: THTTPCommandType;
Description
CommandType is a read-only THTTPCommandType ( 2944) property that represents the value from the enumeration for the
HTTP Command ( 1081) used in the HTTP request.

Internet Direct (Indy) Version 10.1.5 1081


TIdHTTPRequestInfo Class Classes

The default value for CommandType is hcUnknown as assigned in the Create ( 1079) method. CommandType is updated when
the HTTP command is decoded during processing of the HTTP request.

See Also
THTTPCommandType ( 2944)

Create ( 1079)

TIdHTTPRequestInfo.Cookies Property
Represents cookies for the request.

Pascal
property Cookies: TIdServerCookies;
Description
Cookies is a read-only TIdServerCookies ( 1981) property use to store cookie names and values used in the HTTP request.

Cookies is updated in TIdCustomHTTPServer ( 434) when an executing client session receives a HTTP request containing
header values with the HTTP "Cookie:" header.

See Also
TIdHTTPServer ( 1102)

TIdHTTPRequestInfo.Document Property
Specifies the path and document name for a HTTP request.

Pascal
property Document: string;
Description
Document is a String property that specifies the Uniform Resource Identifier (URI) for the HTTP request. Document normally
contains the path, document name, and optional parameters the URL requested.

Document is updated when TIdHTTPServer ( 1102) reads the HTTP request during execution of a HTTP client session.

See Also
TIdHTTPServer ( 1102)

TIdURI ( 2552)

TIdHTTPRequestInfo.FormParams Property
Contains a string representing values from the request post stream.

Pascal
property FormParams: string;
Description
FormParams is a String property that contains the values originating in the PostStream ( 1083) for the HTTP request in their
String representation.

Use UnparsedParams ( 1084) to access the parameters in their unparsed form.

See Also
PostStream ( 1083)

TIdCustomHTTPServer ( 434)

UnparsedParams ( 1084)

1082 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPRequestInfo Class

TIdHTTPRequestInfo.Params Property
Represents the HTTP header values as ASCII characters.

Pascal
property Params: TIdStrings;
Description
Params is a read-only TStrings property used to store the parsed values for HTTP headers in the HTTP request.

Params contains the header values after TIdURI.URLDecode ( 2557) has been used to convert the headers to their ASCII
representation.

In accordance with RFC 1866 section 8.2.1., all "+" characters (Decimal 43) in UnparsedParams ( 1084) are converted to a Space
character (Decimal 32) prior to being decoded and added to the values in the property.

Use UnparsedParams ( 1084) to view the HTTP headers in their URL-encoded form.

Params is updated by TIdHTTPServer ( 1102) when a peer thread generates a new HTTP request.

See Also
TIdHTTPServer ( 1102)

UnparsedParams ( 1084)

TIdHTTPRequestInfo.PostStream Property
Stream used to pass data from a client POST request.

Pascal
property PostStream: TIdStream;
Description
PostStream is a TStream property that represents the stream containing the data sent in the TIdHTTPRequestInfo ( 1077) as
used in the request for the executing HTTP client session.

PostStream is used in TIdCustomHTTPServer ( 434) when the client session is executed. PostStream may contain a reference to
an existing stream, or may be implicitly created for the executing client session.

When the request from the client connection has a non-zero ContentLength ( 674), PostStream is used to read the indicated
number of bytes. Otherwise, all data is read into PostStream until the client connection is closed.

If the stream is created during execution of the client thread, the contents of PostStream are added to the UnparsedParams (
1084) property for the client request.

See Also
UnparsedParams ( 1084)

TIdHTTPRequestInfo.QueryParams Property
Represents the query and optional parameters in an HTTP request.

Pascal
property QueryParams: string;
Description
QueryParams is a String property that represents the optional query

See Also
FormParams ( 1082)

UnparsedParams ( 1084)

Internet Direct (Indy) Version 10.1.5 1083


TIdHTTPRequestInfo Class Classes

TIdCustomHTTPServer ( 434)

TIdHTTPRequestInfo.RawHTTPCommand Property
Text data containing the HTTP Command ( 1081) received in an HTTP request.

Pascal
property RawHTTPCommand: string;
Description
RawHTTPCommand is a read-only String property that represents the raw textual data for the command read from the HTTP client
connection.

RawHTTPCommand is updated when the threaded client connection is executed, and contains values that are examined to set
properties for the TIdHTTPRequestInfo ( 1077) instance like Command ( 1081), Params ( 1083), and Document ( 1082).

See Also
Command ( 1081)

Params ( 1083)

Document ( 1082)

TIdHTTPRequestInfo.RemoteIP Property
Identifies the remote computer for the HTTP request.

Pascal
property RemoteIP: String;
Description
RemoteIP is a read-only String property used to identify the remote computer system that is the endpoint for the session used by
the HTTP request.

RemoteIP is updated in TIdCustomHTTPServer ( 434) when a an executing client session receives a new HTTP request.

See Also
TIdCustomHTTPServer ( 434)

TIdHTTPRequestInfo.Session Property
Represents the HTTP session for the request.

Pascal
property Session: TIdHTTPSession;
Description
Session is a read-only TIdHTTPSession ( 1105) property used to represent the HTTP session for the HTTP request.

Session is updated in TIdHTTPServer ( 1102) when an executing HTTP client session is created to handle an HTTP request.

See Also
TIdHTTPSession ( 1105)

TIdHTTPServer ( 1102)

TIdHTTPRequestInfo.UnparsedParams Property
Represents the HTTP header as URL-encoded values.

1084 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponse Class

Pascal
property UnparsedParams: string;
Description
UnparsedParams is a TStrings property used to store the values for HTTP headers in their URL-encoded form. UnparsedParams
contains the header values in the form they were received in the HTTP request.

Use Params ( 1083) to view the HTTP headers in their ASCII form.

UnparsedParams is updated by TIdHTTPServer ( 1102) when an executing client session receives a new HTTP request.

See Also
TIdHTTPServer ( 1102)

Params ( 1083)

TIdHTTPRequestInfo.Version Property
Specifies the HTTP version for the request.

Pascal
property Version: string;
Description
Version is a read-only String property that represents the HTTP version retrieved as part of the HTTP request.

Version is updated when TIdCustomHTTPServer ( 434) reads the HTTP request during execution of a session for an HTTP client.
THe value in Version is provided as an argument to TIdCustomHTTPServer ( 434) event handlers, like OnCommandGet and
OnCommandOther.

See Also
TIdCustomHTTPServer ( 434)

TIdHTTPServer ( 1102)

TIdHTTPResponse Class
Provides access to headers and properties for an HTTP response.

File
IdHTTP ( 4662)

Hierarchy

Pascal
TIdHTTPResponse = class(TIdResponseHeaderInfo);
Description
TIdHTTPResponse is a TIdResponseHeaderInfo ( 1865) descendant that provides properties and methods used to define and
manipulate header values used in an HTTP response.

TIdHTTPResponse is used when TIdHTTP ( 1041) receives a response to an HTTP request, and indicates both the numeric and
textual responses from the host server, and the connection headers for the HTTP response.

A TIdHTTPResponse instance is provided as an argument to TIdHTTP ( 1041) event handlers that use or update values in the
HTTP response, including OnRedirect, OnSelectAuthorization, OnSelectProxyAuthorization, OnAuthorization, and
OnProxyAuthorization.

Internet Direct (Indy) Version 10.1.5 1085


TIdHTTPResponse Class Classes

TIdHTTPResponse is the type used to represent the TIdHTTPProtocol.Response ( 1069) property, and allows the protocol
handler to store a reference to the response received during HTTP protocol exchanges.

See Also
TIdResponseHeaderInfo ( 1865)

TIdHTTPProtocol.Response ( 1069)

TIdHTTP.OnRedirect ( 1051)

TIdHTTP.OnSelectAuthorization ( 1051)

TIdHTTP.OnSelectProxyAuthorization ( 1052)

TIdHTTP.OnAuthorization ( 1050)

TIdHTTP.OnProxyAuthorization ( 1050)

TIdHTTPResponse Members
The following tables list the members exposed by TIdHTTPResponse.

Properties
Property Description
AcceptRanges ( 1868) Represent the value for the HTTP Accept-Ranges header from an HTTP response.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentStream ( 1088) Contains the streamed content for the HTTP response.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
KeepAlive ( 1088) Indicates if the client connection should be maintained during request/ response protocol exchanges.
LastModified ( 678) Indicates the date and time a server resource was modified.
Location ( 1868) Redirects the user agent to a new location for a requested resource.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyAuthenticate ( 1869) Represents Proxy Authentication headers and values for a connection.
ProxyConnection ( 1869) Indicates the action to perform for a proxied connection after an HTTP response.
RawHeaders ( 679) Contains message header names and values in their original form.
ResponseCode ( 1088) Indicates the numeric response code in an HTTP response.
ResponseText ( 1089) Represents the textual messages received in an HTTP response.
ResponseVersion ( 1089) HTTP version used and supported in the HTTP response.
Server ( 1869) Identifies the software used on the server.
WWWAuthenticate ( 1869) Identifies authentication schemes and parameters for a server realm.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.
Clear ( 1866) Resets response header properties to their default values.
Create ( 1087) Constructor for the object instance.
Destroy ( 671) Frees the object instance.

1086 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponse Class

Destroy ( 1867) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdHTTPResponse Methods
The Methods of the TIdHTTPResponse class are listed here.

Methods
Method Description
Create ( 1087) Constructor for the object instance.

Legend
Constructor
virtual

TIdHTTPResponse.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AParent: TIdCustomHTTP
); virtual; reintroduce;
Parameters
Parameters Description
AParent HTTP Client that owns the response.

Description
Create is the constructor for the object instance, and calls the inherited Create method.

Create assigns AParent to the private member that represents the owner of the HTTP response.

Use Destroy ( 1867) to free the object instance.

See Also
Destroy ( 1867)

TIdHTTPResponse Properties
The Properties of the TIdHTTPResponse class are listed here.

Properties
Property Description
ContentStream ( 1088) Contains the streamed content for the HTTP response.
KeepAlive ( 1088) Indicates if the client connection should be maintained during request/ response protocol exchanges.
ResponseCode ( 1088) Indicates the numeric response code in an HTTP response.
ResponseText ( 1089) Represents the textual messages received in an HTTP response.
ResponseVersion ( 1089) HTTP version used and supported in the HTTP response.

Legend
Property

Internet Direct (Indy) Version 10.1.5 1087


TIdHTTPResponse Class Classes

TIdHTTPResponse.ContentStream Property
Contains the streamed content for the HTTP response.

Pascal
property ContentStream: TIdStream;
Description
ContentStream is a TStream property that represents the stream used when TIdHTTP ( 1041) is used to read the content in an
HTTP response for a Get or Post request.

ContentStream is assigned during opening of the connection to the HTTP host.

ContentStream is used during HTTP response processing, and is used with the IOHandler in the HTTP client to read streamed
values from the HTTP server. When assigned, the size of ContentStream should match the ContentLength ( 674) for the
response. Otherwise, response content is read until the connection is closed.

ContentStream may also be used to retrieve "chunked" response content when the transfer encoding for the response indicates
that "chunked" retrieval is supported.

TIdHTTPResponse.KeepAlive Property
Indicates if the client connection should be maintained during request/ response protocol exchanges.

Pascal
property KeepAlive: Boolean;
Description
KeepAlive is a Boolean property that indicates if the HTTP response supports and uses the HTTP Keep-Alive header for connection
control. Reading the value in KeepAlive causes the value in ResponseText ( 1089) to be examined for a valid HTTP protocol
version.

For HTTP 1.1 clients, the value in KeepAlive will contain True if the HTTP client connection is still intact, and Connetion and
ProxyConnection ( 1869) header values do not contain the 'CLOSE' directive.

For HTTP 1.0 clients, the value in KeepAlive will contain False unless the HTTP Keep-Alive header is used for the HTTP
Connection ( 673) or ProxyConnection ( 1869).

TIdHTTPResponse.ResponseCode Property
Indicates the numeric response code in an HTTP response.

Pascal
property ResponseCode: Integer;
Description
ResponseCode is an Integer property that represents the numeric HTTP response code received in the HTTP response message.
Reading the value in ResponseCode causes the numeric return value to be extracted from the textual value in ResponseText (
1089).

ResponseCode is updated when a request is executed using TIdHTTP.DoRequest, and when the TIdHTTPProtocol ( 1064)
protocol handler processes an HTTP response to to examine state-dependt values during HTTP protocol exchanges.

See Also
ResponseText ( 1089)

TIdHTTPProtocol ( 1064)

1088 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

TIdHTTPResponse.ResponseText Property
Represents the textual messages received in an HTTP response.

Pascal
property ResponseText: string;
Description
ResponseText is a String property that represents the textual values retrieved in an HTTP reponse. ResponseText contains both
the numeric response code and associated message string.

ResponseText is used to extract the numeric HTTP response code in ResponseCode ( 1088).

ResponseText is updated when the connection to the host is established, or when an HTTP response is received and processed for
an HTTP client.

See Also
ResponseCode ( 1088)

TIdHTTPResponse.ResponseVersion Property
HTTP version used and supported in the HTTP response.

Pascal
property ResponseVersion: TIdHTTPProtocolVersion;
Description
ResponseVersion is a TIdHTTPProtocolVersion ( 2955) property that represents the HTTP protocol version supported in a
response received from an HTTP server.

ResponseVersion is used to help determine the value used in the KeepAlive ( 1088) property.

See Also
TIdHTTPProtocolVersion ( 2955)

KeepAlive ( 1088)

TIdHTTPResponseInfo Class
Implements a HTTP response object.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdHTTPResponseInfo = class(TIdResponseHeaderInfo);
Description
TIdHTTPResponseInfo is a TIdResponseHeaderInfo ( 1865) descendant that encapsulates access to information in a HTTP
response.

TIdHTTPResponseInfo publishes properties that provide access to various information for a HTTP response. These properties
include the persistent HTTP session, the authentication realm, Cookies ( 1098), raw Header content, as well as the response
number, content, content length, and content type.

Internet Direct (Indy) Version 10.1.5 1089


TIdHTTPResponseInfo Class Classes

TIdHTTPResponseInfo is used by TIdHTTPServer ( 1102) to prepare a HTTP response for a peer thread request. In preparing the
HTTP response, values are read from TIdHTTPResponseInfo properties and stored in the RawHeaders ( 679) property. Values in
RawHeaders ( 679) and ContentText ( 1097) / ContentStream ( 1097) are used to transmit the HTTP response when the
server calls WriteHeader ( 1095) or WriteContent ( 1095).

See Also
TIdResponseHeaderInfo ( 1865)

TIdHTTPServer ( 1102)

IndySupport ( 15)

TIdHTTPResponseInfo Members
The following tables list the members exposed by TIdHTTPResponseInfo.

Properties
Property Description
AcceptRanges ( 1868) Represent the value for the HTTP Accept-Ranges header from an HTTP response.
AuthRealm ( 1096) Identifies the authentication and encryption for the HTTP response.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
CloseConnection ( 1097) Indicates if the HTTP response should contain a close connection header.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentStream ( 1097) Specifies the stream that contains the content data.
ContentText ( 1097) Specifies the content for the HTTP response.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
Cookies ( 1098) Identifies Cookies for the HTTP response.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
FreeContentStream ( 1098) Indicates if the object instance can free its ContentStream ( 1097).
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
HeaderHasBeenWritten ( 1098) Indicates that headers have been written in the HTTP response.
HTTPServer ( 1099) Server ( 1869) generating the HTTP response.
LastModified ( 678) Indicates the date and time a server resource was modified.
Location ( 1868) Redirects the user agent to a new location for a requested resource.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyAuthenticate ( 1869) Represents Proxy Authentication headers and values for a connection.
ProxyConnection ( 1869) Indicates the action to perform for a proxied connection after an HTTP response.
RawHeaders ( 679) Contains message header names and values in their original form.
ResponseNo ( 1099) Numeric response code for the HTTP response.
ResponseText ( 1100) Represents the text for the response message.
Server ( 1869) Identifies the software used on the server.
ServerSoftware ( 1101) Identifies the server software used to generate the HTTP response.
Session ( 1102) Represents the session for the HTTP response.
WWWAuthenticate ( 1869) Identifies authentication schemes and parameters for a server realm.

Methods
Method Description
Clear ( 670) Resets properties to their default empty values.

1090 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

Clear ( 1866) Resets response header properties to their default values.


CloseSession ( 1091) Closes an HTTP session and removes the session cookie.
Create ( 1092) Constructor for the object instance.
Destroy ( 1092) Frees the object instance.
GetServer ( 1093)
Redirect ( 1093) Updates the location for an HTTP response.
ServeFile ( 1093)
SetServer ( 1094)
SmartServeFile ( 1094)
WriteContent ( 1095) Generates the HTTP response content.
WriteHeader ( 1095) Generates headers for the HTTP response.

Legend
Method
virtual
Property
read only

TIdHTTPResponseInfo Methods
The Methods of the TIdHTTPResponseInfo class are listed here.

Methods
Method Description
CloseSession ( 1091) Closes an HTTP session and removes the session cookie.
Create ( 1092) Constructor for the object instance.
Destroy ( 1092) Frees the object instance.
GetServer ( 1093)
Redirect ( 1093) Updates the location for an HTTP response.
ServeFile ( 1093)
SetServer ( 1094)
SmartServeFile ( 1094)
WriteContent ( 1095) Generates the HTTP response content.
WriteHeader ( 1095) Generates headers for the HTTP response.

Legend
Method
virtual

TIdHTTPResponseInfo.CloseSession Method
Closes an HTTP session and removes the session cookie.

Pascal
procedure CloseSession;
Description
CloseSession is a procedure that closes a session in the session list for an HTTP server.

CloseSession locates the session Cookie with the name specified in GSessionIDCookie ( 3215), and removes the value from the
Cookies ( 1098) collection. CloseSession also frees and release the Session ( 1102) maintained in the object instance.

CloseSession can be used to ensure that an HTTP Server ( 1869) closes the session even when the session list is maintained.

See Also
GSessionIDCookie ( 3215)

Internet Direct (Indy) Version 10.1.5 1091


TIdHTTPResponseInfo Class Classes

TIdHTTPResponseInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AConnection: TIdTCPConnection;
AServer: TIdCustomHTTPServer
); reintroduce;
Parameters
Parameters Description
AConnection The server connection for the HTTP response.
AServer The TIdCustomHTTPServer ( 434) for the HTTP session generating the response.

Description
Create is the reintroduced constructor for the TIdHTTPResponseInfo ( 1089) object. Create is responsible for initializing the
default values for properties in the instance.

Create calls the inherited Create method.

Create sets ContentLength ( 674) to the value specified in GFContentLength ( 3210), and ContentType ( 675) to the value in
GContentType ( 3210). The RawHeaders ( 679) property is updated to avoid folding long lines for clients that may not support
the feature. ServerSoftware ( 1101) is initialized to the values specified in GServerSoftware ( 3214).

Create sets the connection used for the HTTP response to the TIdTCPServerConnection instance referenced in AConnection, and
assigns to ResponseNo ( 1099) the default value from GResponseNo ( 3214).

Create also allocates resources needed for the Cookies ( 1098) property.

See Also
TIdTCPServerConnection

GFContentLength ( 3210)

GContentType ( 3210)

Cookies ( 1098)

TIdHTTPResponseInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing and releasing resources allocated to properties
for the instance, including:

Cookies ( 1098)
ContentStream ( 1097)

Destroy calls the inherited destructor prior to exiting from the method.

See Also
Cookies ( 1098)

ContentStream ( 1097)

1092 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

TIdHTTPResponseInfo.GetServer Method
Pascal
function GetServer: string;
Returns
string

Description
GetServer is a method string function

TIdHTTPResponseInfo.Redirect Method
Updates the location for an HTTP response.

Pascal
procedure Redirect(
const AURL: string
);
Parameters
Parameters Description
AURL Location ( 1868) of the redirected resource.

Description
Redirect is a procedure that allows the HTTP response to redirect the HTTP client to specific URL.

Redirect sets the value for the HTTP response in ResponseNo ( 1099) to 302, the HTTP response code that indicates a
temporary redirection has been performed. To indicate that a resource has been permanently moved, set ResponseNo ( 1099) to
301.

Redirect also updates the "Location ( 1868)" Header for the HTTP response to contain the value specified in AURL.

See Also
ResponseNo ( 1099)

TIdHTTPResponseInfo.ServeFile Method
Pascal
function ServeFile(
AContext: TIdContext;
aFile: String
): cardinal; virtual;
Parameters
Parameters Description
AContext Client session of the HTTP response.
aFile File to be included in the HTTP response.

Returns
Cardinal - Number of bytes in the file written in the HTTP response.

Description
ServeFile is a virtual Cardinal function used to return the contents of the file specified in AFile in the HTTP response.

AContent is the client session in the HTTP server handling the client request for the specified file.

ServeFile allows the HTTP response to easily include the ContentType ( 675), ContentLength ( 674), and file content for the
request file as part of the HTTP response written to the client connection.

Internet Direct (Indy) Version 10.1.5 1093


TIdHTTPResponseInfo Class Classes

When ContentType ( 675) contains an empty string (''), the MIMe type for the file is retrieved using the MIME table in the
HTTPServer ( 1099) for the response.

ContentLength ( 674) is set to the length of the file using the FileSizeByName ( 2790) by function.

ServeFile causes the HTTP headers to be written to the client connection for the HTTP session making the request, followed
immediately by the content for the file specified in aFile.

TIdHTTPResponseInfo.SetServer Method
Pascal
procedure SetServer(
const Value: string
);
Parameters
Parameters Description
Value Type is string.

Description
SetServer is a method procedure.

TIdHTTPResponseInfo.SmartServeFile Method
Pascal
function SmartServeFile(
AContext: TIdContext;
ARequestInfo: TIdHTTPRequestInfo;
aFile: String
): cardinal;
Parameters
Parameters Description
AContext Client session for the HTTP response.
ARequestInfo Headers from the HTTP request.
aFile File name form the HTTP request.

Returns
Cardinal - Number of bytes written in the HTTP response for the requested file.

Description
SmartServeFile is a Cardinal function used to return the contents of the file specified in AFile in the HTTP response.

AContent is the client session in the HTTP server handling the client request for the specified file.

SmartServeFile allows the HTTP response to easily include the headers and contents for the requested file if the file date in the
"If-Modified-Since" header is within 2 seconds of the actual file timestamp.

If the file in aFile has not been modified since the date and time requested in the HTTP "If-Modified-Since" header, the HTTP
response code 304 is returned for the request. The return value for the method is 0 in this situation.

SmartServeFile includes the ContentType ( 675) and ContentLength ( 674) headers in the request, and the contents for the file
specified in aFile.

When ContentType ( 675) contains an empty string (''), the MIME type for the file is retrieved using the MIME table in the
HTTPServer ( 1099) for the response.

ContentLength ( 674) is set to the length of the file using the FileSizeByName ( 2790) by function.

SmartServeFile causes the HTTP headers to be written to the client connection for the HTTP session making the request, followed
immediately by the content for the file specified in aFile.

1094 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

TIdHTTPResponseInfo.WriteContent Method
Generates the HTTP response content.

Pascal
procedure WriteContent;
Description
WriteContent is a procedure used to generate the content for the HTTP response. WriteContent generates the content using either
ContentText ( 1097), or ContentStream ( 1097) when assigned, for ResponseNo ( 1099) values in the range 200

• 499 inclusive. If ResponseNo ( 1099) is not in this range, only the


ResponseNo ( 1099) and ResponseText ( 1100) is included in the content of the HTTP response.

WriteContent calls WriteHeader ( 1095) when HeaderHasBeenWritten ( 1098) contains False. WriteHeader ( 1095) is generally
used for responses where the Content length is unknown.

WriteContent uses methods in Connection ( 673) to transfer the content of the HTTP response to the HTTP client. When
ContentStream ( 1097) is assigned, the WriteStream method in Connection ( 673) is called. When ContentText ( 1097) is
non-blank, the Write method is called. Otherwise, WriteLn is used to send an HTML document containing the HTTP ResponseNo
( 1099) and ResponseText ( 1100).

WriteContent sets ContentText ( 1097) to an empty string ('') and releases the ContentStream ( 1097) to signify that the content
of the HTTP response has been written.

See Also
ContentText ( 1097)

ContentStream ( 1097)

HeaderHasBeenWritten ( 1098)

WriteHeader ( 1095)

ResponseNo ( 1099)

ResponseText ( 1100)

Connection ( 673)

TIdHTTPResponseInfo.WriteHeader Method
Generates headers for the HTTP response.

Pascal
procedure WriteHeader;
Parameters
Parameters Description
Dest Destination stream used as a buffer for the headers. Default value is Nil.

Description
WriteHeader is a procedure used to generate HTTP headers for the HTTP response. WriteHeader will raise an
EIdHTTPHeaderAlreadyWritten ( 100) exception if HeaderHasBeenWritten ( 1098) indicates that HTTP headers have already
been generated.

WriteHeader generates the following HTTP header values:

Content-Type
Content-Length

Internet Direct (Indy) Version 10.1.5 1095


TIdHTTPResponseInfo Class Classes

WWW-Authenticate
Set-Cookie

WWW-Authenticate is generated when AuthRealm ( 1096) contains a non-empty value. ResponseNo ( 1099) is set to 401 when
AuthRealm ( 1096) is used.

Set-Cookie is generated for each value in Cookies ( 1098).

Dest is an optional TStream used as a local buffer for header values. When Dest is not Nil, headers are written to Dest and not to
Connection ( 673).

Use WriteContent ( 1095) to generate the content for the HTTP response.

See Also
WriteContent ( 1095)

HeaderHasBeenWritten ( 1098)

AuthRealm ( 1096)

ResponseNo ( 1099)

EIdHTTPHeaderAlreadyWritten ( 100)

TIdHTTPResponseInfo Properties
The Properties of the TIdHTTPResponseInfo class are listed here.

Properties
Property Description
AuthRealm ( 1096) Identifies the authentication and encryption for the HTTP response.
CloseConnection ( 1097) Indicates if the HTTP response should contain a close connection header.
ContentStream ( 1097) Specifies the stream that contains the content data.
ContentText ( 1097) Specifies the content for the HTTP response.
Cookies ( 1098) Identifies Cookies for the HTTP response.
FreeContentStream ( 1098) Indicates if the object instance can free its ContentStream ( 1097).
HeaderHasBeenWritten ( 1098) Indicates that headers have been written in the HTTP response.
HTTPServer ( 1099) Server ( 1869) generating the HTTP response.
ResponseNo ( 1099) Numeric response code for the HTTP response.
ResponseText ( 1100) Represents the text for the response message.
ServerSoftware ( 1101) Identifies the server software used to generate the HTTP response.
Session ( 1102) Represents the session for the HTTP response.

Legend
Property
read only

TIdHTTPResponseInfo.AuthRealm Property
Identifies the authentication and encryption for the HTTP response.

Pascal
property AuthRealm: string;
Description
AuthRealm is a String property that identifies the authentication and encryption scheme used for the HTTP response. AuthRealm is
used when constructing headers for TIdHTTPResponseInfo ( 1089) using property values.

When AuthRealm contains a non-blank value, the HTTP response will include a "WWW-Authenticate" header with the value "Basic
realm=" and the quoted contents of the AuthRealm property. AuthRealm also ensures that the ResponseNo ( 1099) for the HTTP

1096 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

Response is 401.

The ContentText ( 1097) for the response is also set under this condition and no previous ContentText ( 1097) has been
assigned. ContentText ( 1097) will contain an HTML document consisting of the ResponseNo ( 1099) and the textual message
from RSHTTPUnauthorized.

See Also
ResponseNo ( 1099)

ContentText ( 1097)

ContentLength ( 674)

TIdHTTPResponseInfo.CloseConnection Property
Indicates if the HTTP response should contain a close connection header.

Pascal
property CloseConnection: Boolean;
Description
CloseConnection is a Boolean property that indicates if the connection used for the HTTP response should remain open, or close
after completed transmission of the HTTP response.

Changing the value in CloseConnection causes the value in the HTTP header to be updated when generating the connect header
for the HTTP response.

When CloseConnection contains True, the Connection ( 673) header is given the value 'close'. Otherwise the Connection ( 673)
header is set to the value 'keep-alive'.

TIdHTTPResponseInfo.ContentStream Property
Specifies the stream that contains the content data.

Pascal
property ContentStream: TIdStream;
Description
ContentStream is a TStream property that specifies the stream containing the content data for the HTTP response.

WriteContent ( 1095) uses ContentStream, when assigned, to generate HTTP response content instead of ContentText ( 1097).

See Also
ContentText ( 1097)

WriteContent ( 1095)

TIdHTTPResponseInfo.ContentText Property
Specifies the content for the HTTP response.

Pascal
property ContentText: string;
Description
ContentText is a String property that specifies the data used for the content of the HTTP response.

WriteContent ( 1095) uses values in the ContentStream ( 1097) property, when assigned, to generate the content for the HTTP
response instead of values in ContentText.

See Also
ContentStream ( 1097)

Internet Direct (Indy) Version 10.1.5 1097


TIdHTTPResponseInfo Class Classes

WriteContent ( 1095)

TIdHTTPResponseInfo.Cookies Property
Identifies Cookies for the HTTP response.

Pascal
property Cookies: TIdServerCookies;
Description
Cookies is a TIdServerCookies ( 1981) property that is the container for cookie values to be included in the HTTP response. The
initial values for Cookies are assigned during execution of the HTTP client session in TIdCustomHTTPServer ( 434) when they
are read from the HTTP request.

Cookies is used to store the GSessionIDCookie ( 3215) that represents persistent state information for the HTTP session.
Cookies is also used when headers for the HTTP response are constructed and written in TIdHTTPResponseInfo.WriteHeader (
1095).

See Also
TIdServerCookies ( 1981)

TIdHTTPRequestInfo ( 1077)

TIdHTTPResponseInfo ( 1089)

TIdHTTPResponseInfo.WriteHeader ( 1095)

TIdHTTPResponseInfo.FreeContentStream Property
Indicates if the object instance can free its ContentStream ( 1097).

Pascal
property FreeContentStream: Boolean;
Description
FreeContentStream is a Boolean property that indicates if the object instance can free the TStream resource allocated in
ContentStream ( 1097).

FreeContentStream is set to True in the Create ( 1092) constructor, and ensures that ContentStream ( 1097) will be released, if
assigned, prior to retrieving an HTTP response in the Destroy ( 1092) method.

Under normal circumstances, FreeContentStream is not changed during the lifetime of the HTTP response. Set FreeContentStream
to False when ContentStream ( 1097) is assigned manually, and the stream must continue to exist even after destruction of the
HTTP response.

See Also
TIdHTTP ( 1041)

ContentStream ( 1097)

Create ( 1092)

Destroy ( 1092)

TIdHTTPResponseInfo.HeaderHasBeenWritten Property
Indicates that headers have been written in the HTTP response.

Pascal
property HeaderHasBeenWritten: Boolean;

1098 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

Description
HeaderHasBeenWritten is a Boolean property that indicates headers have already been written in the HTTP response.

HeaderHasBeenWritten is used in WriteHeader ( 1095) to prevent duplication of header values for the HTTP response.
HeaderHasBeenWritten is also checked when a session for a client connection needs to write a HTTP response in the
TIdHTTPServer.OnExecute event handler.

See Also
TIdCustomHTTPServer.OnExecute

TIdHTTPServer.OnExecute

TIdHTTPResponseInfo.HTTPServer Property
Server ( 1869) generating the HTTP response.

Pascal
property HTTPServer: TIdCustomHTTPServer;
Description
HTTPServer is a read-only TIdCustomHTTPServer ( 434) property that represents the server handling the HTTP request.

HTTPServer is assigned using the argument provided in the Create ( 1092) constructor.

HTTPServer provides access to the properties and methods of the server implementation during execution of the HTTP response.

See Also
TIdCustomHTTPServer ( 434)

Create ( 1092)

TIdHTTPResponseInfo.ResponseNo Property
Numeric response code for the HTTP response.

Pascal
property ResponseNo: Integer;
Description
ResponseNo is an Integer property that indicates the numeric response code for the HTTP response.

ResponseNo can contain one of the following numeric values and associated meanings, as defined in the HTTP protocol:

Code Message
200 OK ( 4359)
201 Created
202 Accepted
203 Non-authoritative Information
204 No Content
205 Reset Content -
206 Partial Content
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified

Internet Direct (Indy) Version 10.1.5 1099


TIdHTTPResponseInfo Class Classes

305 Use Proxy


400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method not allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity To Long
414 Request-URI Too Long. 256 Chars max
415 Unsupported Media Type
500 Internal Server ( 1869) Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway timeout
505 HTTP version not supported

Use ResponseText ( 1100) for the textual representation of the HTTP response.

See Also
ResponseText ( 1100)

TIdHTTPResponseInfo.ResponseText Property
Represents the text for the response message.

Pascal
property ResponseText: String;
Description
ResponseText is a String property used to represent the text portion of the HTTP response message.

ResponseText normally contains on the of the following messages for the associated response codes:

Code Meaning
200 OK ( 4359)
201 Created
202 Accepted
203 Non-authoritative Information
204 No Content
205 Reset Content

1100 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPResponseInfo Class

206 Partial Content


301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method not allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity To Long
414 Request-URI Too Long. 256 Chars max
415 Unsupported Media Type
500 Internal Server ( 1869) Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway timeout
505 HTTP version not supported

Use ResponseNo ( 1099) for the numeric representation of the HTTP response.

See Also
ResponseNo ( 1099)

TIdHTTPResponseInfo.ServerSoftware Property
Identifies the server software used to generate the HTTP response.

Pascal
property ServerSoftware: string;
Description
ServerSoftware is a String property that identifies the server software used to generate the HTTP response.

The default value for ServerSoftware is the GServerSoftware ( 3214) string constant, as assigned in Create ( 1092).

See Also
Create ( 1092)

Internet Direct (Indy) Version 10.1.5 1101


TIdHTTPServer Class Classes

TIdHTTPResponseInfo.Session Property
Represents the session for the HTTP response.

Pascal
property Session: TIdHTTPSession;
Description
Session is a read-only TIdHTTPSession ( 1105) property that represents the HTTP session used for the HTTP response.

Session is assigned when the HTTP server calls CreateSession to get or create ( 1092) a persistent session for the client
connection.

See Also
TIdHTTPSession ( 1105)

TIdCustomHTTPServer.CreateSession ( 436)

TIdHTTPServer Class
Implements an HTTP Server.

File
IdHTTPServer ( 4664)

Hierarchy

Pascal
TIdHTTPServer = class(TIdCustomHTTPServer);
Description
TIdHTTPServer is a TIdCustomHTTPServer ( 434) descendant that is a multi-threaded server implementation of the Hypertext
Transfer Protocol (HTTP), as described in the Internet Standards documents:

RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0

RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1

TIdHTTPServer publishes the inherited OnCreatePostStream ( 1105) and OnCommandGet ( 1104) event handlers for the HTTP
server implementation.

TIdHTTPServer also supports the Secure Hypertext Transport protocol (HTTPS) as described in the Internet Standards document:

RFC 2660 - The Secure HyperText Transfer Protocol

TIdHTTPServer does specify or implement any new functionality; it publishes properties specified in TIdCustomHTTPServer (
434) for the OnCreatePostStream ( 1105) and OnCommandGet ( 1104) event handlers.

If the server needs to handle requests using the Secure Socket Layer (SSL) protocol, an instance of a TIdServerIOHandler (
1993) descendant specific to the SSL transport must be assigned to the IOHandler ( 464) for the server.

Assign an instance of TIdServerInterceptOpenSSL to the IOHandler ( 464) property to allow use of the HTTPS protocol using the
OpenSSL library. For the Windows platform, you must install the Indy OpenSSL support .DLL's available at the Intelicom web site
(http://www.intelicom.si/index.php?newlang=eng) to enable Secure Socket Layer support.

See Also
TIdCustomHTTPServer ( 434)

TIdServerIOHandler ( 1993)

1102 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPServer Class

TIdServerInterceptOpenSSL

IndySupport ( 15)

TIdHTTPServer Members
The following tables list the members exposed by TIdHTTPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AutoStartSession ( 438) Requests a new session when an existing session is not found.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 439) Default port number for the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
KeepAlive ( 439) Indicates if a client connection should remain open for subsequent use in an HTTP session.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
MaximumHeaderLineCount ( 439) Maximum number of header lines allowed in an HTTP request.
MIMETable ( 440) Represents the MIME type table for the HTTP server implementation.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnCommandGet ( 1104) Event handler signalled for HTTP server GET, POST, and HEAD requests.
OnCreatePostStream ( 1105) Event handler that allows creation of the POST stream for a client thread.
ParseParams ( 440) Requests parsing of query parameters in client requests.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
ServerSoftware ( 441) Indicates the server software used to generate the HTTP response.
SessionList ( 441) Container for HTTP sessions for the server.
SessionState ( 442) Indicates that the server uses persistent HTTP sessions.
SessionTimeOut ( 442) specifies the default time-to-live for persistent HTTP sessions.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
CreateSession ( 436) Creates a new HTTP session.
Destroy ( 357) Frees the object instance.
Destroy ( 437) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndSession ( 437) Frees the named HTTP session.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.

Internet Direct (Indy) Version 10.1.5 1103


TIdHTTPServer Class Classes

OnCommandOther ( 443) Represents the event handler for unknown HTTP commands.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnCreateSession ( 443) Event signalled when a session is needed a client connection.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnInvalidSession ( 443) Event handler signalled when a session cannot be restored for a specific SessionID.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnSessionEnd ( 444) Specifies the event handler for terminating HTTP sessions.
OnSessionStart ( 444) Specifies the event handler for creating a new HTTP session.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdHTTPServer Properties
The Properties of the TIdHTTPServer class are listed here.

Properties
Property Description
OnCommandGet ( 1104) Event handler signalled for HTTP server GET, POST, and HEAD requests.
OnCreatePostStream ( 1105) Event handler that allows creation of the POST stream for a client thread.

Legend
Property

TIdHTTPServer.OnCommandGet Event
Event handler signalled for HTTP server GET, POST, and HEAD requests.

Pascal
property OnCommandGet;
Parameters
Parameters Description
AContext The client session generating the event.
RequestInfo The request object reference.
ResponseInfo The response object reference.

Description
OnCommandGet is the TIdHTTPGetEvent event handler used to respond to events generated for the HTTP server GET, POST,
and HEAD commands. OnCommandGet is published in TIdHTTPServer ( 1102), and is used during execution of the client thread
to form an HTTP response to the HTTP request from the client connection.

The server implementation may assign a procedure to the OnCommandGet event handler to allow the server to respond to the
HTTP commands. Note: When OnCommandGet is unassigned, the HTTP request will be read from the client connection and an
HTTP prototcol error will be sent in the HTTP reponse.

OnCommandGet can be used to manipulate properties and methods of the RequestInfo and ResponseInfo parameters prior to
allowing the server to send the response to the HTTP client.

See Also
TIdHTTPGetEvent

TIdHTTPRequestInfo ( 1077)

1104 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPSession Class

TIdHTTPResponseInfo ( 1089)

TIdRFCReply

TIdHTTPServer.OnCreatePostStream Event
Event handler that allows creation of the POST stream for a client thread.

Pascal
property OnCreatePostStream;
Parameters
Parameters Description
ASender Client conncetion for the event notification.
VPostStream Steam allocated for the HTTP post request.

Description
OnCreatePostStream is a TOnCreatePostStream ( 3103) property that represents the event handler triggered when a client
thread needs to create ( 267) a stream used in an HTTP POST request. OnCreatePostStream is used during execution of the
thread client connection identified by ASender. OnCreatePostStream is a published property in TIdHTTPServer ( 1102).

The server implementation may assign a procedure to the event handler to allow responding to the event notification. The event
handler can perform processing required prior to creation of a stream class instance. The event handler can create ( 267) and
assign a stream class instance to VPostStream when appropriate, or retun the value Nil. If VPostStream is unassigned, a
TIdStringStream ( 3090) instance will be created prior to execution of a command handler for the HTTP POST request.

See Also
TOnCreatePostStream ( 3103)

TIdContext ( 376)

TIdHTTPSession Class
Implements a persistent HTTP Session.

File
IdCustomHTTPServer ( 4608)

Hierarchy

Pascal
TIdHTTPSession = class(TObject);
Description
TIdHTTPSession is a TObject descendant that implements a HTTP Session. TIdHTTPSession provides support for maintaining
persistent HTTP session and state for TIdCustomHTTPServer ( 434) and TIdHTTPServer ( 1102) implementations.

TIdHTTPSession is used with TIdHTTPCustomSessionList ( 1052) and TIdHTTPDEfaultSessionList to provide persistent HTTP
session management using the SessionID ( 1111) property and the "IDSESSIONID" Cookie.

TIdHTTPSession uses an internal TIdCriticalSection ( 404) instance to provide resource protection (using Lock ( 1109) and
Unlock ( 1109)) in multi-threaded HTTP server implementations.

SessionID ( 1111) is the unique identifier for the HTTP session.

LastTimestamp is the date and time that the HTTP session was last modified.

RemoteHost ( 1110) is the address of the remote computer using the HTTP session.

Internet Direct (Indy) Version 10.1.5 1105


TIdHTTPSession Class Classes

Content ( 1110) is a storage area for string values that can be used to form HTTP request and/or response messages.

See Also
TIdHTTPCustomSessionList ( 1052)

TIdHTTPDefaultSessionList ( 1059)

TIdCustomHTTPServer ( 434)

TIdHTTPServer ( 1102)

TIdCookie

IndySupport ( 15)

TIdHTTPSession Members
The following tables list the members exposed by TIdHTTPSession.

Properties
Property Description
Content ( 1110) Provides storage for HTTP message contents.
LastTimeStamp ( 1110) Specifies the date and time a session was last modified.
RemoteHost ( 1110) Remote IP address for the HTTP session.
SessionID ( 1111) Represents the unique session identifier.

Methods
Method Description
Create ( 1106) Constructor for the object instance.
CreateInitialized ( 1107) Constructor for the object instance.
Destroy ( 1108) Frees the object instance.
Lock ( 1109) Provides resource protection for Session properties and methods.
Unlock ( 1109) Disables resource protection for the HTTP session.

Legend
Constructor
virtual
Property
read only

TIdHTTPSession Methods
The Methods of the TIdHTTPSession class are listed here.

Methods
Method Description
Create ( 1106) Constructor for the object instance.
CreateInitialized ( 1107) Constructor for the object instance.
Destroy ( 1108) Frees the object instance.
Lock ( 1109) Provides resource protection for Session properties and methods.
Unlock ( 1109) Disables resource protection for the HTTP session.

Legend
Constructor
virtual

TIdHTTPSession.Create Constructor
Constructor for the object instance.

1106 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPSession Class

Pascal
constructor Create(
AOwner: TIdHTTPCustomSessionList
); virtual;
Parameters
Parameters Description
AOwner Owner of the object instance.

Description
Create is the constructor for the object instance, and is responsible for initializing properties for the TIdHTTPSession ( 1105)
instance. Create calls the inherited Create constructor.

AOwner is the owner of the object instance, and when assigned, should reflect the TIdHTTPCustomSessionList ( 1052) that owns
the session object instance. AOwner is used to trigger the OnSessionStart event handler to perform session maintenance specific
to the server implementation.

Create allocates the internal TIdCriticalSection ( 404) instance used for resource protection in the Lock ( 1109) and Unlock (
1109) methods.

Create also allocates the resource required for the Content ( 1110) property.

Use CreateInitialized ( 1107) to create an HTTP session that assigns values for the session identifier, remote IP address, and last
access timestamp.

Use Destroy ( 1108) to free the object instance.

See Also
TIdHTTPCustomSessionList ( 1052)

TIdHTTPDefaultSessionList ( 1059)

TOnSessionStartEvent ( 3112)

CreateInitialized ( 1107)

Destroy ( 1108)

SessionID ( 1111)

LastTimeStamp ( 1110)

RemoteHost ( 1110)

Lock ( 1109)

Unlock ( 1109)

TIdHTTPSession.CreateInitialized Constructor
Constructor for the object instance.

Pascal
constructor CreateInitialized(
AOwner: TIdHTTPCustomSessionList;
const SessionID: string;
const RemoteIP: string
); virtual;
Parameters
Parameters Description
AOwner Session list that owns the object instance.
SessionID Session identifier for the object instance.
RemoteIP IP address for the remote host for the session.

Internet Direct (Indy) Version 10.1.5 1107


TIdHTTPSession Class Classes

Description
CreateInitialized is the constructor for the object instance. CreateInitialized creates a new HTTP session, and sets the value for
properties in the HTTP session including the SessionID ( 1111), RemoteHost ( 1110), Content ( 1110), Owner, and
LastTimestamp.

The session identifier is set to the value specified in SessionID ( 1111).

RemoteHost ( 1110) is set to the value specified in RemoteIP.

LastTimeStamp ( 1110) is set to the current date and time on the HTTP server to indicate when the HTTP session was last
accessed.

AOwner is the owner of the object instance, and when assigned, should reflect the TIdHTTPCustomSessionList ( 1052) that owns
the session object instance. AOwner is used to trigger the OnSessionStart event handler to perform session maintenance specific
to the server implementation. `

Resources required for the Content ( 1110) property are allocated in Create ( 1106).

CreateInitialized is called from the CreateSession method in TIdHTTPDefaultSessionList ( 1059), where a new session is created
and added to the session list for the server.

Use Create ( 1106) to allocate a new HTTP session when persistent state is not maintained in the HTTP server implementation.

Use Destroy ( 1108) to free the object instance.

See Also
Create ( 1106)

Destroy ( 1108)

LastTimeStamp ( 1110)

SessionID ( 1111)

Content ( 1110)

TIdHTTPCustomSessionList ( 1052)

TIdHTTPSession.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is an overridden procedure that acts as the destructor for the object instance. Destroy is responsible for handling persistent
session clean-up and freeing resources allocated for properties in the HTTP session.

Destroy triggers the OnSessionEnd event handler that signals the session should be removed from the session list that own the
HTTP session.

Destroy frees and releases resources allocated to the Content ( 1110) property.

Destroy frees and release resources allocated to the internal TIdCriticalSection ( 404) instance used for resource protection in
Lock ( 1109) and Unlock ( 1109).

When the Owner of the session is assigned, the RemoveSession method for the TIdHTTPCustomSessionList ( 1052) instance is
called to remove the current session from the session list.

Destroy calls the inherited destructor proper to exiting from the method.

See Also
Create ( 1106)

CreateInitialized ( 1107)

1108 Internet Direct (Indy) Version 10.1.5


Classes TIdHTTPSession Class

Content ( 1110)

Lock ( 1109)

Unlock ( 1109)

TIdHTTPCustomSessionList.OnSessionEnd ( 1058)

TIdHTTPCustomSessionList.RemoveSession

TIdHTTPSession.Lock Method
Provides resource protection for Session properties and methods.

Pascal
procedure Lock;
Description
Lock is a procedure used to enable resource protection for the properties and methods of the HTTP session in a multi-threaded
application.

Lock uses the internal TIdCriticalSection ( 404) instance allocated in the Create ( 1106) method, and freed in Destroy ( 1108).

Use Unlock ( 1109) to disable resource protection for the HTTP session.

See Also
Create ( 1106)

Destroy ( 1108)

Unlock ( 1109)

TIdCriticalSection ( 404)

TIdHTTPSession.Unlock Method
Disables resource protection for the HTTP session.

Pascal
procedure Unlock;
Description
Unlock is a procedure used to remove resource protect for properties and methods in the HTTP session following a call to Lock (
1109).

Unlock uses the TIdCriticalSection ( 404) instance allocated in Create ( 1106). Unlock exits the TCriticalSection ( 193) used to
prevent multi-threaded access to the object instance properties and methods.

Use Lock ( 1109) to enable resource protection for the HTTP session.

See Also
Lock ( 1109)

TIdCriticalSection ( 404)

TIdHTTPSession Properties
The Properties of the TIdHTTPSession class are listed here.

Properties
Property Description
Content ( 1110) Provides storage for HTTP message contents.

Internet Direct (Indy) Version 10.1.5 1109


TIdHTTPSession Class Classes

LastTimeStamp ( 1110) Specifies the date and time a session was last modified.
RemoteHost ( 1110) Remote IP address for the HTTP session.
SessionID ( 1111) Represents the unique session identifier.

Legend
Property
read only

TIdHTTPSession.Content Property
Provides storage for HTTP message contents.

Pascal
property Content: TIdStrings;
Description
Content is a TStrings property that stores string values that can be used to form the content for an HTTP request and/or response.

Content can also be used as a temporary storage area for values subsequently use in command or event handlers like
TIdHTTP.OnCommandGet.

See Also
TIdHTTP.OnCommandGet

TIdHTTPSession.LastTimeStamp Property
Specifies the date and time a session was last modified.

Pascal
property LastTimeStamp: TIdDateTime;
Description
LastTimeStamp is a read-only TDateTime property that identifies the date and time that a HTTP session was last modified.
LastTimeStamp is used with the SessionTimeOut value from TIdHTTPCustomSessionList ( 1052) to determine when a persistent
HTTP session has expired.

LastTimeStamp is initialized when CreateInitialized ( 1107) is used to instantiate the object instance.

LastTimeStamp is updated in TIdHTTPDefaultSessionList.GetSession ( 1062) when a HTTP session is accessed for use with a
HTTP request or response in TIdCustomHTTPServer ( 434).

LastTimeStamp is used in the PurgeStaleSessions method in TIdHTTPDefaultSessionList ( 1059) to determine when a stale
session needs to the removed from the session list.

See Also
TIdHTTPCustomSessionList ( 1052)

TIdHTTPCustomSessionList.SessionTimeout ( 1057)

TIdHTTPDefaultSessionList ( 1059)

TIdHTTPDefaultSessionList.PurgeStaleSessions ( 1063)

TIdCustomHTTPServer ( 434)

TIdHTTPSession.RemoteHost Property
Remote IP address for the HTTP session.

Pascal
property RemoteHost: string;

1110 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp_dun Class

Description
RemoteHost is a read-only String property that represents the IP address for the remote computer system which is the endpoint for
the HTTP session. RemoteHost is used when the GetSession method in TIdHTTPDefaultSessionList ( 1059) is called to locate a
persistent session having the desired SessionID ( 1111) and RemoteHost.

RemoteHost is updated when CreateInitialized ( 1107) is used to instantiate the HTTP session.

Use SessionID ( 1111) to set the session identifier for the HTTP session.

See Also
SessionID ( 1111)

TIdHTTPDefaultSessionList.GetSession ( 1062)

TIdHTTPDefaultSessionList.CreateUnique

TIdHTTPSession.SessionID Property
Represents the unique session identifier.

Pascal
property SessionID: String;
Description
SessionID is a String property that represents the unique identifier for the HTTP session. SessionID is the "IDSESSIONID" Cookie
value used to implement HTTP session persistence.

SessionID is used when the GetSession method in TIdHTTPDefaultSessionList ( 1059) is called to locate a persistent session
having the desired SessionID and RemoteHost ( 1110) provided in an HTTP session.

SessionID is updated when TIdCustomHTTPServer.CreateSession ( 436) is used to initialize a new persistent session for
requests to the server.

RemoteHost ( 1110) identifies the IP address that is the remote endpoint for the HTTP session.

See Also
RemoteHost ( 1110)

TIdCustomHTTPServer.CreateSession ( 436)

TIdHTTPDefaultSessionList.GetSession ( 1062)

TIdHTTPDefaultSessionList.CreateUnique

TIdicmp_dun Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdicmp_dun = class(TIdUnion);
Description
TIdicmp_dun is a TIdUnion ( 2535) descendant.

Internet Direct (Indy) Version 10.1.5 1111


TIdicmp_dun Class Classes

See Also
TIdUnion ( 2535)

TIdicmp_dun Members
The following tables list the members exposed by TIdicmp_dun.

Properties
Property Description
BytesLen ( 2537)
data ( 1113)
mask ( 1113)
ts_otime ( 1113)
ts_rtime ( 1113)
ts_ttime ( 1113)

Methods
Method Description
create ( 1112)
ReadStruct ( 2262)
ReadStruct ( 2536)
WriteStruct ( 2262)
WriteStruct ( 2536)

Legend
Constructor
virtual
Property
read only

TIdicmp_dun Methods
The Methods of the TIdicmp_dun class are listed here.

Methods
Method Description
create ( 1112)

Legend
Constructor
virtual

TIdicmp_dun.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdicmp_dun Properties
The Properties of the TIdicmp_dun class are listed here.

1112 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp_hun Class

Properties
Property Description
data ( 1113)
mask ( 1113)
ts_otime ( 1113)
ts_rtime ( 1113)
ts_ttime ( 1113)

Legend
Property

TIdicmp_dun.data Property
Pascal
property data: Byte;
Description
data is a Public Byte property. Write access for the property is implemented using setdata.

TIdicmp_dun.mask Property
Pascal
property mask: Cardinal;
Description
mask is a Public Cardinal property. Write access for the property is implemented using Setmask.

TIdicmp_dun.ts_otime Property
Pascal
property ts_otime: TIdNetTime;
Description
ts_otime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Setts_otime.

TIdicmp_dun.ts_rtime Property
Pascal
property ts_rtime: TIdNetTime;
Description
ts_rtime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Setts_rtime.

TIdicmp_dun.ts_ttime Property
Pascal
property ts_ttime: TIdNetTime;
Description
ts_ttime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Setts_ttime.

Internet Direct (Indy) Version 10.1.5 1113


TIdicmp_hun Class Classes

TIdicmp_hun Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdicmp_hun = class(TIdUnion);
Description
TIdicmp_hun is a TIdUnion ( 2535) descendant.

See Also
TIdUnion ( 2535)

TIdicmp_hun Members
The following tables list the members exposed by TIdicmp_hun.

Properties
Property Description
BytesLen ( 2537)
echo_id ( 1115)
echo_seq ( 1115)
frag_mtu ( 1116)
frag_pad ( 1116)
gateway_s_b1 ( 1116)
gateway_s_b2 ( 1116)
gateway_s_b3 ( 1116)
gateway_s_b4 ( 1116)
gateway_s_l ( 1116)
gateway_s_w1 ( 1117)
gateway_s_w2 ( 1117)

Methods
Method Description
create ( 1115)
ReadStruct ( 2262)
ReadStruct ( 2536)
WriteStruct ( 2262)
WriteStruct ( 2536)

Legend
Constructor
virtual
Property
read only

TIdicmp_hun Methods
The Methods of the TIdicmp_hun class are listed here.

1114 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp_hun Class

Methods
Method Description
create ( 1115)

Legend
Constructor
virtual

TIdicmp_hun.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdicmp_hun Properties
The Properties of the TIdicmp_hun class are listed here.

Properties
Property Description
echo_id ( 1115)
echo_seq ( 1115)
frag_mtu ( 1116)
frag_pad ( 1116)
gateway_s_b1 ( 1116)
gateway_s_b2 ( 1116)
gateway_s_b3 ( 1116)
gateway_s_b4 ( 1116)
gateway_s_l ( 1116)
gateway_s_w1 ( 1117)
gateway_s_w2 ( 1117)

Legend
Property

TIdicmp_hun.echo_id Property
Pascal
property echo_id: word;
Description
echo_id is a Public word property. Write access for the property is implemented using Setecho_id.

TIdicmp_hun.echo_seq Property
Pascal
property echo_seq: word;
Description
echo_seq is a Public word property. Write access for the property is implemented using Setecho_seq.

Internet Direct (Indy) Version 10.1.5 1115


TIdicmp_hun Class Classes

TIdicmp_hun.frag_mtu Property
Pascal
property frag_mtu: word;
Description
frag_mtu is a Public word property. Write access for the property is implemented using Setfrag_mtu.

TIdicmp_hun.frag_pad Property
Pascal
property frag_pad: word;
Description
frag_pad is a Public word property. Write access for the property is implemented using Setfrag_pad.

TIdicmp_hun.gateway_s_b1 Property
Pascal
property gateway_s_b1: Byte;
Description
gateway_s_b1 is a Public Byte property. Write access for the property is implemented using Setgateway_s_b1.

TIdicmp_hun.gateway_s_b2 Property
Pascal
property gateway_s_b2: Byte;
Description
gateway_s_b2 is a Public Byte property. Write access for the property is implemented using Setgateway_s_b2.

TIdicmp_hun.gateway_s_b3 Property
Pascal
property gateway_s_b3: Byte;
Description
gateway_s_b3 is a Public Byte property. Write access for the property is implemented using Setgateway_s_b3.

TIdicmp_hun.gateway_s_b4 Property
Pascal
property gateway_s_b4: Byte;
Description
gateway_s_b4 is a Public Byte property. Write access for the property is implemented using Setgateway_s_b4.

TIdicmp_hun.gateway_s_l Property
Pascal
property gateway_s_l: Cardinal;

1116 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp6_hdr Class

Description
gateway_s_l is a Public Cardinal property. Write access for the property is implemented using Setgateway_s_l.

TIdicmp_hun.gateway_s_w1 Property
Pascal
property gateway_s_w1: word;
Description
gateway_s_w1 is a Public word property. Write access for the property is implemented using Setgateway_s_w1.

TIdicmp_hun.gateway_s_w2 Property
Pascal
property gateway_s_w2: word;
Description
gateway_s_w2 is a Public word property. Write access for the property is implemented using Setgateway_s_w2.

TIdicmp6_hdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdicmp6_hdr = class(TIdStruct);
Description
TIdicmp6_hdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdicmp6_hdr Members
The following tables list the members exposed by TIdicmp6_hdr.

Properties
Property Description
data ( 1119)
icmp6_cksum ( 1119)
icmp6_code ( 1119)
icmp6_type ( 1120)

Methods
Method Description
create ( 1118)
Destroy ( 1118)
ReadStruct ( 1118)

Internet Direct (Indy) Version 10.1.5 1117


TIdicmp6_hdr Class Classes

WriteStruct ( 1119)

Legend
Constructor
virtual
Property
read only

TIdicmp6_hdr Methods
The Methods of the TIdicmp6_hdr class are listed here.

Methods
Method Description
create ( 1118)
Destroy ( 1118)
ReadStruct ( 1118)
WriteStruct ( 1119)

Legend
Constructor
virtual

TIdicmp6_hdr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdicmp6_hdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdicmp6_hdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

1118 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp6_hdr Class

TIdicmp6_hdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdicmp6_hdr Properties
The Properties of the TIdicmp6_hdr class are listed here.

Properties
Property Description
data ( 1119)
icmp6_cksum ( 1119)
icmp6_code ( 1119)
icmp6_type ( 1120)

Legend
Property
read only

TIdicmp6_hdr.data Property
Pascal
property data: TIdicmp6_un;
Description
data is a Public read-only TIdicmp6_un ( 1120) property.

TIdicmp6_hdr.icmp6_cksum Property
Pascal
property icmp6_cksum: uint16_t;
Description
icmp6_cksum is a Public uint16_t property. Write access for the property is implemented using Ficmp6_cksum.

TIdicmp6_hdr.icmp6_code Property
Pascal
property icmp6_code: uint8_t;
Description
icmp6_code is a Public uint8_t property. Write access for the property is implemented using Ficmp6_code.

Internet Direct (Indy) Version 10.1.5 1119


TIdicmp6_un Class Classes

TIdicmp6_hdr.icmp6_type Property
Pascal
property icmp6_type: uint8_t;
Description
icmp6_type is a Public uint8_t property. Write access for the property is implemented using Ficmp6_type.

TIdicmp6_un Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdicmp6_un = class(TIdUnion);
Description
TIdicmp6_un is a TIdUnion ( 2535) descendant.

See Also
TIdUnion ( 2535)

TIdicmp6_un Members
The following tables list the members exposed by TIdicmp6_un.

Properties
Property Description
BytesLen ( 2537)
icmp6_data16 ( 1121)
icmp6_data32 ( 1122)
icmp6_data8 ( 1122)
icmp6_id ( 1122)
icmp6_maxdelay ( 1122)
icmp6_mtu ( 1122)
icmp6_pptr ( 1122)
icmp6_seq ( 1122)
icmp6_un_data16 ( 1123)
icmp6_un_data32 ( 1123)
icmp6_un_data8 ( 1123)

Methods
Method Description
create ( 1121)
ReadStruct ( 2262)
ReadStruct ( 2536)
WriteStruct ( 2262)
WriteStruct ( 2536)

1120 Internet Direct (Indy) Version 10.1.5


Classes TIdicmp6_un Class

Legend
Constructor
virtual
Property
read only

TIdicmp6_un Methods
The Methods of the TIdicmp6_un class are listed here.

Methods
Method Description
create ( 1121)

Legend
Constructor
virtual

TIdicmp6_un.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdicmp6_un Properties
The Properties of the TIdicmp6_un class are listed here.

Properties
Property Description
icmp6_data16 ( 1121)
icmp6_data32 ( 1122)
icmp6_data8 ( 1122)
icmp6_id ( 1122)
icmp6_maxdelay ( 1122)
icmp6_mtu ( 1122)
icmp6_pptr ( 1122)
icmp6_seq ( 1122)
icmp6_un_data16 ( 1123)
icmp6_un_data32 ( 1123)
icmp6_un_data8 ( 1123)

Legend
Property

TIdicmp6_un.icmp6_data16 Property
Pascal
property icmp6_data16: uint16_t;
Description
icmp6_data16 is a Public uint16_t property. Write access for the property is implemented using Seticmp6_data16.

Internet Direct (Indy) Version 10.1.5 1121


TIdicmp6_un Class Classes

TIdicmp6_un.icmp6_data32 Property
Pascal
property icmp6_data32: uint32_t;
Description
icmp6_data32 is a Public uint32_t property. Write access for the property is implemented using Seticmp6_un_data32.

TIdicmp6_un.icmp6_data8 Property
Pascal
property icmp6_data8: uint8_t;
Description
icmp6_data8 is a Public uint8_t property. Write access for the property is implemented using Seticmp6_data8.

TIdicmp6_un.icmp6_id Property
Pascal
property icmp6_id: uint16_t;
Description
icmp6_id is a Public uint16_t property. Write access for the property is implemented using Seticmp6_data16.

TIdicmp6_un.icmp6_maxdelay Property
Pascal
property icmp6_maxdelay: uint16_t;
Description
icmp6_maxdelay is a Public uint16_t property. Write access for the property is implemented using Seticmp6_data16.

TIdicmp6_un.icmp6_mtu Property
Pascal
property icmp6_mtu: uint32_t;
Description
icmp6_mtu is a Public uint32_t property. Write access for the property is implemented using Seticmp6_un_data32.

TIdicmp6_un.icmp6_pptr Property
Pascal
property icmp6_pptr: uint32_t;
Description
icmp6_pptr is a Public uint32_t property. Write access for the property is implemented using Seticmp6_un_data32.

TIdicmp6_un.icmp6_seq Property
Pascal
property icmp6_seq: uint16_t;

1122 Internet Direct (Indy) Version 10.1.5


Classes TIdIcmpClient Class

Description
icmp6_seq is a Public uint16_t property. Write access for the property is implemented using Seticmp6_seq.

TIdicmp6_un.icmp6_un_data16 Property
Pascal
property icmp6_un_data16 [Index:Integer]: uint16_t;
Description
icmp6_un_data16 is a Public uint16_t property. Write access for the property is implemented using Seticmp6_un_data16.

TIdicmp6_un.icmp6_un_data32 Property
Pascal
property icmp6_un_data32: uint32_t;
Description
icmp6_un_data32 is a Public uint32_t property. Write access for the property is implemented using Seticmp6_un_data32.

TIdicmp6_un.icmp6_un_data8 Property
Pascal
property icmp6_un_data8 [Index:Integer]: uint8_t;
Description
icmp6_un_data8 is a Public uint8_t property. Write access for the property is implemented using Seticmp6_un_data8.

TIdIcmpClient Class
Implements an ICMP client.

File
IdIcmpClient ( 4665)

Hierarchy

Pascal
TIdIcmpClient = class(TIdCustomIcmpClient);
Description
TIdIcmpClient is a TIdRawClient ( 1814) descendant that implements an Internet Control Message Protocol ( 1816) client, as
described in the Internet standards document:

RFC 792 - Internet Control Message Protocol

TIdIcmpClient is used to send ( 447) an Internet Control Message Protocol ( 1816) (ICMP) packet to another computer. ICMP
packets are used for ping ( 1125) and TraceRoute capability to help diagnose problems with connectivity.

TIdIcmpClient is a descendant of the abstract class TIdRawClient ( 1814), and uses the Protocol ( 1816) value
Id_IPPROTO_ICMP (Decimal 1). TIdIcmpClient uses the message formats and algorithms as defined in RFC 792.

Use TIdIcmpClient to diagnose a communications links by using Ping ( 1125). Host ( 1126) identifies the IP address or computer
name for the echo request. Use ReplyStatus ( 1127) and OnReply ( 1128) to access information received as a result of the echo
request datagram. Set ReceiveTimeout ( 1127) to control the time to wait for a response to the echo request datagram.

Internet Direct (Indy) Version 10.1.5 1123


TIdIcmpClient Class Classes

Use the TTL property to set the packet's Time To Live value: the maximum number of hops the packet will travel before being
bounced.

For Traceroute application, send ( 447) ping ( 1125) echo requests with increased TTL values. Each reply will hold the IP
address of the hop where the TTL expired, allowing the program to build the packet's route.

TIdIcmpClient implements an overridden InitComponent used to sets default property value during component creation, including:

Property Name Value


Protocol ( 1816) Id_IPPROTO_ICMP
ReceiveTimeOut Id_TIDICMP_ReceiveTimeout ( 3823)

For Windows NT and Windows 2000, administrator privileges are required to allow TIdICMPClient.Ping ( 1125) to work properly.
The command line PING application does not exhibit this behavior because Microsoft chose to use undocumented calls in
ICMP.DLL and its winsock implementation to get around the issue. In short: they cheated. Indy does not use ICMP.DLL to maintain
Linux compatibility, and allow use of both Raw sockets and ICMP sockets.

See Also
TIdRawClient ( 1814) Id_IPPROTO_ICMP IndySupport ( 15)

TIdIcmpClient Members
The following tables list the members exposed by TIdIcmpClient.

Properties
Property Description
Binding ( 1813) Represents the socket handle for the connection.
Host ( 1126) Address used to connect to a computer.
IPVersion ( 1126)
PacketSize ( 1127)
Port ( 1816) Identifies the port number for the socket connection.
Protocol ( 1816) Identifies the protocol option for the socket connection.
ProtocolIPv6 ( 1817)
ReceiveTimeout ( 1127) Specifies the time limit to wait for echo responses.
ReplyData ( 1127) Represents the raw data in the ICMP Echo reponse.
ReplyStatus ( 1127) Specifies the structure used to store a response to an echo request.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 446)
Destroy ( 1811) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Ping ( 1125) Sends an echo request and receives an echo response.
Receive ( 446)
ReceiveBuffer ( 1811)
CType ( 267)
Send ( 447)
Create ( 1274)

1124 Internet Direct (Indy) Version 10.1.5


Classes TIdIcmpClient Class

Send ( 1811)

Events
Event Description
OnReply ( 1128) Specifies an event handler for TOnReplyEvent ( 3110) events.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIcmpClient Methods
The Methods of the TIdIcmpClient class are listed here.

Methods
Method Description
Ping ( 1125) Sends an echo request and receives an echo response.

Legend
Method

TIdIcmpClient.Ping Method
Sends an echo request and receives an echo response.

Pascal
procedure Ping(
const ABuffer: String = '';
SequenceID: word = 0
);
Parameters
Parameters Description
ABuffer Optional data to be sent in the ping request.
SequenceID Uniqueness Identifier for the Ping request. Default value is 0.

Description
Ping is a procedure used to prepare and send ( 447) an echo request datagram, and to receive ( 446) the echo response. Ping
sends the echo request to the computer identified in Host ( 1126), and gets the response to the echo request datagram.

ABuffer is an optional string that contains values to be sent in the content of the Ping request.

SequenceID is a Word value used as a packet identifier for the Ping request. SequenceID is also used when decoding the response
packets for a Ping request. When SequenceID contains a non-zero value, it is used to match an echo response to the original ping
request with the same sequence identifer. SequenceID can be set to a unique value to identify a specific Ping request and/or
response.

Set ReceiveTimeout ( 1127) to indicate the time to wait for a response to the echo request datagram.

Use ReplyStatus ( 1127) to access identification, diagnostic, and statistical information received in a response to an echo request
datagram.

Assign an OnReply ( 1128) event handler to perform additional processing when a TOnReplyEvent ( 3110) is triggered during
processing for a Ping response.

The socket handle allocated for sending and receiving datagram packets in Ping is closed prior to completion of the method.

Internet Direct (Indy) Version 10.1.5 1125


TIdIcmpClient Class Classes

For Windows NT and Windows 2000, administrator privileges are required to allow TIdICMPClient.Ping to work properly. The
command line PING application does not exhibit this behavior because Microsoft chose to use undocumented calls in ICMP.DLL
and its winsock implementation to get around the issue. In short: they cheated. Indy does not use ICMP.DLL to maintain Linux
compatibility, and allow use of both Raw sockets and ICMP sockets.

See Also
TIdIcmpClient.Host ( 1126)

TIdIcmpClient.ReceiveTimeout ( 1127)

TIdIcmpClient.ReplyStatus ( 1127)

TIdIcmpClient.OnReply ( 1128)

TOnReplyEvent ( 3110)

TIdIcmpClient Properties
The Properties of the TIdIcmpClient class are listed here.

Properties
Property Description
Host ( 1126) Address used to connect to a computer.
IPVersion ( 1126)
PacketSize ( 1127)
ReceiveTimeout ( 1127) Specifies the time limit to wait for echo responses.
ReplyData ( 1127) Represents the raw data in the ICMP Echo reponse.
ReplyStatus ( 1127) Specifies the structure used to store a response to an echo request.

Legend
Property

TIdIcmpClient.Host Property
Address used to connect to a computer.

Pascal
property Host: string;
Description
Host is a published property in TIdIcmpClient ( 1123) that indicates the IP address or host name to use as the destination for the
ICMP request. The address can be a computer name such as "wvnvm.wvnet.edu" or an IP address such as "129.71.2.4".

Use Port ( 1816) to specify the port number used for the ICMP request.

See Also
TIdIcmpClient.Port ( 1816)

TIdIcmpClient.IPVersion Property
Pascal
property IPVersion;
Description
IPVersion is a Published property.

1126 Internet Direct (Indy) Version 10.1.5


Classes TIdIcmpClient Class

TIdIcmpClient.PacketSize Property
Pascal
property PacketSize;
Description
PacketSize is a Published property.

TIdIcmpClient.ReceiveTimeout Property
Specifies the time limit to wait for echo responses.

Pascal
property ReceiveTimeout: integer;
Description
ReceiveTimeout is an Integer property that identifies the maximum time that the ICMP client connection should wait for a response
to an echo request. ReceiveTimeout is specified in milliseconds.

ReceiveTimeout is used when capturing an echo request in Ping ( 1125).

See Also
TIdIcmpClient.Ping ( 1125)

TIdIcmpClient.ReplyData Property
Represents the raw data in the ICMP Echo reponse.

Pascal
property ReplyData;
Description
ReplyData is a read-only String property that represents the values received in an ICMP Echo response.

ReplyData is updated when the ICMP response packet contains types Id_ICMP_ECHOREPLY ( 3315) or Id_ICMP_ECHO (
3315), and consists of the raw response packet following the IP and ICMP headers.

ReplyData does not have any significance when the ICMP reponse type is any value other than Id_ICMP_ECHOREPLY ( 3315)
or Id_ICMP_ECHO ( 3315).

See Also
TIdIcmpClient.Receive ( 446)

TIdIcmpClient.ReplyStatus ( 1127)

TIdIcmpClient.ReplyStatus Property
Specifies the structure used to store a response to an echo request.

Pascal
property ReplyStatus;
Description
ReplyStatus is a TReplyStatus ( 2679) property used to store a response to an echo request.

ReplyStatus is updated when a receiving a response to an echo request in Ping ( 1125). When the response to an echo request
contains a non-zero length, ReplyStatus is updated with the contents of the echo response datagram.

When the response to an echo request contains 0 bytes, ReplyStatus is updated with values to indicate the error condition,

Internet Direct (Indy) Version 10.1.5 1127


TIdICMPEcho Class Classes

including:

Member Name Value


BytesReceived 0
FromIpAddress '0.0.0.0'
MsgType 0
SequenceId Internal sequence number from TIdIcmpClient ( 1123)
TimeToLive 0
ReplyStatusType rsTimeOut

See Also
TReplyStatus ( 2679)

TIdIcmpClient.Ping ( 1125)

TIdIcmpClient Events
The Events of the TIdIcmpClient class are listed here.

Events
Event Description
OnReply ( 1128) Specifies an event handler for TOnReplyEvent ( 3110) events.

Legend
Event

TIdIcmpClient.OnReply Event
Specifies an event handler for TOnReplyEvent ( 3110) events.

Pascal
property OnReply: TOnReplyEvent;
Parameters
Parameters Description
ReplyStatus Storage for the Reply from the echo request.

Description
OnReply is a TOnReplyEvent ( 3110) handler triggered when a echo response is received.

OnReply is generally used to update progress indicators or other GUI components as a result of receiving the echo response found
in ReplyStatus ( 1127). Assign an event handler to perform additional processing when the TOnReplyEvent ( 3110) is triggered
by Ping ( 1125).

See Also
TOnReplyEvent ( 3110)

TIdICMPEcho Class
File
IdRawHeaders ( 4701)

1128 Internet Direct (Indy) Version 10.1.5


Classes TIdICMPEcho Class

Hierarchy

Pascal
TIdICMPEcho = class(TIdStruct);
Description
TIdICMPEcho is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdICMPEcho Members
The following tables list the members exposed by TIdICMPEcho.

Properties
Property Description
id ( 1130)
seq ( 1130)

Methods
Method Description
create ( 2262)
ReadStruct ( 1129)
WriteStruct ( 1130)

Legend
Constructor
virtual
Property

TIdICMPEcho Methods
The Methods of the TIdICMPEcho class are listed here.

Methods
Method Description
ReadStruct ( 1129)
WriteStruct ( 1130)

Legend
Method
virtual

TIdICMPEcho.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).

Internet Direct (Indy) Version 10.1.5 1129


TIdICMPFrag Class Classes

VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdICMPEcho.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdICMPEcho Properties
The Properties of the TIdICMPEcho class are listed here.

Properties
Property Description
id ( 1130)
seq ( 1130)

Legend
Property

TIdICMPEcho.id Property
Pascal
property id: word;
Description
id is a Public word property. Write access for the property is implemented using FId.

TIdICMPEcho.seq Property
Pascal
property seq: word;
Description
seq is a Public word property. Write access for the property is implemented using FSeq.

TIdICMPFrag Class
File
IdRawHeaders ( 4701)

1130 Internet Direct (Indy) Version 10.1.5


Classes TIdICMPFrag Class

Hierarchy

Pascal
TIdICMPFrag = class(TIdStruct);
Description
TIdICMPFrag is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdICMPFrag Members
The following tables list the members exposed by TIdICMPFrag.

Properties
Property Description
mtu ( 1132)
pad ( 1132)

Methods
Method Description
create ( 2262)
ReadStruct ( 1131)
WriteStruct ( 1132)

Legend
Constructor
virtual
Property

TIdICMPFrag Methods
The Methods of the TIdICMPFrag class are listed here.

Methods
Method Description
ReadStruct ( 1131)
WriteStruct ( 1132)

Legend
Method
virtual

TIdICMPFrag.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).

Internet Direct (Indy) Version 10.1.5 1131


TIdICMPHdr Class Classes

VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdICMPFrag.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdICMPFrag Properties
The Properties of the TIdICMPFrag class are listed here.

Properties
Property Description
mtu ( 1132)
pad ( 1132)

Legend
Property

TIdICMPFrag.mtu Property
Pascal
property mtu: word;
Description
mtu is a Public word property. Write access for the property is implemented using Fmtu.

TIdICMPFrag.pad Property
Pascal
property pad: word;
Description
pad is a Public word property. Write access for the property is implemented using Fpad.

TIdICMPHdr Class
File
IdRawHeaders ( 4701)

1132 Internet Direct (Indy) Version 10.1.5


Classes TIdICMPHdr Class

Hierarchy

Pascal
TIdICMPHdr = class(TIdStruct);
Description
TIdICMPHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdICMPHdr Members
The following tables list the members exposed by TIdICMPHdr.

Properties
Property Description
icmp_code ( 1135)
icmp_dun ( 1135)
icmp_hun ( 1135)
icmp_sum ( 1135)
icmp_type ( 1135)

Methods
Method Description
create ( 1133)
Destroy ( 1134)
ReadStruct ( 1134)
WriteStruct ( 1134)

Legend
Constructor
virtual
Property
read only

TIdICMPHdr Methods
The Methods of the TIdICMPHdr class are listed here.

Methods
Method Description
create ( 1133)
Destroy ( 1134)
ReadStruct ( 1134)
WriteStruct ( 1134)

Legend
Constructor
virtual

TIdICMPHdr.create Constructor
Pascal
constructor create; override;

Internet Direct (Indy) Version 10.1.5 1133


TIdICMPHdr Class Classes

Description
create is a overridden constructor for the object instance.

TIdICMPHdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdICMPHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdICMPHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdICMPHdr Properties
The Properties of the TIdICMPHdr class are listed here.

Properties
Property Description
icmp_code ( 1135)
icmp_dun ( 1135)
icmp_hun ( 1135)
icmp_sum ( 1135)
icmp_type ( 1135)

1134 Internet Direct (Indy) Version 10.1.5


Classes TIdICMPTs Class

Legend
Property
read only

TIdICMPHdr.icmp_code Property
Pascal
property icmp_code: byte;
Description
icmp_code is a Public byte property. Write access for the property is implemented using Ficmp_code.

TIdICMPHdr.icmp_dun Property
Pascal
property icmp_dun: TIdicmp_dun;
Description
icmp_dun is a Public read-only TIdicmp_dun ( 1111) property.

TIdICMPHdr.icmp_hun Property
Pascal
property icmp_hun: TIdicmp_hun;
Description
icmp_hun is a Public read-only TIdicmp_hun ( 1114) property.

TIdICMPHdr.icmp_sum Property
Pascal
property icmp_sum: word;
Description
icmp_sum is a Public word property. Write access for the property is implemented using Ficmp_sum.

TIdICMPHdr.icmp_type Property
Pascal
property icmp_type: byte;
Description
icmp_type is a Public byte property. Write access for the property is implemented using Ficmp_type.

TIdICMPTs Class
File
IdRawHeaders ( 4701)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1135


TIdICMPTs Class Classes

Pascal
TIdICMPTs = class(TIdStruct);
Description
TIdICMPTs is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdICMPTs Members
The following tables list the members exposed by TIdICMPTs.

Properties
Property Description
otime ( 1137)
rtime ( 1137)
ttime ( 1137)

Methods
Method Description
create ( 2262)
ReadStruct ( 1136)
WriteStruct ( 1137)

Legend
Constructor
virtual
Property

TIdICMPTs Methods
The Methods of the TIdICMPTs class are listed here.

Methods
Method Description
ReadStruct ( 1136)
WriteStruct ( 1137)

Legend
Method
virtual

TIdICMPTs.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

1136 Internet Direct (Indy) Version 10.1.5


Classes TIdIdent Class

Description
ReadStruct is a overridden method.

TIdICMPTs.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdICMPTs Properties
The Properties of the TIdICMPTs class are listed here.

Properties
Property Description
otime ( 1137)
rtime ( 1137)
ttime ( 1137)

Legend
Property

TIdICMPTs.otime Property
Pascal
property otime: TIdNetTime;
Description
otime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Fotime.

TIdICMPTs.rtime Property
Pascal
property rtime: TIdNetTime;
Description
rtime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Frtime.

TIdICMPTs.ttime Property
Pascal
property ttime: TIdNetTime;
Description
ttime is a Public TIdNetTime ( 3062) property. Write access for the property is implemented using Fttime.

Internet Direct (Indy) Version 10.1.5 1137


TIdIdent Class Classes

TIdIdent Class
Implements an Ident protocol client.

File
IdIdent ( 4665)

Hierarchy

Pascal
TIdIdent = class(TIdTCPClientCustom);
Description
TIdIdent is a TIdTCPClientCustom ( 2340) descendant that implements an Ident protocol as a client, as described in the Internet
Standards document:

RFC 1413 - Identification Protocol

TIdIdent provides a way to determine the identity of a client using a specific connection. Given a TCP port number pair, an Ident
server can return a character string which identifies the owner of that connection on the server's system. In essence, the Ident
protocol is used like an "Internet Caller ID".

TIdIdent is a TIdTCPClient ( 2333) descendant that connects to the address specified in Host ( 1141) using the IdPORT_AUTH
( 3902) Port ( 1141) number, as required by RFC 1413.

You may optionally set the property value in QueryTimeout prior to calling the Query ( 1140) method with the required port
number pair. System-dependent user information about the identified connection is read from the Ident server reply, and stored in
corresonding TIdIdent properties. Property values can be incomplete if a timeout occurs, or an error response is received from the
Ident server.

See Also
QueryTimeout Query ( 1140) TIdIdentServer ( 1143) TIdTCPClientCustom ( 2340)

TIdIdent Members
The following tables list the members exposed by TIdIdent.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 1141) IP address or host name for the IDENT server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.

1138 Internet Direct (Indy) Version 10.1.5


Classes TIdIdent Class

OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 1141) Port number for the connection to an Ident server.
QueryTimeOut ( 1141) Timeout value for an Ident query ( 1140).
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Reply ( 1141) The server response to an Ident query ( 1140).
ReplyCharset ( 1142) Charset from an IOdent query ( 1140) response.
ReplyOS ( 1142) Operating system identifier found in an Ident query ( 1140) response.
ReplyOther ( 1142) Unformatted, printable text that identifies the user in an Ident query ( 1140).
ReplyUserName ( 1143) User name from an Ident query ( 1140) response.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Query ( 1140) Performs an Ident query using a port number pair.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIdent Methods
The Methods of the TIdIdent class are listed here.

Methods
Method Description
Query ( 1140) Performs an Ident query using a port number pair.

Internet Direct (Indy) Version 10.1.5 1139


TIdIdent Class Classes

Legend
Method

TIdIdent.Query Method
Performs an Ident query using a port number pair.

Pascal
procedure Query(
APortOnServer: Word;
APortOnClient: Word
);
Parameters
Parameters Description
APortOnServer the port on the server in use for the client connection of interest.
APortOnClient the port on the client in use for the client connection of interest.

Description
Query is a procedure that allows TIdIdent ( 1138) to establish a connection to the Ident server, and perform an Ident query using
the port number pair identified in APortOnServer and APortOnClient.

Set the value in Host ( 1141) prior to calling the Query method. Port ( 1141) is given the default value as identified in RFC 1413,
but can be changed prior to calling Query (if your Ident server listens on a different port number).

Query calls Connect ( 2342) to open an ident session, and writes the comma-delimited port number pair that identifies the
connection of interest. Query will wait for a response from the Ident server for the number of milliseconds specified in QueryTimeout.

If a timeout occurs, the connection is closed by calling Disconnect ( 2355) and an EIdIdentQueryTimeOut ( 105) is raised.

When a response has been read from the Ident server, the return value is stored in Reply ( 1141). The return value is also parsed
to determine if it contains an Ident protocol response that indicates an error has occurred.

If an error is detected, an exception derived from EIdIdentReply ( 106) is raised that can include the following:

EIdIdentInvalidPort ( 105) EIdIdentNoUser ( 105) EIdIdentHiddenUser ( 104) EIdIdentUnknownError ( 106)

The parsed contents of a successful Ident response will be available in the ReplyCharset ( 1142), ReplyOS ( 1142), ReplyOther
( 1142), and ReplyUserName ( 1143) properties.

See Also
EIdIdentHiddenUser ( 104) EIdIdentInvalidPort ( 105) EIdIdentNoUser ( 105) EIdIdentUnknownError ( 106)
EIdIdentQueryTimeOut ( 105) EIdIdentReply ( 106) Reply ( 1141) ReplyCharset ( 1142) ReplyOS ( 1142) ReplyOther (
1142) ReplyUserName ( 1143)

TIdIdent Properties
The Properties of the TIdIdent class are listed here.

Properties
Property Description
Host ( 1141) IP address or host name for the IDENT server.
Port ( 1141) Port number for the connection to an Ident server.
QueryTimeOut ( 1141) Timeout value for an Ident query ( 1140).
Reply ( 1141) The server response to an Ident query ( 1140).
ReplyCharset ( 1142) Charset from an IOdent query ( 1140) response.
ReplyOS ( 1142) Operating system identifier found in an Ident query ( 1140) response.
ReplyOther ( 1142) Unformatted, printable text that identifies the user in an Ident query ( 1140).
ReplyUserName ( 1143) User name from an Ident query ( 1140) response.

1140 Internet Direct (Indy) Version 10.1.5


Classes TIdIdent Class

Legend
Property
read only

TIdIdent.Host Property
IP address or host name for the IDENT server.

Pascal
property Host;
Description
Host is a String property that represents the IP address or host name for the IDENT server connection.

Set values in the Host and Port ( 1141) properties prior to calling the Query ( 1140) method.

See Also
Port ( 1141) Query ( 1140)

TIdIdent.Port Property
Port number for the connection to an Ident server.

Pascal
property Port;
Description
Port is a published property in TIdIdent ( 1138) that represents the port number used for the connection to an Ident server. The
default value for Port is IdPORT_AUTH ( 3902), as required by RFC 1413, is assigned during initialization of the component.

Set Host ( 1141) to identify the server IP Address or host name to be used for the connection to the Ident server in Query (
1140).

See Also
Create ( 267) Query ( 1140) Host ( 1141)

TIdIdent.QueryTimeOut Property
Timeout value for an Ident query ( 1140).

Pascal
property QueryTimeOut: Integer;
Description
QueryTimeOut is an Integer property that indicates the number of milliseconds to wait for a response to an Ident query ( 1140).
The default value for QueryTimeOut is IdIdentQryTimeout ( 3851), as assigned during initialization of the component.

The value in QueryTimeOut can be altered, but it is recommended in RFC 1413 that idle timeouts for the Ident protocol be in the
60-180 second range (60000 - 180000 milliseconds).

QueryTimeOut is used in the Query ( 1140) method, and when exceeded forces the query ( 1140) to be abandoned. On timeout,
the Connection is closed and an EIdIdentQueryTimeOut ( 105) exception is raised.

See Also
EIdIdentQueryTimeOut ( 105) IdIdentQryTimeout ( 3851) Query ( 1140)

TIdIdent.Reply Property
The server response to an Ident query ( 1140).

Internet Direct (Indy) Version 10.1.5 1141


TIdIdent Class Classes

Pascal
property Reply: String;
Description
Reply is a String property that represents the response received from an Ident server after calling Query ( 1140). Reply contains
the unaltered response from the server prior to parsing values into the ReplyCharset ( 1142), ReplyOS ( 1142), ReplyOther (
1142), and ReplyUserID properties.

Reply may contain an empty string if a timeout occurs after QueryTimeout milliseconds have elapsed while waiting for the Ident
server response.

See Also
Query ( 1140) QueryTimeout ReplyCharset ( 1142) ReplyOS ( 1142) ReplyOther ( 1142) ReplyUserName ( 1143)

TIdIdent.ReplyCharset Property
Charset from an IOdent query ( 1140) response.

Pascal
property ReplyCharset: String;
Description
ReplyCharset is a read-only String property that represents the character set found in the response to an Ident query ( 1140). The
default value for Charset, 'US-ASCII' as specified in RFC 1413, is returned if the Ident response does not contain an explicit value.

The value in ReplyCharset is obtained by parsing the Reply ( 1141) property updated in the Query ( 1140) method.

Use the ReplyOS ( 1142), ReplyOther ( 1142), and ReplyUserName ( 1143) properties to access additional values that may
have been present in Reply ( 1141).

See Also
Query ( 1140) Reply ( 1141) ReplyOS ( 1142) ReplyOther ( 1142) ReplyUserName ( 1143)

TIdIdent.ReplyOS Property
Operating system identifier found in an Ident query ( 1140) response.

Pascal
property ReplyOS: String;
Description
ReplyOS is a read-only String property that represents the operating system identifier found in the response to an Ident query (
1140). ReplyOS can contain an empty string if the Ident response does not contain an explicit value.

The value in ReplyOS is obtained by parsing the Reply ( 1141) property updated in the Query ( 1140) method. ReplyOS will
normally contain one of the Id_OS constants which are defined in the IdAssignedNumbers unit.

Use the ReplyCharset ( 1142), ReplyOther ( 1142), and ReplyUserName ( 1143) properties to access additional values that
may have been present in Reply ( 1141).

See Also
Query ( 1140) Reply ( 1141) ReplyCharset ( 1142) ReplyOther ( 1142) ReplyUserName ( 1143) IdAssignedNumbers.pas (
4557)

TIdIdent.ReplyOther Property
Unformatted, printable text that identifies the user in an Ident query ( 1140).

1142 Internet Direct (Indy) Version 10.1.5


Classes TIdIdentServer Class

Pascal
property ReplyOther: String;
Description
ReplyOther is a read-only String property that represents the unformatted, printable characters found in the response to an Ident
query ( 1140). ReplyOther is represented in the character set specified by ReplyCharset ( 1142). ReplyOther will contain a value
when the user identifier does not meet the constraints required for an operating system user identifer, and may include an audit
token, the user's real name, phone number, or email address.

The value in ReplyOther is obtained by parsing the Reply ( 1141) property updated in the Query ( 1140) method.

Use the ReplyCharset ( 1142), ReplyOS ( 1142), and ReplyUserName ( 1143) properties to access additional values that may
have been present in Reply ( 1141).

See Also
Query ( 1140) Reply ( 1141) ReplyCharset ( 1142) ReplyOS ( 1142) ReplyUserName ( 1143)

TIdIdent.ReplyUserName Property
User name from an Ident query ( 1140) response.

Pascal
property ReplyUserName: String;
Description
ReplyUserName is a read-only String property that represents the user account identifier associated with a client connection as
returned in the response from an Ident server query ( 1140). ReplyUserName identifies the account using the port number passed
to the Query ( 1140) method.

The value in ReplyUserName is obtained by parsing the Reply ( 1141) property updated in the Query ( 1140) method.

Use the ReplyCharset ( 1142), ReplyOS ( 1142), and ReplyOther ( 1142) properties to access additional values that may have
been present in Reply ( 1141).

See Also
Query ( 1140) Reply ( 1141) ReplyCharset ( 1142) ReplyOS ( 1142) ReplyOther ( 1142)

TIdIdentServer Class
Implements a multi-threaded Identifcation Protocol server.

File
IdIdentServer ( 4666)

Hierarchy

Pascal
TIdIdentServer = class(TIdCustomTCPServer);
Description
TIdIdentServer is a TIdTCPServer ( 2375) descendant that implements a multi-threaded server for the Identifcation Protocol, as
described in the Internet Standards document:

RFC 1413 - Identification Protocol

TIdIdentServer provides properties, methods, and events that can used, in conjunction with OnExecute, to implement the
Identification Protocol which provides a means to determine the identity of a user of a particular TCP connection.

Internet Direct (Indy) Version 10.1.5 1143


TIdIdentServer Class Classes

See Also
TIdTCPServer.OnExecute ( 2379)

TIdIdentServer Members
The following tables list the members exposed by TIdIdentServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1146) Port number used to listen for client connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
QueryTimeOut ( 1147) Timeout value for connections to the Ident Server.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReplyError ( 1145) This method sends an error reply to the client requesting a query.
ReplyIdent ( 1145) This method sends the specified user name for a query.
ReplyOther ( 1146) This method returns unformatted text to the client making a query.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnIdentQuery ( 1147) This event is triggered when a client queries this daemon.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property

1144 Internet Direct (Indy) Version 10.1.5


Classes TIdIdentServer Class

read only
Event

TIdIdentServer Methods
The Methods of the TIdIdentServer class are listed here.

Methods
Method Description
ReplyError ( 1145) This method sends an error reply to the client requesting a query.
ReplyIdent ( 1145) This method sends the specified user name for a query.
ReplyOther ( 1146) This method returns unformatted text to the client making a query.

Legend
Method

TIdIdentServer.ReplyError Method
This method sends an error reply to the client requesting a query.

Pascal
procedure ReplyError(
AContext: TIdContext;
AServerPort: Integer;
AClientPort: Integer;
AErr: TIdIdentErrorType
);
Parameters
Parameters Description
AContext The connection thread for the query
AServerPort The port that the connection on the server (the computer making the query)
AClientPort The port that the client is connecting from (the port the daemon is using to connect to the server making the
query)
AErr The error reply to send and it is one of the values in the TIdIdentErrorType ( 2956) topic

Description
This method sends an error reply to the client requesting a query.

See Also
TIdIdentErrorType ( 2956)

TIdIdentServer.ReplyIdent Method
This method sends the specified user name for a query.

Pascal
procedure ReplyIdent(
AContext: TIdContext;
AServerPort: Integer;
AClientPort: Integer;
AOS: String;
AUserName: String;
const ACharset: String = ''
);
Parameters
Parameters Description
AContext The connection thread for the query
AServerPort The port that the connection on the server (the computer making the query)

Internet Direct (Indy) Version 10.1.5 1145


TIdIdentServer Class Classes

AClientPort The port that the client is connecting from (the port the daemon is using to connect to the server making the
query)
AOS This is the operating system that this computer is running. This value should be one of the Id_OS_ constants
that is defined in the IdAssignedNumbers unit
AUserName This is the user name to be sent to the client.
ACharset This is the character set that the User name is in. This value should be one of the Id_CS constants that is
defined in the IdAssignedNumber unit.

Description
This method sends the specified user name for a query.

TIdIdentServer.ReplyOther Method
This method returns unformatted text to the client making a query.

Pascal
procedure ReplyOther(
AContext: TIdContext;
AServerPort: Integer;
AClientPort: Integer;
AOther: String
);
Parameters
Parameters Description
AContext The connection thread for the query
AServerPort The port that the connection on the server (the computer making the query)
AClientPort The port that the client is connecting from (the port the daemon is using to connect to the server making the
query)
AOther This is the text that is sent to the client making the query.

Description
This method returns unformatted text to the client making a query. Examples include an encrypted audit token or other information
about a user (such as the real name and phone number of a user from a UNIX ( 4539) passwd file)

TIdIdentServer Properties
The Properties of the TIdIdentServer class are listed here.

Properties
Property Description
DefaultPort ( 1146) Port number used to listen for client connections.
QueryTimeOut ( 1147) Timeout value for connections to the Ident Server.

Legend
Property

TIdIdentServer.DefaultPort Property
Port number used to listen for client connections.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is an Integer property redefined in TIdIdentServer ( 1143) to reflect the port number used to listen for client
connections in the Ident server, as required by the Ident protocol.

DefaultPort is given the value IdPORT_AUTH ( 3902) during initialization of the component.

DefaultPort is used when constructing and binding the listener thread for the multi-threaded server implementation.

1146 Internet Direct (Indy) Version 10.1.5


Classes TIdIGMPHdr Class

See Also
IdPORT_AUTH ( 3902) Create ( 267)

TIdIdentServer.QueryTimeOut Property
Timeout value for connections to the Ident Server.

Pascal
property QueryTimeOut: Integer;
Description
QueryTimeOut is an Integer property that represents the time out value used for connections to the the Ident Server. If this value
exceeded, the server will close the connection to the client.

The default value is IdDefIdentQueryTimeOut ( 3831), as assigned during initialization of the component.

See Also
IdDefIdentQueryTimeOut ( 3831)

TIdIdentServer Events
The Events of the TIdIdentServer class are listed here.

Events
Event Description
OnIdentQuery ( 1147) This event is triggered when a client queries this daemon.

Legend
Event

TIdIdentServer.OnIdentQuery Event
This event is triggered when a client queries this daemon.

Pascal
property OnIdentQuery: TIdIdentQueryEvent;
Parameters
Parameters Description
AThread The connection thread for the query. The event is triggered within the context of this thread
AServerPort The port that the connection on the server (the computer making the query)
AClientPort The port that the client is connecting from (the port the daemon is using to connect to the server making the
query)

Description
This event is triggered when a client queries this daemon.

TIdIGMPHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1147


TIdIGMPHdr Class Classes

Pascal
TIdIGMPHdr = class(TIdStruct);
Description
TIdIGMPHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdIGMPHdr Members
The following tables list the members exposed by TIdIGMPHdr.

Properties
Property Description
igmp_code ( 1150)
igmp_group ( 1150)
igmp_sum ( 1150)
igmp_type ( 1150)

Methods
Method Description
create ( 1148)
Destroy ( 1149)
ReadStruct ( 1149)
WriteStruct ( 1149)

Legend
Constructor
virtual
Property
read only

TIdIGMPHdr Methods
The Methods of the TIdIGMPHdr class are listed here.

Methods
Method Description
create ( 1148)
Destroy ( 1149)
ReadStruct ( 1149)
WriteStruct ( 1149)

Legend
Constructor
virtual

TIdIGMPHdr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

1148 Internet Direct (Indy) Version 10.1.5


Classes TIdIGMPHdr Class

TIdIGMPHdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdIGMPHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdIGMPHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdIGMPHdr Properties
The Properties of the TIdIGMPHdr class are listed here.

Properties
Property Description
igmp_code ( 1150)
igmp_group ( 1150)
igmp_sum ( 1150)
igmp_type ( 1150)

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 1149


TIdIMAP4 Class Classes

TIdIGMPHdr.igmp_code Property
Pascal
property igmp_code: byte;
Description
igmp_code is a Public byte property. Write access for the property is implemented using Figmp_code.

TIdIGMPHdr.igmp_group Property
Pascal
property igmp_group: TIdInAddr;
Description
igmp_group is a Public read-only TIdInAddr ( 1271) property.

TIdIGMPHdr.igmp_sum Property
Pascal
property igmp_sum: word;
Description
igmp_sum is a Public word property. Write access for the property is implemented using Figmp_sum.

TIdIGMPHdr.igmp_type Property
Pascal
property igmp_type: byte;
Description
igmp_type is a Public byte property. Write access for the property is implemented using Figmp_type.

TIdIMAP4 Class
Implements an Internet Message Access Protocol version 4.1 client.

File
IdIMAP4 ( 4666)

Hierarchy

Pascal
TIdIMAP4 = class(TIdMessageClient);
Description
TIdIMAP4 is a TIdMessageClient ( 1555) descendant that implements a client for the IMAP4 (Internet Message Access Protocol
version 4.1) protocol, as described in the Internet standards document:

RFC 3501 - Internet Message Access Protocol version 4.1

The Internet Message Access Protocol, Version ( 269) 4.1 (IMAP4rev1) allows a client to access and manipulate electronic mail
messages on an IMAP4 server. IMAP4 permits manipulation of remote message folders, called "mailboxes", in a way that is
functionally equivalent to local mailboxes.

1150 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

IMAP4rev1 includes operations for creating, deleting, and renaming mailboxes; checking for new messages; permanently removing
messages; setting and clearing flags; RFC 822 and MIME message parsing; searching; and selective fetching of message
attributes, texts, and portions thereof. Messages in IMAP4rev1 are accessed by the use of numbers. These numbers are either
message sequence numbers or unique identifiers.

IMAP4rev1 does not specify a means of posting mail; message posting is handled by a mail transfer protocol such as TIdSMTP (
2017).

The IMAP4 protocol allows the client to issue multiple commands before expecting a server response. In addition, server responses
may not necessarily be received in the order in which the IMAP commands are issued on the client. Finally, IMAP4 responses differ
from TCP-related response codes in both format and content. To accomodate these protocol differences, methods inherited from
TIdTCPConnection ( 2349) are reimplemented to support the specifics or the IMAP protocol for sending commands and receiving
responses.

See Also
TIdMessageClient ( 1555) TIdTCPConnection ( 2349) TIdSMTP ( 2017) TIdPOP3 ( 1772)

TIdIMAP4 Members
The following tables list the members exposed by TIdIMAP4.

Properties
Property Description
AuthType ( 1244) Indicates the mechanism to use for authentication in the Login ( 1174) method.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 690)
ConnectionState ( 1244) Indicates the IMAP4 connection state.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
GreetingBanner ( 1245) Identifies the server and its state during connection of the IMAP4 session.
Host ( 1245) Identifies the host name or IP address for the remote IMAP4 server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
MailBox ( 1245) Represents the IMAP4 mailbox.
MailBoxSeparator ( 1246) Identifies the character used to separate mailbox names in the hierarchical mailbox namespace.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
MilliSecsToWaitToClearBuffer ( 1246) Delay time for unhandled response data in the buffer for the client.
MsgLineFold ( 1561) Identifies the line folding character sequence for the message client.
MsgLineLength ( 1561) Maximum line length.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 1247) Identifies the credentials for IMAP4 server authentication.
Port ( 1247) Identifies the port number used for the IMAP4 server connection.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
RetrieveOnSelect ( 1247) Specifies data to automatically retrieve ( 1176) from the mailbox when a mailbox is selected.
SASLMechanisms ( 1248) SASL authentication mechanisms supported on the remote IMAP4 server.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
Username ( 1248) Identifies the user name for IMAP4 server authentication.
UseTLS ( 1249) Indicates Transport-Level Security is used on the connection.
Version ( 269) Identifies the version number for the Indy component suite.

Internet Direct (Indy) Version 10.1.5 1151


TIdIMAP4 Class Classes

WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
AppendMsgNoEncodeFromFile ( 1158) Adds a message to the specified mailbox without encoding message parts.
AppendMsgNoEncodeFromStream ( 1159)
BeginWork ( 356) Triggers the OnBeginWork event.
Capability ( 1159)
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
CheckMailBox ( 1159) Requests a checkpoint for the currently selected mailbox.
CheckMsgSeen ( 1160) Indicates if the specified message has been read.
CloseMailBox ( 1161) Closes the currently selected mailbox.
Connect ( 1161) Opens a connection and optionally logs in to to the IMAP server.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
CopyMsg ( 1162) Copies a message from the current mailbox to a specified mailbox.
CopyMsgs ( 1162) Copies the indicated messages from the current mailbox to a specified mailbox.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
CreateMailBox ( 1163) Creates a new mailbox on the remote IMAP4 server for the current account.
DeleteMailBox ( 1164) Removes the specified mailbox on the IMAP4 server.
DeleteMsgs ( 1165) Marks the specified messages for subsequent deletion when a mailbox is purged.
Destroy ( 1165) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoAlert ( 1167) Triggers the OnAlert ( 1249) event handler.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
ExamineMailBox ( 1167) Selects a mailbox for read-only access.
ExpungeMailBox ( 1168) Removes messages marked for deletion in the currently selected mailbox.
FindHowServerCreatesFolders ( 1168) Determine the method used to create ( 267) folders on the remote IMAP4 server.
GetInternalResponse ( 1169) Reads mutiple untagged responses or a single tagged response from the server.
GetResponse ( 1170) Retrieves and checks a multiple line IMAP4 server response.
GetUID ( 1171) Retrieves the unique identifier for a given relative message number.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InternalRetrieveStructure ( 1172) Retrieves the body structure for a specified message.
KeepAlive ( 1173) Prevents loss of a IMAP server connection due to a timeout.
ListInferiorMailBoxes ( 1173)
ListMailBoxes ( 1173)
ListSubscribedMailBoxes ( 1174)
Login ( 1174) Attempts to login ajnd perform authentication on the IMAP4 server.
ReadLnWait ( 1174) Pauses until a line of text is read from the connection.
RenameMailBox ( 1175) Renames a specified mailbox on the IMAP4 server.
Retrieve ( 1176) Retrieves a message from a mailbox and marks it as read on the server.
RetrieveAllEnvelopes ( 1176) Retrieves RFC-822 envelope data for messages in a mailbox.
RetrieveAllHeaders ( 1177) Retrieves headers for all messages in a mailbox and populates the specified message collection.
RetrieveAllMsgs ( 1178) Retrieves all messages in a mailbox and populates the specified message collection.
RetrieveEnvelope ( 1178) Retrieves SMTP envelope information for a message in the mailbox.
RetrieveEnvelopeRaw ( 1179)
RetrieveFlags ( 1179) Retrieves stored message flags for a message on the IMAP4 server.
RetrieveHeader ( 1180) Retrieves headers for a specified message number and populates the message instance.
RetrieveMailBoxSize ( 1181) Indicates the size of all messages in the currently selected mailbox.
RetrieveMsgSize ( 1181) Indicates the size of a specified message in the currently selected mailbox.
RetrieveNoDecodeToFile ( 1182) Retrieves the raw encoded contents of a message and stores the contents in a file.
RetrieveNoDecodeToStream ( 1183)
RetrievePartHeader ( 1188) Retrieves RFC headers for a specified message and message part.
RetrievePeek ( 1199) Retrieves a message from a mailbox without marking it as read on the server.
RetrieveText ( 1201) Retrieves the text that makes up the body of a message.
RetrieveText2 ( 1202) Retrieves the text that makes up the body of a message.
RetrieveTextPeek ( 1203) Retrieves the text that makes up the body of a message without updating the flags for the message.
RetrieveTextPeek2 ( 1204) Retrieves the text that makes up the body of a message without updating the flags for the message.

1152 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

SearchMailBox ( 1205)
SelectMailBox ( 1205) Selects a mailbox on the IMAP4 server as the current mailbox for message access.
SendMsg ( 1560) Sends message headers and body content on the client connection.
StoreFlags ( 1209) Updates the specified message flags for a list of message numbers.
SubscribeMailBox ( 1210) Adds a mailbox to the list of "active" or "subscribed" mailboxes.
CType ( 267)
AppendMsg ( 1156)
Disconnect ( 1166)
RetrievePart ( 1183)
RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194)
RetrievePartToFilePeek ( 1196)
RetrieveStructure ( 1200)
SendCmd ( 1206)
StatusMailBox ( 1208)
UIDRetrievePart ( 1221)
UIDRetrievePartPeek ( 1226)
UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232)
UIDRetrieveStructure ( 1235)
UIDStoreFlags ( 1241)
Create ( 1274)
ProcessMessage ( 1558)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
UIDCheckMsgSeen ( 1211) Indicates if the specified message has been read.
UIDCopyMsg ( 1211) Copies a message from the current mailbox to a specified mailbox.
UIDCopyMsgs ( 1212)
UIDDeleteMsg ( 1213) Marks the specified message for subsequent deletion when a mailbox is purged.
UIDDeleteMsgs ( 1213) Marks the specified messages for subsequent deletion when a mailbox is purged.
UIDInternalRetrieveStructure ( 1214) Retrieves the body structure for a specified message.
UIDRetrieve ( 1214) Retrieves a message from a mailbox and marks it as read on the server.
UIDRetrieveAllEnvelopes ( 1215) Retrieves RFC-822 envelope data for messages in a mailbox.
UIDRetrieveEnvelope ( 1216) Retrieves SMTP envelope information for a message in the mailbox.
UIDRetrieveEnvelopeRaw ( 1217)
UIDRetrieveFlags ( 1217) Retrieves stored message flags for a message on the IMAP4 server.
UIDRetrieveHeader ( 1218) Retrieves headers for a specified message and populates the message instance.
UIDRetrieveMailBoxSize ( 1218) Indicates the size of all messages in the currently selected mailbox.
UIDRetrieveMsgSize ( 1219) Indicates the size of a specified message in the currently selected mailbox.
UIDRetrieveNoDecodeToFile ( 1220) Retrieves the raw encoded contents of a message and stores the contents in a file.
UIDRetrieveNoDecodeToStream ( 1220)
UIDRetrievePartHeader ( 1225) Retrieves RFC headers for a specified message and message part.
UIDRetrievePeek ( 1234) Retrieves a message from a mailbox without marking it as read on the server.
UIDRetrieveText ( 1237) Retrieves the text that makes up the body of a message.
UIDRetrieveText2 ( 1238) Retrieves the text that makes up the body of a message.
UIDRetrieveTextPeek ( 1239) Retrieves the text that makes up the body of a message without updating the flags for the message.
UIDRetrieveTextPeek2 ( 1240) Retrieves the text that makes up the body of a message without updating the flags for the message.
UIDSearchMailBox ( 1241)
UnsubscribeMailBox ( 1242) Removes a mailbox from the list of "active" or "subscribed" mailboxes.
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteLn ( 1243) Used internally to send a command/request to an IMAP server.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAlert ( 1249) Event handler triggered for IMAP4 ALERT response codes found in server responses.

Internet Direct (Indy) Version 10.1.5 1153


TIdIMAP4 Class Classes

OnStatus ( 359) Represents the current connection status event handler.


OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 691)
OnWorkBeginForPart ( 1249) Event handler signalled when starting retrieval of a message part for the IMAP4 client.
OnWorkEndForPart ( 1250) Event handler signalled when completing retrieval of a message part for the IMAP4 client.
OnWorkForPart ( 1250) Event handler signalled during retrieval of a message part for the IMAP4 client.

Legend
Method
virtual
Property
read only
Event

TIdIMAP4 Methods
The Methods of the TIdIMAP4 class are listed here.

Methods
Method Description
AppendMsg ( 1156)
AppendMsgNoEncodeFromFile ( 1158) Adds a message to the specified mailbox without encoding message parts.
AppendMsgNoEncodeFromStream ( 1159)
Capability ( 1159)
CheckMailBox ( 1159) Requests a checkpoint for the currently selected mailbox.
CheckMsgSeen ( 1160) Indicates if the specified message has been read.
CloseMailBox ( 1161) Closes the currently selected mailbox.
Connect ( 1161) Opens a connection and optionally logs in to to the IMAP server.
CopyMsg ( 1162) Copies a message from the current mailbox to a specified mailbox.
CopyMsgs ( 1162) Copies the indicated messages from the current mailbox to a specified mailbox.
CreateMailBox ( 1163) Creates a new mailbox on the remote IMAP4 server for the current account.
DeleteMailBox ( 1164) Removes the specified mailbox on the IMAP4 server.
DeleteMsgs ( 1165) Marks the specified messages for subsequent deletion when a mailbox is purged.
Destroy ( 1165) Frees the object instance.
Disconnect ( 1166)
DoAlert ( 1167) Triggers the OnAlert ( 1249) event handler.
ExamineMailBox ( 1167) Selects a mailbox for read-only access.
ExpungeMailBox ( 1168) Removes messages marked for deletion in the currently selected mailbox.
FindHowServerCreatesFolders ( 1168) Determine the method used to create ( 267) folders on the remote IMAP4 server.
GetInternalResponse ( 1169) Reads mutiple untagged responses or a single tagged response from the server.
GetResponse ( 1170) Retrieves and checks a multiple line IMAP4 server response.
GetUID ( 1171) Retrieves the unique identifier for a given relative message number.
InternalRetrieveStructure ( 1172) Retrieves the body structure for a specified message.
KeepAlive ( 1173) Prevents loss of a IMAP server connection due to a timeout.
ListInferiorMailBoxes ( 1173)
ListMailBoxes ( 1173)
ListSubscribedMailBoxes ( 1174)
Login ( 1174) Attempts to login ajnd perform authentication on the IMAP4 server.
ReadLnWait ( 1174) Pauses until a line of text is read from the connection.
RenameMailBox ( 1175) Renames a specified mailbox on the IMAP4 server.
Retrieve ( 1176) Retrieves a message from a mailbox and marks it as read on the server.
RetrieveAllEnvelopes ( 1176) Retrieves RFC-822 envelope data for messages in a mailbox.
RetrieveAllHeaders ( 1177) Retrieves headers for all messages in a mailbox and populates the specified message collection.
RetrieveAllMsgs ( 1178) Retrieves all messages in a mailbox and populates the specified message collection.
RetrieveEnvelope ( 1178) Retrieves SMTP envelope information for a message in the mailbox.
RetrieveEnvelopeRaw ( 1179)
RetrieveFlags ( 1179) Retrieves stored message flags for a message on the IMAP4 server.
RetrieveHeader ( 1180) Retrieves headers for a specified message number and populates the message instance.

1154 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

RetrieveMailBoxSize ( 1181) Indicates the size of all messages in the currently selected mailbox.
RetrieveMsgSize ( 1181) Indicates the size of a specified message in the currently selected mailbox.
RetrieveNoDecodeToFile ( 1182) Retrieves the raw encoded contents of a message and stores the contents in a file.
RetrieveNoDecodeToStream ( 1183)
RetrievePart ( 1183)
RetrievePartHeader ( 1188) Retrieves RFC headers for a specified message and message part.
RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194)
RetrievePartToFilePeek ( 1196)
RetrievePeek ( 1199) Retrieves a message from a mailbox without marking it as read on the server.
RetrieveStructure ( 1200)
RetrieveText ( 1201) Retrieves the text that makes up the body of a message.
RetrieveText2 ( 1202) Retrieves the text that makes up the body of a message.
RetrieveTextPeek ( 1203) Retrieves the text that makes up the body of a message without updating the flags for the message.
RetrieveTextPeek2 ( 1204) Retrieves the text that makes up the body of a message without updating the flags for the message.
SearchMailBox ( 1205)
SelectMailBox ( 1205) Selects a mailbox on the IMAP4 server as the current mailbox for message access.
SendCmd ( 1206)
StatusMailBox ( 1208)
StoreFlags ( 1209) Updates the specified message flags for a list of message numbers.
SubscribeMailBox ( 1210) Adds a mailbox to the list of "active" or "subscribed" mailboxes.
UIDCheckMsgSeen ( 1211) Indicates if the specified message has been read.
UIDCopyMsg ( 1211) Copies a message from the current mailbox to a specified mailbox.
UIDCopyMsgs ( 1212)
UIDDeleteMsg ( 1213) Marks the specified message for subsequent deletion when a mailbox is purged.
UIDDeleteMsgs ( 1213) Marks the specified messages for subsequent deletion when a mailbox is purged.
UIDInternalRetrieveStructure ( 1214) Retrieves the body structure for a specified message.
UIDRetrieve ( 1214) Retrieves a message from a mailbox and marks it as read on the server.
UIDRetrieveAllEnvelopes ( 1215) Retrieves RFC-822 envelope data for messages in a mailbox.
UIDRetrieveEnvelope ( 1216) Retrieves SMTP envelope information for a message in the mailbox.
UIDRetrieveEnvelopeRaw ( 1217)
UIDRetrieveFlags ( 1217) Retrieves stored message flags for a message on the IMAP4 server.
UIDRetrieveHeader ( 1218) Retrieves headers for a specified message and populates the message instance.
UIDRetrieveMailBoxSize ( 1218) Indicates the size of all messages in the currently selected mailbox.
UIDRetrieveMsgSize ( 1219) Indicates the size of a specified message in the currently selected mailbox.
UIDRetrieveNoDecodeToFile ( 1220) Retrieves the raw encoded contents of a message and stores the contents in a file.
UIDRetrieveNoDecodeToStream ( 1220)
UIDRetrievePart ( 1221)
UIDRetrievePartHeader ( 1225) Retrieves RFC headers for a specified message and message part.
UIDRetrievePartPeek ( 1226)
UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232)
UIDRetrievePeek ( 1234) Retrieves a message from a mailbox without marking it as read on the server.
UIDRetrieveStructure ( 1235)
UIDRetrieveText ( 1237) Retrieves the text that makes up the body of a message.
UIDRetrieveText2 ( 1238) Retrieves the text that makes up the body of a message.
UIDRetrieveTextPeek ( 1239) Retrieves the text that makes up the body of a message without updating the flags for the message.
UIDRetrieveTextPeek2 ( 1240) Retrieves the text that makes up the body of a message without updating the flags for the message.
UIDSearchMailBox ( 1241)
UIDStoreFlags ( 1241)
UnsubscribeMailBox ( 1242) Removes a mailbox from the list of "active" or "subscribed" mailboxes.
WriteLn ( 1243) Used internally to send a command/request to an IMAP server.

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 1155


TIdIMAP4 Class Classes

TIdIMAP4.AppendMsg Method
Overload List

Method Description
TIdIMAP4.AppendMsg (String, Adds a message to the specified mailbox.
TIdMessage, TIdHeaderList,
TIdMessageFlagsSet) ( 1156)
TIdIMAP4.AppendMsg (String, Adds a message to the specified mailbox.
TIdMessage, TIdMessageFlagsSet) (
1157)

TIdIMAP4.AppendMsg Method (String, TIdMessage, TIdHeaderList, TIdMessageFlagsSet)


Adds a message to the specified mailbox.

Pascal
function AppendMsg(
const AMBName: String;
AMsg: TIdMessage;
AAlternativeHeaders: TIdHeaderList;
const AFlags: TIdMessageFlagsSet = []
): Boolean; overload;
Parameters
Parameters Description
AMBName Mailbox name used to store the new message.
AMsg Message to be added to the mailbox.
AAlternativeHeaders Alternate headers to use in place of those stored in the message.
AFlags Message flags to apply to the message in the mailbox. Default value is [].

Returns
Boolean - True on success.

Description
AppendMsg is an overloaded Boolean function used to append the message specified in AMsg to the mailbox specified in
AMBName. AppendMsg allows the client to perform mailbox maintenance routines like copying and moving messages between
mailboxes for the client. AppendMsg copies the contents of the specified TIdMessage ( 1521) instance, including attachments, to
the specified mailbox.

AppendMsg implements the IMAP4 APPEND command, and requires that the ConnectionState ( 1244) for the client contain the
value csAuthenticated or csSelected. AppendMsg can raise an EIdConnectionStateError ( 70) exception when the
ConnectionState ( 1244) does not contain one of the expected values.

AMBName must contain a valid mailbox name on the IMAP4 server or an EIdConnectionStateError ( 70) will be raised.

AFlags indicates the set of message flags which should be applied to the message in the mailbox. AppendMsg constructs the flags
for the message using MessageFlagSetToStr prior to calling SendCmd ( 1206) using the IMAP4 APPEND command.

AAlternativeHeaders contains alternate RFC-compliant header values to use in place of those stored in the message specified in
AMsg. When AAlternativeHeaders isomitted, the message headers found the TIdMessage ( 1521) instance are used when
appending message data to the specified mailbox.

AppendMsg creates a temporary file used to calculate the size of the encoded message, including attachments, as required by the
IMAP4 APPEND command. The numeric size is updated to reflect the size of the headers specified in AAlternateHeaders, when
present.

The APPEND command is sent to the IMAP4 server using the indicated mailbox name, message flags, and the message size as
stored in the mailbox. The value in AMBName is enclosed in double quotation marks to prevent errors with mailbox names that
include the Space character.

1156 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

AppendMsg inspects the numeric response code in LastCmdResult ( 2367), and when the value is IMAP_CONT ( 4334) sends
the message headers, body, and attachments in AMsg to the IMAP4 server.

AppendMsg returns False if the APPEND operation is not successfully completed on the IMAP4 server.

Please note that the APPEND command is not used for message delivery, because it does not provide a mechanism to transfer
SMTP envelope information.

Use AppendMsgNoEncodeFromFile ( 1158) or AppendMsgNoEncodeFromStream ( 1159) to append a message to a mailbox


without encoding message parts prior to transmission.

See Also
AppendMsg ConnectionState ( 1244) EIdConnectionStateError ( 70) AppendMsgNoEncodeFromFile ( 1158)
AppendMsgNoEncodeFromStream ( 1159)

TIdIMAP4.AppendMsg Method (String, TIdMessage, TIdMessageFlagsSet)


Adds a message to the specified mailbox.

Pascal
function AppendMsg(
const AMBName: String;
AMsg: TIdMessage;
const AFlags: TIdMessageFlagsSet = []
): Boolean; overload;
Parameters
Parameters Description
AMBName Mailbox name used to store the new message.
AMsg Message to be added to the mailbox.
AFlags Message flags to apply to the message in the mailbox. Default value is [].

Returns
Boolean - True on success.

Description
AppendMsg is an overloaded Boolean function used to append the message specified in AMsg to the mailbox specified in
AMBName. AppendMsg allows the client to perform mailbox maintenance routines like copying and moving messages between
mailboxes for the client. AppendMsg copies the contents of the specified TIdMessage ( 1521) instance, including attachments, to
the specified mailbox.

AppendMsg implements the IMAP4 APPEND command, and requires that the ConnectionState ( 1244) for the client contain the
value csAuthenticated or csSelected. AppendMsg can raise an EIdConnectionStateError ( 70) exception when the
ConnectionState ( 1244) does not contain one of the expected values.

AMBName must contain a valid mailbox name on the IMAP4 server or an EIdConnectionStateError ( 70) will be raised.

AFlags indicates the set of message flags which should be applied to the message in the mailbox. AppendMsg constructs the flags
for the message using MessageFlagSetToStr prior to calling SendCmd ( 1206) using the IMAP4 APPEND command.

AAlternativeHeaders contains alternate RFC-compliant header values to use in place of those stored in the message specified in
AMsg. When AAlternativeHeaders isomitted, the message headers found the TIdMessage ( 1521) instance are used when
appending message data to the specified mailbox.

AppendMsg creates a temporary file used to calculate the size of the encoded message, including attachments, as required by the
IMAP4 APPEND command. The numeric size is updated to reflect the size of the headers specified in AAlternateHeaders, when
present.

The APPEND command is sent to the IMAP4 server using the indicated mailbox name, message flags, and the message size as
stored in the mailbox. The value in AMBName is enclosed in double quotation marks to prevent errors with mailbox names that
include the Space character.

AppendMsg inspects the numeric response code in LastCmdResult ( 2367), and when the value is IMAP_CONT ( 4334) sends
the message headers, body, and attachments in AMsg to the IMAP4 server.

Internet Direct (Indy) Version 10.1.5 1157


TIdIMAP4 Class Classes

AppendMsg returns False if the APPEND operation is not successfully completed on the IMAP4 server.

Please note that the APPEND command is not used for message delivery, because it does not provide a mechanism to transfer
SMTP envelope information.

Use AppendMsgNoEncodeFromFile ( 1158) or AppendMsgNoEncodeFromStream ( 1159) to append a message to a mailbox


without encoding message parts prior to transmission.

See Also
AppendMsg ConnectionState ( 1244) EIdConnectionStateError ( 70) AppendMsgNoEncodeFromFile ( 1158)
AppendMsgNoEncodeFromStream ( 1159)

TIdIMAP4.AppendMsgNoEncodeFromFile Method
Adds a message to the specified mailbox without encoding message parts.

Pascal
function AppendMsgNoEncodeFromFile(
const AMBName: String;
ASourceFile: string;
const AFlags: TIdMessageFlagsSet = []
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name used to store the new message.
ASourceFile File with the message content to be added to the mailbox.
AFlags Message flags to apply to the message in the mailbox. Default value is [].

Returns
Boolean - True on success.

Description
AppendMsgNoEncodeFromFile is a Boolean function used to append a message stored in a file into the specified IMAP4 server
mailbox. AppendMsgNoEncodeFromFile is very similar to the AppendMsg ( 1156) method, but does not perform encoding for
message parts loaded from the specified file name.

AppendMsgNoEncodeFromFile requires that the ConnectionState ( 1244) property contain the value csAuthenticated or
csSelected, or an EIdConnectionStateError ( 70) exception will be raised.

AMBName is the mailbox name on the IMAP4 server to receive the message content. AMBName must contain a valid mailbox
name on the IMAP4 server or an EIdConnectionStateError ( 70) exception will be raised.

ASourceFile is the file name containing the message content to be appended to the specified mailbox. ASourceFile contains values
as created using the TIdMessage.SaveToFile ( 1534) method.

AFlags indicates the set of message flags which should be applied to the message in the mailbox. AppendMsgNoEncodeFromFile
constructs the flags for the message using MessageFlagSetToStr prior to calling SendCmd ( 1206) using the IMAP4 APPEND
command.

AppendMsgNoEncodeFromFile calls the AppendMsgNoEncodeFromStream ( 1159) method perform the apopend operation.

AppendMsgNoEncodeFromFile causes the APPEND command to be sent to the IMAP4 server using the indicated mailbox name,
message flags, and the message size as stored in the mailbox. The value in AMBName is enclosed in double quotation marks to
prevent errors with mailbox names that include the Space character.

AppendMsgNoEncodeFromFile inspects the numeric response code in LastCmdResult ( 2367), and when the value is
IMAP_CONT ( 4334) sends the message headers, body, and attachments in AMsg to the IMAP4 server.

AppendMsgNoEncodeFromFile returns False if the APPEND operation is not successfully completed on the IMAP4 server.

Please note that the APPEND command is not used for message delivery, because it does not provide a mechanism to transfer
SMTP envelope information.

1158 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Use AppendMsgNoEncodeFromStream ( 1159) to append a message to a mailbox without encoding message parts prior to
transmission, or AppendMsg ( 1156) to append a messgae specified in a TIdMessage ( 1521) instance.

See Also
AppendMsg ( 1156) AppendMsgNoEncodeFromStream ( 1159) ConnectionState ( 1244) EIdConnectionStateError ( 70)
TIdMessage.SaveToFile ( 1534)

TIdIMAP4.AppendMsgNoEncodeFromStream Method
Pascal
function AppendMsgNoEncodeFromStream(
const AMBName: String;
AStream: TIdStream;
const AFlags: TIdMessageFlagsSet = []
): Boolean;
Parameters
Parameters Description
AMBName Scope is const. Type is String.
AStream Type is TIdStream ( 3087).
AFlags Scope is const. Type is TIdMessageFlagsSet ( 3059). Default value is [].

Returns
Boolean

Description
AppendMsgNoEncodeFromStream is a method.

AppendMsgNoEncodeFromStream returns a Boolean value.

TIdIMAP4.Capability Method
Pascal
function Capability(
ASlCapability: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
ASlCapability Type is TIdStrings ( 3089).

Returns
Boolean

Description
Capability is a overloaded method.

Capability returns a Boolean value.

See Also
TIdIMAP4.Capability

TIdIMAP4.CheckMailBox Method
Requests a checkpoint for the currently selected mailbox.

Pascal
function CheckMailBox: Boolean;

Internet Direct (Indy) Version 10.1.5 1159


TIdIMAP4 Class Classes

Returns
Boolean - True on success.

Description
CheckMailBox is a Boolean function that requests a checkpoint for the currently selected mailbox. A checkpoint refers to the IMAP4
server-specific housekeeping associated with a mailbox that is not normally executed as part of each IMAP4 command.

Please note that this function does absolutely nothing on most if not all IMAP servers because they do not leave anything to
"housekeeping" routines. This function is part of the IMAP specification but appears to be totally pointless since the specification
does not define what functions may depend on this function being called first.

CheckMailBox requires that ConnectionState ( 1244) contain the value csSelected or an EIdConnectionStateError ( 70)
exception wil be raised.

CheckMailBox executes the IMAP4 CHECK command, and sets the return value to indicate if the server response in
LastCmdResult ( 2367) is IMAP_OK ( 4334).

Exceptions
Exceptions Description
EIdConnectionStateError ( 70) Raised with the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName.

See Also
ConnectionState ( 1244) LastCmdResult ( 2367) EIdConnectionStateError ( 70) RSIMAP4ConnectionStateError

TIdIMAP4.CheckMsgSeen Method
Indicates if the specified message has been read.

Pascal
function CheckMsgSeen(
const AMsgNum: Integer
): Boolean;
Parameters
Parameters Description
AMsgNum Message number to be checked.

Returns
Boolean - True when the message has been read.

Description
CheckMsgSeen is a Boolean function that indicates if the message in the currently selected mailbox specified by the relative
message number in AMsgNum has been read.

CheckMsgSeen may raise an EIdNumberInvalid ( 126) exception if AMsgNum contains an invalid value (0 or a negative number).

CheckMsgSeen requires that the ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

CheckMsgSeen calls SendCmd ( 1206), after incrementing the IMAP command counter, using the IMAP FETCH command with
the FLAGS attribute. CheckMsgSeen returns True when the server response indicates that the flags for the message contains the
TIdMessageFlag value mfSeen.

Use UIDCheckMsgSeen ( 1211) to check the flags for a message by its unique identifier.

Exceptions
Exceptions Description
EIdNumberInvalid ( 126) With the message RSIMAP4NumberInvalid when AMsgNum is invalid.
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName when
ConnectionState ( 1244) indicates a mailbox has not been selected.

1160 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) TIdMessageFlags ( 2968)
TIdMessageFlagsSet ( 3059) UIDCheckMsgSeen ( 1211)

TIdIMAP4.CloseMailBox Method
Closes the currently selected mailbox.

Pascal
function CloseMailBox: Boolean;
Returns
Boolean - True on success.

Description
CloseMailBox is a Boolean function used to close the currently selected mailbox. CloseMailBox requires that ConnectionState (
1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception will be raised.

CloseMailBox calls SendCmd ( 1206) to execute the IMAP CLOSE command, and sets ConnectionState ( 1244) to
csAuthenticated on successful completion.

The return value for the method is True on successful completion of the IMAP4 CLOSE command.

Exceptions
Exceptions Description
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName.

See Also
ConnectionState ( 1244) SendCmd ( 1206) EIdConnectionStateError ( 70)

TIdIMAP4.Connect Method
Opens a connection and optionally logs in to to the IMAP server.

Pascal
function Connect(
const AAutoLogin: boolean = true
): Boolean; virtual; reintroduce;
Parameters
Parameters Description
AAndLogin Indicates if the Login ( 1174) method is called when connecting.

Description
Connect is an overridden procedure in TIdIMAP4 ( 1150) that opens the connection to the IMAP4 server.

AAndLogin indicates if the Login ( 1174) method is called using values in the Username ( 1248) and Password ( 1247)
properties when establishing the connection to the server.

Connect sets the value in the ConnectionState ( 1244) property to csNonAuthenticated on entry to the method. When AAndLogin
contains True, the value may also be updated after successful completion of the Login ( 1174) method.

Connect calls the inherited Connect method when Connected ( 2353) indicates the IMAP4 session has not been previously
established. If Connected ( 2353) returns True, the method is exited with no additional processing.

Connect captures values in the LastCmdResult ( 2367) property following connecting to the server for use in GreetingBanner (
1245) property.

Connect will call the Login ( 1174) method when AAndLogin contains True. Additional lines of text returned by the IMAP server
may be stored in the Capabilities ( 690) property when SASL is used for authenticating the client connection in ancestor classes.

Internet Direct (Indy) Version 10.1.5 1161


TIdIMAP4 Class Classes

The Login ( 1174) method may be called manually when additional IMAP4 commands are required after connection but prior to
logging in, such as when issuing the Capability ( 1159) command. This also allows switching users on the same server without
having to disconnect ( 1166) from the server.

See Also
Username ( 1248) Password ( 1247) ConnectionState ( 1244) Disconnect ( 1166) Login ( 1174) Capabilities ( 690)

TIdIMAP4.CopyMsg Method
Copies a message from the current mailbox to a specified mailbox.

Pascal
function CopyMsg(
const AMsgNum: Integer;
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMsgNum relative message number for the message in the currently selected mailbox.
AMBName target mailbox name on the IMAP4 server.

Returns
Boolean - True on success.

Description
CopyMsg is a Boolean function used to copy a message in the currently selected mailbox to another mailbox on the IMAP4 server.

AMsgNum is the relative message number for the message in the currently selected mailbox.

AMBName is the target mailbox on the IMAP4 server where a copy of the message will be stored. AMBName must represent an
existing mailbox on the IMAP4 server that is valid for the currently connected ( 2353) Username ( 1248) and Password ( 1247).

CopyMsg performs validation for the value in AMsgNum, and can raise an EIdNumberInvalid ( 126) exception if the message
number contains zero or a negative number.

Use of CopyMsg requires that a mailbox be previously selected using the SelectMailbox ( 1205) method, and that
ConnectionState ( 1244) contains the value csSelected, or an EIdConnectionStateError ( 70) exception will be raised.

CopyMsg calls SendCmd ( 1206) to send the IMAP4 COPY command using the values indicated in AMsgNum and AMBName.
AMBName is UTF7-encoded prior to transmission.

The return value for the method is True on successful completion of the IMAP4 COPY command.

Use CopyMsgs ( 1162) to copy multiple message numbers to a specified mailbox.

Use UIDCopyMsg ( 1211) or UIDCopyMsgs ( 1212) to copy messages in the currently selected mailbox using unique
identifier(s) instead of relative message number(s).

Exceptions
Exceptions Description
EIdNumberInvalid ( 126) With the message RSIMAP4NumberInvalid.
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError.

See Also
SelectMailBox ( 1205) ConnectionState ( 1244) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70) SendCmd ( 1206)
UIDCopyMsg ( 1211) UIDCopyMsgs ( 1212)

TIdIMAP4.CopyMsgs Method
Copies the indicated messages from the current mailbox to a specified mailbox.

1162 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Pascal
function CopyMsgs(
const AMsgNumList: array of Integer;
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMsgNumList Array of relative message numbers for messages to be copied.
AMBName target mailbox name on the IMAP4 server.

Returns
Boolean - True on success.

Description
CopyMsgs is a Boolean function used to copy a list of relative message numbers in the currently selected mailbox to another
mailbox on the IMAP4 server.

AMsgNumList is an Array of relative message numbers for messages to be copied. If the length of the array is 0, no action is
performed and the method is exited.

AMBName is the target mailbox on the IMAP4 server where a copy of the message will be stored. AMBName must represent an
existing mailbox on the IMAP4 server that is valid for the currently connected ( 2353) Username ( 1248) and Password ( 1247).

Use of CopyMsgs requires that a mailbox be previously selected using the SelectMailbox ( 1205) method, and that
ConnectionState ( 1244) contains the value csSelected, or an EIdConnectionStateError ( 70) exception will be raised.

CopyMsgs calls SendCmd ( 1206) to send the IMAP4 COPY command using the list of message numbers and the value in
AMBName. AMBName is UTF7-encoded prior to transmission.

The return value for the method is True on successful completion of the IMAP4 COPY command.

Use CopyMsg ( 1162) to copy a single message to a specified mailbox.

Use UIDCopyMsg ( 1211) or UIDCopyMsgs ( 1212) to copy messages in the currently selected mailbox using unique
identifier(s) instead of relative message number(s).

Exceptions
Exceptions Description
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError.

See Also
SelectMailBox ( 1205) ConnectionState ( 1244) EIdConnectionStateError ( 70) SendCmd ( 1206) UIDCopyMsg ( 1211)
UIDCopyMsgs ( 1212)

TIdIMAP4.CreateMailBox Method
Creates a new mailbox on the remote IMAP4 server for the current account.

Pascal
function CreateMailBox(
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to create ( 267) on the IMAP4 server.

Returns
Boolean - True on success, False on error.

Internet Direct (Indy) Version 10.1.5 1163


TIdIMAP4 Class Classes

Description
CreateMailBox is a Boolean function used to create ( 267) a mailbox with the name indicated in AMBName on the remote IMAP4
server. AMBName must represent a valid mailbox name that does not already exist on the IMAP4 server.

CreateMailBox requires that ConnectionState ( 1244) contain the value csAuthenticated or csSelected, indicating that the
connection was successfully authenticated using the values in the Username ( 1248) and Password ( 1247) properties. When
ConnectionState ( 1244) contains any other value, an EIdConnectionStateError ( 70) exception is raised.

CreateMailBox uses SendCmd ( 1206) to send the IMAP4 CREATE command using a UTF7-encoded copy of the value specified
in AMBName.

CreateMailBox returns True if the requested mailbox was successfully created on the remote IMAP4 server, or False when a
protocol response indicates the operation was not successfully completed. The return value for the method is set to True if the
server response is IMAP_OK ( 4334). A value other than IMAP_OK ( 4334) generally indicates that the IMAP4 account does not
have permissions required to create ( 267) new mailboxes on the server. Use LastCmdResult ( 2367) to access the protocol
response and determine the exact reason for the failure.

Use DeleteMailbox ( 1164), ExpungeMailbox ( 1168), ExamineMailbox ( 1167), or StatusMailbox ( 1208) to perform
maintenance for a mailbox on the remote IMAP4 server.

See Also
Username ( 1248) Password ( 1247) ConnectionState ( 1244) EIdConnectionStateError ( 70) SendCmd ( 1206)
LastCmdResult ( 2367) DeleteMailbox ( 1164) ExpungeMailbox ( 1168) ExamineMailbox ( 1167) StatusMailbox ( 1208)
MailboxSeperator

TIdIMAP4.DeleteMailBox Method
Removes the specified mailbox on the IMAP4 server.

Pascal
function DeleteMailBox(
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to be removed for the current account.

Returns
Boolean - True on success, or False when a protocol error has occurred.

Description
DeleteMailBox is a Boolean function used to permanently remove the mailbox specified in AMBName from the IMAP4 server.
Attempting to remove the "INBOX" mailbox, or a mailbox name that does not exist, will result in an error response from the server.

DeleteMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

DeleteMailBox calls SendCmd ( 1206) using the IMAP DELETE Command, and sets the return value to True when the server
response contains the value IMAP_OK ( 4334).

Please note that IMAP servers are required to have an "Inbox" or "INBOX" folder to allow them to receive email for a given user.
This may or may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already
exist. Because of this requirement, you may not be able to delete a mailbox named Inbox, and if it succeeded, such a deletion may
cause unexpected results.

In additional, use caustion when choosing the characters included in mailbox names. Different IMAP servers may allow, and may
interpret differently, various characters, as allowed within the IMAP specification. Characters such as ~/ and . may have special
meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or
insensitivity, as applicable. Please note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use

1164 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

of spaces in mailbox names. Some IMAP servers may not allow spaces (this functionality is necessary to allow IdIMAP4 to deal
with pre-existing mailboxes that include spaces).

Use CreateMailBox ( 1163) to create ( 267) a new mailbox.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70)

TIdIMAP4.DeleteMsgs Method
Marks the specified messages for subsequent deletion when a mailbox is purged.

Pascal
function DeleteMsgs(
const AMsgNumList: array of Integer
): Boolean;
Parameters
Parameters Description
AMsgNumList Array of messge numbers to mark for deletion.

Returns
Boolean - True on success.

Description
DeleteMsgs is a Boolean function used to mark the specified messages in AMsgNumList for subsequent deletion when the mailbox
is purged. DeleteMsgs calls StoreFlags ( 1209) to add the message flag value mfDeleted to the flags stored for the associated
message on the IMAP4 server.

A mailbox must be selected using the SelectMailBox ( 1205) method prior to calling DeleteMsgs, or an exception is raised when
storing the message flags on the IMAP4 server.

Use UIDDeleteMsgs ( 1213) to mark a list of messages for deletion using their unique identifiers.

Use ExpungeMailBox ( 1168) to remove messages marked for deletion in the specified mailbox.

See Also
StoreFlags ( 1209) MailBox ( 1245)

TIdIMAP4.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy calls the Disconnect ( 1166) method if the session is still Connected ( 2353).

Destroy frees and releases resources allocated to the MailBox ( 1245) and LineStruct properties allocated during initialization of
the component.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
Disconnect ( 1166) Connected ( 2353) MailBox ( 1245)

Internet Direct (Indy) Version 10.1.5 1165


TIdIMAP4 Class Classes

TIdIMAP4.Disconnect Method
Overload List

Method Description
TIdIMAP4.Disconnect () ( 1166) Closes an IMAP4 session and connection.
TIdIMAP4.Disconnect (Boolean, Closes an IMAP4 session and connection.
Boolean) ( 1166)

TIdIMAP4.Disconnect Method ()
Closes an IMAP4 session and connection.

Pascal
procedure Disconnect; overload;
Description
Disconnect is an overloaded procedure in TIdIMAP4 ( 1150) that closes an IMAP4 session and connection.

Disconnect normally requires that the session still be Connected ( 2353) in order to send the LOGOUT command. Calling
Disconnect with no arguments causes the session to be closed without notifying the peer connection and without raising an
exception if the connection is already closed.

Disconnect sets ConnectionState ( 1244) to the value csNonAuthenticated.

Please note that the contents of the Capabilities ( 690) property are cleared in Disconnect.

Disconnect is automatically called by the destructor when Connected ( 2353) contains True.

See Also
Connect ( 1161) EIdNotConnected ( 125) ConnectionState ( 1244) Destroy ( 1165) SendCmd ( 1206)

TIdIMAP4.Disconnect Method (Boolean, Boolean)


Closes an IMAP4 session and connection.

Pascal
procedure Disconnect(
AImmediate: Boolean;
const ARaiseExceptionIfNotCon: Boolean
); overload; reintroduce;
Parameters
Parameters Description
AImmediate
ARaiseExceptionIfNotCon

Description
Disconnect is an overloaded procedure in TIdIMAP4 ( 1150) that closes an IMAP4 session and connection.

Disconnect requires that the session still be Connected ( 2353) in order to send the LOGOUT command. If Connected ( 2353) is
False, an EIdNotConnected ( 125) exception will be raised. This behavior is suppressed if the value in ARaiseExceptionIfNotCon
is False.

Disconnect calls the SendCmd ( 1206) method using the IMAP LOGOUT command prior to calling the inherited Disconnect
method and setting ConnectionState ( 1244) to the value csNonAuthenticated. Please note that the contents of the Capabilities (
690) property are cleared in Disconnect.

Disconnect is automatically called by the destructor when Connected ( 2353) contains True.

Calling Disconnect with no arguments causes the session to be closed without notifying the peer connection and without raising an
exception if the connection is already closed.

1166 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

See Also
Connect ( 1161) EIdNotConnected ( 125) ConnectionState ( 1244) Destroy ( 1165) SendCmd ( 1206)

TIdIMAP4.DoAlert Method
Triggers the OnAlert ( 1249) event handler.

Pascal
procedure DoAlert(
const AMsg: String
);
Parameters
Parameters Description
AMsg Message for the OnAlert ( 1249) event handler.

Description
DoAlert is a public method used to trigger the OnAlert ( 1249) event handler using the value specified in AMsg.

DoAlert is a procedure that implements event notification for alert messages in an IMAP4 response. Alert messages can occur in
results from an IMAP4 command that selects the current mailbox, or appends a new message to a mailbox. TIdAlertEvent ( 3004)
event are generated when the alert is parsed from the results from the command.

DoAlert signals the OnAlert ( 1249) event handler for the current IMAP4 client instance using the value in AMsg for the alert
message. Applications must assign a procedure to the OnAlert ( 1249) event handler to allow responding to the event notification.

Please note that IMAP servers rarely implement alerts.

See Also
OnAlert ( 1249) SelectMailBox ( 1205) ExamineMailBox ( 1167) AppendMsg ( 1156) TIdAlertEvent ( 3004)

TIdIMAP4.ExamineMailBox Method
Selects a mailbox for read-only access.

Pascal
function ExamineMailBox(
const AMBName: String;
AMB: TIdMailBox
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to use accessed on the IMAP4 server.
AMB Mailbox to be filled with the retrieved message values.

Returns
Boolean - True on success.

Description
ExamineMailBox is a Boolean function in TIdIMAP4 ( 1150) used to select the mailbox specified in AMBName for read-only
access. Messages and Flags are retrieved from the mailbox and stored in the TIdMailBox ( 1481) instance specified in AMB.
ExamineMailBox returns the same output as SelectMailBox ( 1205), except for the read-only attribute applied to the mailbox,
flags, and messages.

ExamineMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

ExamineMailBox calls SendCmd ( 1206) using the IMAP EXAMINE command. When the numeric code in LastCmdResult (
2367) contains wsOk ( 4546), the text values in LastCmdResult ( 2367) are parsed to populate the TIdMailBox ( 1481) instance
specified AMB.

Internet Direct (Indy) Version 10.1.5 1167


TIdIMAP4 Class Classes

Please note that IMAP servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Use caustion when choosing the characters used in mailbox names. Different IMAP servers may allow, and interpret differently,
various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special meaning in the
IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive and others not.
It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or insensitivity,
as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of spaces in
mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow IdIMAP4
deal with pre-existing mailboxes that include spaces).

ExamineMailBox returns True on successful completion of the method, or false when the response code is not IMAP_OK ( 4334)
or an exception occurs.

See Also
SelectMailBox ( 1205) ConnectionState ( 1244) TIdMailBox ( 1481)

TIdIMAP4.ExpungeMailBox Method
Removes messages marked for deletion in the currently selected mailbox.

Pascal
function ExpungeMailBox: Boolean;
Returns
Boolean - True on success.

Description
ExpungeMailBox is a Boolean function that permanently removes messages marked for deletion in the currently selected mailbox.
Messages marked for deletion contain the Deleted flag.

ExpungeMailBox requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

ExpungeMailBox calls the SendCmd ( 1206) method using the IMAP EXPUNGE command, and on successful completion calls
the ParseExpungeResult method for the selected mailbox. Please note that ExpungeMailBox does not affect the current list of
messages stored in the MailBox ( 1245) property; the application is responsible for synchronizing the local and remote storage for
the mailbox.

ExpungeMailBox sets the return value to True when the IMAP4 protocol response contains the value IMAP_OK ( 4334).

Use DeleteMsgs ( 1165), or UIDDeleteMsgs ( 1213) to mark messages for deletion.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) TIdMailBox ( 1481)

TIdIMAP4.FindHowServerCreatesFolders Method
Determine the method used to create ( 267) folders on the remote IMAP4 server.

Pascal
function FindHowServerCreatesFolders: TIdIMAP4FolderTreatment;
Returns
TIdIMAP4FolderTreatment ( 2957)

Description
FindHowServerCreatesFolders is a TIdIMAP4FolderTreatment ( 2957) function used to determine the method used to create (
267) folders on the remote IMAP4 server. FindHowServerCreatesFolders examines and probes the mailbox hierarchy for the
current IMAP4 account to derive the return value for the method.

1168 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4FolderTreatment ( 2957) includes the following values and associated meanings:

Value Meaning

---- ------

ftAllowsTopLevelCreation Folders can be created at the same level as Inbox (the top level)
ftFoldersMustBeUnderInbox Folders must be created under INBOX, such as INBOX.Sent
ftDoesNotAllowFolderCreation Won't allow you create ( 267) folders at the top level or under Inbox (may be read-only
connection)
ftCannotTestBecauseHasNoInbox Won't allow top-level folder creation but cannot test creation under Inbox because it does not
exist
ftCannotRetrieveAnyFolders No folders present for that user, cannot be determined

FindHowServerCreatesFolders attempts to get any existing mailbox names for the current account using ListMailBoxes ( 1173). If
no mailboxes are found, the value ftCannotRetrieveAnyFolders is returned.

When an "Inbox" or "INBOX" mailbox is found, FindHowServerCreatesFolders will try to create ( 267) temprary top-level and
inferior mailboxes. Temporary mailboxes are deleted prior to exiting from the method.

If the an Inbox cannot be located, the value ftCannotTestBecauseHasNoInbox is returned.

If neither top-level or inferior mailboxes are allowed, the value ftDoesNotAllowFolderCreation is returned.

TIdIMAP4.GetInternalResponse Method
Reads mutiple untagged responses or a single tagged response from the server.

Pascal
function GetInternalResponse(
const ATag: String;
AExpectedResponses: array of String;
ASingleLineMode: Boolean;
ASingleLineMayBeSplit: Boolean = False
): string; overload; reintroduce;
Parameters
Parameters Description
ATag Command tag expecetd in the IMAP4 response.
AExpectedResponses Success values for the current response.
ASingleLineMode Caller wants only the first line of the server response.
ASingleLineMayBeSplit The first line may contain values split among one or more lines. Default value is False.

Returns
String - Text from the server response.

Description
GetInternalResponse is a procedure that implements reading of tagged and untagged IMAP4 responses from the remote IMAP4
server. GetInternalResponse is called from the implementation of the GetResponse ( 1170) method.

GetInternalResponse creates and maintains a TStringList that is used to capture the response line(s) from the IMAP4 server using
ReadLnWait ( 1174). GetInternalLineResponse will read multiple untagged responses until the tagged response in ATag is
encountered, or a single tagged response line having the value in ATag.

ASingleLineMode indicates if the caller wants only the first line in the IMAP4 response. For instance, the caller may be looking only
for "* FETCH (blah blah)", because he needs to parse that line to figure out how the rest will follow. This arises with a number of the
FETCH commands where the caller needs to get the byte-count from the first line before he can retrieve ( 1176) the rest of the
response.

Note "FETCH" would have to be in AExpectedResponses.

Internet Direct (Indy) Version 10.1.5 1169


TIdIMAP4 Class Classes

When ASingleLineMode contains False, the caller wants everything up to and including the reply terminator (e.g. "C45 OK ( 4359)
Completed").

In ASingleLineMode, we ignore any lines that dont have one of AExpectedResponses at the start, otherwise we add all lines to
.Text and later strip out any lines that dont have one of AExpectedResponses at the start.

ASingleLineMayBeSplit (which should only be used with ASingleLineMode = True) deals with the (unusual) case where the server
cannot or does not fit a single-line response onto one line. This arises when FETCHing the BODYSTRUCTURE, which can be very
long. The server (Courier, anyway) signals it by adding a byte-count to the end of the first line, that would not normally be present.

For example, for normal short responses, the server would send:

• FETCH (BODYSTRUCTURE (Part1 Part2))


but if it splits it, it sends:

• FETCH (BODYSTRUCTURE (Part1 {16} Part2))


The number in the chain brackets {16} seems to be random.

WARNING: If you use ASingleLineMayBeSplit on a line that is EXPECTED to end with a byte-count, the code will break, so don't
use it unless absolutely necessary.

GetInternalResponse handles server response lines that include the "BYE" command that indicates pending disconnection from the
server. If the value "BYE" is not included in AExpectedResponses, the disconnection is not expected and causes the value in
ConnectionState ( 1244) to be set to csUnexpectedlyDisconnected. An EIdDisconnectedProbablyIdledOut ( 73) is raised in this
circumstance.

GetInternalResponse calls LastCmdResult.ParseResponse using the command tag in ATag and the TStringList containing
response lines to prepare the response for use in the IMAP4 client. GetInternalResponse frees the TStringList prior to exiting from
the method.

See Also
GetResponse ( 1170) TIdRFCReply

TIdIMAP4.GetResponse Method
Retrieves and checks a multiple line IMAP4 server response.

Pascal
function GetResponse: string; overload; reintroduce;
Returns
String - The initial word from the server response.

Description
GetResponse is a reintroduced string function in TIdIMAP4 ( 1150) that implements retrieval and processing of IMAP4 server
responses. GetResponse is used to read and accumulate response lines from the remote IMAP4 server until a line that has a valid
response that terminates the response.

GetResponse handles server response that include the following:

• Simple tagged responses


C41 OK Completed

• Untagged responses followed by a tagged response:


* LIST (UnMarked) "/" INBOX
* LIST (UnMarked) "/" Junk

1170 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

* LIST (UnMarked) "/" Junk/Subbox1


C42 OK Completed

• Untagged success or failure reponses:


* OK CommuniGate Pro IMAP Server 3.5.7 ready

• Untagged message literals:


+ Send the additional command text

• Completion responses:
OK - search completed
NO - search error: can't search that [CHARSET] or criteria
BAD - command unknown or arguments invalid
Because you may get data first, which you need to skip, you need to accept all the above possibilities.

We MUST stop when we find a valid response code, like OK ( 4359).

GetResponse sets the formatted reply in LastCmdResult ( 2367) using the initial tagged or completion response accumulated
from the server.

See Also
GetInternalResponse ( 1169) LastCmdResult ( 2367)

TIdIMAP4.GetUID Method
Retrieves the unique identifier for a given relative message number.

Pascal
function GetUID(
const AMsgNum: Integer;
var AUID: string
): Boolean;
Parameters
Parameters Description
AMsgNum Message number (relative)
AUID destination for the retrieved UID

Returns
Boolean - True on success.

Description
GetUID is a Bollean function used to retrieve ( 1176) the UID (unique identifier) for a specified relative message number. GetUID
allows the user to switch from relative message numbers to UIDs.

Please note that TIdIMAP4 ( 1150) stores the UID as a string rather than a number (it is defined as a number in the RFCs) for
historical reasons but is simply converted to a number via StrToInt should you wish to do so. Storing it as a string rather than a
number is of no practical consequence or disadvantage, and changing it in TIdIMAP4 ( 1150) would only break existing code.

The IMAP protocol uses two methods for message numbering: "relative" message numbers and UIDs. "Relative" message numbers
are sequential numbers starting from 1 for each message in a mailbox - this is just the index number of the message in the
TIdMailBox ( 1481) plus 1 (the first index is 0 in TIdMailBox ( 1481) and 1 on the IMAP server). UIDs are unique numbers
assigned by the IMAP server, which rarely, if ever, change. While they can theoretically be changed as per the IMAP protocol, they
certainly should not change during the period you have a mailbox open. While you may be able to get away with using the relative
message number, you will get into difficulties if two sessions are accessing the same mailbox, and one of them deletes a message -
the relative message for the other session will then be incorrect. As an example, this can arise where a manager and his/her
secretary are accessing the manager's mailbox. Even if you are using UIDs, this also gives the problem that the second session

Internet Direct (Indy) Version 10.1.5 1171


TIdIMAP4 Class Classes

may also try to modify the deleted message, but the solution is to always call the UIDRetrieveFlags ( 1217) function before you try
to modify the message - it will return False if the message has been deleted.

IMAP implements a mechanism for checking if UIDs are valid over long periods. This can be useful in certain circumstances where
you may need to keep track of a message between sessions or over long periods, such as weeks. A possible application that would
do this is one that monitors a particular mailbox, such as sales leads, to ensure that someone reads them, and if they do not after
say a week, emails an administrator to assign someone to read them. In that case, you don't want to create ( 267) a high load on
the IMAP server by continually scanning through the mailbox. While there are different methods of doing this, one way is to
periodically call UIDCheckMsgSeen ( 1211) or UIDRetrieveFlags ( 1217) for the given UID. The only potential problem you have
is the unlikely/infrequent possibility of some other program re-ordering the mailbox, which will make your UIDs invalid.

The return value for the method indicates if the UID was successfully retrieved for the specified relative message number.

GetUID validates the value in AMsgNum to ensure that it contains a positive non-zero value. An EIdNumberInvalid ( 126)
exception is raised when the relative message number contains an invalid value.

GetUID requires that ConnectionState ( 1244) contain the value csSelected, indicating that a mailbox has been previously
selected using SelectMailBox ( 1205), or an EIdConnectionStateError ( 70) exception is raised.

GetUID calls SendCmd ( 1206) to send the IMAP4 FETCH command using the values in AMsgNum and the fetch data item for
the UID value. Some servers return NO if the requested message number is not present (e.g. Cyrus), others return OK ( 4359) but
no data (CommuniGate). If the server response contains the value IMAP_OK ( 4334), the values in LastCmdResult ( 2367) are
parsed to determine the UID value.

To check if your UIDs have changed, use StatusMailBox ( 1208) command and check for changes to the UIDValidity field - the
IMAP protocol guarantees that the server will change this value if it changes the UIDs of any existing messages.

TIdIMAP4.InternalRetrieveStructure Method
Retrieves the body structure for a specified message.

Pascal
function InternalRetrieveStructure(
const AMsgNum: Integer;
AMsg: TIdMessage;
AParts: TIdImapMessageParts
): Boolean;
Parameters
Parameters Description
AMsgNum Relative message number for the requested message.
AMsg Message instance to store FETCH results from the server.
AParts Message parts that represent the body structure for the message.

Returns
Boolean - True on success.

Description
InternalRetrieveStructure is a Boolean function used to implement retrieving the body structure for the relative message number
specified in AMsgNum. InternalRetrieveStructure is used in the implementation of the RetrieveStructure ( 1200) method.

AMsg is the TIdMessage ( 1521) instance to use for retrieving the contents of the specified message.

AParts is a TIdImapMessageParts ( 1270) instance used to store the message parts that represent the BODYSTRUCTURE
response from the IMAP4 server.

InternalRetrieveStructure requires ConnectionState ( 1244) to contain the value csSelected, indicating a mailbox has been
previously selected using SelectMailBox ( 1205), or an EIdConnectionStateError ( 70) exception is raised.

InternalRetrieveStructure uses SendCmd ( 1206) to send the IMAP4 FETCH command with the specified message number and
the BODYSTRUCTURE argument. When a successful FETCH response is received, values in LastCmdResult ( 2367) are parsed
to store message parts that represent the body structure in AParts.

The return value for the method is True if the body structure for the specified message number is successfully retrieved using the

1172 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

method.

TIdIMAP4.KeepAlive Method
Prevents loss of a IMAP server connection due to a timeout.

Pascal
procedure KeepAlive;
Description
KeepAlive is a Procedure used to prevents loss of the IMAP server connection due to a timeout condition by sending the IMAP4
NOOP command using the SendCmd ( 1206) method. Calling KeepAlive is allowed regardless of the value in the
ConnectionState ( 1244) property.

Please note that the IMAP protocol states that if an IMAP server implements an autologout function, it must be of at least 30
minutes duration. To avoid being logged out, add a timer component to your form that calls the KeepAlive function every 25
minutes, but make sure you don't call KeepAlive while another IMAP function is awaiting a response, or it may mistakenly think the
KeepAlive response is its response.

In practice, some IMAP servers may not implement the correct autologout duration. Also note that a dial-up connection can be
disconnected after a set period of inactivity, which you may mistake for a server disconnection. If the Borland IDE debugger is
active, the protocol stack sending back lower-level "keep alive" ACK packets may still result in server disconnection - if you are
getting disconnected unexpectedly, try your program outside the debugger to see if the problem persists.

TIdIMAP4.ListInferiorMailBoxes Method
Pascal
function ListInferiorMailBoxes(
AMailBoxList: TIdStringList;
AInferiorMailBoxList: TIdStringList
): Boolean;
Parameters
Parameters Description
AMailBoxList Type is TIdStringList ( 3088).
AInferiorMailBoxList Type is TIdStringList ( 3088).

Returns
Boolean

Description
ListInferiorMailBoxes is a method.

ListInferiorMailBoxes returns a Boolean value.

TIdIMAP4.ListMailBoxes Method
Pascal
function ListMailBoxes(
AMailBoxList: TIdStringList
): Boolean;
Parameters
Parameters Description
AMailBoxList Type is TIdStringList ( 3088).

Returns
Boolean

Internet Direct (Indy) Version 10.1.5 1173


TIdIMAP4 Class Classes

Description
ListMailBoxes is a method.

ListMailBoxes returns a Boolean value.

TIdIMAP4.ListSubscribedMailBoxes Method
Pascal
function ListSubscribedMailBoxes(
AMailBoxList: TIdStringList
): Boolean;
Parameters
Parameters Description
AMailBoxList Type is TIdStringList ( 3088).

Returns
Boolean

Description
ListSubscribedMailBoxes is a method.

ListSubscribedMailBoxes returns a Boolean value.

TIdIMAP4.Login Method
Attempts to login ajnd perform authentication on the IMAP4 server.

Pascal
procedure Login; virtual;
Description
Login is a virtual procedure in TIdIMAP4 ( 1150) used to perform authentication for the IMAP4 account. Login allows the IMAP4
session to switching users that are on the same server without having to disconnect ( 1166) from the server.

For connections that support TLS (Transport Layer Security) and contain an explicit TLS value in UseTLS ( 1249), the STARTTLS
command is used to perform TLS handshaking and negotiation.

For non-TLS transports, the value in the AuthType ( 1244) property indicates if the Username ( 1248) and Password ( 1247)
properties are used for authentication, or if the SASLMechaisms and Capabilities ( 690) propeties are used for authentication.

Login updates the value in ConnectionState ( 1244) to reflect the current status of the authentication process.

If an exception occurs in the Login method, the connection is closed by calling the Disconnect ( 1166) method prior to exit.

Login is called in the Connect ( 1161) method when arguments to the method indicate automatic logins should be performed.

See Also
Connect ( 1161) ConnectionState ( 1244) UseTLS ( 1249) AuthType ( 1244) Disconnect ( 1166) SASLMechanisms (
1248) Capabilities ( 690)

TIdIMAP4.ReadLnWait Method
Pauses until a line of text is read from the connection.

Pascal
function ReadLnWait: string;
Returns
String - Text read from the connection.

1174 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
ReadLnWait is a String function used to pause until a line of text is read from the connection. ReadLnWait uses the ReadLnWait
method in the IOHandler ( 2364) assigned for the client to read the line of text.

Please note that an exception can be raised if the ReadTimeout ( 2349) value for the client elapses prior to returning a line of text
from the client connection.

The return value for the method is the line of text (without the line end characters) read from the connection.

ReadLnWait is used internally in the implementation of many IMAP4 methods that access line-oriented values (like server
responses).

See Also
IOHandler ( 2364) TIdIOHandler.ReadLnWait ( 1307)

TIdIMAP4.RenameMailBox Method
Renames a specified mailbox on the IMAP4 server.

Pascal
function RenameMailBox(
const AOldMBName: String;
const ANewMBName: String
): Boolean;
Parameters
Parameters Description
AOldMBName Mailbox name to be changed .
ANewMBName New name for the mailbox.

Returns
Boolean - True on success.

Description
RenameMailBox is a Boolean function used to rename the mailbox specified in AOldMBName to the value specified in
ANewMBName on the remote IMAP4 server. RenameMailBox will receive a protocol error if a mailbox with the name specified in
AOldMBName does not exist, or when a mailbox with the name specified in ANewMBName already exists for the IMAP4 account.

Renaming the "INBOX" mailbox is permitted in the IMAP4 RFC, and has special behaviour. It moves all messages in INBOX to a
new mailbox with the given name, leaving INBOX empty. If the server implementation supports inferior hierarchical names of
INBOX, these are unaffected by a rename of INBOX. Note that the behaviour on IMAP4 servers for renaming INBOX seems to be
varied in practice, and consequently renaming of the INBOX is not encouraged.

RenameMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

RenameMailBox calls SendCmd ( 1206) using the IMAP4 RENAME command to alter the mailbox name. RenameMailBox sets
the return value to True when the server response contains the value IMAP_OK ( 4334).

Please note that IMAP4 servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

WARNING:

Be careful with the characters you use for mailbox names. Different IMAP servers may allow, and interpret differently, various
characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special meaning in the IMAP4
servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive and others not. It is
recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or insensitivity, as
applicable. Also note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of spaces in
mailbox names, but also note that a particular IMAP4 server may not allow spaces (this functionality is necessary to allow IdIMAP4
deal with pre-existing mailboxes that include spaces).

Internet Direct (Indy) Version 10.1.5 1175


TIdIMAP4 Class Classes

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70)

TIdIMAP4.Retrieve Method
Retrieves a message from a mailbox and marks it as read on the server.

Pascal
function Retrieve(
const AMsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgNum Message number to retreive from the mailbox.
AMsg Stores the retrieved message headers, body, and attachments.

Returns
Boolean - True on success.

Description
Retrieve is a Boolean function that retrieves the entire contents for a message from a mailbox and marks it as read on the remote
IMAP4 server. Retrieve requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised.

Retrieve calls a protected method that sends the IMAP4 FETCH command for the message number specified in AMsgNum.
Retrieve performs validation for the relative message number to ensure that it contains a positive non-zero value. An
EIdNumberInvalid ( 126) exception can be raised if the relative message number in aMsgNum is invalid.

On successful retrieval of the RFC 822 envelope data, Retrieve calls ReceiveHeader and ReceiveBody to load the message
contents into the TIdMessage ( 1521) instance specified by AMsg. All headers, message parts, and the body of the message
instance are cleared prior to storing values retrieved from the remote IMAP4 server. The value of the UID and Flags properties for
the message in AMsg are updated based on the values found in the IMAP4 server response.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) EIdConnectionStateError ( 70) TIdMessage (
1521) TIdMessage.Headers ( 1546) TIdMessage.Body ( 1538) TIdMessage.MessageParts ( 1548) TIdMessage.UID ( 1553)
TIdMessage.Flags ( 1545)

TIdIMAP4.RetrieveAllEnvelopes Method
Retrieves RFC-822 envelope data for messages in a mailbox.

Pascal
function RetrieveAllEnvelopes(
AMsgList: TIdMessageCollection
): Boolean;
Parameters
Parameters Description
AMsgList Collection of message instances for storing message envelope data.

Returns
Boolean - True on success, False on exception or protocol error.

Description
RetrieveAllEnvelopes is a Boolean function used to retrieve ( 1176) IMAP4 envelope data for all messages in the currently
selected IMAP4 mailbox by their message number.

1176 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

IMAP4 envelope information consists of data items that describe the envelope structure of a message and is computed by parsing
RFC-822 message headers from individual messages in the IMAP4 mailbox. Fields in the envelope structure are in the following
order: date, subject, from, sender, reply-to, to, cc, bcc, in-reply-to, and message-id.

Any member in an envelope structure that is not applicable is presented as an empty value. Please note that the IMAP4 server
sends a default value for the reply-to and sender fields using the from field; a client is not expected to know how to do this.

RetrieveAllEnvelopes requires that the ConnectionState ( 1244) property for the IMAP4 client contain the value csSelected, or an
EIdConnectionStateError ( 70) exception will be raised and the return value will be set to False.

RetrieveAllEnvelopes implements the IMAP4 FETCH command using arguments that will result in all envelope data items for the
messages in the selected mailbox. The multi-line response from the IMAP4 server is captured and parsed into TIdMessages
instances in the AMsgList collection.

Please note that existing items in AMsgList are assumed to be in relative message number order, and will overwrite message
headers for the TIdMessage ( 1521) instances based on that assumption. When AMsgList is unassigned, or does not contain
enough items for the envelopes in the mailbox, a new TIdMessage ( 1521) instance is created and added to the AMsgList
collection.

The return value for RetrieveAllEnvelopes will be True when the protocol response code from the IMAP4 server is IMAP_OK (
4334), and the multi-line response is successfully parsed into the AMsgList collection.

Use UIDLRetrieveAllEnvelopes to retrieve ( 1176) envelope data for messages using their unique identifier(s).

See Also
TIdMessage ( 1521) TIdMessageCollection ( 1561) UIDLRetrieveAllEnvelopes

TIdIMAP4.RetrieveAllHeaders Method
Retrieves headers for all messages in a mailbox and populates the specified message collection.

Pascal
function RetrieveAllHeaders(
AMsgList: TIdMessageCollection
): Boolean;
Parameters
Parameters Description
AMsgList Message collection to be populated.

Returns
Boolean - True on success.

Description
RetrieveAllHeaders is a Boolean function that retrieves headers for all messages in the currently selected mailbox, and populates
the message collection specified in AMsgList with message instances to store the header values.

RetrieveAllHeaders requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

When AMsgList is unassigned (Nil), RetrieveAllHeaders will set the return value to False and exit from the method. Otherwise,
RetrieveAllHeaders will create ( 267) a new TIdMessageItem ( 1611) in AMsgList and call RetrieveHeader ( 1180) for each
individual relative message number stored in the Mailbox property. If the headers for a given message cannot be loaded from the
IMAP4 mailbox, the return value is set to False and additional messages are ignored.

RetrieveAllHeaders will return True when all message headers have been retrieved from the mailbox.

RetrieveAllHeaders is used in SelectMailBox ( 1205) to automatically retrieve ( 1176) data from the selected mailbox when
RetrieveOnSelect ( 1247) contains the value rsHeaders.

RetrieveAllMsgs ( 1178) is used in SelectMailBox ( 1205) to fetch both message headers and message part contents in a
message collection when RetrieveOnSelect ( 1247) contains the value rsMessages.

Internet Direct (Indy) Version 10.1.5 1177


TIdIMAP4 Class Classes

See Also
MailBox ( 1245) SelectMailBox ( 1205) ConnectionState ( 1244) EIdConnectionStateError ( 70) TIdMessageCollection (
1561) TIdMessageItem ( 1611) TIdMessage ( 1521) RetrieveHeader ( 1180) RetrieveAllMsgs ( 1178)

TIdIMAP4.RetrieveAllMsgs Method
Retrieves all messages in a mailbox and populates the specified message collection.

Pascal
function RetrieveAllMsgs(
AMsgList: TIdMessageCollection
): Boolean;
Parameters
Parameters Description
AMsgList Message collection to be populated.

Returns
Boolean - True on success.

Description
RetrieveAllMsgs is a Boolean function used to retrieve ( 1176) all messages in the currently selected mailbox, and populates the
message collection specified in AMsgList with message instances.

RetrieveAllMsgs is used in SelectMailBox ( 1205) to automatically retrieve ( 1176) data from the selected mailbox when
RetrieveOnSelect ( 1247) contains the value rsMessages.

RetrieveAllMsgs requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

When AMsgList is unassigned (Nil), RetrieveAllHeaders ( 1177) will set the return value to False and exit from the method.
Otherwise, RetrieveAllMsgs will create ( 267) a new message in the collection and call Retrieve ( 1176) for each individual
realtive message number found in the current MailBox ( 1245) for the IMAP4 account. If the headers for a given message cannot
be loaded from the IMAP4 mailbox, the return value is set to False and additional messages are ignored.

RetrieveAllMsgs will return True when all messages have been retrieved from the mailbox.

Use RetrieveAllHeaders ( 1177) to fetch only message headers for the message collection.

See Also
SelectMailBox ( 1205) ConnectionState ( 1244) EIdConnectionStateError ( 70) TIdMessageCollection ( 1561)
TIdMessageItem ( 1611) TIdMessage ( 1521) Retrieve ( 1176) RetrieveAllHeaders ( 1177)

TIdIMAP4.RetrieveEnvelope Method
Retrieves SMTP envelope information for a message in the mailbox.

Pascal
function RetrieveEnvelope(
const AMsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgNum Message number to retrieve ( 1176) from the mailbox.
AMsg Message instance to store the return values.

Returns
Boolean - True on success.

1178 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
RetrieveEnvelope is a Boolean function used to retrieve ( 1176) the SMTP envelope information for the relative message number
specified in AMsgNum, and to store the information in the message identified by AMsg.

RetrieveEnvelope validates the relative message number in aMsg to ensure that it contains a positive non-zero value. An
EIdNumberInvalid ( 126) exception will be raised when the realtive message number is invalid.

RetrieveEnvelope requires that ConnectionState ( 1244) contain the value csSelected, indicating a mailbox has been successfully
selected and authenticated. RetrieveEnvelope can raise an EIdConnectionStateError ( 70) exception if a mailbox has not been
selected and/or authenticated for the current user.

RetrieveEnvelope calls SendCmd ( 1206) using the IMAP4 FETCH command and arguments constructed from the value in
AMsgNum and the IMAP4 fetch data flags required for the operation. RetrieveEnvelope reads the multi-line response from the
IMAP4 server, and verifies that the initial response matches the command issued using SendCmd ( 1206). When they are the
same, RetrieveEnvelope extracts the SMTP headers from the response and parses the header values in the message specified in
AMsg.

Use RetrieveEnvelopeRaw ( 1179) to retrieve ( 1176) and store message envelope data into a specified TStrings argument.

Use UIDRetrieve ( 1214) or UIDRetrieveEnvelopeRaw ( 1217) to retrieve ( 1176) and store message envelope data for a
message identified by its unique identifier (UID).

See Also
ConnectionState ( 1244) TIdMessage ( 1521) RetrieveEnvelopeRaw ( 1179) UIDRetrieveEnvelope ( 1216)
UIDRetrieveEnvelopeRaw ( 1217) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)

TIdIMAP4.RetrieveEnvelopeRaw Method
Pascal
function RetrieveEnvelopeRaw(
const AMsgNum: Integer;
ADestList: TIdStringList
): Boolean;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
ADestList Type is TIdStringList ( 3088).

Returns
Boolean

Description
RetrieveEnvelopeRaw is a method.

RetrieveEnvelopeRaw returns a Boolean value.

TIdIMAP4.RetrieveFlags Method
Retrieves stored message flags for a message on the IMAP4 server.

Pascal
function RetrieveFlags(
const AMsgNum: Integer;
var AFlags: TIdMessageFlagsSet
): Boolean;
Parameters
Parameters Description
AMsgNum Message number containing flags to be retrieved.
AFlags Storage for message flags in the specified message number.

Internet Direct (Indy) Version 10.1.5 1179


TIdIMAP4 Class Classes

Returns
Boolean - True on success.

Description
RetrieveFlags is a Boolean function used to retrieve ( 1176) stored message flags for the relative message number specified
AMsgNum. Flags values retrieved from the current mailbox on the IMAP4 server are stored in the AFlags argument.

RetrieveFlags validates the relative message number in AMsgNum to ensuire that it contains a positive non-zero value, and raises
an EIdNumberInvalid ( 126) exception when AMsgNum contains 0 (zero) or a negative number.

RetrieveFlags requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account propr to calling RetrieveFlags.

RetrieveFlags sends the IMAP4 FETCH command to get the flag values for the specified message number. If a protocol response
error occurs while retrieving the flag values, RetrieveFlags sets the return value to False and exits from the method. AFlags will
contains an empty set in this condition.

On successful completion, RetrieveFlags processes the untagged responses in IMPAP4 server response, and sets the return value
to True.

Message flags returned in the AFlags argument can be stored in the TIdMessage.Flags ( 1545) property for items in MailBox (
1245).

Use UIDRetrieveFlags ( 1217) to retrieve ( 1176) message flags for a message using its unique identifier (UID).

Use StoreFlags ( 1209) to update the stored message flags for a message in the mailbox on the remote IMAP4 server.

See Also
ConnectionState ( 1244) MailBox ( 1245) StoreFlags ( 1209) UIDRetrieveFlags ( 1217) EIdConnectionStateError ( 70)
EIdNumberInvalid ( 126) TIdMessage.Flags ( 1545)

TIdIMAP4.RetrieveHeader Method
Retrieves headers for a specified message number and populates the message instance.

Pascal
function RetrieveHeader(
const AMsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgNum Message number to be retrieved from the mailbox.
AMsg Message instance used to store retrieved header values.

Returns
Boolean - True on success.

Description
RetrieveHeader is a Boolean function used to retrieve ( 1176) headers for the message number specified in AMsgNum, and
populates the message instance specified in AMsg with the header values.

RetrieveHeader validates the relative message number in AMsgNum to ensure that it contains a positive non-zero value, and raises
and EIdNumberInvalid ( 126) exception if the condition is not met.

RetrieveHeader requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account prior to calling RetrieveHeader.

RetrieveHeader sends the IMAP4 FETCH command for the specified message number to access the stored header values.

1180 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

RetrieveHeader ensures that the untagged server response contains an RFC 822 header before populating the header values in
the specified message instance. Please note that any existing header values in AMsg are cleared prior to parsing and storing
headers from the IMAP4 server response.

RetrieveHeader sets the return value to True when the protocol response contains the value IMAP_OK ( 4334).

RetrieveHeader is used in the implementation of the RetrieveAllHeaders ( 1177) method, which is in turn called by SelectMailBox
( 1205) when RetrieveOnSelect ( 1247) contains the value rsHeaders.

Use UIDRetrieveHeader ( 1218) to retrieve ( 1176) message headers by a unique identifier (UID).

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) MailBox ( 1245) RetrieveAllHeaders ( 1177)
UIDRetrieveHeader ( 1218) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) TIdMessage.Headers ( 1546)

TIdIMAP4.RetrieveMailBoxSize Method
Indicates the size of all messages in the currently selected mailbox.

Pascal
function RetrieveMailBoxSize: Integer;
Returns
Integer - Bytes required to store all messages in the mailbox or -1 when an error occurs.

Description
RetrieveMailBoxSize is an Integer function that calculates the size of all messages in the currently selected mailbox. The calculated
size for the mailbox includes all message parts (including attachments) currently stored on the remote IMAP4 server.

RetrieveMailBoxSize requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account prior to calling RetrieveMailBoxSize.

RetrieveMailBoxSize calls SendCMd using the IMAP4 FETCH command to get the message size for each of the messages in the
IMAP mailbox, and accumulates the total size as the return value for the method. The return value for RetrieveMailBoxSize is -1 if a
protocol response error occurs in the method.

Use RetreiveMsgSize or UIDRetreiveMsgSize to determine the size of a specific message stored in the currently selected mailbox
for the IMAP4 account.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) SendCmd ( 1206) RetreiveMsgSize UIDRetreiveMsgSize IMAP_OK
( 4334)

TIdIMAP4.RetrieveMsgSize Method
Indicates the size of a specified message in the currently selected mailbox.

Pascal
function RetrieveMsgSize(
const AMsgNum: Integer
): Integer;
Parameters
Parameters Description
AMsgNum Message number to access in the mailbox.

Returns
Integer - Bytes required to store the message in the mailbox or -1 when an error occurs.

Internet Direct (Indy) Version 10.1.5 1181


TIdIMAP4 Class Classes

Description
RetrieveMsgSize is an Integer function that calculates the size of the message specified by AMsgNum in the currently selected
IMAP4 mailbox.

RetrieveMsgSize validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveMsgSize requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveMsgSize.

RetrieveMsgSize calls SendCMd using the IMAP4 FETCH command to get the message size for the specified relative message
number in the IMAP mailbox. The server response is examined for the message size when the server response contains the value
IMAP_OK ( 4334), and sets the return value for the method. The return value for RetrieveMsgSize is -1 if a protocol error
response occurs in the method.

Use UIDRetrieveMsgSize ( 1219) to retrieve ( 1176) the size of a message using the unique identifier (UID) for the message.

Use RetrieveMailBoxSize ( 1181) to retrieve ( 1176) the space required for all messages in the currently selected mailbox for the
IMAP4 account.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) SendCmd ( 1206) UIDRetrieveMsgSize (
1219) RetrieveMailBoxSize ( 1181)

TIdIMAP4.RetrieveNoDecodeToFile Method
Retrieves the raw encoded contents of a message and stores the contents in a file.

Pascal
function RetrieveNoDecodeToFile(
const AMsgNum: Integer;
ADestFile: string
): Boolean;
Parameters
Parameters Description
AMsgNum Relative message number to retrieve ( 1176).
ADestFile File name used to store the message contents.

Returns
Boolean - True on success.

Description
RetrieveNoDecodeToFile is a Boolean function used to retrieve ( 1176) the raw encoded contents of the relative message number
indicated in AMsgNum, and to store the message contents in the file indicated by ADestFile.

RetrieveNoDecodeToFile can be used to access the contents of the message without creating object instances in the
MessageParts collection.

RetrieveNoDecodeToFile validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and
raises an EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveNoDecodeToFile requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveNoDecodeToFile.

RetrieveNoDecodeToFile creates a TIdMessage ( 1521) instance used to temporarily store the encoded contents of the specified
message. The TIdMessage ( 1521) instance is freed after storing the message contents in the indicated file.

RetrieveNoDecodeToFile returns True on successful completion of message retrieval. RetrieveNoDecodeToFile returns False if a
protocol error response is received during retrieval of the specified message.

1182 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Use RetrieveNoDecodeToStream ( 1183) to retrieve ( 1176) a message without decoding, and to store the contents in a stream.

See Also
ConnectionState ( 1244) RetrieveNoDecodeToStream ( 1183) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
TIdMessage.NoDecode ( 1549)

TIdIMAP4.RetrieveNoDecodeToStream Method
Pascal
function RetrieveNoDecodeToStream(
const AMsgNum: Integer;
AStream: TIdStream
): Boolean;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
AStream Type is TIdStream ( 3087).

Returns
Boolean

Description
RetrieveNoDecodeToStream is a method.

RetrieveNoDecodeToStream returns a Boolean value.

TIdIMAP4.RetrievePart Method
Overload List

Method Description
TIdIMAP4.RetrievePart (Integer, Retrieves an individual message part for a specified message stored in the remote
Integer, PChar, Integer, string) ( 1183) mailbox.
TIdIMAP4.RetrievePart (Integer, Retrieves an individual message part for a specified message stored in the remote
Integer, TIdBytes, Integer, string) ( 1184) mailbox.
TIdIMAP4.RetrievePart (Integer, string, Retrieves an individual message part for a specified message stored in the remote
PChar, Integer, string) ( 1185) mailbox.
TIdIMAP4.RetrievePart (Integer, string, Retrieves an individual message part for a specified message stored in the remote
TIdBytes, Integer, string) ( 1186) mailbox.
TIdIMAP4.RetrievePart (Integer, string,
TIdStream, string) ( 1187)

TIdIMAP4.RetrievePart Method (Integer, Integer, PChar, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function RetrievePart(
const AMsgNum: Integer;
const APartNum: Integer;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number to be retrieved from the mailbox.

Internet Direct (Indy) Version 10.1.5 1183


TIdIMAP4 Class Classes

APartNum Message part number to be retrieved.


ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
RetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the relative message
number specified in aMsgNum.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePart validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception
will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveNoDecodeToStream ( 1183).

RetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message part
content using a TIdTCPStream ( 2381) instance. RetrievePart assigns the event handlers in OnWorkBeginForPart ( 1249),
OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work events
occurring during message part retrieval.

AFter retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
RetrievePart

RetrieveStructure ( 1200)

RetrievePartPeek ( 1189)

RetrievePartToFile ( 1194)

RetrievePartToFilePeek ( 1196)

TIdIMAP4.RetrievePart Method (Integer, Integer, TIdBytes, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function RetrievePart(
const AMsgNum: Integer;
const APartNum: Integer;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number to be retrieved from the mailbox.

1184 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

APartNum Message part number to be retrieved.


ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
RetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the relative message
number specified in aMsgNum.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePart validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception
will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveNoDecodeToStream ( 1183).

RetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message part
content using a TIdTCPStream ( 2381) instance. RetrievePart assigns the event handlers in OnWorkBeginForPart ( 1249),
OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work events
occurring during message part retrieval.

AFter retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
RetrievePart

RetrieveStructure ( 1200)

RetrievePartPeek ( 1189)

RetrievePartToFile ( 1194)

RetrievePartToFilePeek ( 1196)

TIdIMAP4.RetrievePart Method (Integer, string, PChar, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function RetrievePart(
const AMsgNum: Integer;
const APartNum: string;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number to be retrieved from the mailbox.

Internet Direct (Indy) Version 10.1.5 1185


TIdIMAP4 Class Classes

APartNum Message part number to be retrieved.


ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
RetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the relative message
number specified in aMsgNum.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePart validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception
will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveNoDecodeToStream ( 1183).

RetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message part
content using a TIdTCPStream ( 2381) instance. RetrievePart assigns the event handlers in OnWorkBeginForPart ( 1249),
OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work events
occurring during message part retrieval.

AFter retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
RetrievePart

RetrieveStructure ( 1200)

RetrievePartPeek ( 1189)

RetrievePartToFile ( 1194)

RetrievePartToFilePeek ( 1196)

TIdIMAP4.RetrievePart Method (Integer, string, TIdBytes, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function RetrievePart(
const AMsgNum: Integer;
const APartNum: string;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number to be retrieved from the mailbox.

1186 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

APartNum Message part number to be retrieved.


ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
RetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the relative message
number specified in aMsgNum.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePart validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception
will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveNoDecodeToStream ( 1183).

RetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message part
content using a TIdTCPStream ( 2381) instance. RetrievePart assigns the event handlers in OnWorkBeginForPart ( 1249),
OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work events
occurring during message part retrieval.

AFter retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
RetrievePart

RetrieveStructure ( 1200)

RetrievePartPeek ( 1189)

RetrievePartToFile ( 1194)

RetrievePartToFilePeek ( 1196)

TIdIMAP4.RetrievePart Method (Integer, string, TIdStream, string)


Pascal
function RetrievePart(
const AMsgNum: Integer;
const APartNum: string;
ADestStream: TIdStream;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
APartNum Scope is const. Type is string.
ADestStream Type is TIdStream ( 3087).

Internet Direct (Indy) Version 10.1.5 1187


TIdIMAP4 Class Classes

AContentTransferEncoding Type is string. Default value is 'tex.

Returns
Boolean

Description
RetrievePart is a overloaded method.

RetrievePart returns a Boolean value.

See Also
TIdIMAP4.RetrievePart

TIdIMAP4.RetrievePartHeader Method
Retrieves RFC headers for a specified message and message part.

Pascal
function RetrievePartHeader(
const AMsgNum: Integer;
const APartNum: string;
AHeaders: TIdHeaderList
): Boolean;
Parameters
Parameters Description
AMsgNum Relative message number for retrieved headers.
APartNum Relative message part number for retrieved headers.
AHeaders Header values retrieved from the message and message part.

Returns
Boolean - True on Success.

Description
RetrievePartHeader is a Boolean function used to retrieve ( 1176) RFC-compliant headers for a specific message part using the
relative message number for the current mailbox.

AMsgNum specifies the relative message number for the message as stored in the current mailbox on the remote IMAP4 server.

APartNum indicates the relative message part number to be used for retrieval of RFC-compliant message headers. APartNum is
the ordinal position of the message part as indicated by RetrieveStructure ( 1200).

AHeaders is used to store the RFC-compliant message headers retrieved for the specified message and message part.

RetrievePartHeader validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartHeader requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartHeader.

RetrievePartHeader sends the IMAP4 FETCH command with the relative message number and data element requests needed to
retrieve ( 1176) the message headers for a message part.

The return value for the RetrievePartHeader method indicates if message headers were successfully retrieved using the specified
message number and message part number. The return value will be False if a protocol error response (a value other than
IMAP_OK ( 4334)) is received during processing in the method.

Text returned in the IMAP4 server response is parsed to determine the size of the message headers for the specified message part.
Instances of TIdTCPStream ( 2381) and TIdStreamVCL ( 2709) are created for internal use during retrieval and storage of the
message headers in the server response.

Use OnWorkForPart ( 1250) to respond to work events occurring during retrieval of the message part headers.

1188 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Use UIDRetrievePartHeader ( 1225) to retrieve ( 1176) message headers for a specified message part using the unique
identifier (UID) for the message.

Use RetrieveStructure ( 1200) to determine all of the message parts available in a message stored on the remote IMAP4 server.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) the headers and the content for a specified message
part.

Use RetrievePartPeek ( 1189) or RetrievePartToFilePeek ( 1196) to retrieve ( 1176) a message part without affecting the
message flags for the message.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) RetrievePart ( 1183) RetrievePartPeek ( 1189)
RetrievePartToFilePeek ( 1196) RetrieveStructure ( 1200) UIDRetrievePart ( 1221) UIDRetrievePartHeader ( 1225)
OnWorkForPart ( 1250) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)

TIdIMAP4.RetrievePartPeek Method
Overload List

Method Description
TIdIMAP4.RetrievePartPeek (Integer, Retrieves a specified message part without affecting the flags stored for the message.
Integer, PChar, Integer, string) ( 1189)
TIdIMAP4.RetrievePartPeek (Integer, Retrieves a specified message part without affecting the flags stored for the message.
Integer, TIdBytes, Integer, string) ( 1190)
TIdIMAP4.RetrievePartPeek (Integer, Retrieves a specified message part without affecting the flags stored for the message.
string, PChar, Integer, string) ( 1191)
TIdIMAP4.RetrievePartPeek (Integer, Retrieves a specified message part without affecting the flags stored for the message.
string, TIdBytes, Integer, string) ( 1193)
TIdIMAP4.RetrievePartPeek (Integer,
string, TIdStream, string) ( 1194)

TIdIMAP4.RetrievePartPeek Method (Integer, Integer, PChar, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

Pascal
function RetrievePartPeek(
const AMsgNum: Integer;
const APartNum: Integer;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number for the message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.
AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
RetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

Internet Direct (Indy) Version 10.1.5 1189


TIdIMAP4 Class Classes

AMsgNum is the relative message number for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart ( 1183) or RetrievePartPeek.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePartPeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek.

RetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. RetrievePartPeek assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length
of the decoded message part.

Please note that RetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing the
message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) to capture and store an unseen message part into a file on the local system.

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

See Also
RetrievePartPeek RetrievePart ( 1183) RetrieveStructure ( 1200) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) UIDRetrievePart ( 1221) RetrievePartToFilePeek (
1196) RetrievePeek ( 1199) UIDRetrievePeek ( 1234) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250)
OnWorkEndForPart ( 1250) TIdTCPStream ( 2381)

TIdIMAP4.RetrievePartPeek Method (Integer, Integer, TIdBytes, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

Pascal
function RetrievePartPeek(
const AMsgNum: Integer;
const APartNum: Integer;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number for the message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.

1190 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
RetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

AMsgNum is the relative message number for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart ( 1183) or RetrievePartPeek.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePartPeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek.

RetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. RetrievePartPeek assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length
of the decoded message part.

Please note that RetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing the
message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) to capture and store an unseen message part into a file on the local system.

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

See Also
RetrievePartPeek RetrievePart ( 1183) RetrieveStructure ( 1200) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) UIDRetrievePart ( 1221) RetrievePartToFilePeek (
1196) RetrievePeek ( 1199) UIDRetrievePeek ( 1234) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250)
OnWorkEndForPart ( 1250) TIdTCPStream ( 2381)

TIdIMAP4.RetrievePartPeek Method (Integer, string, PChar, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

Pascal
function RetrievePartPeek(
const AMsgNum: Integer;
const APartNum: string;
var ABuffer: PChar;
var ABufferLength: Integer;

Internet Direct (Indy) Version 10.1.5 1191


TIdIMAP4 Class Classes

AContentTransferEncoding: string = 'text'


): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number for the message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.
AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
RetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

AMsgNum is the relative message number for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart ( 1183) or RetrievePartPeek.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePartPeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek.

RetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. RetrievePartPeek assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length
of the decoded message part.

Please note that RetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing the
message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) to capture and store an unseen message part into a file on the local system.

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

See Also
RetrievePartPeek RetrievePart ( 1183) RetrieveStructure ( 1200) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) UIDRetrievePart ( 1221) RetrievePartToFilePeek (
1196) RetrievePeek ( 1199) UIDRetrievePeek ( 1234) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250)
OnWorkEndForPart ( 1250) TIdTCPStream ( 2381)

1192 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4.RetrievePartPeek Method (Integer, string, TIdBytes, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

Pascal
function RetrievePartPeek(
const AMsgNum: Integer;
const APartNum: string;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Relative message number for the message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.
AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
RetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

AMsgNum is the relative message number for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePart ( 1183) or RetrievePartPeek.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

RetrievePartPeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek.

RetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. RetrievePartPeek assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length
of the decoded message part.

Please note that RetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing the
message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) to capture and store an unseen message part into a file on the local system.

Internet Direct (Indy) Version 10.1.5 1193


TIdIMAP4 Class Classes

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

See Also
RetrievePartPeek RetrievePart ( 1183) RetrieveStructure ( 1200) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) UIDRetrievePart ( 1221) RetrievePartToFilePeek (
1196) RetrievePeek ( 1199) UIDRetrievePeek ( 1234) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250)
OnWorkEndForPart ( 1250) TIdTCPStream ( 2381)

TIdIMAP4.RetrievePartPeek Method (Integer, string, TIdStream, string)


Pascal
function RetrievePartPeek(
const AMsgNum: Integer;
const APartNum: string;
ADestStream: TIdStream;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
APartNum Scope is const. Type is string.
ADestStream Type is TIdStream ( 3087).
AContentTransferEncoding Type is string. Default value is 'tex.

Returns
Boolean

Description
RetrievePartPeek is a overloaded method.

RetrievePartPeek returns a Boolean value.

See Also
TIdIMAP4.RetrievePartPeek

TIdIMAP4.RetrievePartToFile Method
Overload List

Method Description
TIdIMAP4.RetrievePartToFile (Integer, Retrieves and stores a message part for a message in the specified local file.
Integer, Integer, string, string) ( 1194)
TIdIMAP4.RetrievePartToFile (Integer,
string, Integer, string, string) ( 1196)

TIdIMAP4.RetrievePartToFile Method (Integer, Integer, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file.

Pascal
function RetrievePartToFile(
const AMsgNum: Integer;
const APartNum: Integer;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;

1194 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Parameters
Parameters Description
AMsgNum relative message number for the message.
APartNum relative part number for the message part.
ALength size of message part as indicated in the IMAP4 server response.
ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.

Returns
Boolean - True on success.

Description
RetrievePartToFile is a Boolean function used to retrieve ( 1176) a specific message part for the specified message, and to store
the message parts contents in the specified local file name.

AMsgNum is the relative message number for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePartToFile.

RetrievePartToFile validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFile validates the message part number in APartNum to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFile requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartToFile.

RetrievePartToFile sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. RetrievePartToFile assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFilePeek ( 1196) or UIDRetrievePartToFilePeek ( 1232) to retrieve ( 1176) a message part to a file without
affecting the stored message flags for the message.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189) RetrievePartToFilePeek ( 1196) EIdNumberInvalid
( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

Internet Direct (Indy) Version 10.1.5 1195


TIdIMAP4 Class Classes

TIdIMAP4.RetrievePartToFile Method (Integer, string, Integer, string, string)


Pascal
function RetrievePartToFile(
const AMsgNum: Integer;
const APartNum: string;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
APartNum Scope is const. Type is string.
ALength Type is Integer.
ADestFileNameAndPath Type is string.
AContentTransferEncoding Type is string.

Returns
Boolean

Description
RetrievePartToFile is a overloaded method.

RetrievePartToFile returns a Boolean value.

See Also
TIdIMAP4.RetrievePartToFile

TIdIMAP4.RetrievePartToFilePeek Method
Overload List

Method Description
TIdIMAP4.RetrievePartToFilePeek Retrieves and stores a message part for a message in the specified local file without
(Integer, Integer, Integer, string, string) ( updating message flags stored on the remote IMAP4 server.
1196)
TIdIMAP4.RetrievePartToFilePeek Retrieves and stores a message part for a message in the specified local file without
(Integer, string, Integer, string, string) ( updating message flags stored on the remote IMAP4 server.
1197)

TIdIMAP4.RetrievePartToFilePeek Method (Integer, Integer, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file without updating message flags stored on the remote
IMAP4 server.

Pascal
function RetrievePartToFilePeek(
const AMsgNum: Integer;
const APartNum: Integer;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgNum relative message number for the message.
APartNum relative part number for the message part.

1196 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

ALength size of message part as indicated in the IMAP4 server response.


ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.

Returns
Boolean - True on success.

Description
RetrievePartToFilePeek is a Boolean function used to retrieve ( 1176) a specific message part for the specified message, and to
store the message parts contents in the specified local file name. RetrievePartToFilePeek is similar to RetrievePartToFile ( 1194),
but does not update the message flags stored on the remote IMAP4 server. Specifically, it does not affect the 'Seen' flag when
accessing the message and/or message parts.

AMsgNum is the relative message number for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePartToFilePeek.

RetrievePartToFilePeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises
an EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek validates the message part number in APartNum to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartToFilePeek.

RetrievePartToFilePeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. RetrievePartToFilePeek assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFile ( 1194) or UIDRetrievePartToFile ( 1230) to retrieve ( 1176) a message part to a file and to update the
stored message flags for the message.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189) RetrievePartToFile ( 1194) EIdNumberInvalid (
126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

TIdIMAP4.RetrievePartToFilePeek Method (Integer, string, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file without updating message flags stored on the remote
IMAP4 server.

Internet Direct (Indy) Version 10.1.5 1197


TIdIMAP4 Class Classes

Pascal
function RetrievePartToFilePeek(
const AMsgNum: Integer;
const APartNum: string;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgNum relative message number for the message.
APartNum relative part number for the message part.
ALength size of message part as indicated in the IMAP4 server response.
ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.

Returns
Boolean - True on success.

Description
RetrievePartToFilePeek is a Boolean function used to retrieve ( 1176) a specific message part for the specified message, and to
store the message parts contents in the specified local file name. RetrievePartToFilePeek is similar to RetrievePartToFile ( 1194),
but does not update the message flags stored on the remote IMAP4 server. Specifically, it does not affect the 'Seen' flag when
accessing the message and/or message parts.

AMsgNum is the relative message number for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used
for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePartToFilePeek.

RetrievePartToFilePeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises
an EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek validates the message part number in APartNum to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartToFilePeek.

RetrievePartToFilePeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. RetrievePartToFilePeek assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFile ( 1194) or UIDRetrievePartToFile ( 1230) to retrieve ( 1176) a message part to a file and to update the
stored message flags for the message.

1198 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189) RetrievePartToFile ( 1194) EIdNumberInvalid (
126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

TIdIMAP4.RetrievePeek Method
Retrieves a message from a mailbox without marking it as read on the server.

Pascal
function RetrievePeek(
const AMsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgNum Message number to retreive from the mailbox.
AMsg Stores the retrieved message headers, body, and attachments.

Returns
Boolean - True on success.

Description
RetrievePeek is a Boolean function that retrieves the entire contents for a message from a mailbox without marking it as read on
the remote IMAP4 server.

Please note that "Peek" versions of the IMAP4 functions do NOT set the mfSeen message flag. A new message in your inbox
should not have set the mfSeen flag until you retrieve ( 1176) the message via a function such as Retrieve ( 1176). You can,
however, retrieve ( 1176) the message via RetrievePeek, which should not set the mfSeen flag. The situation is not so clear,
however, if you retrieve ( 1176) the third attachment (only) of an email. All the "Peek" versions of TIdIMAP4 ( 1150) functions do
imply that the mfSeen flag NOT be set. Be aware that IMAP4 server support for the "Peek" functionality may vary.

RetrievePeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

RetrievePeek calls a protected method that sends the IMAP4 FETCH command for the message number specified in AMsgNum.
RetrievePeek performs validation for the relative message number to ensure that it contains a positive non-zero value. An
EIdNumberInvalid ( 126) exception can be raised if the relative message number in aMsgNum is invalid.

On successful retrieval of the RFC 822 envelope data, RetrievePeek calls ReceiveHeader and ReceiveBody to load the message
contents into the TIdMessage ( 1521) instance specified by AMsg. All headers, message parts, and the body of the message
instance are cleared prior to storing values retrieved from the remote IMAP4 server. The value of the UID and Flags properties for
the message in AMsg are updated based on the values found in the IMAP4 server response.

RetrievePeek creates an internal TIdTCPStream ( 2381) instance to read message parts in the serve response, and assigns
event handlers for the operation using procedure stored in OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and
OnWorkEndForPart ( 1250).

RetrievePeek sets the return value to True when the IMAP4 server response contains the value IMAP_OK ( 4334).

Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox and retrieve ( 1176) messages or headers in
Mailbox prior to calling the Retrieve ( 1176) or RetrievePeek methods.

Use on of the UIDRetrieveXxx methods to retrieve ( 1176) message(s) using the unique identifier (UID) for a message in the
selected mailbox.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) EIdConnectionStateError ( 70) TIdMessage (

Internet Direct (Indy) Version 10.1.5 1199


TIdIMAP4 Class Classes

1521) TIdMessage.Headers ( 1546) TIdMessage.Body ( 1538) TIdMessage.MessageParts ( 1548) TIdMessage.UID ( 1553)


TIdMessage.Flags ( 1545)

TIdIMAP4.RetrieveStructure Method
Overload List

Method Description
TIdIMAP4.RetrieveStructure (Integer,
TIdImapMessageParts) ( 1200)
TIdIMAP4.RetrieveStructure (Integer,
TIdMessage) ( 1201)

TIdIMAP4.RetrieveStructure Method (Integer, TIdImapMessageParts)


Pascal
function RetrieveStructure(
const AMsgNum: Integer;
AParts: TIdImapMessageParts
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Message number
AParts A TIdMessageParts ( 1623) instance used to return the structure of the message parts.

Returns
Boolean - True on success.

Description
RetrieveStructure is an overloaded Boolean function used to return a list of the message parts for the message specified in
AMsgNum.

AParts is used to return the list of message parts with additional information about the size and content transfer encoding applied to
the individual message parts.

RetrieveStructure validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveStructure requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveStructure.

RetrieveStructure sends the IMAP4 FETCH command using the specified message number and arguments needed to retrieve (
1176) the Body structure for the message stored in the current mailbox on the remote IMAP4 server.

The return value for the method is True if retrieval of the message part list is completed successfully. The return value for the
method is False if a protocol error response (any value other than IMAP_OK ( 4334)) is received during processing in the method.

RetrieveStructure parses text in the IMAP4 server response, and stores the data about the message parts in the parameter
provided to the method.

RetrieveStructure is used in the implementation of other TIdIMAP4 ( 1150) methods, like RetrieveText ( 1201) and
UIDRetrieveText ( 1237). RetrieveStructure may also be used to access the structure for the message prior to calling methods
that require relative message part numbers and content transfer encoding information, like RetrievePart ( 1183) and
UIDRetrievePart ( 1221).

See Also
RetrieveStructure EIdNumberInvalid ( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205)
ExamineMailBox ( 1167) RetrieveText ( 1201) UIDRetrieveText ( 1237) RetrievePart ( 1183) UIDRetrievePart ( 1221)
TIdImapMessageParts ( 1270)

1200 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4.RetrieveStructure Method (Integer, TIdMessage)


Pascal
function RetrieveStructure(
const AMsgNum: Integer;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgNum Message number.
AMsg Message instance used to store informatiuon about message parts for the message.

Returns
Boolean - True on success.

Description
RetrieveStructure is an overloaded Boolean function used to return a list of the message parts for the message specified in
AMsgNum.

AMsg is used to return the list of message parts with additional information about the size and content transfer encoding applied to
the individual message parts.

RetrieveStructure validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveStructure requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveStructure.

RetrieveStructure sends the IMAP4 FETCH command using the specified message number and arguments needed to retrieve (
1176) the Body structure for the message stored in the current mailbox on the remote IMAP4 server.

The return value for the method is True if retrieval of the message part list is completed successfully. The return value for the
method is False if a protocol error response (any value other than IMAP_OK ( 4334)) is received during processing in the method.

RetrieveStructure parses text in the IMAP4 server response, and stores the data about the message parts in the parameter
provided to the method.

RetrieveStructure is used in the implementation of other TIdIMAP4 ( 1150) methods, like RetrieveText ( 1201) and
UIDRetrieveText ( 1237). RetrieveStructure may also be used to access the structure for the message prior to calling methods
that require relative message part numbers and content transfer encoding information, like RetrievePart ( 1183) and
UIDRetrievePart ( 1221).

See Also
RetrieveStructure EIdNumberInvalid ( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205)
ExamineMailBox ( 1167) RetrieveText ( 1201) UIDRetrieveText ( 1237) RetrievePart ( 1183) UIDRetrievePart ( 1221)
TIdImapMessageParts ( 1270)

TIdIMAP4.RetrieveText Method
Retrieves the text that makes up the body of a message.

Pascal
function RetrieveText(
const AMsgNum: Integer;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgNum relative message number for the message.

Internet Direct (Indy) Version 10.1.5 1201


TIdIMAP4 Class Classes

AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
RetrieveText is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the body of
the message. RetrieveText uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the
message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. Use RetrieveText2 ( 1202) for servers that exhibit this behavior.

RetrieveText validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveText requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception
will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling RetrieveText or
RetrieveText2 ( 1202).

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

RetrieveText captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. RetrieveText creates an instance of TIdTCPStream ( 2381) for use in capturing the body
text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart ( 1250)
event handlers used to respond to work events triggered during retrieval of the message part.

Please note that some IMAP4 servers may truncate the initial body text found in the message structure if it contains non-textual
data such as binary transfer-encoded data or multipart content with the subtype mixed, digest, or parallel. Use RetrieveText2 (
1202) for servers exhibiting this behavior.

Use UIDRetrieveText ( 1237) of UIDRetrieveText2 ( 1238) to retrieve ( 1176) the body text for a message using the unique
identifier (UID) for the message.

See Also
RetrieveText2 ( 1202) UIDRetrieveText ( 1237) UIDRetrieveText2 ( 1238) EIdNumberInvalid ( 126) ConnectionState (
1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167) TIdTCPStream ( 2381) OnWorkForPart
( 1250) OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250)

TIdIMAP4.RetrieveText2 Method
Retrieves the text that makes up the body of a message.

Pascal
function RetrieveText2(
const AMsgNum: Integer;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgNum relative message number for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
RetrieveText2 is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the body of
the message. RetrieveText2 uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the
message.

1202 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Please note that some IMAP4 servers do not correctly return the body text using this command.

Some servers return the first unencoded attachment instead. Other IMAP4 servers may truncate the initial body text found in the
message structure if it contains non-textual data such as binary transfer-encoded data or multipart content with the subtype mixed,
digest, or parallel.

RetrieveText2 accounts for this behavior by checking the size of the initial message part, and retrieves a subsequent message part
when the size of first message part contains 0 (zero).

RetrieveText2 validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveText2 requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling RetrieveText
( 1201) or RetrieveText2.

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

RetrieveText2 captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. RetrieveText2 creates an instance of TIdTCPStream ( 2381) for use in capturing the body
text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart ( 1250)
event handlers used to respond to work events triggered during retrieval of the message part.

Use UIDRetrieveText ( 1237) of UIDRetrieveText2 ( 1238) to retrieve ( 1176) the body text for a message using the unique
identifier (UID) for the message.

See Also
RetrieveText ( 1201) UIDRetrieveText ( 1237) UIDRetrieveText2 ( 1238) EIdNumberInvalid ( 126) ConnectionState ( 1244)
EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167) TIdTCPStream ( 2381) OnWorkForPart (
1250) OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250)

TIdIMAP4.RetrieveTextPeek Method
Retrieves the text that makes up the body of a message without updating the flags for the message.

Pascal
function RetrieveTextPeek(
const AMsgNum: Integer;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgNum relative message number for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
RetrieveTextPeek is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the
body of the message. RetrieveTextPeek is similar to RetrieveText ( 1201), but does not update the stored flags fpr the message
when accessing the message or message parts in the IMAP4 mailbox. Specifically, it does not set the 'Seen' or mfSeen flag that
indicates the message has been read.

RetrieveTextPeek uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. Use RetrieveTextPeek2 ( 1204) for servers that exhibit this behavior.

RetrieveTextPeek validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

Internet Direct (Indy) Version 10.1.5 1203


TIdIMAP4 Class Classes

RetrieveTextPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveTextPeek or RetrieveTextPeek2 ( 1204).

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

RetrieveTextPeek captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. RetrieveTextPeek creates an instance of TIdTCPStream ( 2381) for use in capturing the
body text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart (
1250) event handlers used to respond to work events triggered during retrieval of the message part.

Please note that some IMAP4 servers may truncate the initial body text found in the message structure if it contains non-textual
data such as binary transfer-encoded data or multipart content with the subtype mixed, digest, or parallel. Use RetrieveText2 (
1202) for servers exhibiting this behavior.

Use UIDRetrieveTextPeek ( 1239) or UIDRetrieveTextPeek2 ( 1240) to retrieve ( 1176) the body text for a message using the
unique identifier (UID) for the message.

See Also
RetrieveText ( 1201) RetrieveText2 ( 1202) UIDRetrieveTextPeek ( 1239) UIDRetrieveTextPeek2 ( 1240) EIdNumberInvalid
( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
TIdTCPStream ( 2381) OnWorkForPart ( 1250) OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250)

TIdIMAP4.RetrieveTextPeek2 Method
Retrieves the text that makes up the body of a message without updating the flags for the message.

Pascal
function RetrieveTextPeek2(
const AMsgNum: Integer;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgNum relative message number for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
RetrieveTextPeek2 is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the
body of the message. RetrieveTextPeek2 is similar to RetrieveTextPeek ( 1203), and does not update the stored flags for the
message when accessing the message or message parts in the IMAP4 mailbox. Specifically, it does not set the 'Seen' or mfSeen
flag that indicates the message has been read.

RetrieveTextPeek2 uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. RetrieveTextPeek2 accounts for this behavior by accessing subsequent message bodies to locate
the text for the message where the initial message part has a length of 0 (zero).

RetrieveTextPeek2 validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrieveTextPeek2 requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveTextPeek ( 1203) or RetrieveTextPeek2.

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error

1204 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

RetrieveTextPeek2 captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. RetrieveTextPeek2 creates an instance of TIdTCPStream ( 2381) for use in capturing the
body text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart (
1250) event handlers used to respond to work events triggered during retrieval of the message part.

Use UIDRetrieveTextPeek ( 1239) or UIDRetrieveTextPeek2 ( 1240) to retrieve ( 1176) the body text for a message using the
unique identifier (UID) for the message.

See Also
RetrieveText ( 1201) RetrieveText2 ( 1202) RetrieveTextPeek ( 1203) UIDRetrieveTextPeek ( 1239) UIDRetrieveTextPeek2
( 1240) EIdNumberInvalid ( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205)
ExamineMailBox ( 1167) TIdTCPStream ( 2381) OnWorkForPart ( 1250) OnWorkBeginForPart ( 1249) OnWorkEndForPart
( 1250)

TIdIMAP4.SearchMailBox Method
Pascal
function SearchMailBox(
const ASearchInfo: array of TIdIMAP4SearchRec
): Boolean;
Parameters
Parameters Description
ASearchInfo Scope is const. Type is array of TIdIMAP4SearchRec ( 2958).

Returns
Boolean

Description
SearchMailBox is a method.

SearchMailBox returns a Boolean value.

TIdIMAP4.SelectMailBox Method
Selects a mailbox on the IMAP4 server as the current mailbox for message access.

Pascal
function SelectMailBox(
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to be activated.

Returns
Boolean - True on success.

Description
SelectMailBox is a Boolean function that selects the mailbox specified in AMBName as the current mailbox for message access on
the IMAP4 server. Only one mailbox can be selected at a time in an IMAP4 connection. Simultaneous access to multiple mailboxes
requires multiple connections. SelectMailBox automatically deselects any currently selected mailbox before attempting the new
selection. Consequently, if a mailbox is selected and a SELECT command that fails is attempted, no mailbox is selected.

SelectMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

SelectMailBox calls SendCmd ( 1206) using the IMAP4 SELECT command for the specified mailbox name. On successful

Internet Direct (Indy) Version 10.1.5 1205


TIdIMAP4 Class Classes

completion of the command, SelectMailBox parses the multi-line response and loads the values into the MailBox ( 1245) specified
in AMBName.

SelectMailBox sets ConnectionState ( 1244) to the value csSelected. If the response code from SendCmd ( 1206) contains a
value other than wsOk ( 4546), the value in ConnectionState ( 1244) is set csAuthenticated.

SelectMailBox can also call either RetrieveAllHeaders ( 1177) or RetrieveAllMsgs ( 1178), based on the value of
RetrieveOnSelect ( 1247), to populate the message list in MailBox ( 1245).

Please note that IMAP servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Also, caution is advised when selecting the characters for mailbox names. Different IMAP servers may allow, and interpret
differently, various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special
meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or
insensitivity, as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of
spaces in mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow
IdIMAP4 deal with pre-existing mailboxes that include spaces).

SelectMailBox sets the return value for the method to True when the IMAP4 server response contains the value IMAP_OK ( 4334).

See Also
ConnectionState ( 1244)

EIdConnectionStateError ( 70)

TIdTCPConnection.LastCmdResult ( 2367)

SendCmd ( 1206)

MailBox ( 1245)

RetrieveAllHeaders ( 1177)

RetrieveAllMsgs ( 1178)

RetrieveOnSelect ( 1247)

TIdIMAP4.SendCmd Method
Overload List

Method Description
TIdIMAP4.SendCmd (string, array of Sends an IMAP4 command to the server and checks for valid response codes.
String) ( 1206)
TIdIMAP4.SendCmd (string, string, Sends an IMAP4 command to the server and checks for valid response codes.
array of String) ( 1207)

TIdIMAP4.SendCmd Method (string, array of String)


Sends an IMAP4 command to the server and checks for valid response codes.

Pascal
function SendCmd(
const AOut: string;
AExpectedResponses: array of String
): string; overload;
Parameters
Parameters Description
AOut Command to be executed on the IMAP4 server.
AResponse Anticipated server reponse(s). -1 when omitted.

1206 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Returns
String - Response received from the IMAP4 server.

Description
SendCmd is an overloaded String function in TIdIMAP4 ( 1150) that allows the client to send the IMAP4 command specified in
AOut to the IMAP4 server, and anticipates a response or responses as specified in AResponse.

AResponse can be an array of SmallInt values that indicate the valie responses for the command, or a single SmallInt value.

SendCmd ensures that any unhandled data remaining in the buffer for the client connection is read prior to writing a new command
for the remote IMAP4 server.

SendCmd calls WriteLn ( 1243) to send the value AOut to the IMAP4 server, and calls GetResponse ( 1170) to determine the
server response. The return value for the method contains the initial IMAP4 server response received for the command.

SendCmd will handle an EIdSocketError ( 152) exception raised when sending the command by setting the ConnectionState (
1244) property to the value csUnexpectedlyDisconnected. The exception is re-raised for subsequent error handling.

See Also
GetResponse ( 1170) WriteLn ( 1243) ConnectionState ( 1244) EIdSocketError ( 152)

TIdIMAP4.SendCmd Method (string, string, array of String)


Sends an IMAP4 command to the server and checks for valid response codes.

Pascal
function SendCmd(
const ATag: string;
const AOut: string;
AExpectedResponses: array of String
): string; overload;
Parameters
Parameters Description
ATag Tag to identify the server response to this command.
AOut Command to be executed on the IMAP4 server.
AResponse Anticipated server reponse(s). -1 when omitted.

Returns
String - Response received from the IMAP4 server.

Description
SendCmd is an overloaded String function in TIdIMAP4 ( 1150) that allows the client to send the IMAP4 command specified in
ATag and AOut to the IMAP4 server, and anticipates a response or responses as specified in AResponse.

AResponse can be an array of SmallInt values that indicate the valie responses for the command, or a single SmallInt value.

SendCmd ensures that any unhandled data remaining in the buffer for the client connection is read prior to writing a new command
for the remote IMAP4 server.

SendCmd calls WriteLn ( 1243) to send the values in ATag and AOut to the IMAP4 server, and calls GetResponse ( 1170) to
determine the server response. The return value for the method contains the initial IMAP4 server response received for the
command.

SendCmd will handle an EIdSocketError ( 152) exception raised when sending the command by setting the ConnectionState (
1244) property to the value csUnexpectedlyDisconnected. The exception is re-raised for subsequent error handling.

See Also
GetResponse ( 1170) WriteLn ( 1243) ConnectionState ( 1244) EIdSocketError ( 152)

Internet Direct (Indy) Version 10.1.5 1207


TIdIMAP4 Class Classes

TIdIMAP4.StatusMailBox Method
Overload List

Method Description
TIdIMAP4.StatusMailBox (String, Retrieves status data items for the specified mailbox.
TIdMailBox) ( 1208)
TIdIMAP4.StatusMailBox (String, Retrieves status data items for the specified mailbox.
TIdMailBox, array of
TIdIMAP4StatusDataItem) ( 1209)

TIdIMAP4.StatusMailBox Method (String, TIdMailBox)


Retrieves status data items for the specified mailbox.

Pascal
function StatusMailBox(
const AMBName: String;
AMB: TIdMailBox
): Boolean; overload;
Parameters
Parameters Description
AMBName Mailbox name tio be accessed and loaded.
AMB Represents the contents read from the mailbox.

Returns
Boolean - True on success.

Description
StatusMailBox is an overloaded Boolean function used to retrieve ( 1176) status data items specified in AStatusDataItems for the
mailbox specified in AMBName.

StatusMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

StatusMailBox calls SendCmd ( 1206) using the IMAP4 STATUS command for the specified mailbox name and data items. On
succesful completion, StatusMailBox parses the server response and loads values in the server response into the Mailbox specified
in AMB.

It is pointless calling StatusMailBox with an empty array of mail data items because you are asking the IMAP4 server to update
none of the status flags. Instead, the standard flags returned by SelectMailBox ( 1205) are used for the requested mail data items
to check if the mailbox has changed. In this situation, the array of TIdIMAP4StatusDataItem ( 2958) includes the following values:

mdMessages
mdRecent
mdUIDNext
mdUIDValidity
mdUnseen

Please note that IMAP servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Also, caution is advised when choosing the characters used for mailbox names. Different IMAP servers may allow, and interpret
differently, various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special
meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or

1208 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

insensitivity, as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of
spaces in mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow
IdIMAP4 deal with pre-existing mailboxes that include spaces).

StatusMailBox sets the return value for the method to True when the server response contains the value IMAP_OK ( 4334).

See Also
StatusMailBox ConnectionState ( 1244) EIdConnectionStateError ( 70) TIdMailBox ( 1481) TIdIMAP4StatusDataItem ( 2958)

TIdIMAP4.StatusMailBox Method (String, TIdMailBox, array of TIdIMAP4StatusDataItem)


Retrieves status data items for the specified mailbox.

Pascal
function StatusMailBox(
const AMBName: String;
AMB: TIdMailBox;
const AStatusDataItems: array of TIdIMAP4StatusDataItem
): Boolean; overload;
Parameters
Parameters Description
AMBName Mailbox name tio be accessed and loaded.
AMB Represents the contents read from the mailbox.
AStatusDataItems Status data items to be retrieved.

Returns
Boolean - True on success.

Description
StatusMailBox is an overloaded Boolean function used to retrieve ( 1176) status data items specified in AStatusDataItems for the
mailbox specified in AMBName.

StatusMailBox requires that the value of ConnectionState ( 1244) contain either csAuthenticated or csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

StatusMailBox calls SendCmd ( 1206) using the IMAP4 STATUS command for the specified mailbox name and data items. On
succesful completion, StatusMailBox parses the server response and loads values in the server response into the Mailbox specified
in AMB.

Please note that IMAP servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Also, caution is advised when choosing the characters used for mailbox names. Different IMAP servers may allow, and interpret
differently, various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special
meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or
insensitivity, as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of
spaces in mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow
IdIMAP4 deal with pre-existing mailboxes that include spaces).

StatusMailBox sets the return value for the method to True when the server response contains the value IMAP_OK ( 4334).

See Also
StatusMailBox ConnectionState ( 1244) EIdConnectionStateError ( 70) TIdMailBox ( 1481) TIdIMAP4StatusDataItem ( 2958)

TIdIMAP4.StoreFlags Method
Updates the specified message flags for a list of message numbers.

Pascal
function StoreFlags(

Internet Direct (Indy) Version 10.1.5 1209


TIdIMAP4 Class Classes

const AMsgNumList: array of Integer;


const AStoreMethod: TIdIMAP4StoreDataItem;
const AFlags: TIdMessageFlagsSet
): Boolean;
Parameters
Parameters Description
AMsgNumList Message numbers to be updated by the method.
AStoreMethod Method to use for storing flag values.
AFlags Message flags to be updated for the specified messages.

Returns
Boolean - True on success.

Description
StoreFlags is a Boolean function that updates the message flags specified in AFlags for the list of message numbers specified in
AMsgNumList. AStoreMethod indicates if the message flags are added, replaced or removed.

When AMsgNumList has a length of zero, the return value for the method is set to False and the method is exited. StoreFlags
requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70) exception will be
raised.

StoreFlags calls SendCmd ( 1206) using the IMAP4 STORE command for the specified messages and flags. StoreFlags sets the
return value for the method to True when the server response contains the value IMAP_OK ( 4334).

See Also
TIdIMAP4StoreDataItem ( 2958) TIdMessageFlags ( 2968) ConnectionState ( 1244) EIdConnectionStateError ( 70)

TIdIMAP4.SubscribeMailBox Method
Adds a mailbox to the list of "active" or "subscribed" mailboxes.

Pascal
function SubscribeMailBox(
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to add to the active mailbox list.

Returns
Boolean - True on success.

Description
SubscribeMailBox is a Boolean function used to add the mailbox name specified in AMBName to the list of "active" or "subscribed"
mailboxes on the IMAP4 server. SubscribeMailBox updates the values that are returned by the IMAP4 LSUB command.

SubscribeMailBox requires that ConnectionState ( 1244) contain the value csAuthenticated or csSelected to perform the IMAP4
function. SubscribeMailBox can raise an EIdConnectionStateError ( 70) exception with the message
RSIMAP4ConnectionStateError if ConnectionState ( 1244) contains a value other than csAuthenticated or csSelected.

SubscribeMailBox calls SendCmd ( 1206) using the IMAP4 SUBSCRIBE command and the value specified in AMBName as an
argument. The IMAP4 server may validate the mailbox argument in AMBName to verify that it exists. SubscribeMailBox returns
True when the server response contains the value IMAP_OK ( 4334).

Use UnsubscribeMailBox ( 1242) to remove a specified mailbox from the "active" or "subscibed" list.

Please note that IMAP4 servers are required to have an "Inbox" folder to allow them to receive email for a given user. This may or
may not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Also, caution is advised when choosing the characters used for mailbox names. Different IMAP servers may allow, and interpret
differently, various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special

1210 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or
insensitivity, as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of
spaces in mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow
IdIMAP4 deal with pre-existing mailboxes that include spaces).

See Also
SendCmd ( 1206) ConnectionState ( 1244) EIdConnectionStateError ( 70) RSIMAP4ConnectionStateError
UnsubscribeMailBox ( 1242)

TIdIMAP4.UIDCheckMsgSeen Method
Indicates if the specified message has been read.

Pascal
function UIDCheckMsgSeen(
const AMsgUID: String
): Boolean;
Parameters
Parameters Description
AMsgUID Message unique identifier to be checked.

Returns
Boolean - True when the message has been read.

Description
UIDCheckMsgSeen is a Boolean function that indicates if the message in the currently selected mailbox specified by the unique
identifier in AMsgUID has been read.

UIDCheckMsgSeen may raise an EIdNumberInvalid ( 126) exception if AMsgUID contains an invalid value for use in a unique
identifier.

UIDCheckMsgSeen requires that the ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised.

UIDCheckMsgSeen calls SendCmd ( 1206), after incrementing the IMAP command counter, using the IMAP FETCH command
with the FLAGS attribute. UIDCheckMsgSeen returns True when the server response indicates that the flags for the message
contains the TIdMessageFlag value mfSeen.

Use CheckMsgSeen ( 1160) to check the flags for a message by its relative message number.

Exceptions
Exceptions Description
EIdNumberInvalid ( 126) With the message RSIMAP4NumberInvalid when AMsgUID is invalid.
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName when
ConnectionState ( 1244) indicates a mailbox has not been selected.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) TIdMessageFlags ( 2968)
TIdMessageFlagsSet ( 3059) CheckMsgSeen ( 1160)

TIdIMAP4.UIDCopyMsg Method
Copies a message from the current mailbox to a specified mailbox.

Pascal
function UIDCopyMsg(
const AMsgUID: String;
const AMBName: String
): Boolean;

Internet Direct (Indy) Version 10.1.5 1211


TIdIMAP4 Class Classes

Parameters
Parameters Description
AMsgUID Unique identifier for the message in the currently selected mailbox.
AMBName target mailbox name on the IMAP4 server.

Returns
Boolean - True on success.

Description
UIDCopyMsg is a Boolean function used to copy a message in the currently selected mailbox to another mailbox on the IMAP4
server.

AMsgUID is the unique identifier for the message in the currently selected mailbox.

AMBName is the target mailbox on the IMAP4 server where a copy of the message will be stored. AMBName must represent an
existing mailbox on the IMAP4 server that is valid for the currently connected ( 2353) Username ( 1248) and Password ( 1247).

UIDCopyMsg performs validation for the value in AMsgUID, and can raise an EIdNumberInvalid ( 126) exception if the message
UID contains an invalid value for use as a unique identifier.

Use of UIDCopyMsg requires that a mailbox be previously selected using the SelectMailbox ( 1205) method, and that
ConnectionState ( 1244) contains the value csSelected, or an EIdConnectionStateError ( 70) exception will be raised.

UIDCopyMsg calls SendCmd ( 1206) to send the IMAP4 COPY command using the values indicated in AMsgUID and AMBName.
AMBName is UTF7-encoded prior to transmission.

The return value for the method is True on successful completion of the IMAP4 COPY command.

Use UIDCopyMsgs ( 1212) to copy multiple message numbers to a specified mailbox.

Use CopyMsg ( 1162) or UIDCopyMsg to copy a single message in the currently selected mailbox using a relative message
number or a unique identifier.

Exceptions
Exceptions Description
EIdNumberInvalid ( 126) With the message RSIMAP4NumberInvalid.
EIdConnectionStateError ( 70) With the message RSIMAP4ConnectionStateError.

See Also
SelectMailBox ( 1205) ConnectionState ( 1244) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70) SendCmd ( 1206)
UIDCopyMsgs ( 1212) CopyMsg ( 1162)

TIdIMAP4.UIDCopyMsgs Method
Pascal
function UIDCopyMsgs(
const AMsgUIDList: TIdStringList;
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMsgUIDList Scope is const. Type is TIdStringList ( 3088).
AMBName Scope is const. Type is String.

Returns
Boolean

Description
UIDCopyMsgs is a method.

UIDCopyMsgs returns a Boolean value.

1212 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4.UIDDeleteMsg Method
Marks the specified message for subsequent deletion when a mailbox is purged.

Pascal
function UIDDeleteMsg(
const AMsgUID: String
): Boolean;
Parameters
Parameters Description
AMsgUID Message unique identifier to mark for deletion.

Returns
Boolean - True on success.

Description
UIDDeleteMsg is a Boolean function used to mark the specified message in AMsgUID for subsequent deletion when the mailbox is
purged. UIDDeleteMsg calls StoreFlags ( 1209) to add the message flag value mfDeleted to the flags stored for the associated
message on the IMAP4 server.

A mailbox must be selected using the SelectMailBox ( 1205) method prior to calling DeleteMsgs ( 1165), or an exception is
raised when storing the message flags on the IMAP4 server.

Use DeleteMsgs ( 1165) or UIDDeleteMsgs ( 1213) to mark a list of messages for deletion using their unique identifiers or
relative message numbers.

Use ExpungeMailBox ( 1168) to remove messages marked for deletion in the specified mailbox.

Use GetUID ( 1171) to retrieve ( 1176) the UID for a specified relative message number.

See Also
StoreFlags ( 1209) MailBox ( 1245) ExpungeMailBox ( 1168) GetUID ( 1171) DeleteMsgs ( 1165) UIDDeleteMsgs ( 1213)

TIdIMAP4.UIDDeleteMsgs Method
Marks the specified messages for subsequent deletion when a mailbox is purged.

Pascal
function UIDDeleteMsgs(
const AMsgUIDList: array of String
): Boolean;
Parameters
Parameters Description
AMsgUIDList Array of message unique identifiers to mark for deletion.

Returns
Boolean - True on success.

Description
UIDDeleteMsgs is a Boolean function used to mark the specified messages in AMsgUIDList for subsequent deletion when the
mailbox is purged. UIDDeleteMsgs calls StoreFlags ( 1209) to add the message flag value mfDeleted to the flags stored for the
associated message on the IMAP4 server.

A mailbox must be selected using the SelectMailBox ( 1205) method prior to calling DeleteMsgs ( 1165), or an exception is
raised when storing the message flags on the IMAP4 server.

Use DeleteMsgs ( 1165) to mark a list of messages for deletion using their relative message numbers.

Use ExpungeMailBox ( 1168) to remove messages marked for deletion in the specified mailbox.

Internet Direct (Indy) Version 10.1.5 1213


TIdIMAP4 Class Classes

Use GetUID ( 1171) to retrieve ( 1176) the UID for a specified relative message number.

See Also
StoreFlags ( 1209) MailBox ( 1245) ExpungeMailBox ( 1168) GetUID ( 1171)

TIdIMAP4.UIDInternalRetrieveStructure Method
Retrieves the body structure for a specified message.

Pascal
function UIDInternalRetrieveStructure(
const AMsgUID: String;
AMsg: TIdMessage;
AParts: TIdImapMessageParts
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the requested message.
AMsg Message instance to store FETCH results from the server.
AParts Message parts that represent the body structure for the message.

Returns
Boolean - True on success.

Description
UIDInternalRetrieveStructure is a Boolean function used to implement retrieving the body structure for the unique message
identifier specified in AMsgUID. UIDInternalRetrieveStructure is used in the implementation of the UIDRetrieveStructure ( 1236)
method.

AMsg is the TIdMessage ( 1521) instance to use for retrieving the contents of the specified message.

AParts is a TIdImapMessageParts ( 1270) instance used to store the message parts that represent the BODYSTRUCTURE
response from the IMAP4 server.

UIDInternalRetrieveStructure requires ConnectionState ( 1244) to contain the value csSelected, indicating a mailbox has been
previously selected using SelectMailBox ( 1205), or an EIdConnectionStateError ( 70) exception is raised.

UIDInternalRetrieveStructure uses SendCmd ( 1206) to send the IMAP4 FETCH command with the specified message UID and
the BODYSTRUCTURE argument. When a successful FETCH response is received, values in the response are parsed to store
message parts that represent the body structure in AParts.

The return value for the method is True if the body structure for the specified message UID is successfully retrieved using the
method.

TIdIMAP4.UIDRetrieve Method
Retrieves a message from a mailbox and marks it as read on the server.

Pascal
function UIDRetrieve(
const AMsgUID: String;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgUID Message unique identifier to retreive from the mailbox.
AMsg Stores the retrieved message headers, body, and attachments.

Returns
Boolean - True on success.

1214 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
UIDRetrieve is a Boolean function that retrieves the entire contents for a given message unique identifier from a mailbox and marks
it as read on the remote IMAP4 server. UIDRetrieve requires that ConnectionState ( 1244) contain the value csSelected, or an
EIdConnectionStateError ( 70) exception will be raised.

UIDRetrieve calls a protected method that sends the IMAP4 FETCH command for the message UID specified in AMsgUID.
UIDRetrieve performs validation for the message UID to ensure that it contains a valid value. An EIdNumberInvalid ( 126)
exception can be raised if the unique identifier in aMsgUID is invalid.

On successful retrieval of the RFC 822 envelope data, UIDRetrieve calls ReceiveHeader and ReceiveBody to load the message
contents into the TIdMessage ( 1521) instance specified by AMsg. All headers, message parts, and the body of the message
instance are cleared prior to storing values retrieved from the remote IMAP4 server. The value of the UID and Flags properties for
the message in AMsg are updated based on the values found in the IMAP4 server response.

UIDRetrieve creates an internal TIdTCPStream ( 2381) instance to read message parts in the serve response, and assigns event
handlers for the operation using procedure stored in OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and
OnWorkEndForPart ( 1250).

UIDRetrieve sets the return value to True when the IMAP4 server response contains the value IMAP_OK ( 4334).

Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox and retrieve ( 1176) messages or headers in
Mailbox prior to calling the UIDRetrieve method.

Use Retrieve ( 1176) to retrieve ( 1176) a message using the relative message number for a message in the selected mailbox.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) EIdConnectionStateError ( 70) TIdMessage (
1521) TIdMessage.Headers ( 1546) TIdMessage.Body ( 1538) TIdMessage.MessageParts ( 1548) TIdMessage.UID ( 1553)
TIdMessage.Flags ( 1545) Retrieve ( 1176)

TIdIMAP4.UIDRetrieveAllEnvelopes Method
Retrieves RFC-822 envelope data for messages in a mailbox.

Pascal
function UIDRetrieveAllEnvelopes(
AMsgList: TIdMessageCollection
): Boolean;
Parameters
Parameters Description
AMsgList Collection of message instances for storing message envelope data.

Returns
Boolean - True on success, False on exception or protocol error.

Description
UIDRetrieveAllEnvelopes is a Boolean function used to retrieve ( 1176) IMAP4 envelope data for all messages in the currently
selected IMAP4 mailbox by their unique message identifiers.

IMAP4 envelope information consists of data items that describe the envelope structure of a message and is computed by parsing
RFC-822 message headers from individual messages in the IMAP4 mailbox. Fields in the envelope structure are in the following
order: date, subject, from, sender, reply-to, to, cc, bcc, in-reply-to, and message-id.

Any member in an envelope structure that is not applicable is presented as an empty value. Please note that the IMAP4 server
sends a default value for the reply-to and sender fields using the from field; a client is not expected to know how to do this.

UIDRetrieveAllEnvelopes requires that the ConnectionState ( 1244) property for the IMAP4 client contain the value csSelected, or
an EIdConnectionStateError ( 70) exception will be raised and the return value will be set to False.

UIDRetrieveAllEnvelopes implements the IMAP4 FETCH command using arguments that will result in all envelope data items for
the messages in the selected mailbox. The multi-line response from the IMAP4 server is captured and parsed into TIdMessages

Internet Direct (Indy) Version 10.1.5 1215


TIdIMAP4 Class Classes

instances in the AMsgList collection.

Please note that existing items in AMsgList are assumed to be in unique identifier order, and will overwrite message headers for the
TIdMessage ( 1521) instances based on that assumption. When AMsgList is unassigned, or does not contain enough items for
the envelopes in the mailbox, a new TIdMessage ( 1521) instance is created and added to the AMsgList collection.

The return value for UIDRetrieveAllEnvelopes will be True when the protocol response code from the IMAP4 server is IMAP_OK (
4334), and the multi-line response is successfully parsed into the AMsgList collection.

Use RetrieveAllEnvelopes ( 1176) to retrieve ( 1176) envelope data for messages using their relative message number(s).

See Also
TIdMessage ( 1521) TIdMessageCollection ( 1561) ConnectionState ( 1244) EIdConnectionStateError ( 70)
RetrieveAllEnvelopes ( 1176)

TIdIMAP4.UIDRetrieveEnvelope Method
Retrieves SMTP envelope information for a message in the mailbox.

Pascal
function UIDRetrieveEnvelope(
const AMsgUID: String;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgUID Message unique identifier to retrieve ( 1176) from the mailbox.
AMsg Message instance to store the return values.

Returns
Boolean - True on success.

Description
UIDRetrieveEnvelope is a Boolean function used to retrieve ( 1176) the SMTP envelope information for the unique identifier
specified in AMsgUID, and to store the information in the message identified by AMsg.

UIDRetrieveEnvelope validates the message UID in AMsgUID to ensure that it contains a valid value. An EIdNumberInvalid ( 126)
exception will be raised when the UID is invalid.

UIDRetrieveEnvelope requires that ConnectionState ( 1244) contain the value csSelected, indicating a mailbox has been
successfully selected and authenticated. UIDRetrieveEnvelope can raise an EIdConnectionStateError ( 70) exception if a mailbox
has not been selected and/or authenticated for the current user.

UIDRetrieveEnvelope calls SendCmd ( 1206) using the IMAP4 FETCH command and arguments constructed from the value in
AMsgUID and the IMAP4 fetch data flags required for the operation. UIDRetrieveEnvelope reads the multi-line response from the
IMAP4 server, and verifies that the initial response matches the command issued using SendCmd ( 1206). When they are the
same, UIDRetrieveEnvelope extracts the headers from the response and parses the header values in the message specified in
AMsg.

Use UIDRetrieveEnvelopeRaw ( 1217) to retrieve ( 1176) and store message envelope data into a specified TStrings argument.

Use Retrieve ( 1176) or RetrieveEnvelopeRaw ( 1179) to retrieve ( 1176) and store message envelope data for a message
identified by its relative message number.

See Also
ConnectionState ( 1244) TIdMessage ( 1521) UIDRetrieveEnvelopeRaw ( 1217) RetrieveEnvelope ( 1178)
RetrieveEnvelopeRaw ( 1179) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)

1216 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4.UIDRetrieveEnvelopeRaw Method
Pascal
function UIDRetrieveEnvelopeRaw(
const AMsgUID: String;
ADestList: TIdStringList
): Boolean;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.
ADestList Type is TIdStringList ( 3088).

Returns
Boolean

Description
UIDRetrieveEnvelopeRaw is a method.

UIDRetrieveEnvelopeRaw returns a Boolean value.

TIdIMAP4.UIDRetrieveFlags Method
Retrieves stored message flags for a message on the IMAP4 server.

Pascal
function UIDRetrieveFlags(
const AMsgUID: String;
var AFlags: TIdMessageFlagsSet
): Boolean;
Parameters
Parameters Description
AMsgUID Unique message identifier containing flags to be retrieved.
AFlags Storage for message flags in the specified message UID.

Returns
Boolean - True on success.

Description
UIDRetrieveFlags is a Boolean function used to retrieve ( 1176) stored message flags for the unique message identifier specified
AMsgUID. Flags values retrieved from the current mailbox on the IMAP4 server are stored in the AFlags argument.

UIDRetrieveFlags validates the unique message identifier in AMsgUID to ensuire that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception when AMsgUID contains an invalid value for use as a UID.

UIDRetrieveFlags requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account propr to calling UIDRetrieveFlags.

UIDRetrieveFlags sends the IMAP4 FETCH command to get the flag values for the specified message UID. If a protocol response
error occurs while retrieving the flag values, UIDRetrieveFlags sets the return value to False and exits from the method. AFlags will
contains an empty set in this condition.

On successful completion, UIDRetrieveFlags processes the untagged responses in IMAP4 server response, and sets the return
value to True.

Message flags returned in the AFlags argument can be stored in the TIdMessage.Flags ( 1545) property for items in MailBox (
1245).

Use RetrieveFlags ( 1179) to retrieve ( 1176) message flags for a message using its relative message number.

Internet Direct (Indy) Version 10.1.5 1217


TIdIMAP4 Class Classes

Use StoreFlags ( 1209) or UIDStoreFlags ( 1241) to update the stored message flags for a message in the mailbox on the
remote IMAP4 server.

See Also
ConnectionState ( 1244) MailBox ( 1245) StoreFlags ( 1209) UIDStoreFlags ( 1241) UIDRetrieveFlags
EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) TIdMessage.Flags ( 1545)

TIdIMAP4.UIDRetrieveHeader Method
Retrieves headers for a specified message and populates the message instance.

Pascal
function UIDRetrieveHeader(
const AMsgUID: String;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
AMsgUID Message unique identifier to be retrieved from the mailbox.
AMsg Message instance used to store retrieved header values.

Returns
Boolean - True on success.

Description
UIDRetrieveHeader is a Boolean function used to retrieve ( 1176) headers for the message unique identifier specified in
AMsgUID, and populates the message instance specified in AMsg with the header values.

UIDRetrieveHeader validates the UID in AMsgUID to ensure that it contains a valid value, and raises and EIdNumberInvalid ( 126)
exception if the condition is not met.

UIDRetrieveHeader requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account prior to calling UIDRetrieveHeader.

UIDRetrieveHeader sends the IMAP4 FETCH command for the specified message number to access the stored header values.
UIDRetrieveHeader ensures that the untagged server response contains an RFC 822 header before populating the header values
in the specified message instance. Please note that any existing header values in AMsg are cleared prior to parsing and storing
headers from the IMAP4 server response.

UIDRetrieveHeader sets the return value to True when the protocol response contains the value IMAP_OK ( 4334).

UIDRetrieveHeader is used in the implementation of the RetrieveAllHeaders ( 1177) method, which is in turn called by
SelectMailBox ( 1205) when RetrieveOnSelect ( 1247) contains the value rsHeaders.

Use RetrieveHeader ( 1180) to retrieve ( 1176) message headers by a relative message number.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) MailBox ( 1245) RetrieveAllHeaders ( 1177)
RetrieveHeader ( 1180) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) TIdMessage.Headers ( 1546)

TIdIMAP4.UIDRetrieveMailBoxSize Method
Indicates the size of all messages in the currently selected mailbox.

Pascal
function UIDRetrieveMailBoxSize: Integer;
Returns
Integer - Bytes required to store all messages in the mailbox or -1 when an error occurs.

1218 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
UIDRetrieveMailBoxSize is an Integer function that calculates the size of all messages in the currently selected mailbox. The
calculated size for the mailbox includes all message parts (including attachments) currently stored on the remote IMAP4 server.

UIDRetrieveMailBoxSize requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select the current mailbox for the IMAP4
account prior to calling UIDRetrieveMailBoxSize.

UIDRetrieveMailBoxSize calls SendCMd using the IMAP4 FETCH command to get the message size for each of the message UIDs
in the IMAP4 mailbox, and accumulates the total size as the return value for the method. The return value for
UIDRetrieveMailBoxSize is -1 if a protocol response error occurs in the method.

Use RetreiveMsgSize or UIDRetreiveMsgSize to determine the size of a specific message stored in the currently selected mailbox
for the IMAP4 account.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) SendCmd ( 1206) RetreiveMsgSize UIDRetreiveMsgSize
RetrieveMailBoxSize ( 1181) IMAP_OK ( 4334)

TIdIMAP4.UIDRetrieveMsgSize Method
Indicates the size of a specified message in the currently selected mailbox.

Pascal
function UIDRetrieveMsgSize(
const AMsgUID: String
): Integer;
Parameters
Parameters Description
AMsgUID Message unique identifier to access in the mailbox.

Returns
Integer - Bytes required to store the message in the mailbox or -1 when an error occurs.

Description
UIDRetrieveMsgSize is an Integer function that calculates the size of the message unique identifier specified by AMsgUID in the
currently selected IMAP4 mailbox.

UIDRetrieveMsgSize validates the message UID in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveMsgSize requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrieveMsgSize.

UIDRetrieveMsgSize calls SendCMd using the IMAP4 FETCH command to get the message size for the specified UID in the IMAP
mailbox. The server response is examined for the message size when the server response contains the value IMAP_OK ( 4334),
and sets the return value for the method. The return value for UIDRetrieveMsgSize is -1 if a protocol error response occurs in the
method.

Use RetrieveMsgSize ( 1181) to retrieve ( 1176) the size of a message using the relative message number for the message.

Use RetrieveMailBoxSize ( 1181) to retrieve ( 1176) the space required for all messages in the currently selected mailbox for the
IMAP4 account.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) SendCmd ( 1206) RetrieveMsgSize (
1181) RetrieveMailBoxSize ( 1181)

Internet Direct (Indy) Version 10.1.5 1219


TIdIMAP4 Class Classes

TIdIMAP4.UIDRetrieveNoDecodeToFile Method
Retrieves the raw encoded contents of a message and stores the contents in a file.

Pascal
function UIDRetrieveNoDecodeToFile(
const AMsgUID: String;
ADestFile: string
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the message to retrieve ( 1176).
ADestFile File name used to store the message contents.

Returns
Boolean - True on success.

Description
UIDRetrieveNoDecodeToFile is a Boolean function used to retrieve ( 1176) the raw encoded contents of the unique message
identifier indicated in AMsgUID, and to store the message contents in the file indicated by ADestFile.

UIDRetrieveNoDecodeToFile can be used to access the contents of the message without creating object instances in the
MessageParts collection.

UIDRetrieveNoDecodeToFile validates the message UID in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveNoDecodeToFile requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError
( 70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrieveNoDecodeToFile.

UIDRetrieveNoDecodeToFile creates a TIdMessage ( 1521) instance used to temporarily store the encoded contents of the
specified message. The TIdMessage ( 1521) instance is freed after storing the message contents in the indicated file.

UIDRetrieveNoDecodeToFile returns True on successful completion of message retrieval. UIDRetrieveNoDecodeToFile returns


False if a protocol error response is received during retrieval of the specified message.

Use UIDRetrieveNoDecodeToStream ( 1220) to retrieve ( 1176) a message without decoding, and to store the contents in a
stream.

See Also
ConnectionState ( 1244) UIDRetrieveNoDecodeToStream ( 1220) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)
TIdMessage.NoDecode ( 1549)

TIdIMAP4.UIDRetrieveNoDecodeToStream Method
Pascal
function UIDRetrieveNoDecodeToStream(
const AMsgUID: String;
AStream: TIdStream
): Boolean;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.
AStream Type is TIdStream ( 3087).

Returns
Boolean

1220 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
UIDRetrieveNoDecodeToStream is a method.

UIDRetrieveNoDecodeToStream returns a Boolean value.

TIdIMAP4.UIDRetrievePart Method
Overload List

Method Description
TIdIMAP4.UIDRetrievePart (String, Retrieves an individual message part for a specified message stored in the remote
Integer, PChar, Integer, string) ( 1221) mailbox.
TIdIMAP4.UIDRetrievePart (String, Retrieves an individual message part for a specified message stored in the remote
Integer, TIdBytes, Integer, string) ( 1222) mailbox.
TIdIMAP4.UIDRetrievePart (String, Retrieves an individual message part for a specified message stored in the remote
string, PChar, Integer, string) ( 1223) mailbox.
TIdIMAP4.UIDRetrievePart (String, Retrieves an individual message part for a specified message stored in the remote
string, TIdBytes, Integer, string) ( 1224) mailbox.
TIdIMAP4.UIDRetrievePart (String,
string, TIdStream, string) ( 1225)

TIdIMAP4.UIDRetrievePart Method (String, Integer, PChar, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function UIDRetrievePart(
const AMsgUID: String;
const APartNum: Integer;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique message identifier for the message.
APartNum Message part number to be retrieved.
ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
UIDRetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the unique message
identifier specified in aMsgUID.

Use UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and the content transfer encoding
used for each of the message parts. Use the message part number (the relative position of the message part) and the content
transfer encoding when calling UIDRetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

Internet Direct (Indy) Version 10.1.5 1221


TIdIMAP4 Class Classes

UIDRetrievePart validates the unique message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrievePart.

UIDRetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. UIDRetrievePart assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
UIDRetrievePart UIDRetrieveStructure ( 1236) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194) RetrievePartToFilePeek ( 1196)

TIdIMAP4.UIDRetrievePart Method (String, Integer, TIdBytes, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function UIDRetrievePart(
const AMsgUID: String;
const APartNum: Integer;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique message identifier for the message.
APartNum Message part number to be retrieved.
ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
UIDRetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the unique message
identifier specified in aMsgUID.

Use UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and the content transfer encoding
used for each of the message parts. Use the message part number (the relative position of the message part) and the content
transfer encoding when calling UIDRetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

UIDRetrievePart validates the unique message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)

1222 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrievePart.

UIDRetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. UIDRetrievePart assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
UIDRetrievePart UIDRetrieveStructure ( 1236) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194) RetrievePartToFilePeek ( 1196)

TIdIMAP4.UIDRetrievePart Method (String, string, PChar, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function UIDRetrievePart(
const AMsgUID: String;
const APartNum: string;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique message identifier for the message.
APartNum Message part number to be retrieved.
ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
UIDRetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the unique message
identifier specified in aMsgUID.

Use UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and the content transfer encoding
used for each of the message parts. Use the message part number (the relative position of the message part) and the content
transfer encoding when calling UIDRetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

UIDRetrievePart validates the unique message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrievePart.

UIDRetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message

Internet Direct (Indy) Version 10.1.5 1223


TIdIMAP4 Class Classes

part content using a TIdTCPStream ( 2381) instance. UIDRetrievePart assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
UIDRetrievePart UIDRetrieveStructure ( 1236) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194) RetrievePartToFilePeek ( 1196)

TIdIMAP4.UIDRetrievePart Method (String, string, TIdBytes, Integer, string)


Retrieves an individual message part for a specified message stored in the remote mailbox.

Pascal
function UIDRetrievePart(
const AMsgUID: String;
const APartNum: string;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique message identifier for the message.
APartNum Message part number to be retrieved.
ABuffer Destination used to store the retrieved message part.
ABufferLength Length of the message part.
AContentTransferEncoding Content transfer encoding for the message part.

Returns
Boolean - True on success.

Description
UIDRetrievePart is an overloaded Boolean function used to retrieve ( 1176) an individual message part for the unique message
identifier specified in aMsgUID.

Use UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and the content transfer encoding
used for each of the message parts. Use the message part number (the relative position of the message part) and the content
transfer encoding when calling UIDRetrievePart.

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

UIDRetrievePart validates the unique message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePart requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrievePart.

UIDRetrievePart sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the message
part content using a TIdTCPStream ( 2381) instance. UIDRetrievePart assigns the event handlers in OnWorkBeginForPart (
1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381) instance to respond to work
events occurring during message part retrieval.

1224 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

After retrieval of the message part, ABuffer will contains the decoded message part content and ABufferLength will contain the
length of the decoded message part.

See Also
UIDRetrievePart UIDRetrieveStructure ( 1236) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFile ( 1230)
UIDRetrievePartToFilePeek ( 1232) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189)
RetrievePartToFile ( 1194) RetrievePartToFilePeek ( 1196)

TIdIMAP4.UIDRetrievePart Method (String, string, TIdStream, string)


Pascal
function UIDRetrievePart(
const AMsgUID: String;
const APartNum: string;
var ADestStream: TIdStream;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.
APartNum Scope is const. Type is string.
ADestStream Scope is var. Type is TIdStream ( 3087).
AContentTransferEncoding Type is string. Default value is 'tex.

Returns
Boolean

Description
UIDRetrievePart is a overloaded method.

UIDRetrievePart returns a Boolean value.

See Also
TIdIMAP4.UIDRetrievePart

TIdIMAP4.UIDRetrievePartHeader Method
Retrieves RFC headers for a specified message and message part.

Pascal
function UIDRetrievePartHeader(
const AMsgUID: String;
const APartNum: string;
AHeaders: TIdHeaderList
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
APartNum Relative message part number for retrieved headers.
AHeaders Header values retrieved from the message and message part.

Returns
Boolean - True on Success.

Description
UIDRetrievePartHeader is a Boolean function used to retrieve ( 1176) RFC-compliant headers for a specific message part using
the unique identifier for the message in the current mailbox.

AMsgUID specifies the unique identifier (UID) for the message as stored in the current mailbox on the remote IMAP4 server.

Internet Direct (Indy) Version 10.1.5 1225


TIdIMAP4 Class Classes

APartNum indicates the relative message part number to be used for retrieval of RFC-compliant message headers. APartNum is
the ordinal position of the message part as indicated by RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236).

AHeaders is used to store the RFC-compliant message headers retrieved for the specified message and message part.

UIDRetrievePartHeader validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartHeader requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError (
70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartHeader ( 1188) or UIDRetrievePartHeader.

UIDRetrievePartHeader sends the IMAP4 FETCH command with the relative message number and data element requests needed
to retrieve ( 1176) the message headers for a message part.

The return value for the UIDRetrievePartHeader. method indicates if message headers were successfully retrieved using the
specified message identifier and message part number. The return value will be False if a protocol error response (a value other
than IMAP_OK ( 4334)) is received during processing in the method.

Text returned in the IMAP4 server response is parsed to determine the size of the message headers for the specified message part.
Instances of TIdTCPStream ( 2381) and TIdStreamVCL ( 2709) are created for internal use during retrieval and storage of the
message headers in the server response.

Use OnWorkForPart ( 1250) to respond to work events occurring during retrieval of the message part headers.

Use RetrievePartHeader ( 1188) to retrieve ( 1176) message headers for a specified message part using the relative message
number for the message.

Use RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236) to determine all of the message parts available in a message
stored on the remote IMAP4 server.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) the headers and the content for a specified message
part.

Use RetrievePartPeek ( 1189), RetrievePartToFilePeek ( 1196), UIDRetrievePartPeek ( 1226), UIDRetrievePartToFilePeek (


1232) to retrieve ( 1176) a message part without affecting the message flags for the message.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) RetrievePart ( 1183) RetrievePartHeader ( 1188)
RetrievePartPeek ( 1189) RetrievePartToFilePeek ( 1196) RetrieveStructure ( 1200) UIDRetrievePart ( 1221)
UIDRetrievePartHeader UIDRetrievePartPeek ( 1226) UIDRetrievePartToFilePeek ( 1232) UIDRetrieveStructure ( 1236)
OnWorkForPart ( 1250) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70)

TIdIMAP4.UIDRetrievePartPeek Method
Overload List

Method Description
TIdIMAP4.UIDRetrievePartPeek (String, Retrieves a specified message part without affecting the flags stored for the message.
Integer, PChar, Integer, string) ( 1226)
TIdIMAP4.UIDRetrievePartPeek (String, Retrieves a specified message part without affecting the flags stored for the message.
Integer, TIdBytes, Integer, string) ( 1228)
TIdIMAP4.UIDRetrievePartPeek (String,
string, PChar, Integer, string) ( 1229)
TIdIMAP4.UIDRetrievePartPeek (String,
string, TIdStream, string) ( 1229)

TIdIMAP4.UIDRetrievePartPeek Method (String, Integer, PChar, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

1226 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Pascal
function UIDRetrievePartPeek(
const AMsgUID: String;
const APartNum: Integer;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier for the message with the desired message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.
AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
UIDRetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

AMsgUID is the unique identifier (UID) for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and
the content transfer encoding used for each of the message parts. Use the message part number (the relative position of the
message part) and the content transfer encoding when calling RetrievePart ( 1183) or RetrievePartPeek ( 1189).

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

UIDRetrievePartPeek validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek ( 1189) or UIDRetrievePartPeek.

UIDRetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. UIDRetrievePartPeek assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length
of the decoded message part.

Please note that UIDRetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing
the message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) or UIDRetrievePartToFilePeek ( 1232) to capture and store an unseen message part into a
file on the local system.

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

Internet Direct (Indy) Version 10.1.5 1227


TIdIMAP4 Class Classes

See Also
RetrievePart ( 1183) RetrievePartPeek ( 1189) RetrievePartToFilePeek ( 1196) RetrievePeek ( 1199) RetrieveStructure (
1200) UIDRetrievePart ( 1221) UIDRetrievePartPeek UIDRetrievePartToFilePeek ( 1232) UIDRetrievePeek ( 1234)
UIDRetrieveStructure ( 1236) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70) ConnectionState ( 1244)
SelectMailBox ( 1205) ExamineMailBox ( 1167) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart (
1250) TIdTCPStream ( 2381)

TIdIMAP4.UIDRetrievePartPeek Method (String, Integer, TIdBytes, Integer, string)


Retrieves a specified message part without affecting the flags stored for the message.

Pascal
function UIDRetrievePartPeek(
const AMsgUID: String;
const APartNum: Integer;
var ABuffer: TIdBytes;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier for the message with the desired message part.
APartNum Relative part number for the message part.
ABuffer Buffer for storing the retrieve ( 1176) message part.
ABufferLength SIze of the buffer need to store the message part.
AContentTransferEncoding Content transfer encoding applied to the stored message part.

Returns
Boolean - True on success.

Description
UIDRetrievePartPeek is an overloaded Boolean function used to retrieve ( 1176) a message part for a specific message without
affecting the flags stored on the remote IMAP4 server for the message.

AMsgUID is the unique identifier (UID) for the message stored in the current mailbox on the remote IMAP4 server.

APartNum is the relative part number for the requested message part.

Use RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and
the content transfer encoding used for each of the message parts. Use the message part number (the relative position of the
message part) and the content transfer encoding when calling RetrievePart ( 1183) or RetrievePartPeek ( 1189).

ABuffer is the storage to use for the retrieved message part after decoding the message content using the algorithm specified in
AContentTransferEncoding.

On successful retrieval of the message part, the values in ABuffer and ABufferLength are updated to reflect the message part
content and length (respectively). Please note that the caller is responsible for freeing the memory allocated in ABuffer by calling
FreeMem.

UIDRetrievePartPeek validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartPeek ( 1189) or UIDRetrievePartPeek.

UIDRetrievePartPeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. UIDRetrievePartPeek assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

After retrieval of the message part, ABuffer will contain the decoded message part content and ABufferLength will contain the length

1228 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

of the decoded message part.

Please note that UIDRetrievePartPeek does not affect the message flags stored for the message. Specifically, it allows accessing
the message parts without setting the 'Seen' message flag that indicates the message has been read.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) (and mark as seen) a specific message part.

Use RetrievePartToFilePeek ( 1196) or UIDRetrievePartToFilePeek ( 1232) to capture and store an unseen message part into a
file on the local system.

Use RetrievePeek ( 1199) or UIDRetrievePeek ( 1234) to perform similar processing for the entire contents of a specified
message.

See Also
RetrievePart ( 1183) RetrievePartPeek ( 1189) RetrievePartToFilePeek ( 1196) RetrievePeek ( 1199) RetrieveStructure (
1200) UIDRetrievePart ( 1221) UIDRetrievePartPeek UIDRetrievePartToFilePeek ( 1232) UIDRetrievePeek ( 1234)
UIDRetrieveStructure ( 1236) EIdNumberInvalid ( 126) EIdConnectionStateError ( 70) ConnectionState ( 1244)
SelectMailBox ( 1205) ExamineMailBox ( 1167) OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart (
1250) TIdTCPStream ( 2381)

TIdIMAP4.UIDRetrievePartPeek Method (String, string, PChar, Integer, string)


Pascal
function UIDRetrievePartPeek(
const AMsgUID: String;
const APartNum: string;
var ABuffer: PChar;
var ABufferLength: Integer;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.
APartNum Scope is const. Type is string.
ABuffer Scope is var. Type is PChar.
ABufferLength Scope is var. Type is Integer.
AContentTransferEncoding Type is string. Default value is 'tex.

Returns
Boolean

Description
UIDRetrievePartPeek is a overloaded method.

UIDRetrievePartPeek returns a Boolean value.

See Also
TIdIMAP4.UIDRetrievePartPeek

TIdIMAP4.UIDRetrievePartPeek Method (String, string, TIdStream, string)


Pascal
function UIDRetrievePartPeek(
const AMsgUID: String;
const APartNum: string;
var ADestStream: TIdStream;
AContentTransferEncoding: string = 'text'
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.

Internet Direct (Indy) Version 10.1.5 1229


TIdIMAP4 Class Classes

APartNum Scope is const. Type is string.


ADestStream Scope is var. Type is TIdStream ( 3087).
AContentTransferEncoding Type is string. Default value is 'tex.

Returns
Boolean

Description
UIDRetrievePartPeek is a overloaded method.

UIDRetrievePartPeek returns a Boolean value.

See Also
TIdIMAP4.UIDRetrievePartPeek

TIdIMAP4.UIDRetrievePartToFile Method
Overload List

Method Description
TIdIMAP4.UIDRetrievePartToFile Retrieves and stores a message part for a message in the specified local file.
(String, Integer, Integer, string, string) (
1230)
TIdIMAP4.UIDRetrievePartToFile
(String, string, Integer, string, string) (
1231)

TIdIMAP4.UIDRetrievePartToFile Method (String, Integer, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file.

Pascal
function UIDRetrievePartToFile(
const AMsgUID: String;
const APartNum: Integer;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier (UID) for the desired message.
APartNum relative part number for the message part.
ALength size of message part as indicated in the IMAP4 server response.
ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.

Returns
Boolean - True on success.

Description
UIDRetrievePartToFile is a Boolean function used to retrieve ( 1176) a specific message part for the specified message, and to
store the message parts contents in the specified local file name.

AMsgUID is the unique identifier (UID) for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

1230 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and
the content transfer encoding used for each of the message parts. Use the message part number (the relative position of the
message part) and the content transfer encoding when calling RetrievePartToFile ( 1194).

UIDRetrievePartToFile validates the unique identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartToFile validates the message part number in APartNum to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartToFile requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartToFile ( 1194).

UIDRetrievePartToFile sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. UIDRetrievePartToFile assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFilePeek ( 1196) or UIDRetrievePartToFilePeek ( 1232) to retrieve ( 1176) a message part to a file without
affecting the stored message flags for the message.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189) RetrievePartToFilePeek ( 1196) UIDRetrievePart (
1221) UIDRetrieveStructure ( 1236) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFilePeek ( 1232) EIdNumberInvalid (
126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

TIdIMAP4.UIDRetrievePartToFile Method (String, string, Integer, string, string)


Pascal
function UIDRetrievePartToFile(
const AMsgUID: String;
const APartNum: string;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Scope is const. Type is String.
APartNum Scope is const. Type is string.
ALength Type is Integer.
ADestFileNameAndPath Type is string.
AContentTransferEncoding Type is string.

Returns
Boolean

Internet Direct (Indy) Version 10.1.5 1231


TIdIMAP4 Class Classes

Description
UIDRetrievePartToFile is a overloaded method.

UIDRetrievePartToFile returns a Boolean value.

See Also
TIdIMAP4.UIDRetrievePartToFile

TIdIMAP4.UIDRetrievePartToFilePeek Method
Overload List

Method Description
TIdIMAP4.UIDRetrievePartToFilePeek Retrieves and stores a message part for a message in the specified local file without
(String, Integer, Integer, string, string) ( updating message flags stored on the remote IMAP4 server.
1232)
TIdIMAP4.UIDRetrievePartToFilePeek Retrieves and stores a message part for a message in the specified local file without
(String, string, Integer, string, string) ( updating message flags stored on the remote IMAP4 server.
1233)

TIdIMAP4.UIDRetrievePartToFilePeek Method (String, Integer, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file without updating message flags stored on the remote
IMAP4 server.

Pascal
function UIDRetrievePartToFilePeek(
const AMsgUID: String;
const APartNum: Integer;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
APartNum relative part number for the message part.
ALength size of message part as indicated in the IMAP4 server response.
ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.
AMsgNum relative message number for the message.

Returns
Boolean - True on success.

Description
RetrievePartToFilePeek ( 1196) is a Boolean function used to retrieve ( 1176) a specific message part for the specified
message, and to store the message parts contents in the specified local file name. RetrievePartToFilePeek ( 1196) is similar to
RetrievePartToFile ( 1194), but does not update the message flags stored on the remote IMAP4 server. Specifically, it does not
affect the 'Seen' flag when accessing the message and/or message parts.

AMsgNum is the relative message number for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) to find the message parts available for a specific message, and the content transfer encoding used

1232 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

for each of the message parts. Use the message part number (the relative position of the message part) and the content transfer
encoding when calling RetrievePartToFilePeek ( 1196).

RetrievePartToFilePeek ( 1196) validates the message number in AMsgNum to ensure that it contains a positive non-zero value,
and raises an EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek ( 1196) validates the message part number in APartNum to ensure that it contains a valid value, and
raises an EIdNumberInvalid ( 126) exception if the requirement is not met.

RetrievePartToFilePeek ( 1196) requires that ConnectionState ( 1244) contain the value csSelected, or an
EIdConnectionStateError ( 70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a
mailbox prior to calling RetrievePartToFilePeek ( 1196).

RetrievePartToFilePeek ( 1196) sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and
retrieves the message part content using a TIdTCPStream ( 2381) instance. RetrievePartToFilePeek ( 1196) assigns the event
handlers in OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream (
2381) instance to respond to work events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFile ( 1194) or UIDRetrievePartToFile ( 1230) to retrieve ( 1176) a message part to a file and to update the
stored message flags for the message.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrieveStructure ( 1200) RetrievePartPeek ( 1189) RetrievePartToFile ( 1194) EIdNumberInvalid (
126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

TIdIMAP4.UIDRetrievePartToFilePeek Method (String, string, Integer, string, string)


Retrieves and stores a message part for a message in the specified local file without updating message flags stored on the remote
IMAP4 server.

Pascal
function UIDRetrievePartToFilePeek(
const AMsgUID: String;
const APartNum: string;
ALength: Integer;
ADestFileNameAndPath: string;
AContentTransferEncoding: string
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier for the desired message.
APartNum relative part number for the message part.
ALength size of message part as indicated in the IMAP4 server response.
ADestFileNameAndPath name of the file (including the optional path) used to store the contents of the message part.
AContentTransferEncoding content transfer encoding expected for the specified message part.

Returns
Boolean - True on success.

Description
UIDRetrievePartToFilePeek is a Boolean function used to retrieve ( 1176) a specific message part for the specified message, and

Internet Direct (Indy) Version 10.1.5 1233


TIdIMAP4 Class Classes

to store the message parts contents in the specified local file name. UIDRetrievePartToFilePeek is similar to UIDRetrievePartToFile
( 1230), but does not update the message flags stored on the remote IMAP4 server. Specifically, it does not affect the 'Seen' flag
when accessing the message and/or message parts.

AMsgUID is the unique identifier (UID) for the message as stored in the currently selected mailbox on the remote IMAP4 server.

APartNum is the relative part number for the message part in the structure for the message.

ALength is the size of message part as indicated in the IMAP4 server response.

ADestFileNameAndPath is the name of the file (including the optional path) used to store the contents of the message part.

AContentTransferEncoding is the content transfer encoding expected for the specified message part.

Use RetrieveStructure ( 1200) or UIDRetrieveStructure ( 1236) to find the message parts available for a specific message, and
the content transfer encoding used for each of the message parts. Use the message part number (the relative position of the
message part) and the content transfer encoding when calling UIDRetrievePartToFilePeek.

UIDRetrievePartToFilePeek validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartToFilePeek validates the message part number in APartNum to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrievePartToFilePeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError
( 70) exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrievePartToFilePeek ( 1196) or UIDRetrievePartToFilePeek.

UIDRetrievePartToFilePeek sends the IMAP4 FETCH command to retrieve ( 1176) the specified message part, and retrieves the
message part content using a TIdTCPStream ( 2381) instance. UIDRetrievePartToFilePeek assigns the event handlers in
OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and OnWorkEndForPart ( 1250) to the TIdTCPStream ( 2381)
instance to respond to work events occurring during message part retrieval.

The return value for the method is True if the message part is successfully retrieved for the specified message. The return value for
the method is False if a protocol error response is received (any value other than IMAP_OK ( 4334)) or the value in
ADestFileNameAndPath is an empty string ('').

Please note that the destination file specified in ADestFileNameAndPath will contain the decoded content for the message part after
reversing the encoding algorithm specified in AContentTransferEncoding.

Use RetrievePartToFile ( 1194) or UIDRetrievePartToFile ( 1230) to retrieve ( 1176) a message part to a file and to update the
stored message flags for the message.

Use RetrievePart ( 1183) or UIDRetrievePart ( 1221) to retrieve ( 1176) a message part and to update the stored message
flags for the message.

See Also
RetrievePart ( 1183) RetrievePartPeek ( 1189) RetrievePartToFile ( 1194) RetrieveStructure ( 1200) UIDRetrievePart (
1221) UIDRetrievePartPeek ( 1226) UIDRetrievePartToFile ( 1230) UIDRetrieveStructure ( 1236) EIdNumberInvalid ( 126)
ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) OnWorkEndForPart ( 1250)

TIdIMAP4.UIDRetrievePeek Method
Retrieves a message from a mailbox without marking it as read on the server.

Pascal
function UIDRetrievePeek(
const AMsgUID: String;
AMsg: TIdMessage
): Boolean;

1234 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Parameters
Parameters Description
AMsgUID Unique identifier for the desired message.
AMsg Stores the retrieved message headers, body, and attachments.

Returns
Boolean - True on success.

Description
UIDRetrievePeek is a Boolean function that retrieves the entire contents for a message from a mailbox without marking it as read
on the remote IMAP4 server.

Please note that "Peek" versions of the IMAP4 functions do NOT set the mfSeen message flag. A new message in your inbox
should not have set the mfSeen flag until you retrieve ( 1176) the message via a function such as Retrieve ( 1176). You can,
however, retrieve ( 1176) the message via RetrievePeek ( 1199), which should not set the mfSeen flag. The situation is not so
clear, however, if you retrieve ( 1176) the third attachment (only) of an email. All the "Peek" versions of TIdIMAP4 ( 1150)
functions do imply that the mfSeen flag NOT be set. Be aware that IMAP4 server support for the "Peek" functionality may vary.

UIDRetrievePeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

UIDRetrievePeek calls a protected method that sends the IMAP4 FETCH command for the message number specified in
AMsgNum. UIDRetrievePeek performs validation for the unique message identifier to ensure that it contains a valid value. An
EIdNumberInvalid ( 126) exception can be raised if the condition is not met.

On successful retrieval of the RFC 822 envelope data, UIDRetrievePeek calls ReceiveHeader and ReceiveBody to load the
message contents into the TIdMessage ( 1521) instance specified by AMsg. All headers, message parts, and the body of the
message instance are cleared prior to storing values retrieved from the remote IMAP4 server. The value of the UID and Flags
properties for the message in AMsg are updated based on the values found in the IMAP4 server response.

UIDRetrievePeek creates an internal TIdTCPStream ( 2381) instance to read message parts in the serve response, and assigns
event handlers for the operation using procedure stored in OnWorkBeginForPart ( 1249), OnWorkForPart ( 1250), and
OnWorkEndForPart ( 1250).

UIDRetrievePeek sets the return value to True when the IMAP4 server response contains the value IMAP_OK ( 4334).

Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox and retrieve ( 1176) messages or headers in
Mailbox prior to calling the Retrieve ( 1176), UIDRetrieve ( 1214), RetrievePeek ( 1199), or UIDRetrievePeek methods.

Use on of the RetrieveXxx methods to retrieve ( 1176) message(s) using the relative message number for a message in the
selected mailbox.

See Also
ConnectionState ( 1244) SelectMailBox ( 1205) ExamineMailBox ( 1167) EIdConnectionStateError ( 70) TIdMessage (
1521) TIdMessage.Headers ( 1546) TIdMessage.Body ( 1538) TIdMessage.MessageParts ( 1548) TIdMessage.UID ( 1553)
TIdMessage.Flags ( 1545) Retrieve ( 1176) RetrievePeek ( 1199) UIDRetrieve ( 1214)

TIdIMAP4.UIDRetrieveStructure Method
Overload List

Method Description
TIdIMAP4.UIDRetrieveStructure (String,
TIdImapMessageParts) ( 1236)
TIdIMAP4.UIDRetrieveStructure (String,
TIdMessage) ( 1236)

Internet Direct (Indy) Version 10.1.5 1235


TIdIMAP4 Class Classes

TIdIMAP4.UIDRetrieveStructure Method (String, TIdImapMessageParts)


Pascal
function UIDRetrieveStructure(
const AMsgUID: String;
AParts: TIdImapMessageParts
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
AParts Stores informatiuon about the message parts for the message.

Returns
Boolean - True on success.

Description
UIDRetrieveStructure is an overloaded Boolean function used to return a list of the message parts for the message specified in
AMsgUID.

AParts is used to return the information about the message parts with additional information about the size and content transfer
encoding applied to the individual message parts.

UIDRetrieveStructure validates the message number in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveStructure requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveStructure ( 1200) or UIDRetrieveStructure.

UIDRetrieveStructure sends the IMAP4 FETCH command using the specified message number and arguments needed to retrieve
( 1176) the Body structure for the message stored in the current mailbox on the remote IMAP4 server.

The return value for the method is True if retrieval of the message part list is completed successfully. The return value for the
method is False if a protocol error response (any value other than IMAP_OK ( 4334)) is received during processing in the method.

UIDRetrieveStructure parses text in the IMAP4 server response, and stores the data about the message parts in the parameter
provided to the method.

UIDRetrieveStructure is used in the implementation of other TIdIMAP4 ( 1150) methods, like UIDRetrieveText ( 1237).
UIDRetrieveStructure may also be used to access the structure for the message prior to calling methods that require unique
identifiers and content transfer encoding information, like UIDRetrievePart ( 1221).

See Also
EIdNumberInvalid ( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox (
1167) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrieveText ( 1201) UIDRetrievePart ( 1221) UIDRetrieveStructure
UIDRetrieveText ( 1237) TIdImapMessageParts ( 1270)

TIdIMAP4.UIDRetrieveStructure Method (String, TIdMessage)


Pascal
function UIDRetrieveStructure(
const AMsgUID: String;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
AMsg Message instance used to store informatiuon about message parts for the message.

1236 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Returns
Boolean - True on success.

Description
UIDRetrieveStructure is an overloaded Boolean function used to return a list of the message parts for the message specified in
AMsgUID.

AMsg is used to return the list of message parts with additional information about the size and content transfer encoding applied to
the individual message parts.

UIDRetrieveStructure validates the message number in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveStructure requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
RetrieveStructure ( 1200) or UIDRetrieveStructure.

UIDRetrieveStructure sends the IMAP4 FETCH command using the specified message number and arguments needed to retrieve
( 1176) the Body structure for the message stored in the current mailbox on the remote IMAP4 server.

The return value for the method is True if retrieval of the message part list is completed successfully. The return value for the
method is False if a protocol error response (any value other than IMAP_OK ( 4334)) is received during processing in the method.

UIDRetrieveStructure parses text in the IMAP4 server response, and stores the data about the message parts in the parameter
provided to the method.

UIDRetrieveStructure is used in the implementation of other TIdIMAP4 ( 1150) methods, like UIDRetrieveText ( 1237).
UIDRetrieveStructure may also be used to access the structure for the message prior to calling methods that require unique
identifiers and content transfer encoding information, like UIDRetrievePart ( 1221).

See Also
EIdNumberInvalid ( 126) ConnectionState ( 1244) EIdConnectionStateError ( 70) SelectMailBox ( 1205) ExamineMailBox (
1167) RetrievePart ( 1183) RetrieveStructure ( 1200) RetrieveText ( 1201) UIDRetrievePart ( 1221) UIDRetrieveStructure
UIDRetrieveText ( 1237) TIdImapMessageParts ( 1270)

TIdIMAP4.UIDRetrieveText Method
Retrieves the text that makes up the body of a message.

Pascal
function UIDRetrieveText(
const AMsgUID: String;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
UIDRetrieveText is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the body
of the message. UIDRetrieveText uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for
the message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. Use UIDRetrieveText2 ( 1238) for servers that exhibit this behavior.

UIDRetrieveText validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an

Internet Direct (Indy) Version 10.1.5 1237


TIdIMAP4 Class Classes

EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveText requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrieveText or UIDRetrieveText2 ( 1238).

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

UIDRetrieveText captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. UIDRetrieveText creates an instance of TIdTCPStream ( 2381) for use in capturing the body
text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart ( 1250)
event handlers used to respond to work events triggered during retrieval of the message part.

Please note that some IMAP4 servers may truncate the initial body text found in the message structure if it contains non-textual
data such as binary transfer-encoded data or multipart content with the subtype mixed, digest, or parallel. Use UIDRetrieveText2 (
1238) for servers exhibiting this behavior.

Use RetrieveText ( 1201) of RetrieveText2 ( 1202) to retrieve ( 1176) the body text for a message using the relative message
number for the message.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250) OnWorkForPart ( 1250) RetrieveText ( 1201) RetrieveText2 (
1202) SelectMailBox ( 1205) TIdTCPStream ( 2381) UIDRetrieveText2 ( 1238) UIDRetrieveText2 ( 1238)

TIdIMAP4.UIDRetrieveText2 Method
Retrieves the text that makes up the body of a message.

Pascal
function UIDRetrieveText2(
const AMsgUID: String;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgUID
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
UIDRetrieveText2 is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the
body of the message. RetrieveText2 ( 1202) uses the IMAP4 BODY[TEXT] command to access the message part that represents
the body for the message.

Please note that some IMAP4 servers do not correctly return the body text using this command.

Some servers return the first unencoded attachment instead. Other IMAP4 servers may truncate the initial body text found in the
message structure if it contains non-textual data such as binary transfer-encoded data or multipart content with the subtype mixed,
digest, or parallel.

UIDRetrieveText2 accounts for this behavior by checking the size of the initial message part, and retrieves a subsequent message
part when the size of first message part contains 0 (zero).

UIDRetrieveText2 validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveText2 requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling

1238 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

UIDRetrieveText ( 1237) or UIDRetrieveText2.

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

UIDRetrieveText2 captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of the
message part in the AText argument. UIDRetrieveText2 creates an instance of TIdTCPStream ( 2381) for use in capturing the
body text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart (
1250) event handlers used to respond to work events triggered during retrieval of the message part.

Use RetrieveText ( 1201) of RetrieveText2 ( 1202) to retrieve ( 1176) the body text for a message using the relative message
number for the message.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250) OnWorkForPart ( 1250) RetrieveText ( 1201) RetrieveText2 (
1202) RetrieveTextPeek ( 1203) RetrieveText2Peek SelectMailBox ( 1205) TIdTCPStream ( 2381) UIDRetrieveText ( 1237)
UIDRetrieveText2 UIDRetrieveTextPeek ( 1239) UIDRetrieveText2Peek

TIdIMAP4.UIDRetrieveTextPeek Method
Retrieves the text that makes up the body of a message without updating the flags for the message.

Pascal
function UIDRetrieveTextPeek(
const AMsgUID: String;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
UIDRetrieveTextPeek is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents the
body of the message. UIDRetrieveTextPeek is similar to UIDRetrieveText ( 1237), but does not update the stored flags for the
message when accessing the message or message parts in the IMAP4 mailbox. Specifically, it does not set the 'Seen' or mfSeen
flag that indicates the message has been read.

UIDRetrieveTextPeek uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the
message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. Use UIDRetrieveTextPeek2 ( 1240) for servers that exhibit this behavior.

UIDRetrieveTextPeek validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveTextPeek requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrieveTextPeek or UIDRetrieveTextPeek2 ( 1240).

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

UIDRetrieveTextPeek captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of
the message part in the AText argument. UIDRetrieveTextPeek creates an instance of TIdTCPStream ( 2381) for use in capturing
the body text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and OnWorkEndForPart

Internet Direct (Indy) Version 10.1.5 1239


TIdIMAP4 Class Classes

( 1250) event handlers used to respond to work events triggered during retrieval of the message part.

Please note that some IMAP4 servers may truncate the initial body text found in the message structure if it contains non-textual
data such as binary transfer-encoded data or multipart content with the subtype mixed, digest, or parallel. Use UIDRetrieveText2 (
1238) for servers exhibiting this behavior.

Use RetrieveTextPeek ( 1203) or RetrieveTextPeek2 ( 1204) to retrieve ( 1176) the body text for a message using the relative
message number for the message.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250) OnWorkForPart ( 1250) RetrieveText ( 1201) RetrieveText2 (
1202) RetrieveTextPeek ( 1203) RetrieveText2Peek SelectMailBox ( 1205) TIdTCPStream ( 2381) UIDRetrieveText ( 1237)
UIDRetrieveText2 ( 1238) UIDRetrieveTextPeek2 ( 1240)

TIdIMAP4.UIDRetrieveTextPeek2 Method
Retrieves the text that makes up the body of a message without updating the flags for the message.

Pascal
function UIDRetrieveTextPeek2(
const AMsgUID: String;
var AText: string
): Boolean;
Parameters
Parameters Description
AMsgUID Unique identifier for the message.
AText destination for text representing the body of the message.

Returns
Boolean - True on success.

Description
UIDRetrieveTextPeek2 is a Boolean function used to retrieve ( 1176) a message part for the specified message that represents
the body of the message. UIDRetrieveTextPeek2 is similar to UIDRetrieveTextPeek ( 1239), and does not update the stored flags
for the message when accessing the message or message parts in the IMAP4 mailbox. Specifically, it does not set the 'Seen' or
mfSeen flag that indicates the message has been read.

UIDRetrieveTextPeek2 uses the IMAP4 BODY[TEXT] command to access the message part that represents the body for the
message.

Please note that some IMAP4 servers do not correctly return the body text using this command. Some servers return the first
unencoded attachment instead. UIDRetrieveTextPeek2 accounts for this behavior by accessing subsequent message bodies to
locate the text for the message where the initial message part has a length of 0 (zero).

UIDRetrieveTextPeek2 validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an
EIdNumberInvalid ( 126) exception if the requirement is not met.

UIDRetrieveTextPeek2 requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised. Use SelectMailBox ( 1205) or ExamineMailBox ( 1167) to select a mailbox prior to calling
UIDRetrieveTextPeek ( 1239) or UIDRetrieveTextPeek2.

The return value for the method indicates if the body text was successfully retrieved. The return value is False if a protocol error
response (any value other than IMAP_OK ( 4334)) is received, or the number of lines in the body text cannot be determined.

UIDRetrieveTextPeek2 captures and decodes the body lines in the IMAP4 server response, and stores the unencoded contents of
the message part in the AText argument. UIDRetrieveTextPeek2 creates an instance of TIdTCPStream ( 2381) for use in
capturing the body text for the message, and assigns the OnWorkForPart ( 1250), OnWorkBeginForPart ( 1249), and
OnWorkEndForPart ( 1250) event handlers used to respond to work events triggered during retrieval of the message part.

Use RetrieveTextPeek ( 1203) or RetrieveTextPeek2 ( 1204) to retrieve ( 1176) the body text for a message using the relative

1240 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

message number for the message.

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) EIdNumberInvalid ( 126) ExamineMailBox ( 1167)
OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250) OnWorkForPart ( 1250) RetrieveText ( 1201) RetrieveText2 (
1202) RetrieveTextPeek ( 1203) RetrieveText2Peek SelectMailBox ( 1205) TIdTCPStream ( 2381) UIDRetrieveText ( 1237)
UIDRetrieveTextPeek ( 1239)

TIdIMAP4.UIDSearchMailBox Method
Pascal
function UIDSearchMailBox(
const ASearchInfo: array of TIdIMAP4SearchRec
): Boolean;
Parameters
Parameters Description
ASearchInfo Scope is const. Type is array of TIdIMAP4SearchRec ( 2958).

Returns
Boolean

Description
UIDSearchMailBox is a method.

UIDSearchMailBox returns a Boolean value.

TIdIMAP4.UIDStoreFlags Method
Overload List

Method Description
TIdIMAP4.UIDStoreFlags (array of
String, TIdIMAP4StoreDataItem,
TIdMessageFlagsSet) ( 1242)
TIdIMAP4.UIDStoreFlags (String, Updates the specified message flags for a given message UID.
TIdIMAP4StoreDataItem,
TIdMessageFlagsSet) ( 1241)

TIdIMAP4.UIDStoreFlags Method (String, TIdIMAP4StoreDataItem, TIdMessageFlagsSet)


Updates the specified message flags for a given message UID.

Pascal
function UIDStoreFlags(
const AMsgUID: String;
const AStoreMethod: TIdIMAP4StoreDataItem;
const AFlags: TIdMessageFlagsSet
): Boolean; overload;
Parameters
Parameters Description
AMsgUID Message unique identifier to be updated by the method.
AStoreMethod Method to use for storing flag values.
AFlags Message flags to be updated for the specified messages.

Returns
Boolean - True on success.

Internet Direct (Indy) Version 10.1.5 1241


TIdIMAP4 Class Classes

Description
UIDStoreFlags is a Boolean function that updates the message flags specified in AFlags for the message unique identifier specified
in AMsgUID.

AStoreMethod indicates if the message flags are added, replaced or removed.

When AMsgUID has a length of zero, the return value for the method is set to False and the method is exited.

UIDStoreFlags requires that ConnectionState ( 1244) contain the value csSelected, or an EIdConnectionStateError ( 70)
exception will be raised.

UIDStoreFlags calls SendCmd ( 1206) using the IMAP4 STORE command for the specified messages and flags. UIDStoreFlags
sets the return value for the method to True when the server response contains the value IMAP_OK ( 4334).

Use StoreFlags ( 1209) to update message flag for a message using relative message numbers.

See Also
TIdIMAP4StoreDataItem ( 2958) TIdMessageFlags ( 2968) ConnectionState ( 1244) EIdConnectionStateError ( 70)
StoreFlags ( 1209)

TIdIMAP4.UIDStoreFlags Method (array of String, TIdIMAP4StoreDataItem,


TIdMessageFlagsSet)
Pascal
function UIDStoreFlags(
const AMsgUIDList: array of String;
const AStoreMethod: TIdIMAP4StoreDataItem;
const AFlags: TIdMessageFlagsSet
): Boolean; overload;
Parameters
Parameters Description
AMsgUIDList Scope is const. Type is array of String.
AStoreMethod Scope is const. Type is TIdIMAP4StoreDataItem ( 2958).
AFlags Scope is const. Type is TIdMessageFlagsSet ( 3059).

Returns
Boolean

Description
UIDStoreFlags is a overloaded method.

UIDStoreFlags returns a Boolean value.

See Also
TIdIMAP4.UIDStoreFlags

TIdIMAP4.UnsubscribeMailBox Method
Removes a mailbox from the list of "active" or "subscribed" mailboxes.

Pascal
function UnsubscribeMailBox(
const AMBName: String
): Boolean;
Parameters
Parameters Description
AMBName Mailbox name to removed from the active or subscribed list.

Returns
Boolean - True on success.

1242 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Description
UnsubscribeMailBox is a Boolean function used to remove the mailbox name specified in AMBName from the list of "active" or
"subscribed" mailboxes on the IMAP4 server. UnsubscribeMailBox updates the values that are returned by the IMAP4 LSUB
command.

UnsubscribeMailBox requires that the ConnectionState ( 1244) for the client contain the value csAuthenticated or csSelected to
perform the IMAP4 function. SubscribeMailBox ( 1210) can raise an EIdConnectionStateError ( 70) exception with the message
RSIMAP4ConnectionStateError if ConnectionState ( 1244) contains a value other than csAuthenticated or csSelected.

UnsubscribeMailBox calls sends the IMAP4 UNSUBSCRIBE command and the value specified in AMBName as an argument.
UnsubscribeMailBox returns True when the response code from the IMAP4 server is IMAP_OK ( 4334).

Use SubscribeMailBox ( 1210) to add a specified mailbox from the "active" or "subscibed" list.

Please note that IMAP4 servers are required to have an "Inbox" folder to allow receipt of email for a given user. This may or may
not be case-sensitive. Your implementation may require you to create ( 267) an Inbox folder if it does not already exist.

Also, caution is advised when choosing the characters used for mailbox names. Different IMAP servers may allow, and interpret
differently, various characters, which is allowed within the IMAP specification. Characters such as ~ / and . may have special
meaning in the IMAP servers context, and may produce unexpected results. In practice, some IMAP servers may be case-sensitive
and others not. It is recommended that you only use the characters A-Z and 0-9 and that you program to allow for case sensitivity or
insensitivity, as applicable. Note that, in general, IdIMAP4 adds double-quotes around mailbox names, which allows the use of
spaces in mailbox names, but also note that a perticular IMAP server may not allow spaces (this functionality is necessary to allow
IdIMAP4 deal with pre-existing mailboxes that include spaces).

See Also
ConnectionState ( 1244) EIdConnectionStateError ( 70) RSIMAP4ConnectionStateError SubscribeMailBox ( 1210)

TIdIMAP4.WriteLn Method
Used internally to send a command/request to an IMAP server.

Pascal
procedure WriteLn(
AOut: string
);
Parameters
Parameters Description
AOut Command (string) to be sent.

Description
WriteLn is an overloaded method used internally to send the command or request specified in AOut to the remote IMAP4 server.

WriteLn uses the corresponding method in the IOHandler ( 2364) assigned for the client connection

See Also
IOHandler ( 2364)

TIdIMAP4 Properties
The Properties of the TIdIMAP4 class are listed here.

Properties
Property Description
AuthType ( 1244) Indicates the mechanism to use for authentication in the Login ( 1174) method.
ConnectionState ( 1244) Indicates the IMAP4 connection state.
GreetingBanner ( 1245) Identifies the server and its state during connection of the IMAP4 session.
Host ( 1245) Identifies the host name or IP address for the remote IMAP4 server.

Internet Direct (Indy) Version 10.1.5 1243


TIdIMAP4 Class Classes

MailBox ( 1245) Represents the IMAP4 mailbox.


MailBoxSeparator ( 1246) Identifies the character used to separate mailbox names in the hierarchical mailbox namespace.
MilliSecsToWaitToClearBuffer ( 1246) Delay time for unhandled response data in the buffer for the client.
Password ( 1247) Identifies the credentials for IMAP4 server authentication.
Port ( 1247) Identifies the port number used for the IMAP4 server connection.
RetrieveOnSelect ( 1247) Specifies data to automatically retrieve ( 1176) from the mailbox when a mailbox is selected.
SASLMechanisms ( 1248) SASL authentication mechanisms supported on the remote IMAP4 server.
Username ( 1248) Identifies the user name for IMAP4 server authentication.
UseTLS ( 1249) Indicates Transport-Level Security is used on the connection.

Legend
Property
read only

TIdIMAP4.AuthType Property
Indicates the mechanism to use for authentication in the Login ( 1174) method.

Pascal
property AuthType: TIdIMAP4AuthenticationType;
Description
AuthType is a TIdIMAP4AuthenticationType ( 2957) property that indicates the mechanism to use when performing authentication
for the IMAP4 client connection in the Login ( 1174) method.

When AuthType contains the value atUserPass, the values in the Username ( 1248) and Password ( 1247) properties are used
to perform authentication. Username ( 1248) is required. Password ( 1247) may contain an empty string ('') if the IMAP4
acccount does not require authentication credentials.

When AuthType contains the value atSASL, the authentication mechanisms found in the SASLMechanism and Capabilities ( 690)
properties are used to send the AUTHENTICATE command.

AuthType is used in the Login ( 1174) method following TLS handshaking and negotiations when UseTLS ( 1249) contains True,
and the value in LastCmdResult ( 2367) contains the value IMAP_OK ( 4334).

The default value for AuthType is DEF_IMAP4_AUTH ( 3188), as assigned during initialization of the component.

Use Login ( 1174) to establish and authenticate the IMAP4 client connection.

Use ConnectionState ( 1244) to determine the state of the IMAP4 connection following authentication or completion of the Login
( 1174) method.

Use Capability ( 1159) to request and populate the Capabilities ( 690) supported on the remote server.

See Also
Capabilities ( 690) Capability ( 1159) ConnectionState ( 1244) Login ( 1174) SASLMechanisms ( 1248) UseTLS ( 1249)

TIdIMAP4.ConnectionState Property
Indicates the IMAP4 connection state.

Pascal
property ConnectionState: TIdIMAP4ConnectionState;
Description
ConnectionState is a Public read-only TIdIMAP4ConnectionState ( 2957) property

ConnectionState is a read-only TIdIMAP4ConnectionState ( 2957) property that indicates the state of the IMAP4 connection. AN
IMAP4 connection can exist in one of the following states: Non-Authenticated, Authenticated, Selected, and Logout.
ConnectionState is used to determine which IMAP commands are valid for the indicated state.

ConnectionState can contain one the follwing TIdIMAP4ConnectionState ( 2957) values:

1244 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Value Meaning
csAny Commands allowed in any connection state.
csNonAuthenticated Commands allowed prior to establishing authentication and entering an authenticated state.
csAuthenticated Commands allowed after authentication but prior to mailbox selection.
csSelected Commands allowed after selecting a mailbox.
csUnexpectedlyDisconnected Commands are disallowed because the connection has been closed.

csAny allows execution of the commands cmdCAPABILITY, cmdNOOP, and cmdLOGOUT at any time during the IMAP4 session.

csNonAuthenticated permits commands from the csAny connection state, as well as the commands cmdAUTHENTICATE and
cmdLOGOUT.

csAuthenticated permits commands from the csNonAuthenticated connection state, as well as the commands cmdSELECT,
cmdEXAMINE, cmdCREATE, cmdDELETE, cmdRENAME, cmdSUBSCRIBE, cmdUNSUBSCRIBE, cmdLIST, cmdLSUB,
cmdSTATUS, and cmdAPPEND.

csSelected permits commands from the csAuthenticated connection state, as well as the commands cmdCHECK, cmdCLOSE,
cmdEXPUNGE, cmdSEARCH, cmdFETCH, cmdSTORE, cmdCOPY, cmdUID, and the experimental/expansion commmands
represented by cmdXCmd.

csUnexpectedlyDisconnected is used when sending IMAP4 commands and processing server responses to indicate situations
where the connection has been reset by the peer.

See Also
TIdIMAP4ConnectionState ( 2957) Login ( 1174) Connect ( 1161) SendCmd ( 1206)

TIdIMAP4.GreetingBanner Property
Identifies the server and its state during connection of the IMAP4 session.

Pascal
property GreetingBanner: string;
Description
GreetingBanner is a read-only string property used to help in identifying the remote IMAP4 server for the client connection.
GreetingBanner can help the user decide the appropriate actions to perform after connecting to the IMAP4 server.

GreetingBanner is updated in the Connect ( 1161) method using values returned in the initial IMAP4 server response received
after establishing the client connection. This generally includes information that identifies the server and its state, like:

* OK IMAP4rev1 Service Ready

TIdIMAP4.Host Property
Identifies the host name or IP address for the remote IMAP4 server.

Pascal
property Host;
Description
Host is a Published String property that identifies the host name or IP address for the remote IMAP4 server for the client connection.

Set values in the Host and Port ( 1247) properties prior to calling Connect ( 1161) and Login ( 1174).

TIdIMAP4.MailBox Property
Represents the IMAP4 mailbox.

Internet Direct (Indy) Version 10.1.5 1245


TIdIMAP4 Class Classes

Pascal
property MailBox: TIdMailBox;
Description
MailBox is a TIdMailBox ( 1481) property that represents the IMAP4 mailbox including Attributes, Flags, and Messages stored on
the remote IMAP4 server.

Resources are allocated for the MailBox property during initialization of the component, and freed and released in the Destroy (
1165) method.

MailBox is assigned during processing that occurs for the server response in either the SelectMailBox ( 1205) or ExamineMailBox
( 1167) methods, and can be updated in methods that select, retrieve ( 1176) or update messages on the IMAP4 server.

Use SelectMailBox ( 1205) to select the current mailbox with read or write access.

Use ExamineMailBox ( 1167) to select the current mailbox with read-only access.

Please note that message instances stored in the MailBox may not contain the complete contents for messages. They may contain
only the headers (and no message parts), based on the value of the RetrieveOnSelect ( 1247) property when the mailbox is
selected (or examined).

Use one of the RetrieveXxx or UIDRetrieveXxx methods to populate the list of envelopes, headers, and messages in the mailbox.

See Also
TIdMailBox ( 1481) Destroy ( 1165) SelectMailBox ( 1205) ExamineMailBox ( 1167) RetrieveOnSelect ( 1247) Retrieve (
1176) UIDRetrieve ( 1214)

TIdIMAP4.MailBoxSeparator Property
Identifies the character used to separate mailbox names in the hierarchical mailbox namespace.

Pascal
property MailBoxSeparator: Char;
Description
MailBoxSeparator is a Char property that represents the character used to separate levels of hierarchy in a hierarchical mailbox
namespace. The default value for MailBoxSeparator is '/', as assigned during initialization of the component.

The namespace may contain an optional namespace character '#' and namespace identifier that specifies the type of mailbox store,
followed by one or more mailboxes. The interpretation of mailbox names is implementation-dependent. However, the
case-insensitive mailbox name 'INBOX' is a special name reserved to mean "the primary mailbox for this user on this server".

For instance, the following examples represent the default mailbox for an IMAP4 account for the user 'jdoe', and the shared NNTP
mailbox for the borland.public.delphi.internet.winsock newsgroup on the server Forums.Borland.Com:

jdoe/InBox
#news/Forums/Borland/Com/Borland/Public/Delphi/Internet/Winsock
By changing the MailboxSeparator character to '.', the previous examples would contain the following:

jdoe.InBox
#news.Forums.Borland.Com.Borland.Public.Delphi.Internet.Winsock
MailBoxSeparator is used when parsing IMAP4 server responses that include mailbox names. MailBoxSeparator may also be
updated to reflect the mailbox separator character detected when parsing the IMAP4 server response.

Please note that MailBoxSeparator may be set to the value CHAR0 ( 3169) (decimal 0) when server responses use the value NIL
as the mailbox seperator character.

TIdIMAP4.MilliSecsToWaitToClearBuffer Property
Delay time for unhandled response data in the buffer for the client.

1246 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

Pascal
property MilliSecsToWaitToClearBuffer: integer;
Description
MilliSecsToWaitToClearBuffer is an integer property that indicates the number of milliseconds to wait for clearing of previously
unhandled response data in the buffer for the IMAP4 client. MilliSecsToWaitToClearBuffer is used in the overloaded SendCmd (
1206) method, and allows the client to detect and read unhandled response data before sending additional commands on the client
connection.

The default value for MilliSecsToWaitToClearBuffer is IDF_DEFAULT_MS_TO_WAIT_TO_CLEAR_BUFFER ( 3833), as assigned


during initialization of the component.

See Also
SendCmd ( 1206) IDF_DEFAULT_MS_TO_WAIT_TO_CLEAR_BUFFER ( 3833)

TIdIMAP4.Password Property
Identifies the credentials for IMAP4 server authentication.

Pascal
property Password;
Description
Password is a String property that represents the authentication credentials used for the IMAP4 account.

Username ( 1248) and Password are used in the Login ( 1174) method to perform authentication on the remote IMAP4 server
when AuthType ( 1244) contains the value atUserPass. Username ( 1248) and Password are used also used when creating
SASL challenge / response exchanges using the SASLMechanisms ( 1248) and Capabilities ( 690) implemented for the remote
IMAP4 server.

Set values in the Username ( 1248) and Password properties prior to calling the the Connect ( 1161) (with automatic login (
1174)) or Login ( 1174) methods.

See Also
Username ( 1248) Connect ( 1161) Login ( 1174) SASLMechanisms ( 1248) Capabilities ( 690)

TIdIMAP4.Port Property
Identifies the port number used for the IMAP4 server connection.

Pascal
property Port;
Description
Port is a published Integer property that identifies the port number used for the IMAP4 server connection. Port is assigned the
default value IdPORT_IMAP4 ( 4031) during initialization of the component.

Set values in the Host ( 1245), Port, Username ( 1248), and Password ( 1247) properties prior to calling the Connect ( 1161)
or Login ( 1174) methods.

See Also
Create ( 267) Destroy ( 1165) IdPORT_IMAP4 ( 4031) Connect ( 1161) Login ( 1174) Username ( 1248) Password (
1247) Host ( 1245)

TIdIMAP4.RetrieveOnSelect Property
Specifies data to automatically retrieve ( 1176) from the mailbox when a mailbox is selected.

Internet Direct (Indy) Version 10.1.5 1247


TIdIMAP4 Class Classes

Pascal
property RetrieveOnSelect: TIdRetrieveOnSelect;
Description
RetrieveOnSelect is a TIdRetrieveOnSelect ( 2973) property that indicates the data to be automatically retrieved when selecting
an IMAP4 mailbox.

rsHeaders indicates that only message headers are loaded for messages in the mailbox.

rsMessages indicates that complete messages are loaded from the mailbox.

rsDisabled indicates that no message data is loaded from the mailbox.

RetrieveOnSelect is used in the SelectMailBox ( 1205) and the ExamineMailBox ( 1167) methods to determine if any message
data should be loaded in the MailBox ( 1245) that represents the currently selected mailbox.

The default value for RetrieveOnSelect is rsDisabled as assigned during initialization of the component.

See Also
TIdRetrieveOnSelect ( 2973) SelectMailBox ( 1205) ExamineMailBox ( 1167)

TIdIMAP4.SASLMechanisms Property
SASL authentication mechanisms supported on the remote IMAP4 server.

Pascal
property SASLMechanisms: TIdSASLEntries;
Description
SASLMechanisms is a TIdSASLList property that identifies the Simple Authentication and Security Layer (SASL) authentication
mechanisms supported on the connection to the remote IMAP4 server.

SASLMechanisms is updated in the Login ( 1174) method when the AuthType ( 1244) property contains the value atSASL, and
the Capabilities ( 690) property includes the AUTHENTICATE directive that indicates supports for the feature on the remote
IMAP4 server.

For additional information about SASL authentication, please refer to the following documentation:

IANA Official Simple Authentication and Security Layer Mechanisms

See Also
Login ( 1174) Capabilities ( 690) AuthType ( 1244)

TIdIMAP4.Username Property
Identifies the user name for IMAP4 server authentication.

Pascal
property Username;
Description
Username is a published String property that identifies the user (or account) to be used for connection and authentication to the
IMAP4 server.

Username and Password ( 1247) are used in the Login ( 1174) method, and in Connect ( 1161) when automatic login ( 1174)
is selected, to perform authentication for the connection to the remote IMAP4 server.

Use AuthType ( 1244) to determine the authentication mechanism used for the connection.

See Also
Password ( 1247) Connect ( 1161) Login ( 1174) AuthType ( 1244)

1248 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4 Class

TIdIMAP4.UseTLS Property
Indicates Transport-Level Security is used on the connection.

Pascal
property UseTLS;
Description
UseTLS is a Published TIdUseTLS ( 2982) property that indicates the level of Transport Layer Security (TLS) required for the
TIdIMAP4 ( 1150) client.

Values in UseTLS and SupportsTLS ( 690) are used in the Login ( 1174) method to determine if the IMAP4 STARTTLS
command is issued to perform TLS handshaking and negotiation for the client connection.

Use Capabilities ( 690) to determine if the remote IMAP4 server contains support for TLS.

See Also
Login ( 1174) Capabilities ( 690)

TIdIMAP4 Events
The Events of the TIdIMAP4 class are listed here.

Events
Event Description
OnAlert ( 1249) Event handler triggered for IMAP4 ALERT response codes found in server responses.
OnWorkBeginForPart ( 1249) Event handler signalled when starting retrieval of a message part for the IMAP4 client.
OnWorkEndForPart ( 1250) Event handler signalled when completing retrieval of a message part for the IMAP4 client.
OnWorkForPart ( 1250) Event handler signalled during retrieval of a message part for the IMAP4 client.

Legend
Event

TIdIMAP4.OnAlert Event
Event handler triggered for IMAP4 ALERT response codes found in server responses.

Pascal
property OnAlert: TIdAlertEvent;
Description
OnAlert is a TIdAlertEvent ( 3004) property that represents the event handler triggered when the IMAP4 ALERT response code is
retrieved for a message in an IMAP4 server response. OnAlert is triggered once for each message with the ALERT response code
during parsing of server responses in the SelectMailBox ( 1205) and ExamineMailBox ( 1167) methods.

OnAlert allows the application to present the human-readable text from the server response that contains the special alert
associated with the message. Applications must assign a procedure to the event handler to allow responding to the event
notification.

TIdIMAP4.OnWorkBeginForPart Event
Event handler signalled when starting retrieval of a message part for the IMAP4 client.

Pascal
property OnWorkBeginForPart: TWorkBeginEvent;
Description
OnWorkBeginForPart is a TWorkBeginEvent ( 3120) property that represents the event handler signalled when starting to read or

Internet Direct (Indy) Version 10.1.5 1249


TIdIMAP4PeerContext Class Classes

write a message part using the IMAP4 client.

OnWorkBeginForPart, OnWorkEndForPart ( 1250), and OnWorkForPart ( 1250) are used internally in the implementation of
methods like Retrieve ( 1176), UIDRetrieve ( 1214), AppendMsg ( 1156), AppendMsgNoEncodeFromFile ( 1158), and
AppendMsgNoEncodeFromStream ( 1159). When assigned, the event handlers are assigned to the TIdTCPStream ( 2381)
instance used to read or write the message part for the operation.

Applications must assign a procedure to the OnWorkBeginForPart, OnWorkEndForPart ( 1250), and OnWorkForPart ( 1250)
event handlers to allow responding to the event notifications.

See Also
OnWorkEndForPart ( 1250) OnWorkForPart ( 1250) TIdTCPStream ( 2381) Retrieve ( 1176) UIDRetrieve ( 1214)
AppendMsg ( 1156) AppendMsgNoEncodeFromFile ( 1158) AppendMsgNoEncodeFromStream ( 1159)

TIdIMAP4.OnWorkEndForPart Event
Event handler signalled when completing retrieval of a message part for the IMAP4 client.

Pascal
property OnWorkEndForPart: TWorkEndEvent;
Description
OnWorkEndForPart is a TWorkEndEvent ( 3121) property that represents the event handler signalled when completing a read or
write operation for a message part using the IMAP4 client.

OnWorkBeginForPart ( 1249), OnWorkEndForPart, and OnWorkForPart ( 1250) are used internally in the implementation of
methods like Retrieve ( 1176), UIDRetrieve ( 1214), AppendMsg ( 1156), AppendMsgNoEncodeFromFile ( 1158), and
AppendMsgNoEncodeFromStream ( 1159). When assigned, the event handlers are assigned to the TIdTCPStream ( 2381)
instance used to read or write the message part for the operation.

Applications must assign a procedure to the OnWorkBeginForPart ( 1249), OnWorkEndForPart, and OnWorkForPart ( 1250)
event handlers to allow responding to the event notifications.

See Also
OnWorkBeginForPart ( 1249) OnWorkForPart ( 1250) TIdTCPStream ( 2381) Retrieve ( 1176) UIDRetrieve ( 1214)
AppendMsg ( 1156) AppendMsgNoEncodeFromFile ( 1158) AppendMsgNoEncodeFromStream ( 1159)

TIdIMAP4.OnWorkForPart Event
Event handler signalled during retrieval of a message part for the IMAP4 client.

Pascal
property OnWorkForPart: TWorkEvent;
Description
OnWorkForPart is a TWorkEvent ( 3121) property that represents the event handler signalled during execution of a read or write
operation for a message part using the IMAP4 client.

OnWorkBeginForPart ( 1249), OnWorkEndForPart ( 1250), and OnWorkForPart are used internally in the implementation of
methods like Retrieve ( 1176), UIDRetrieve ( 1214), AppendMsg ( 1156), AppendMsgNoEncodeFromFile ( 1158), and
AppendMsgNoEncodeFromStream ( 1159). When assigned, the event handlers are assigned to the TIdTCPStream ( 2381)
instance used to read or write the message part for the operation.

Applications must assign a procedure to the OnWorkBeginForPart ( 1249), OnWorkEndForPart ( 1250), and OnWorkForPart
event handlers to allow responding to the event notifications.

See Also
OnWorkBeginForPart ( 1249) OnWorkEndForPart ( 1250) TIdTCPStream ( 2381) Retrieve ( 1176) UIDRetrieve ( 1214)
AppendMsg ( 1156) AppendMsgNoEncodeFromFile ( 1158) AppendMsgNoEncodeFromStream ( 1159)

1250 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4PeerContext Class

TIdIMAP4PeerContext Class
File
IdIMAP4Server ( 4668)

Hierarchy

Pascal
TIdIMAP4PeerContext = class(TIdContext);
Description
TIdIMAP4PeerContext is a TIdContext ( 376) descendant

See Also
TIdContext ( 376)

TIdIMAP4PeerContext Members
The following tables list the members exposed by TIdIMAP4PeerContext.

Properties
Property Description
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
Data ( 2332) A user-specified object with values used during execution of the task.
LoginName ( 1253)
MailBox ( 1253)
TagData ( 1253)
UsingTLS ( 1253)
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 1252)
Destroy ( 1252)
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

Internet Direct (Indy) Version 10.1.5 1251


TIdIMAP4PeerContext Class Classes

TIdIMAP4PeerContext Methods
The Methods of the TIdIMAP4PeerContext class are listed here.

Methods
Method Description
Create ( 1252)
Destroy ( 1252)

Legend
Constructor
virtual

TIdIMAP4PeerContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); override;
Parameters
Parameters Description
AConnection Peer connection for the client.
AYarn Thread or fiber for execution the client connections task.
AList List of session contexts that owns the new session context.

Description
Create is the reintroduced constructor for the client session context.

AConnection is the peer connection for the client session created in a listener thread for the server.

AYarn is the thread or fiber to use when executing the task for the client connection created in a listener thread for the server.

AList is the list of session contexts that exist in the server, and owns the new session context.

Create calls the inherited constructor using AYarn as the owner of the task. Create stores the value in AConnection in the
Connection property. The value in AList is stored in a private member used for the other session contexts that exist in the server.
When AList contains a valid non-null instance, the new session context from the constructor is added to the internal list of session
contexts.

Use Destroy to free the session context.

See Also
Connection

Destroy

TIdIMAP4PeerContext.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden method procedure

1252 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

TIdIMAP4PeerContext Properties
The Properties of the TIdIMAP4PeerContext class are listed here.

Properties
Property Description
LoginName ( 1253)
MailBox ( 1253)
TagData ( 1253)
UsingTLS ( 1253)

Legend
Property
read only

TIdIMAP4PeerContext.LoginName Property
Pascal
property LoginName: string;
Description
LoginName is a Public string property

TIdIMAP4PeerContext.MailBox Property
Pascal
property MailBox: TIdMailBox;
Description
MailBox is a Public TIdMailBox ( 1481) property

TIdIMAP4PeerContext.TagData Property
Pascal
property TagData: TIdIMAP4Tag;
Description
TagData is a Public TIdIMAP4Tag ( 1265) property

TIdIMAP4PeerContext.UsingTLS Property
Pascal
property UsingTLS: boolean;
Description
UsingTLS is a Public read-only boolean property

TIdIMAP4Server Class
File
IdIMAP4Server ( 4668)

Internet Direct (Indy) Version 10.1.5 1253


TIdIMAP4Server Class Classes

Hierarchy

Pascal
TIdIMAP4Server = class(TIdExplicitTLSServer);
Description
TIdIMAP4Server is a TIdExplicitTLSServer ( 691) descendant

See Also
TIdExplicitTLSServer ( 691)

TIdIMAP4Server Members
The following tables list the members exposed by TIdIMAP4Server.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPassword ( 1256)
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MailBoxSeparator ( 1257)
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
RootPath ( 1257)
SaferMode ( 1257)
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
UseDefaultMechanismsForUnassignedCommands
( 1257)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1256)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.

1254 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCmd ( 1258)
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnBeforeSend ( 1258)
OnCommandAPPEND ( 1258)
OnCommandAUTHENTICATE ( 1259)
OnCommandCAPABILITY ( 1259)
OnCommandCHECK ( 1259)
OnCommandCLOSE ( 1259)
OnCommandCOPY ( 1259)
OnCommandCREATE ( 1259)
OnCommandDELETE ( 1259)
OnCommandError ( 1260)
OnCommandEXAMINE ( 1260)
OnCommandEXPUNGE ( 1260)
OnCommandFETCH ( 1260)
OnCommandLIST ( 1260)
OnCommandLOGIN ( 1260)
OnCommandLOGOUT ( 1261)
OnCommandLSUB ( 1261)
OnCommandNOOP ( 1261)
OnCommandRENAME ( 1261)
OnCommandSEARCH ( 1261)
OnCommandSELECT ( 1261)
OnCommandSTATUS ( 1261)
OnCommandSTORE ( 1262)
OnCommandSUBSCRIBE ( 1262)
OnCommandUID ( 1262)
OnCommandUNSUBSCRIBE ( 1262)
OnCommandX ( 1262)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDefMechCopyMessage ( 1262)
OnDefMechCreateMailBox ( 1263)
OnDefMechDeleteMailBox ( 1263)
OnDefMechDeleteMessage ( 1263)
OnDefMechDoesImapMailBoxExist ( 1263)
OnDefMechGetFileNameToWriteAppendMessage
( 1263)
OnDefMechGetMessageHeader ( 1263)
OnDefMechGetMessageRaw ( 1263)
OnDefMechGetMessageSize ( 1264)
OnDefMechGetNextFreeUID ( 1264)
OnDefMechIsMailBoxOpen ( 1264)
OnDefMechListMailBox ( 1264)
OnDefMechNameAndMailBoxToPath ( 1264)
OnDefMechOpenMailBox ( 1264)
OnDefMechReinterpretParamAsMailBox ( 1265)
OnDefMechRenameMailBox ( 1265)
OnDefMechSetupMailbox ( 1265)
OnDefMechUpdateNextFreeUID ( 1265)
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.

Internet Direct (Indy) Version 10.1.5 1255


TIdIMAP4Server Class Classes

OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIMAP4Server Methods
The Methods of the TIdIMAP4Server class are listed here.

Methods
Method Description
Destroy ( 1256)

Legend
Destructor
virtual

TIdIMAP4Server.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden method procedure

TIdIMAP4Server Properties
The Properties of the TIdIMAP4Server class are listed here.

Properties
Property Description
DefaultPassword ( 1256)
MailBoxSeparator ( 1257)
RootPath ( 1257)
SaferMode ( 1257)
UseDefaultMechanismsForUnassignedCommands
( 1257)

Legend
Property
read only

TIdIMAP4Server.DefaultPassword Property
Pascal
property DefaultPassword: string;
Description
DefaultPassword is a Published string property

1256 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

TIdIMAP4Server.MailBoxSeparator Property
Pascal
property MailBoxSeparator: Char;
Description
MailBoxSeparator is a Published read-only Char property

TIdIMAP4Server.RootPath Property
Pascal
property RootPath: string;
Description
RootPath is a Published string property

TIdIMAP4Server.SaferMode Property
Pascal
property SaferMode: Boolean;
Description
SaferMode is a Published Boolean property default value is False

TIdIMAP4Server.UseDefaultMechanismsForUnassignedCommands Property
Pascal
property UseDefaultMechanismsForUnassignedCommands: Boolean;
Description
UseDefaultMechanismsForUnassignedCommands is a Published Boolean property default value is True

TIdIMAP4Server Events
The Events of the TIdIMAP4Server class are listed here.

Events
Event Description
OnBeforeCmd ( 1258)
OnBeforeSend ( 1258)
OnCommandAPPEND ( 1258)
OnCommandAUTHENTICATE ( 1259)
OnCommandCAPABILITY ( 1259)
OnCommandCHECK ( 1259)
OnCommandCLOSE ( 1259)
OnCommandCOPY ( 1259)
OnCommandCREATE ( 1259)
OnCommandDELETE ( 1259)
OnCommandError ( 1260)
OnCommandEXAMINE ( 1260)
OnCommandEXPUNGE ( 1260)
OnCommandFETCH ( 1260)
OnCommandLIST ( 1260)
OnCommandLOGIN ( 1260)
OnCommandLOGOUT ( 1261)

Internet Direct (Indy) Version 10.1.5 1257


TIdIMAP4Server Class Classes

OnCommandLSUB ( 1261)
OnCommandNOOP ( 1261)
OnCommandRENAME ( 1261)
OnCommandSEARCH ( 1261)
OnCommandSELECT ( 1261)
OnCommandSTATUS ( 1261)
OnCommandSTORE ( 1262)
OnCommandSUBSCRIBE ( 1262)
OnCommandUID ( 1262)
OnCommandUNSUBSCRIBE ( 1262)
OnCommandX ( 1262)
OnDefMechCopyMessage ( 1262)
OnDefMechCreateMailBox ( 1263)
OnDefMechDeleteMailBox ( 1263)
OnDefMechDeleteMessage ( 1263)
OnDefMechDoesImapMailBoxExist ( 1263)
OnDefMechGetFileNameToWriteAppendMessage
( 1263)
OnDefMechGetMessageHeader ( 1263)
OnDefMechGetMessageRaw ( 1263)
OnDefMechGetMessageSize ( 1264)
OnDefMechGetNextFreeUID ( 1264)
OnDefMechIsMailBoxOpen ( 1264)
OnDefMechListMailBox ( 1264)
OnDefMechNameAndMailBoxToPath ( 1264)
OnDefMechOpenMailBox ( 1264)
OnDefMechReinterpretParamAsMailBox ( 1265)
OnDefMechRenameMailBox ( 1265)
OnDefMechSetupMailbox ( 1265)
OnDefMechUpdateNextFreeUID ( 1265)

Legend
Event

TIdIMAP4Server.OnBeforeCmd Event
Pascal
property OnBeforeCmd: TIdIMAP4CommandBeforeEvent;
Description
OnBeforeCmd is a Published TIdIMAP4CommandBeforeEvent ( 3032) event handler property

TIdIMAP4Server.OnBeforeSend Event
Pascal
property OnBeforeSend: TIdIMAP4CommandBeforeSendEvent;
Description
OnBeforeSend is a Published TIdIMAP4CommandBeforeSendEvent ( 3033) event handler property

TIdIMAP4Server.OnCommandAPPEND Event
Pascal
property OnCommandAPPEND: TIMAP4CommandEvent;
Description
OnCommandAPPEND is a Published TIMAP4CommandEvent ( 3098) event handler property

1258 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

TIdIMAP4Server.OnCommandAUTHENTICATE Event
Pascal
property OnCommandAUTHENTICATE: TIMAP4CommandEvent;
Description
OnCommandAUTHENTICATE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandCAPABILITY Event
Pascal
property OnCommandCAPABILITY: TIMAP4CommandEvent;
Description
OnCommandCAPABILITY is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandCHECK Event
Pascal
property OnCommandCHECK: TIMAP4CommandEvent;
Description
OnCommandCHECK is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandCLOSE Event
Pascal
property OnCommandCLOSE: TIMAP4CommandEvent;
Description
OnCommandCLOSE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandCOPY Event
Pascal
property OnCommandCOPY: TIMAP4CommandEvent;
Description
OnCommandCOPY is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandCREATE Event
Pascal
property OnCommandCREATE: TIMAP4CommandEvent;
Description
OnCommandCREATE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandDELETE Event
Pascal
property OnCommandDELETE: TIMAP4CommandEvent;

Internet Direct (Indy) Version 10.1.5 1259


TIdIMAP4Server Class Classes

Description
OnCommandDELETE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandError Event
Pascal
property OnCommandError: TIMAP4CommandEvent;
Description
OnCommandError is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandEXAMINE Event
Pascal
property OnCommandEXAMINE: TIMAP4CommandEvent;
Description
OnCommandEXAMINE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandEXPUNGE Event
Pascal
property OnCommandEXPUNGE: TIMAP4CommandEvent;
Description
OnCommandEXPUNGE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandFETCH Event
Pascal
property OnCommandFETCH: TIMAP4CommandEvent;
Description
OnCommandFETCH is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandLIST Event
Pascal
property OnCommandLIST: TIMAP4CommandEvent;
Description
OnCommandLIST is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandLOGIN Event
Pascal
property OnCommandLOGIN: TIMAP4CommandEvent;
Description
OnCommandLOGIN is a Published TIMAP4CommandEvent ( 3098) event handler property

1260 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

TIdIMAP4Server.OnCommandLOGOUT Event
Pascal
property OnCommandLOGOUT: TIMAP4CommandEvent;
Description
OnCommandLOGOUT is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandLSUB Event
Pascal
property OnCommandLSUB: TIMAP4CommandEvent;
Description
OnCommandLSUB is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandNOOP Event
Pascal
property OnCommandNOOP: TIMAP4CommandEvent;
Description
OnCommandNOOP is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandRENAME Event
Pascal
property OnCommandRENAME: TIMAP4CommandEvent;
Description
OnCommandRENAME is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandSEARCH Event
Pascal
property OnCommandSEARCH: TIMAP4CommandEvent;
Description
OnCommandSEARCH is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandSELECT Event
Pascal
property OnCommandSELECT: TIMAP4CommandEvent;
Description
OnCommandSELECT is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandSTATUS Event
Pascal
property OnCommandSTATUS: TIMAP4CommandEvent;

Internet Direct (Indy) Version 10.1.5 1261


TIdIMAP4Server Class Classes

Description
OnCommandSTATUS is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandSTORE Event
Pascal
property OnCommandSTORE: TIMAP4CommandEvent;
Description
OnCommandSTORE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandSUBSCRIBE Event
Pascal
property OnCommandSUBSCRIBE: TIMAP4CommandEvent;
Description
OnCommandSUBSCRIBE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandUID Event
Pascal
property OnCommandUID: TIMAP4CommandEvent;
Description
OnCommandUID is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandUNSUBSCRIBE Event
Pascal
property OnCommandUNSUBSCRIBE: TIMAP4CommandEvent;
Description
OnCommandUNSUBSCRIBE is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnCommandX Event
Pascal
property OnCommandX: TIMAP4CommandEvent;
Description
OnCommandX is a Published TIMAP4CommandEvent ( 3098) event handler property

TIdIMAP4Server.OnDefMechCopyMessage Event
Pascal
property OnDefMechCopyMessage: TIdIMAP4DefMech7;
Description
OnDefMechCopyMessage is a Published TIdIMAP4DefMech7 ( 3036) event handler property

1262 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Server Class

TIdIMAP4Server.OnDefMechCreateMailBox Event
Pascal
property OnDefMechCreateMailBox: TIdIMAP4DefMech1;
Description
OnDefMechCreateMailBox is a Published TIdIMAP4DefMech1 ( 3033) event handler property

TIdIMAP4Server.OnDefMechDeleteMailBox Event
Pascal
property OnDefMechDeleteMailBox: TIdIMAP4DefMech1;
Description
OnDefMechDeleteMailBox is a Published TIdIMAP4DefMech1 ( 3033) event handler property

TIdIMAP4Server.OnDefMechDeleteMessage Event
Pascal
property OnDefMechDeleteMessage: TIdIMAP4DefMech6;
Description
OnDefMechDeleteMessage is a Published TIdIMAP4DefMech6 ( 3035) event handler property

TIdIMAP4Server.OnDefMechDoesImapMailBoxExist Event
Pascal
property OnDefMechDoesImapMailBoxExist: TIdIMAP4DefMech1;
Description
OnDefMechDoesImapMailBoxExist is a Published TIdIMAP4DefMech1 ( 3033) event handler property

TIdIMAP4Server.OnDefMechGetFileNameToWriteAppendMessage Event
Pascal
property OnDefMechGetFileNameToWriteAppendMessage: TIdIMAP4DefMech14;
Description
OnDefMechGetFileNameToWriteAppendMessage is a Published TIdIMAP4DefMech14 ( 3034) event handler property

TIdIMAP4Server.OnDefMechGetMessageHeader Event
Pascal
property OnDefMechGetMessageHeader: TIdIMAP4DefMech9;
Description
OnDefMechGetMessageHeader is a Published TIdIMAP4DefMech9 ( 3036) event handler property

TIdIMAP4Server.OnDefMechGetMessageRaw Event
Pascal
property OnDefMechGetMessageRaw: TIdIMAP4DefMech10;

Internet Direct (Indy) Version 10.1.5 1263


TIdIMAP4Server Class Classes

Description
OnDefMechGetMessageRaw is a Published TIdIMAP4DefMech10 ( 3033) event handler property

TIdIMAP4Server.OnDefMechGetMessageSize Event
Pascal
property OnDefMechGetMessageSize: TIdIMAP4DefMech8;
Description
OnDefMechGetMessageSize is a Published TIdIMAP4DefMech8 ( 3036) event handler property

TIdIMAP4Server.OnDefMechGetNextFreeUID Event
Pascal
property OnDefMechGetNextFreeUID: TIdIMAP4DefMech3;
Description
OnDefMechGetNextFreeUID is a Published TIdIMAP4DefMech3 ( 3035) event handler property

TIdIMAP4Server.OnDefMechIsMailBoxOpen Event
Pascal
property OnDefMechIsMailBoxOpen: TIdIMAP4DefMech1;
Description
OnDefMechIsMailBoxOpen is a Published TIdIMAP4DefMech1 ( 3033) event handler property

TIdIMAP4Server.OnDefMechListMailBox Event
Pascal
property OnDefMechListMailBox: TIdIMAP4DefMech5;
Description
OnDefMechListMailBox is a Published TIdIMAP4DefMech5 ( 3035) event handler property

TIdIMAP4Server.OnDefMechNameAndMailBoxToPath Event
Pascal
property OnDefMechNameAndMailBoxToPath: TIdIMAP4DefMech3;
Description
OnDefMechNameAndMailBoxToPath is a Published TIdIMAP4DefMech3 ( 3035) event handler property

TIdIMAP4Server.OnDefMechOpenMailBox Event
Pascal
property OnDefMechOpenMailBox: TIdIMAP4DefMech11;
Description
OnDefMechOpenMailBox is a Published TIdIMAP4DefMech11 ( 3033) event handler property

1264 Internet Direct (Indy) Version 10.1.5


Classes TIdIMAP4Tag Class

TIdIMAP4Server.OnDefMechReinterpretParamAsMailBox Event
Pascal
property OnDefMechReinterpretParamAsMailBox: TIdIMAP4DefMech12;
Description
OnDefMechReinterpretParamAsMailBox is a Published TIdIMAP4DefMech12 ( 3034) event handler property

TIdIMAP4Server.OnDefMechRenameMailBox Event
Pascal
property OnDefMechRenameMailBox: TIdIMAP4DefMech4;
Description
OnDefMechRenameMailBox is a Published TIdIMAP4DefMech4 ( 3035) event handler property

TIdIMAP4Server.OnDefMechSetupMailbox Event
Pascal
property OnDefMechSetupMailbox: TIdIMAP4DefMech2;
Description
OnDefMechSetupMailbox is a Published TIdIMAP4DefMech2 ( 3034) event handler property

TIdIMAP4Server.OnDefMechUpdateNextFreeUID Event
Pascal
property OnDefMechUpdateNextFreeUID: TIdIMAP4DefMech13;
Description
OnDefMechUpdateNextFreeUID is a Published TIdIMAP4DefMech13 ( 3034) event handler property

TIdIMAP4Tag Class
File
IdIMAP4Server ( 4668)

Hierarchy

Pascal
TIdIMAP4Tag = class(TObject);
Description
TIdIMAP4Tag is a TObject descendant

See Also
TObject

Internet Direct (Indy) Version 10.1.5 1265


TIdImapMessagePart Class Classes

TIdIMAP4Tag Members
The following tables list the members exposed by TIdIMAP4Tag.

Legend
Data Member

TIdIMAP4Tag Fields
The Fields of the TIdIMAP4Tag class are listed here.

Legend
Data Member

TIdIMAP4Tag.IMAP4Tag Field
Pascal
IMAP4Tag: String;
Description
IMAP4Tag

TIdIMAPLineStruct Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
TIdIMAPLineStruct = class(TObject);
Description
TIdIMAPLineStruct is a TObject descendant.

See Also
TObject

TIdImapMessagePart Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
TIdImapMessagePart = class(TIdCollectionItem);

1266 Internet Direct (Indy) Version 10.1.5


Classes TIdImapMessagePart Class

Description
TIdImapMessagePart is a TIdCollectionItem ( 3011) descendant.

See Also
TIdCollectionItem ( 3011)

TIdImapMessagePart Members
The following tables list the members exposed by TIdImapMessagePart.

Properties
Property Description
BodySubType ( 1268)
BodyType ( 1268)
Boundary ( 1268)
ContentTransferEncoding ( 1268)
Description ( 1269)
Encoding ( 1269)
FileName ( 1269)
ImapPartNumber ( 1269)
ParentPart ( 1269)
Size ( 1269)
UnparsedEntry ( 1269)

Methods
Method Description
Create ( 1267)

Legend
Constructor
virtual
Property

TIdImapMessagePart Methods
The Methods of the TIdImapMessagePart class are listed here.

Methods
Method Description
Create ( 1267)

Legend
Constructor
virtual

TIdImapMessagePart.Create Constructor
Pascal
constructor Create(
Collection: TIdCollection
); override;
Parameters
Parameters Description
Collection Type is TIdCollection ( 3011).

Internet Direct (Indy) Version 10.1.5 1267


TIdImapMessagePart Class Classes

Description
Create is a overridden constructor for the object instance.

TIdImapMessagePart Properties
The Properties of the TIdImapMessagePart class are listed here.

Properties
Property Description
BodySubType ( 1268)
BodyType ( 1268)
Boundary ( 1268)
ContentTransferEncoding ( 1268)
Description ( 1269)
Encoding ( 1269)
FileName ( 1269)
ImapPartNumber ( 1269)
ParentPart ( 1269)
Size ( 1269)
UnparsedEntry ( 1269)

Legend
Property

TIdImapMessagePart.BodySubType Property
Pascal
property BodySubType: String;
Description
BodySubType is a Public String property. Write access for the property is implemented using FBodySubType.

TIdImapMessagePart.BodyType Property
Pascal
property BodyType: String;
Description
BodyType is a Public String property. Write access for the property is implemented using FBodyType.

TIdImapMessagePart.Boundary Property
Pascal
property Boundary: string;
Description
Boundary is a Public string property. Write access for the property is implemented using FBoundary.

TIdImapMessagePart.ContentTransferEncoding Property
Pascal
property ContentTransferEncoding: String;
Description
ContentTransferEncoding is a Public String property. Write access for the property is implemented using

1268 Internet Direct (Indy) Version 10.1.5


Classes TIdImapMessagePart Class

FContentTransferEncoding.

TIdImapMessagePart.Description Property
Pascal
property Description: String;
Description
is a Public String property. Write access for the property is implemented using FDescription.

TIdImapMessagePart.Encoding Property
Pascal
property Encoding: TIdMessageEncoding;
Description
Encoding is a Public TIdMessageEncoding ( 2968) property. Write access for the property is implemented using FEncoding.

TIdImapMessagePart.FileName Property
Pascal
property FileName: String;
Description
FileName is a Public String property. Write access for the property is implemented using FFileName.

TIdImapMessagePart.ImapPartNumber Property
Pascal
property ImapPartNumber: string;
Description
ImapPartNumber is a Public string property. Write access for the property is implemented using FImapPartNumber.

TIdImapMessagePart.ParentPart Property
Pascal
property ParentPart: integer;
Description
ParentPart is a Public integer property. Write access for the property is implemented using FParentPart.

TIdImapMessagePart.Size Property
Pascal
property Size: integer;
Description
Size is a Public integer property. Write access for the property is implemented using FSize.

TIdImapMessagePart.UnparsedEntry Property
Pascal
property UnparsedEntry: string;

Internet Direct (Indy) Version 10.1.5 1269


TIdImapMessageParts Class Classes

Description
UnparsedEntry is a Public string property. Write access for the property is implemented using FUnparsedEntry.

TIdImapMessageParts Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
TIdImapMessageParts = class(TIdOwnedCollection);
Description
TIdImapMessageParts is a TIdOwnedCollection ( 3072) descendant.

See Also
TIdOwnedCollection ( 3072)

TIdImapMessageParts Members
The following tables list the members exposed by TIdImapMessageParts.

Properties
Property Description
Items ( 1271)

Methods
Method Description
Add ( 1270)

Legend
Method
Property

TIdImapMessageParts Methods
The Methods of the TIdImapMessageParts class are listed here.

Methods
Method Description
Add ( 1270)

Legend
Method

TIdImapMessageParts.Add Method
Pascal
function Add: TIdImapMessagePart;

1270 Internet Direct (Indy) Version 10.1.5


Classes TIdInAddr Class

Returns
TIdImapMessagePart ( 1266)

Description
Add is a method.

Add returns a TIdImapMessagePart ( 1266) value.

TIdImapMessageParts Properties
The Properties of the TIdImapMessageParts class are listed here.

Properties
Property Description
Items ( 1271)

Legend
Property

TIdImapMessageParts.Items Property
Pascal
property Items [Index: Integer]: TIdImapMessagePart;
Description
Items is a Public TIdImapMessagePart ( 1266) property. Write access for the property is implemented using SetItem.

Items is the default property for the object instance.

TIdInAddr Class
Represents IP addresses for the Indy library.

File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdInAddr = class(TIdLongWord);
Description
TIdInAddr is a packed record type that represents an IP address based on the compiler define in effect when the Indy libray is
compiled. If IPv6 is defined, IP addresses are represented using the TIdIn6Addr ( 2959) record type. Otherwise, the TIdIn4Addr (
2959) record type is used for IP addresses.

See Also
TIdIn6Addr ( 2959)

TIdIn4Addr ( 2959)

Internet Direct (Indy) Version 10.1.5 1271


TIdInitializerComponent Class Classes

TIdInAddr Members
The following tables list the members exposed by TIdInAddr.

Properties
Property Description
BytesLen ( 2537)
s_b1 ( 1468)
s_b2 ( 1468)
s_b3 ( 1468)
s_b4 ( 1468)
s_l ( 1468)
s_w1 ( 1469)
s_w2 ( 1469)

Methods
Method Description
CopyFrom ( 1272)
create ( 1467)
create ( 2262)
create ( 2536)
ReadStruct ( 2262)
ReadStruct ( 2536)
WriteStruct ( 2262)
WriteStruct ( 2536)

Legend
Method
virtual
Property
read only

TIdInAddr Methods
The Methods of the TIdInAddr class are listed here.

Methods
Method Description
CopyFrom ( 1272)

Legend
Method

TIdInAddr.CopyFrom Method
Pascal
procedure CopyFrom(
const ASource: TIdInAddr
);
Parameters
Parameters Description
ASource Scope is const. Type is TIdInAddr ( 1271).

Description
CopyFrom is a method.

1272 Internet Direct (Indy) Version 10.1.5


Classes TIdInitializerComponent Class

TIdInitializerComponent Class
Ancestor for Indy component classes that accounts for differences between constructors in .Net and VCL.

File
IdBaseComponent ( 4588)

Hierarchy

Pascal
[DesignTimeVisible(false), ToolboxItem(false)]
TIdInitializerComponent = class(TIdNativeComponent);
Description
TIdInitializerComponent is a TIdNativeComponent ( 3061) descendant that acts as an ancestor class for Indy components.
TIdInitializerComponent is used to consolidate differences between constructors as implemented in the .Net and VCL environments.

In the .Net environment, constructors (for visual components) are generally called without arguments. In the VCL environment,
constructors (for visual components) are generally called with an owner for free notifications.

TIdInitializerComponent accounts for these differences by implementing overloaded constructors for both platforms that accept the
expected arguments.

TIdInitializerComponent also implements the protected virtual procedure InitComponent which eliminates the need for overridden
constructors in descendant classes used as visual components. Descendant classes can override the InitComponent method to
perform component initialization operations that were traditionally reserved for overridden (or overloaded) constructors.

Notes
For the .Net environment, initialization sections are not called unless a reference has been added for the unit. Delphi for .NET
makes initializations and globals part of a "Unit" class. So initialization sections wont get called until the Unit class is used. Delphi 8,
2005, and 2006 EXEs are ok, but assemblies (ie VS.NET and probably asms in some cases when used from a D8 EXE) do not call
their initialization sections. InitComponent is used to loop through the list of classes in the assembly, and for each named Unit the
class constructor which causes the initialization section to be called.

See Also
TIdBaseComponent ( 266)

TIdNativeComponent ( 3061)

TIdInitializerComponent Members
The following tables list the members exposed by TIdInitializerComponent.

Methods
Method Description
Create ( 1274)

Legend
Constructor
virtual

TIdInitializerComponent Methods
The Methods of the TIdInitializerComponent class are listed here.

Internet Direct (Indy) Version 10.1.5 1273


TIdInitializerComponent Class Classes

Methods
Method Description
Create ( 1274)

Legend
Constructor
virtual

TIdInitializerComponent.Create Constructor
Overload List

Method Description
TIdInitializerComponent.Create () ( Constructor for the object instance.
1274)
TIdInitializerComponent.Create Constructor for the object instance.
(TIdNativeComponent) ( 1274)

TIdInitializerComponent.Create Constructor ()
Constructor for the object instance.

Pascal
constructor Create; virtual; overload; reintroduce;
Description
Create is an overloaded virtual Constructor for the object instance.

For the .Net environment, Create calls the inherited Create method and calls the protected InitComponent method to perform
initialization tasks for the new object instance.

For platforms implementing the Borland VCL, Create calls the overloaded Create method using an owner with the value Nil.

See Also
TIdInitializerComponent.Create

TIdInitializerComponent.Create Constructor (TIdNativeComponent)


Constructor for the object instance.

Pascal
constructor Create(
AOwner: TIdNativeComponent
); override; overload;
Description
AOwner - Owner of the object instance.

Create is an overloaded overridden Constructor for the object instance.

Create is overloaded to provide a VCL-compatible constructor that specifies the owner for free notifications in the AOwner
parameter. AOwner can contains the value Nil when no owner is specified.

Create calls the inherited Create method using AOwner as an argument.

Create calls the protected InitComponent method to perform initialization tasks for the new object instance.

Notes
Descendant classes can override the InitComponent method to perform component initialization operations that were traditionally
reserved for overridden (or overloaded) constructors.

1274 Internet Direct (Indy) Version 10.1.5


Classes TIdInterceptSimLog Class

See Also
TIdInitializerComponent.Create

TIdInterceptSimLog Class
Writes log file entries for data sent and received using the connection intercept.

File
IdInterceptSimLog ( 4669)

Hierarchy

Pascal
TIdInterceptSimLog = class(TIdConnectionIntercept);
Description
TIdInterceptSimLog is a TIdConnectionIntercept ( 368) descendant that implements a mechanism used to perform logging
activities when data if read from or written to the connection for an intercept.

TIdInterceptSimLog provides a Filename ( 1280) property that indicates the file to use for storing log file entries. The log file is
recreated each time the connection for the intercept is connected.

TIdInterceptSimLog performs logging using string outputs instead of binary so that the results can be viewed and modified with any
ASCII file editor. Most Send ( 1278) and/or Receive ( 1277) operations includes a writeln (or EOL ( 3202) marker), but may not
always. TIdInterceptSimLog writes an additional EOL ( 3202) marker to guarantee separation between lines in the log file.

TIdInterceptSimLog, like all TIdConnectionIntercept ( 368) descendants, can be assigned to an TIdIOHandler ( 1284) instance to
provide data from the IOHandler.

See Also
TIdConnectionIntercept ( 368)

TIdIOHandler ( 1284)

TIdInterceptSimLog Members
The following tables list the members exposed by TIdInterceptSimLog.

Properties
Property Description
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Filename ( 1280) Filename for the connection intercept log file.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Connect ( 1276)
Create ( 267) Constructor for the object instance.
Disconnect ( 1277) Closes the log file and the connection for an intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Receive ( 1277) Receives data and writes log entries for the intercept.
Send ( 1278) Sends data and writes log entries for the intercept.

Internet Direct (Indy) Version 10.1.5 1275


TIdInterceptSimLog Class Classes

CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdInterceptSimLog Methods
The Methods of the TIdInterceptSimLog class are listed here.

Methods
Method Description
Connect ( 1276)
Disconnect ( 1277) Closes the log file and the connection for an intercept.
Receive ( 1277) Receives data and writes log entries for the intercept.
Send ( 1278) Sends data and writes log entries for the intercept.

Legend
Method
virtual

TIdInterceptSimLog.Connect Method
Pascal
procedure Connect(
AConnection: TIdNativeComponent
); override;
Parameters
Parameters Description
AConnection Connection ( 371) for the log file intercept.

Description
Connect is an overridden procedure used to establish the Connection ( 371) for the log file intercept.

Connect calls the inherited Connect method.

Connect creates an internal TIdStreamVCL ( 2709) used to write log file entries. The stream instance relies on a TFileStream for
the file indicated in Filename ( 1280), and is recreated each time the Connect method is executed.

Warning! Connect will overwrite an existing file.

Use Disconnect ( 1277) to free the TIdStream ( 3087) instance and close the connection for the log file intercept.

See Also
TIdInterceptSimLog.Filename ( 1280)

TIdInterceptSimLog.Disconnect ( 1277)

TIdStreamVCL ( 2709)

1276 Internet Direct (Indy) Version 10.1.5


Classes TIdInterceptSimLog Class

TIdInterceptSimLog.Disconnect Method
Closes the log file and the connection for an intercept.

Pascal
procedure Disconnect; override;
Description
Disconnect is an overridden procedure in TIdInterceptSimLog ( 1275) used to close the log file in Filename ( 1280), and allows
the intercept for a Connection ( 371) be closed.

Disconnect frees the internal TIdStreamVCL ( 2709) instance used for the log file in Filename ( 1280).

Disconnect calls the inherited Disconnect method.

Use Connect ( 1276) to open the log file for the intercept.

See Also
TIdInterceptSimLog.Connect ( 1276)

TIdInterceptSimLog.Filename ( 1280)

TIdStreamVCL ( 2709)

TIdInterceptSimLog.Receive Method
Receives data and writes log entries for the intercept.

Pascal
procedure Receive(
var ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Buffer containing data from the connection for the intercept.

Description
Receive is an overridden procedure used to capture data and write log entries for the intercept. ABuffer contains the data read from
the connection for the intercept.

Receive calls the inherited method, and writes a log entry to the file indicated in Filename ( 1280). Log entries include the
operation performed followed by the contents in ABuffer (minus any binary characters). A blank line is written between log file
entries.

For example:
Recv:EOL
220 mail..com (IMail 8.00 6073-1) NT-ESMTP Server X1

Send:EOL
EHLO Kudzu

Recv:Bytes:135
250-mail.bogus.com says hello
250-SIZE 0
250-8BITMIME
250-DSN
250-ETRN
250-AUTH LOGIN CRAM-MD5
250-AUTH=LOGIN
250 EXPN

Send:EOL
RSET

Internet Direct (Indy) Version 10.1.5 1277


TIdInterceptSimLog Class Classes

Recv:EOL
250 ok its reset

Send:EOL
MAIL FROM:<john@doe.org>

Recv:EOL
250 ok

Send:EOL
RCPT TO:<jane@doe.org>

Recv:EOL
250 ok its for <jane@doe.org>

Send:EOL
DATA

Recv:EOL
354 ok, send it; end with <CRLF>.<CRLF>

Send:Bytes:133
From: "John Doe" <john@doe.org>
Subject: Test
To: jane@doe.org
In-Reply-To: Test
Date: Sun, 5 Jan 1975 00:00:00 +0200

Send:EOL

Send:EOL
Test Message

Send:EOL

Send:EOL
.

Recv:EOL
250 Message queued

Send:EOL
QUIT

Recv:EOL
221 Goodbye

TIdInterceptSimLog.Send Method
Sends data and writes log entries for the intercept.

Pascal
procedure Send(
var ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Buffer containing data sent on the connection for the intercept.

Description
Send is an overridden procedure used to capture data and write log entries for the intercept. ABuffer contains the data sent using
the connection for the intercept.

Send calls the inherited method, and writes a log entry to the file indicated in Filename ( 1280). Log entries include the operation
performed followed by the contents in ABuffer (minus any binary characters). A blank line is written between log file entries.

For example:

1278 Internet Direct (Indy) Version 10.1.5


Classes TIdInterceptSimLog Class

Recv:EOL
220 mail..com (IMail 8.00 6073-1) NT-ESMTP Server X1

Send:EOL
EHLO Kudzu

Recv:Bytes:135
250-mail.bogus.com says hello
250-SIZE 0
250-8BITMIME
250-DSN
250-ETRN
250-AUTH LOGIN CRAM-MD5
250-AUTH=LOGIN
250 EXPN

Send:EOL
RSET

Recv:EOL
250 ok its reset

Send:EOL
MAIL FROM:<john@doe.org>

Recv:EOL
250 ok

Send:EOL
RCPT TO:<jane@doe.org>

Recv:EOL
250 ok its for <jane@doe.org>

Send:EOL
DATA

Recv:EOL
354 ok, send it; end with <CRLF>.<CRLF>

Send:Bytes:133
From: "John Doe" <john@doe.org>
Subject: Test
To: jane@doe.org
In-Reply-To: Test
Date: Sun, 5 Jan 1975 00:00:00 +0200

Send:EOL

Send:EOL
Test Message

Send:EOL

Send:EOL
.

Recv:EOL
250 Message queued

Send:EOL
QUIT

Recv:EOL
221 Goodbye

TIdInterceptSimLog Properties
The Properties of the TIdInterceptSimLog class are listed here.

Internet Direct (Indy) Version 10.1.5 1279


TIdInterceptThrottler Class Classes

Properties
Property Description
Filename ( 1280) Filename for the connection intercept log file.

Legend
Property

TIdInterceptSimLog.Filename Property
Filename for the connection intercept log file.

Pascal
property Filename: string;
Description
Filename is a string property that identifies the file to be used for logging messages read from and written to the connection
intercept.

Filename is recreated each time Connect ( 1276) is called for the connection intercept.

Changing the value in Filename after calling Connect ( 1276) will raised an EIdException ( 76) with the message
RSLogFileAlreadyOpen. Set the value for Filename prior to calling Connect ( 1276), or after calling Disconnect ( 1277).

See Also
TIdInterceptSimLog.Connect ( 1276)

TIdInterceptSimLog.Disconnect ( 1277)

TIdInterceptThrottler Class
Implements a connection intercept that limits throughput to a target value.

File
IdInterceptThrottler ( 4670)

Hierarchy

Pascal
TIdInterceptThrottler = class(TIdConnectionIntercept);
Description
TIdInterceptThrottler is a TIdConnectionIntercept ( 368) descendant that implements a connection intercept with the capability to
restrict throughput on the connection to a target number of bits per second.

TIdInterceptThrottler provides overridden Send ( 1282) and Receive ( 1281) methods that implement bandwidth checking and
preservation using the target value indicated in BitsPerSec ( 1283).

See Also
TIdConnectionIntercept ( 368)

TIdInterceptThrottler Members
The following tables list the members exposed by TIdInterceptThrottler.

1280 Internet Direct (Indy) Version 10.1.5


Classes TIdInterceptThrottler Class

Properties
Property Description
BitsPerSec ( 1283) Indicates the upper limit for throughput on the connection intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Connect ( 369)
Create ( 267) Constructor for the object instance.
Disconnect ( 369) Responds to socket disconnection notifications.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Receive ( 1281) Implements bandwidth checking for the receive operation.
Send ( 1282) Implements bandwidth checking for the Send operation.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdInterceptThrottler Methods
The Methods of the TIdInterceptThrottler class are listed here.

Methods
Method Description
Receive ( 1281) Implements bandwidth checking for the receive operation.
Send ( 1282) Implements bandwidth checking for the Send operation.

Legend
Method
virtual

TIdInterceptThrottler.Receive Method
Implements bandwidth checking for the receive operation.

Pascal
procedure Receive(
var ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Values to be used in the operation.

Internet Direct (Indy) Version 10.1.5 1281


TIdInterceptThrottler Class Classes

Description
Receive is an overridden procedure used to implement bandwidth checking for the connection intercept. Receive ensures that
throughput on the Connection ( 371) does not exceed the value indicated in BitsPerSec ( 1283).

Receive calls the inherited method to get the data in ABuffer from the Intercept ( 372) and IOHandler for the Connection ( 371).

When BitsPerSec ( 1283) contains a positive non-zero value, Receive causes the connection intercept to pause using
TIdAntiFreezeBase.Sleep ( 221).

Use Send ( 1282) to make data in a buffer availble to the Intercept ( 372) and IOHandler for the Connection ( 371).

See Also
TIdInterceptThrottler.BitsPerSec ( 1283)

TIdInterceptThrottler.Send ( 1282)

TIdAntiFreezeBase.Sleep ( 221)

TIdInterceptThrottler.Send Method
Implements bandwidth checking for the Send operation.

Pascal
procedure Send(
var ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Values to be used in the operation.

Description
Send is an overridden procedure used to implement bandwidth checking for the connection intercept. Send ensures that throughput
on the Connection ( 371) does not exceed the value indicated in BitsPerSec ( 1283).

Send calls the inherited method to transmit the data in ABuffer to the Intercept ( 372) and IOHandler for the Connection ( 371).

When BitsPerSec ( 1283) contains a positive non-zero value, Send causes the connection intercept to pause using
TIdAntiFreezeBase.Sleep ( 221).

Use Receive ( 1281) to get data in a buffer availble from the Intercept ( 372) and IOHandler for the Connection ( 371).

See Also
TIdInterceptThrottler.BitsPerSec ( 1283)

TIdInterceptThrottler.Receive ( 1281)

TIdAntiFreezeBase.Sleep ( 221)

TIdInterceptThrottler Properties
The Properties of the TIdInterceptThrottler class are listed here.

Properties
Property Description
BitsPerSec ( 1283) Indicates the upper limit for throughput on the connection intercept.

Legend
Property

1282 Internet Direct (Indy) Version 10.1.5


Classes TIdInterfacedObject Class

TIdInterceptThrottler.BitsPerSec Property
Indicates the upper limit for throughput on the connection intercept.

Pascal
property BitsPerSec: Integer;
Description
BitsPerSec is an Integer property that indicates the upper limit for throughput on the connection intercept.

BitsPerSec is used in Send ( 1282) and Receive ( 1281), and will cause the connection intercept to call
TIdAntiFreezeBase.Sleep ( 221) when the number of bits (8 bits per byte) in the buffer for the operation exceeds the target value
in BitsPerSec.

Set the value in BitsPerSec prior to calling Connect ( 369).

See Also
TIdInterceptThrottler.Receive ( 1281)

TIdInterceptThrottler.Send ( 1282)

TIdInterfacedObject Class
File
IdGlobalProtocols ( 4654)

Hierarchy

Pascal
TIdInterfacedObject = class(TInterfacedObject);
Description
TIdInterfacedObject is a TInterfacedObject descendant.

See Also
TInterfacedObject

TIdInterfacedObject Members
The following tables list the members exposed by TIdInterfacedObject.

Methods
Method Description
_AddRef ( 1284)
_Release ( 1284)

Legend
Method

TIdInterfacedObject Methods
The Methods of the TIdInterfacedObject class are listed here.

Internet Direct (Indy) Version 10.1.5 1283


TIdIOHandler Class Classes

Methods
Method Description
_AddRef ( 1284)
_Release ( 1284)

Legend
Method

TIdInterfacedObject._AddRef Method
Pascal
function _AddRef: Integer;
Returns
Integer

Description
_AddRef is a method.

_AddRef returns a Integer value.

TIdInterfacedObject._Release Method
Pascal
function _Release: Integer;
Returns
Integer

Description
_Release is a method.

_Release returns a Integer value.

TIdIOHandler Class
Defines the framework for input and output using Indy components.

File
IdIOHandler ( 4670)

Hierarchy

Pascal
TIdIOHandler = class(TIdComponent);
Description
TIdIOHandler is a TIdComponent ( 355) descendant that defines the framework used to perform input and output operations for
Indy components.

TIdIOHandler defines the mechanism used to provide buffered access to data read from or written to a connection using TIdBuffer
( 279). Special purpose buffers are also available for sending and receiving large chunks of data, and accumulating data written to
a connection for less frequent transmission.

TIdIOHandler implements the common method required to perform IO operations for a connection. These methods include reading

1284 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

and writing common data types using its buffering mechanism. TIdIOHandler also includes methods for direct reads and writes that
bypass the buffering mechanism.

TIdIOHandler also specifies convenience methods used to create ( 267) an IOHandler for a client connection, determine when an
IOHandler is ready to perform an IO operation, and trigger events when data is sent and received using the IO handler.

The properties, methods, and events in TIdIOHandler generally belong to the following usage categories:

Category Property, Method, or Event


Configuration Destination ( 1325)
Host ( 1325)
MaxCapturedLines ( 1327)
MaxLineLength ( 1327)
Port ( 1329)
ConnectTimeout ( 1324)
ReadTimeout ( 1330)
RecvBufferSize ( 1330)
SendBufferSize ( 1331)
Connection CheckForDataOnSource ( 1294)
State
CheckForDisconnect ( 1295)
Close ( 1295)
CloseGracefully ( 1296)
ClosedGracefully ( 1324)
Connected ( 1296)
Open ( 1300)
Opened ( 1329)
ReadLnTimedout ( 1330)
Readable ( 1300)
Buffers and InputBuffer ( 1325)
Buffering
InputBufferAsString ( 1297)
InputBufferIsEmpty ( 1297)
InputBufferToStream ( 1298)
WriteBufferCancel ( 1317)
WriteBufferClear ( 1317)
WriteBufferClose ( 1318)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
WriteBufferThreshhold ( 1331)
WriteBufferingActive ( 1319)
Read Operations AllData ( 1289)
Capture ( 1290)
InputLn ( 1298)
ReadBytes ( 1301)

Internet Direct (Indy) Version 10.1.5 1285


TIdIOHandler Class Classes

ReadCardinal ( 1301)
ReadChar ( 1302)
ReadInt64 ( 1302)
ReadInteger ( 1303)
ReadLn ( 1304)
ReadLnSplit ( 1306)
ReadLnWait ( 1307)
ReadSmallInt ( 1307)
ReadStream ( 1308)
ReadString ( 1309)
ReadStrings ( 1310)
WaitFor ( 1311)
Write ( 1312) Write ( 1312)
Operations
WriteDirect ( 1321)
WriteLn ( 1322)
WriteFile ( 1321)
Connection OnWork ( 1328)
Events
OnWorkBegin ( 1328)
OnWorkEnd ( 1329)
MaxLineAction ( 1327)
Intercept ( 1326)

TIdIOHandler contains abstract methods. Applications normally create ( 267) instances of a descendant class, like
TIdIOHandlerSocket ( 1331), TIdIOHandlerStack ( 1342), or TIdIOHandlerStream ( 1348) that implement the abstract virtual
methods of this ancestor class.

See Also
TIdComponent ( 355)

TIdIOHandlerSocket ( 1331)

TIdIOHandlerStack ( 1342)

TIdIOHandlerStream ( 1348)

IndySupport ( 15)

TIdIOHandler Members
The following tables list the members exposed by TIdIOHandler.

Properties
Property Description
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
Destination ( 1325) Endpoint for the IOHandler connection.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.

1286 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.
MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1330) Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.
RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
WriteBufferThreshhold ( 1331)

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForDataOnSource ( 1294) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1295) Checks state and status information on the transport for the IO handler.
Close ( 1295) Closes the IO handler and associated Intercepts and transports.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1296) Indicates the connection is open ( 1300), or data exists in the Indy buffer.
Create ( 267) Constructor for the object instance.
Destroy ( 1296) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.
InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.
InputLn ( 1298) Reads a line of data from the connection.
MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1300) Prepares the IOHandler for subsequent read and write ( 1312) requests.
Readable ( 1300) Indicates if the IOHandler is ready to perform a read request.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
CType ( 267)
Create ( 1274)
Capture ( 1290)
ReadLn ( 1304)
Write ( 1311)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.

Internet Direct (Indy) Version 10.1.5 1287


TIdIOHandler Class Classes

WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteDirect ( 1321) Moves values to the socket-level transport for the IOHandler.
WriteFile ( 1321) Writes the contents of a local file to the IOHandler.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdIOHandler Methods
The Methods of the TIdIOHandler class are listed here.

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
Capture ( 1290)
CheckForDataOnSource ( 1294) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1295) Checks state and status information on the transport for the IO handler.
Close ( 1295) Closes the IO handler and associated Intercepts and transports.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1296) Indicates the connection is open ( 1300), or data exists in the Indy buffer.
Destroy ( 1296) Frees the object instance.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.
InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.
InputLn ( 1298) Reads a line of data from the connection.
MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1300) Prepares the IOHandler for subsequent read and write ( 1312) requests.
Readable ( 1300) Indicates if the IOHandler is ready to perform a read request.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLn ( 1304)
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.

1288 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Write ( 1311)
WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferFlush ( 1318)
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteBufferOpen ( 1320)
WriteDirect ( 1321) Moves values to the socket-level transport for the IOHandler.
WriteFile ( 1321) Writes the contents of a local file to the IOHandler.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Legend
Method
virtual
abstract

TIdIOHandler.AfterAccept Method
Specifies the method used to initialize an IOHandler after a new connection request.

Pascal
procedure AfterAccept; virtual;
Description
AfterAccept is a virtual procedure in TIdIOHandler ( 1284) that specifies the mechanism used to initialize an IOHandler after a
listener thread for a server has detected a client connection request.

AfterAccept must be implemented in a descendant class, like TIdServerIOHandlerSocket ( 1996), to allow any operation needed
prior to calling Accept for the socket binding in the newly detected client connection.

See Also
TIdSimpleServer ( 2007)

TIdServerIOHandlerSocket ( 1996)

TIdIOHandler.AllData Method
Retrieves all data from a connection.

Pascal
function AllData: string; virtual;
Returns
string - Data read from the connection.

Description
AllData is a virtual String function that retrieves data from a peer connection until the connection is closed.

AllData triggers the OnWorkBegin ( 1328) event handler by calling BeginWork ( 356).

While the connection is open ( 1300), AllData calls CheckForDataOnSource ( 1294) to determine if data is available on the
underlying data source. Data is accumulated by calling InputBufferAsString ( 1297) until the connection is closed. The return value
for the method consists of the accumulated string values from InputBufferAsString ( 1297).

AllData triggers the OnWorkEnd ( 1329) event handler by calling EndWork ( 358).

Do not use AllData unless the communications protocol supports using the connection in this manner. Protocols which support
AllData include Finger, Quote of the Day, and WhoIs.

Internet Direct (Indy) Version 10.1.5 1289


TIdIOHandler Class Classes

See Also
TIdIOHandler.CheckForDataOnSource ( 1294)

TIdIOHandler.InputBufferAsString ( 1297) TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.Capture Method
Overload List

Method Description
TIdIOHandler.Capture (TIdStream) ( Reads data from the connection into the specified stream.
1290)
TIdIOHandler.Capture (TIdStream, Reads data from the connection into the specified object.
Integer, string, Boolean) ( 1291)
TIdIOHandler.Capture (TIdStream, Reads data from the connection into the specified object.
string, Boolean) ( 1291)
TIdIOHandler.Capture (TIdStrings) ( Reads data from the connection into the specified object.
1292)
TIdIOHandler.Capture (TIdStrings, Reads data from the connection into the specified object.
Integer, string, Boolean) ( 1293)
TIdIOHandler.Capture (TIdStrings, Reads data from the connection into the specified object.
string, Boolean) ( 1293)

TIdIOHandler.Capture Method (TIdStream)


Reads data from the connection into the specified stream.

Pascal
procedure Capture(
ADest: TIdStream
); overload;
Parameters
Parameters Description
ADest Type is TIdStream ( 3087).

Description
Capture is an overloaded procedure used to read data from the connection for the IOHandler into the destination specified by
ADest. If ADest contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the
message RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and
TIdStrings ( 3089) as the data type for ADest.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

See Also
Capture

EIdObjectTypeNotSupported ( 126)

OnWorkBegin ( 1328)

OnWorkEnd ( 1329)

1290 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

ReadLn ( 1304)

TIdIOHandler.Capture Method (TIdStream, Integer, string, Boolean)


Reads data from the connection into the specified object.

Pascal
procedure Capture(
ADest: TIdStream;
out VLineCount: Integer;
const ADelim: string = '.';
AIsRFCMessage: Boolean = True
); overload;
Parameters
Parameters Description
ADest Storage for the captured data values.
VLineCount Number of lines resulting from the capture.
ADelim Delimiter for captured data values. Default value is '.'.
AIsRFCMessage Captured data is an RFC 2822 message. Default value is True.

Description
Capture is an overloaded procedure used to read data from the connection into the destination specified by ADest. If ADest
contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the message
RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and TIdStrings
( 3089) as the data type for ADest.

VLineCount is used to return the number of lines resulting from the capture operation using the specified delimiter.

ADelim is the delimiter used to determine if all data has been read from the connection. ADelim will appear as a line with no other
data when all data has been captured. The default delimiter is '.', as used in most RFC-compliant protocols.

AIsRFCMessage indicates that Capture is reading an RFC 2822 Internet message format where a line may contain the characters
'..'. Capture will convert this character sequence to a single '.' character. A single '.' character in a line indicates the end of the RFC
822 message.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

See Also
EIdObjectTypeNotSupported ( 126)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.Capture Method (TIdStream, string, Boolean)


Reads data from the connection into the specified object.

Pascal
procedure Capture(
ADest: TIdStream;
ADelim: string;
AIsRFCMessage: Boolean = True
); overload;

Internet Direct (Indy) Version 10.1.5 1291


TIdIOHandler Class Classes

Parameters
Parameters Description
ADest Storage for the captured data values.
ADelim Delimiter for captured data values. Default value is '.'.
AIsRFCMessage Captured data is an RFC 2822 message. Default value is True.

Description
Capture is an overloaded procedure used to read data from the connection into the destination specified by ADest. If ADest
contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the message
RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and TIdStrings
( 3089) as the data type for ADest.

ADelim is the delimiter used to determine if all data has been read from the connection. ADelim will appear as a line with no other
data when all data has been captured. The default delimiter is '.', as used in most RFC-compliant protocols.

AIsRFCMessage indicates that Capture is reading an RFC 2822 internet message format where a line may contain the characters
'..'. Capture will convert this character sequence to a single '.' character. A single '.' character in a line indicates the end of the RFC
2822 message.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

See Also
EIdObjectTypeNotSupported ( 126)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.Capture Method (TIdStrings)


Reads data from the connection into the specified object.

Pascal
procedure Capture(
ADest: TIdStrings
); overload;
Parameters
Parameters Description
ADest Storage for the captured data values.

Description
Capture is an overloaded procedure used to read data from the connection into the destination specified by ADest. If ADest
contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the message
RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and TIdStrings
( 3089) as the data type for ADest.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

1292 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

See Also
EIdObjectTypeNotSupported ( 126)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.Capture Method (TIdStrings, Integer, string, Boolean)


Reads data from the connection into the specified object.

Pascal
procedure Capture(
ADest: TIdStrings;
out VLineCount: Integer;
const ADelim: string = '.';
AIsRFCMessage: Boolean = True
); overload;
Parameters
Parameters Description
ADest Storage for the captured data values.
VLineCount Number of lines resulting from the capture.
ADelim Delimiter for captured data values. Default value is '.'.
AIsRFCMessage Captured data is an RFC 2822 message. Default value is True.

Description
Capture is an overloaded procedure used to read data from the connection into the destination specified by ADest. If ADest
contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the message
RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and TIdStrings
( 3089) as the data type for ADest.

VLineCount is used to return the number of lines resulting from the capture operation using the specified delimiter.

ADelim is the delimiter used to determine if all data has been read from the connection. ADelim will appear as a line with no other
data when all data has been captured. The default delimiter is '.', as used in most RFC-compliant protocols.

AIsRFCMessage indicates that Capture is reading an RFC 2822 Internet message format where a line may contain the characters
'..'. Capture will convert this character sequence to a single '.' character. A single '.' character in a line indicates the end of the RFC
2822 message.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

See Also
EIdObjectTypeNotSupported ( 126)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.Capture Method (TIdStrings, string, Boolean)


Reads data from the connection into the specified object.

Internet Direct (Indy) Version 10.1.5 1293


TIdIOHandler Class Classes

Pascal
procedure Capture(
ADest: TIdStrings;
const ADelim: string;
AIsRFCMessage: Boolean = True
); overload;
Parameters
Parameters Description
ADest Storage for the captured data values.
ADelim Delimiter for captured data values. Default value is '.'.
AIsRFCMessage Captured data is an RFC 2822 message. Default value is True.

Description
Capture is an overloaded procedure used to read data from the connection into the destination specified by ADest. If ADest
contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported ( 126) exception with the message
RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream ( 3087) and TIdStrings
( 3089) as the data type for ADest.

ADelim is the delimiter used to determine if all data has been read from the connection. ADelim will appear as a line with no other
data when all data has been captured. The default delimiter is '.', as used in most RFC-compliant protocols.

AIsRFCMessage indicates that Capture is reading an RFC 2822 Internet message format where a line may contain the characters
'..'. Capture will convert this character sequence to a single '.' character. A single '.' character in a line indicates the end of the RFC
822 message.

Capture triggers the OnWorkBegin ( 1328) event handler with wmRead mode before reading data from the connection. Capture
calls ReadLn ( 1304) to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to
ADest upon receipt. Capture triggers the OnWorkEnd ( 1329) event handler with wmRead mode when all data has been captured
from the connection.

Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 ( 1150) and TIdNNTP ( 1692).

See Also
EIdObjectTypeNotSupported ( 126)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.CheckForDataOnSource Method
Determine if data is available in the unbuffered communication layer for the connection.

Pascal
procedure CheckForDataOnSource(
ATimeout: Integer = 0
); virtual; abstract;
Parameters
Parameters Description
ATimeout Milliseconds to wait for the connection to become readable ( 1300), or to return data.

Description
CheckForDataOnSource is an abstract virtual procedure in TIdIOHandler ( 1284). CheckForDataOnSource must be overridden in
a descendant class to allow inspection of the unbuffered data in the source for the connection.

CheckForDataOnSource is used to determine when new data is available to be added to the buffering mechanism in Indy.

ATimeout indicates the number of milliseconds to wait for the connection to become readable ( 1300), or to return data values for
the read operation. A descendant class can use ATimeout when appropriate for the transport mechanism.

1294 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

CheckForDataOnSource will generally rely on the protected ReadFromSource method to retrieve unbuffered data from the
communications layer, and to add the values to an Indy buffer for subsequent processing.

ReadFromSource is an abstract virtual method in TIdIOHandler ( 1284), and must be implemented in descendant classes that
provide access to a transport for the IOHandler.

TIdIOHandler.CheckForDisconnect Method
Checks state and status information on the transport for the IO handler.

Pascal
procedure CheckForDisconnect(
ARaiseExceptionIfDisconnected: Boolean = True;
AIgnoreBuffer: Boolean = False
); virtual; abstract;
Parameters
Parameters Description
ARaiseExceptionIfDisconnected Indicates if exceptions are raised when the connection has closed prematurely.
AIgnoreBuffer Indicates if data in the Indy buffer is ignored when the connection has closed prematurely.

Description
CheckForDisconnect is an abstract virtual procedure in TIdIOHandler ( 1284). CheckForDisconnect must be overridden in a
descendant class to allow inspecting the status of the connection prior to or following a method call that performs an IO operation.

CheckForDisconnect is used primarily to ensure that state and status properties for the IOHandler are synchronized with the
underlying transport mechanism.

In descendant classes, CheckForDisconnect must not delay when inspecting the connection. The method should not raise any
exceptions directly, but may call methods in the descendant designed for that purpose when ARaiseExceptionIfDisconnected
contains True.

CheckForDisconnect may trigger the OnStatus ( 359) event handler for the connection if the connection state has changed based
on values detected in the method.

See Also
TIdIOHandlerStack ( 1342)

TIdIOHandlerStream ( 1348)

TIdIOHandlerStack.CheckForDisconnect ( 1345)

TIdIOHandler.Close Method
Closes the IO handler and associated Intercepts and transports.

Pascal
procedure Close; virtual;
Description
Close is a virtual procedure in TIdIOHandler ( 1284). Close ensures that an assigned Intercept ( 1326) for the connection is also
disconnected when the IO handler is closed.

Close sets the value in the Opened ( 1329) property to False.

Close may be overidden in descendant classes when the transport requires special handling during closing of the connection.

Use Open ( 1300) to reset the IOHandler and open ( 1300) the receive and InputBuffer ( 1325) for the IOHandler.

See Also
TIdIOHandler.Opened ( 1329)

TIdIOHandler.InputBuffer ( 1325)

Internet Direct (Indy) Version 10.1.5 1295


TIdIOHandler Class Classes

TIdIOHandlerStream.Close ( 1352)

TIdIOHandler.CloseGracefully Method
Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.

Pascal
procedure CloseGracefully; virtual;
Description
CloseGracefully is a procedure used to update the value in the ClosedGracefully ( 1324) property that indicates the connection
has been closed by the peer.

See Also
TIdIOHandler.ClosedGracefully ( 1324)

TIdIOHandler.Connected ( 1296)

TIdIOHandler.ReadStream ( 1308)

TIdIOHandler.Connected Method
Indicates the connection is open ( 1300), or data exists in the Indy buffer.

Pascal
function Connected: Boolean; virtual;
Returns
Boolean - True when the connection is open ( 1300), or data exists in the Indy buffer.

Description
Connected is a Boolean function used to indicate that connection for the IOHandler has been established, and that the internal
buffer is assigned or contains existing data.

Connected calls CheckForDisconnect ( 1295) to synchronize properties that reflect the connection state of the transport for the
IOHandler.

The return value for the function is True when the InputBuffer ( 1325) contains exisiting data, or when ClosedGracefully ( 1324)
is False and the InputBuffer ( 1325) is assigned.

Connected is used in ReadStream ( 1308) and AllData ( 1289) to determine if unread data in InputBuffer ( 1325) should be
handled or more data read from the transport for the IOHandler.

See Also
TIdIOHandler.ClosedGracefully ( 1324)

TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy calls Close ( 1295) to disable the connection for the IOHandler.

Destroy also frees and releases resources allocated to the receive buffer for the transport and the InputBuffer ( 1325) property.

1296 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Destroy calls the inherited destructor prior to exit from the method.

See Also
TIdIOHandler.Close ( 1295)

TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.InputBufferAsString Method
Provides access to the contents of the Indy input buffer in string form.

Pascal
function InputBufferAsString: string;
Returns
string - Contents from the Indy input buffer in string form.

Description
InputBufferAsString is a string function that provides access to the contents of the InputBuffer ( 1325) for the Indy connection.

InputBufferAsString can be used to access any data stored in the InputBuffer ( 1325) for the IOHandler connection.

The return value for InputBufferAsString represents the entire contents of InputBuffer ( 1325). The return values are retrieved and
removed from InputBuffer ( 1325) using this method.

InputBufferAsString is used in the implementation of WaitFor ( 1311) and AllData ( 1289).

Use InputBufferToStream ( 1298) to access the contents of the Indy input buffer as a TIdStream ( 3087) instance.

Use InputBufferIsEmpty ( 1297) to determine if any unhandled data exists in InputBuffer ( 1325).

See Also
TIdBuffer ( 279)

TIdIOHandler.InputBufferToStream ( 1298)

TIdIOHandler.InputBufferIsEmpty ( 1297)

TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.WaitFor ( 1311)

TIdIOHandler.AllData ( 1289)

TIdIOHandler.InputBufferIsEmpty Method
Indicates the input buffer for the IOHandler does not contain any data.

Pascal
function InputBufferIsEmpty: Boolean;
Returns
Boolean - True when the input buffer is empty.

Description
InputBufferIsEmpty is a Boolean function used to indicate if the InputBuffer ( 1325) for the IOHandler contains any unhandled data.

InputBufferIsEmpty uses InputBuffer ( 1325) to determine if the buffer has been assigned, and to get the existing length of the
buffer.

See Also
TIdIOHandler.InputBuffer ( 1325)

Internet Direct (Indy) Version 10.1.5 1297


TIdIOHandler Class Classes

TIdIOHandler.InputBufferToStream Method
Stores the contents of the input buffer to a stream.

Pascal
procedure InputBufferToStream(
AStream: TIdStream;
AByteCount: Integer = -1
);
Parameters
Parameters Description
AStream Stream used to store the contents of the input buffer.
AByteCount Number of bytes to retrieve from the input buffer. Default value is -1.

Description
InputBufferToStream is a procedure used to store the contents of the InputBuffer ( 1325) buffer for the IOHandler to the stream
specified in AStream.

AStream is the TIdStream ( 3087) instance to use for storing the values found in the input buffer for the IOHandler.

AByteCount indicates the number of bytes to retrieve from the input buffer. The default value is -1, and indicates that all existing
data in the buffer should be retrieved.

InputBufferToStream extracts the requested number of bytes in AByteCount from InputBuffer ( 1325), and writes the values to
AStream.

See Also
TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.InputLn Method
Reads a line of data from the connection.

Pascal
function InputLn(
const AMask: String = '';
AEcho: Boolean = True;
ATabWidth: Integer = 8;
AMaxLineLength: Integer = -1
): String; virtual;
Parameters
Parameters Description
AMask Character to echo instead of the value read from the connection.
AEcho Indicates if echoing is enabled.
ATabWidth Number of space characters to use to represent a TAB ( 4393).
AMaxLineLength Maximum line length allowed for data read from the connection.

Returns
String - Values read from the IOHandler connection.

Description
InputLn is a virtual String function used to read a single line of data from the connection for the IOHandler.

AMaxLineLength indicates the maximum line length allowed for data read from the connection. When AMaxLineLength contains -1,
the value in MaxLineLength ( 1327) is used for the maximum line length.

InputLn reads data one character at a time from the connection for the IOHandler, and accumulates values read from the
connection as the return value for the function. Trailing CR ( 3174) and LF ( 4341) characters are truncated from the return value.

When AEcho is True, values read from the connection are written back to the connection, with special handling provided for the

1298 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

TAB ( 4393) and BACKSPACE ( 3137) characters.

TAB ( 4393) characters are echoed as a string of CHAR32 ( 3169) values with the length indicated in ATabWidth when
ATabWidth contains a positive non-zero value.

BACKSPACE ( 3137) characters cause the last value read from the connection to be removed from the accumulated return value.
When AEcho is True, the BACKSPACE ( 3137) character is echoed with additional CHAR32 ( 3169) and BACKSPACE ( 3137)
values.

When AMask is specified, the AMask string is sent to the peer for each character received instead of the actual characters read
from the connection.

InputLn is useful when obtaining data from a user such as username, passwords, and commands.

See Also
TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.ReadChar ( 1302)

TIdIOHandler.MakeDefaultIOHandler Method
Creates an instance of the IOHandler using the default class factory.

Pascal
class function MakeDefaultIOHandler(
AOwner: TIdNativeComponent = nil
): TIdIOHandler;
Parameters
Parameters Description
AOwner Type is TIdNativeComponent ( 3061). Default value is nil.

Returns
TIdIOHandler ( 1284) - The new IOHandler class instance.

Description
MakeDefaultIOHandler is a class method used to create ( 267) an instance of the IOHandler using the default class factory in
GIOHandlerClassDefault.

TIdIOHandler.MakeIOHandler Method
Creates a new instance of an IOHandler using the specified class reference.

Pascal
class function MakeIOHandler(
ABaseType: TIdIOHandlerClass;
AOwner: TIdNativeComponent = nil
): TIdIOHandler;
Parameters
Parameters Description
ABaseType Class reference used to create ( 267) the IOHandler instance.
AOwner Component that owns the IOHandler class instance. Default value is nil.

Returns
TIdIOHandler ( 1284) - The new IOHandler class instance.

Description
MakeIOHandler is a class method used to create ( 267) a new instance of an IOHandler using the class reference specified in
ABaseType. MakeIOHandler searches GIOHandlerClassList for an IOHandlers class that inherits from the ancestor class in
ABaseType, an it is used to instantiate the class instance for the return value.

Internet Direct (Indy) Version 10.1.5 1299


TIdIOHandler Class Classes

MakeIOHandler can raise an EIdException ( 76) exception if an instance of the ancestor class is not found in
GIOHandlerClassList.

The value in AOwner is ignored at the present time.

Exceptions
Exceptions Description
EIdException ( 76) Raised with the message RSIOHandlerTypeNotInstalled and the class name for the ancestor class in
ABaseType.

TIdIOHandler.Open Method
Prepares the IOHandler for subsequent read and write ( 1312) requests.

Pascal
procedure Open; virtual;
Description
Open is a virtual procedure used to allocate buffers and reset state properties used in IOHandler methods that perform Send and
Receive operations.

Open recreates the receive buffer used when reading data from the transport for the IOHandler. Open also creates the InputBuffer
( 1325) used as internal storage for unhandled data read from the transport for the IOHandler.

Open sets ClosedGracefully ( 1324) to False and Opened ( 1329) to True.

Use Close ( 1295) to free resources allocated to the receive buffer and InputBuffer ( 1325).

See Also
TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.ClosedGracefully ( 1324)

TIdIOHandler.Close ( 1295)

TIdBuffer ( 279)

TIdIOHandler.Readable Method
Indicates if the IOHandler is ready to perform a read request.

Pascal
function Readable(
AMSec: Integer = IdTimeoutDefault
): Boolean; virtual;
Parameters
Parameters Description
AMSec Number of milliseconds to wait for an IOHandler connection to become ready for a read operation. The default
value is IdTimeoutDefault ( 4331).

Returns
Boolean - True when the connection is ready for the IO request.

Description
Readable is a virtual Boolean function that indicates if the connection for the IOHandler is ready to perform an IO request.

AMSec indicates the number of milliseconds to wait for the IOHandler connection to become ready for the read operation. The
default value is IdTimeoutDefault ( 4331).

In TIdIOHandler ( 1284), the return value for the method is False.

Readable has no significance in TIdIOHandler ( 1284), but is provided for compatibility with descendant classes that may not have
an overridden implementation of the method.

1300 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

See Also
TIdIOHandlerSocket.Readable

TIdIOHandlerStack.Readable ( 1346)

TIdIOHandler.ReadBytes Method
Perform a read request for IOHandler.

Pascal
procedure ReadBytes(
var VBuffer: TIdBytes;
AByteCount: Integer;
AAppend: boolean = true
); virtual;
Parameters
Parameters Description
VBuffer Storage for values read from the IOHandler.
AByteCount Number of bytes expected in the read request.
AAppend Indicates if values are appended to exisitng data in the buffer.

Description
ReadBytes is a virtual procedure used to perform a read request for the IOHandler.

VBuffer is the variable argument used to store values read from the data source for the IOHandler connection.

AByteCount indicates the number of byte values expected for the read request. When AByteCount contains 0 (zero), no data is
read from the data source for the IOHandler. when AByteCount contains -1, data is read from the data source until it is
disconnected or the ReadTimeout ( 1330) value has elapsed.

ReadBytes reads data from the IOHandler data source until the number of bytes in AByteCount has been accumulated in
InputBuffer ( 1325), or CheckForDisconnect ( 1295) interrupts the read request.

On successful completion of the read request, values are extracted from InputBuffer ( 1325) into VBuffer.

AAppend indicates that values extracted from the input buffer should be appended to existing data in VBuffer. When AAppend is
False, any values in VBuffer are discarded during extraction of data from InputBuffer ( 1325).

See Also
TIdBytes ( 3007)

TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.CheckForDisconnect ( 1295)

TIdIOHandler.ReadCardinal Method
Reads the ordinal data type from the IOHandler connection.

Pascal
function ReadCardinal(
AConvert: Boolean = True
): Cardinal;
Parameters
Parameters Description
AConvert Indicates the bytes order for the ordinal data type must be converted.

Returns
Cardinal - Ordinal value read from the IOHandler connection.

Internet Direct (Indy) Version 10.1.5 1301


TIdIOHandler Class Classes

Description
ReadCardinal is a Cardinal function used to read the ordinal data type from the data source for the IOHandler connection.
ReadCardinal calls ReadBytes ( 1301) to perform the read request, and calls BytesToCardinal ( 2721) to convert the byte values
to the ordinal data type.

AConvert indicates that the byte order in the return value should be converted from the Network byte order to the host-specific byte
order required for the data type. GStack ( 3126) is used to access TIdStack.NetworkToHost ( 2172) method for the byte order
conversion.

Use other methods to get a specific data type from the IOHandler connection, including:

ReadChar ( 1302)
ReadInteger ( 1303)
ReadSmallInt ( 1307)
ReadString ( 1309)

See Also
TIdIOHandler.ReadBytes ( 1301)

TIdIOHandler. BytesToCardinal ( 2721)

GStack ( 3126)

TIdStack.NetworkToHost ( 2172)

TIdIOHandler.ReadChar Method
Reads the simple data type from the IOHandler connection.

Pascal
function ReadChar: Char;
Returns
Char - Value read from the IOHandler connection.

Description
ReadChar is a Char function used to read the simple data type from the connection for the IOHandler. ReadChar calls ReadBytes
( 1301) to prepare the return value for the method.

Use other methods to get a specific data type from the IOHandler connection, including:

ReadCardinal ( 1301)
ReadInteger ( 1303)
ReadSmallInt ( 1307)
ReadString ( 1309)

See Also
TIdIOHandler.ReadBytes ( 1301)

TIdIOHandler.ReadInt64 Method
Reads a 64-bit Integer data type from the data source for the IOHandler.

1302 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Pascal
function ReadInt64(
AConvert: Boolean = True
): Int64;
Parameters
Parameters Description
AConvert Indicates if the byte order is converted from network ordering to its host-specific representation. Default value
is True.

Returns
Int64 - 64-bit Integer value read from the IOHandler.

Description
ReadInt64 is an Int64 function used to read a 64-bit Integer value from the data source for the IOHandler. ReadInt64 use
ReadBytes ( 1301) to acquire the number of bytes indicated by callint SizeOf for the Int64 data type, and passing the value to
BytesToInt64 ( 2723).

AConvert indicates if the byte order for the return value is converted from network byte order to its host-specific representation.
When AConvert contains True, the TIdStack.NetworkToHost ( 2172) method in GStack ( 3126) is called to perform the byte
order conversion.

The default value for AConvert is True.

Use ReadCardinal ( 1301), ReadSmallInt ( 1307), or ReadInteger ( 1303) to acquire other numeric data types from the
IOHandler.

See Also
TIdIOHandler.ReadCardinal ( 1301)

TIdIOHandler.ReadSmallInt ( 1307)

TIdIOHandler.ReadInteger ( 1303)

TIdIOHandler.ReadInteger Method
Reads the data type from the IOHandler connection.

Pascal
function ReadInteger(
AConvert: Boolean = True
): Integer;
Parameters
Parameters Description
AConvert Indicates the order of bytes for the ordinal data type must be converted.

Returns
Integer - Data type read from the the IOHandler connection.

Description
ReadInteger is an Integer function used to read the ordinal data type from the data source for the IOHandler connection.
ReadInteger calls ReadBytes ( 1301) to perform the read request, and calls BytesToInteger ( 2724) to convert the byte values to
the ordinal data type.

AConvert indicates that the byte order in the return value should be converted from the Network byte order to the host-specific byte
order required for the data type. GStack ( 3126) is used to access the TIdStack.NetworkToHost ( 2172) method for the byte
order conversion.

Use other methods to get a specific data type from the IOHandler connection, including:

Internet Direct (Indy) Version 10.1.5 1303


TIdIOHandler Class Classes

ReadCardinal ( 1301)
ReadChar ( 1302)
ReadSmallInt ( 1307)
ReadString ( 1309)

See Also
TIdIOHandler.ReadBytes ( 1301)

TIdIOHandler. BytesToInteger ( 2724)

GStack ( 3126)

TIdStack.NetworkToHost ( 2172)

TIdIOHandler.ReadLn Method
Overload List

Method Description
TIdIOHandler.ReadLn () ( 1304) Reads a line from the internal buffer for the IOHandler.
TIdIOHandler.ReadLn (string, Integer, Reads a line from the Indy buffer.
Integer) ( 1305)

TIdIOHandler.ReadLn Method ()
Reads a line from the internal buffer for the IOHandler.

Pascal
function ReadLn: string; overload;
Returns
String - Line read from the buffer.

Description
ReadLn is an overloaded string function used to read a single line of text from values received from the peer connection for the
IOHandler.

ReadLn is a String function that returns a a single line from the input buffer maintained for the IOHandler. This variant of the
ReadLn method uses the LF ( 4341) character as the end-of-line delimiter, and calls an overloaded variant of the method.

ReadLn retrieves data from InputBuffer ( 1325) until the end-of-line sequence is located, the maximum line length is exceeded,
the socket connection is closed, or a timeout occurs. If there is not enough data to satisfy the request, ReadLn calls
CheckForDisconnect ( 1295) to update the IOHandler status and reads data from the data source for the IOHandler connection.

ReadLn will return an empty string ('') if the peer connection is prematurely closed or a time-out occurs. If a timeout condition occurs
in ReadLn, the ReadLnTimedOut property is set to True.

ReadLn can raise an EIdReadLnMaxLineLengthExceeded ( 135) exception when the position of the end-of-line sequnce in the
InputBuffer ( 1325) is greater than the maximum line length allowed for an IOHandler using the value maException in
MaxLineAction ( 1327).

All ATerminator characters in the return value for ReadLn (including CR ( 3174) and LF ( 4341) characters) are removed prior to
exiting from the method.

See Also
TIdIOHandler.ReadLn

TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.ReadLnTimedOut

1304 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

TIdIOHandler.ReadLnSplit ( 1306)

TIdIOHandler.MaxLineLength ( 1327)

TIdIOHandler.MaxLineAction ( 1327)

IdTimeoutInfinite ( 4331)

EIdReadLnMaxLineLengthExceeded ( 135)

TIdIOHandler.ReadLn Method (string, Integer, Integer)


Reads a line from the Indy buffer.

Pascal
function ReadLn(
ATerminator: string;
ATimeout: Integer = IdTimeoutDefault;
AMaxLineLength: Integer = -1
): string; virtual; overload;
Parameters
Parameters Description
ATerminator End-of-line termination character or characters.
ATimeout Time-out in milliseconds.
AMaxLineLength Maximum length allowed for the line read from the IOHandler.

Returns
String - Line read from the buffer.

Description
ReadLn is a String function that returns a a single line from the input buffer maintained for the IOHandler.

ATerminator is an optional parameter that indicates the end-of-line symbol for the client or protocol. When ATerminator is not
specified or contains an empty string, LF ( 4341) is used as the default terminator. If data is expected and you do not need a
custom end-of-line symbol, you can use the default ATerminator value or one of the following:

Char Description
LF ( Line Feed (Decimal 10)
4341)
CR ( Carriage Return (Decimal 13)
3174)
EOL ( End-of-line (Carriage Return + Line Feed)
3202)

ATimeout allows the client to use a custom timeout value to change the number of milliseconds to wait for a response from the peer
connection before a time-out occurs. The default value for ATimeout is IdTimeoutDefault ( 4331).

AMaxLineLength is used to indictate that ReadLn cannot accept a string with a length in excess of the parameter value. The default
value for AMaxLineLength is -1, and indicates that the value in the MaxLineLength ( 1327) property should be used in ReadLn.

ReadLn retrieves data from InputBuffer ( 1325) until the symbol in ATerminator is located, AMaxLineLength is exceeded, the
socket connection is closed, or a timeout occurs. If there is not enough data to satisfy the request, ReadLn calls
CheckForDisconnect ( 1295) to update the IOHandler status and reads data from the data source for the IOHandler connection.

ReadLn will return an empty string ('') if the peer connection is prematurely closed or a time-out occurs. If a timeout condition occurs
in ReadLn, the ReadLnTimedOut property is set to True.

ReadLn can raise an EIdReadLnMaxLineLengthExceeded ( 135) exception when the position of ATerminator in InputBuffer (
1325) is greater than the value in AMaxLineLength, and MaxLineAction ( 1327) contains maException.

When MaxLineAction ( 1327) is not maException, ReadLnSplit ( 1306) is set to True and the string is extracted from InputBuffer

Internet Direct (Indy) Version 10.1.5 1305


TIdIOHandler Class Classes

( 1325).

All ATerminator characters in the return value for ReadLn (including CR ( 3174) characters) are removed prior to exiting from the
method.

See Also
TIdIOHandler.InputBuffer ( 1325)

TIdIOHandler.ReadLnTimedOut

TIdIOHandler.ReadLnSplit ( 1306)

TIdIOHandler.MaxLineLength ( 1327)

TIdIOHandler.MaxLineAction ( 1327)

IdTimeoutInfinite ( 4331)

EIdReadLnMaxLineLengthExceeded ( 135)

TIdIOHandler.ReadLnSplit Method
Reads a line from the Indy buffer.

Pascal
function ReadLnSplit(
var AWasSplit: Boolean;
ATerminator: string = LF;
ATimeout: Integer = IdTimeoutDefault;
AMaxLineLength: Integer = -1
): string;
Parameters
Parameters Description
AWasSplit Indicates the line was split based on the line length.
ATerminator End-of-line termination character or characters.
ATimeout Time-out in milliseconds.
AMaxLineLength Maximum length allowed for the line read from the IOHandler.

Returns
String - Line read from the buffer.

Description
ReadLnSplit is a String function used to read a line of text from the IOHandler. ReadLnSplit allows the text line to be separated into
additional lines when the line length exceeds the value in AMaxLineLength.

ReadLnSplit temporarily overrides the value in MaxLineAction ( 1327) to prevent an exception from being raised when the line
length exceeds AMaxLineLength.

AWasSplit is updated to indicate the line length exceeded the value in AMaxLineLength.

ATerminator is an optional parameter that indicates the end-of-line symbol for the client or protocol. When ATerminator is not
specified or contains an empty string, LF ( 4341) is used as the default terminator. If data is expected and you do not need a
custom end-of-line symbol, you can use the default ATerminator value or one of the following:

Char Description
LF ( Line Feed (Decimal 10)
4341)
CR ( Carriage Return (Decimal 13)
3174)
EOL ( End-of-line (Carriage Return + Line Feed)
3202)

1306 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

ATimeout allows the client to use a custom timeout value to change the number of milliseconds to wait for a response from the peer
connection before a time-out occurs. The default value for ATimeout is IdTimeoutDefault ( 4331).

AMaxLineLength is used to indictate that ReadLn ( 1304) cannot accept a string with a length in excess of the parameter value.
The default value for AMaxLineLength is -1, and indicates that the value in the MaxLineLength ( 1327) property should be used in
ReadLn ( 1304).

ReadLnSplit calls ReadLn ( 1304) to read data from the buffer for IOHandler.

See Also
TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.ReadLnWait Method
Waits for a line of text to be read from the IOHandler.

Pascal
function ReadLnWait(
AFailCount: Integer = MaxInt
): string; virtual;
Parameters
Parameters Description
AFailCount Number of attempts to make in reading the line of text.

Returns
string - Line of text read from the IOHandler.

Description
ReadLnWait is a string function used read a line of text from the IOHandler. ReadLnWait attempts to read a non-blank string value
using ReadLn ( 1304).

If data is not available or a timeout occurs, ReadLnWait will retry the operation until the number of attempts in AFailCount have
been exceeded. The default value is MaxInt, and essentially indicates that ReadLnWait should wait until a non-blank line is read
from the IOHandler.

Set the value in ReadTimeout ( 1330) to indicate the number of milliseconds to wait for each read before a timeout occurs ans the
attempt fails.

Use ReadLnTimedout ( 1330) to determine if the read failed due to a timeout condition.

See Also
TIdIOHandler.ReadTimeout ( 1330) TIdIOHandler.ReadLnTimedout ( 1330)

TIdIOHandler.ReadSmallInt Method
Reads the data type from the IOHandler connection.

Pascal
function ReadSmallInt(
AConvert: Boolean = True
): SmallInt;
Parameters
Parameters Description
AConvert Indicates the order of bytes for the ordinal data type must be converted.

Returns
SmallInt - Data type read from the the IOHandler connection.

Description
ReadSmallInt is a SmallInt function used to read the ordinal data type from the data source for the IOHandler connection.

Internet Direct (Indy) Version 10.1.5 1307


TIdIOHandler Class Classes

ReadSmallInt calls ReadBytes ( 1301) to perform the read request, and calls BytesToSmallInt to convert the byte values to the
ordinal data type.

AConvert indicates that the byte order in the return value should be converted from the Network byte order to the host-specific byte
order required for the data type. GStack ( 3126) is used to access the TIdStack.NetworkToHost ( 2172) method for the byte
order conversion.

Use other methods to get a specific data type from the IOHandler connection, including:

• ReadCardinal ( 1301)
• ReadChar ( 1302)
• ReadInteger ( 1303)
• ReadString ( 1309)
See Also
TIdIOHandler.ReadBytes ( 1301)

TIdIOHandler.BytesToSmallInt

GStack ( 3126)

TIdStack.NetworkToHost ( 2172)

TIdIOHandler.ReadStream Method
Reads data from the IOHandler into a stream.

Pascal
procedure ReadStream(
AStream: TIdStream;
AByteCount: Int64 = -1;
AReadUntilDisconnect: Boolean = False
); virtual;
Parameters
Parameters Description
AStream Stream used to store
AByteCount Type is Int64. Default value is -1.
AReadUntilDisconnect Type is Boolean. Default value is False.

Description
ReadStream is a method used to read data from the IOHandler into the stream instance specified in AStream. An EAssertionFailed
exception will be raised if AStream is unassigned.

AByteCount indicates the number of bytes of data to read using the IOHandler, and to store in the stream instance in AStream.

When AByteCount contains the value cSizeUnknown, the amount of data to read from the IOHandler is determined either by
reading the byte count from the IOHandler or by reading data until the connection is closed by the peer.

When AReadUntilDisconnect contains False, the byte count is read from the IOHandler. The byte count will be an Integer data type
when LargeStream ( 1326) contains False, or an Int64 value when LargeStream ( 1326) contains True. This allows the Indy
library to maintain compatibility with older VCL versions where stream sizes and positions are not returned as Int64 data types. The
byte count (from the argument or read from the IOHandler) is used to pre-allocate the stream size.

When AReadUntilDisconnect contains True, ReadStream expects the connection for the IOHandler to be closed when no more
data is available for the method.

ReadStream signals the OnWorkBegin ( 1328), OnWork ( 1328), and OnWorkEnd ( 1329) event handlers when reading values
from the IOHandler. The expected number of bytes for OnWorkBegin ( 1328) is an arbitrarily large value when
AReadUntilDisconnect contains True, and will not reflect the actual number of bytes read from the IOHandler. The OnWork (
1328) event handler is signalled when byte values are extracted and removed from InputBuffer ( 1325), and not when they are

1308 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

added.

ReadStream always consumes data from the internal buffer for the IOHandler. Any exisiting data in InputBuffer ( 1325) is used
before reading additional data using the ReadFromSource method. The value in RecvBufferSize ( 1330) is used to allocate a
TIdBytes ( 3007) buffer that stores data extracted from the InputBuffer ( 1325) and written to the stream instance in AStream.

ReadStream iteratively calls ReadBytes ( 1301) to extract values from InputBuffer ( 1325) until the expected number of bytes
has been read and written to AStream, or until the IOHandler is no longer Connected ( 1296).

If an exception occurs while reading bytes from the IOHandler, any existing data in the InputBuffer ( 1325) is extacted and written
to the stream. An EIdConnClosedGracefully ( 69) is ignored when AReadUntilDisconnect contains true. Use the ClosedGracefully
( 1324) property to determine when the connection for the IOHandler has been closed by the peer.

Any other exception occurring in the method is re-raised to allow the application to detect the error condition.

ReadFromStream ensures that the size of the stream in AStream is adjusted to reflect the actual amount of data read from the
IOHandler before exiting from the method.

Exceptions
Exceptions Description
EAssertionFailed Raised when the stream for the operation is unassigned.
EIdException ( 76) Raised for other error conditions during the operation.

See Also
OnWorkBegin ( 1328)

OnWork ( 1328)

OnWorkEnd ( 1329)

InputBuffer ( 1325)

ReadBytes ( 1301)

ClosedGracefully ( 1324)

EIdConnClosedGracefully ( 69)

EAssertionFailed

TIdIOHandler.ReadString Method
Reads a Delphi string from the IOHandler buffer.

Pascal
function ReadString(
ABytes: Integer
): string;
Parameters
Parameters Description
ABytes Number of bytes requested from the IOHandler.

Returns
string - Values read from the IOHandler.

Description
ReadString is a String function used to read a string containing the number of bytes specified in ABytes from the IOHandler.

ReadString calls ReadBytes ( 1301) to read values from the internal buffer for the IOHandler. ReadString calls BytesToString (
2728) to prepare the string used in the return value for the method.

Use ReadChar ( 1302), ReadBytes ( 1301), or ReadStrings ( 1310) to access data in the IOHandler buffer as the requested
data type.

Internet Direct (Indy) Version 10.1.5 1309


TIdIOHandler Class Classes

See Also
ReadChar ( 1302)

ReadBytes ( 1301)

ReadStrings ( 1310)

TIdIOHandler.ReadStrings Method
Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.

Pascal
procedure ReadStrings(
ADest: TIdStrings;
AReadLinesCount: Integer = -1
);
Parameters
Parameters Description
ADest Stores lines of text read from the IOHandler.
AReadLinesCount Number of lines of text expected from the IOHandler.

Description
ReadStrings is a procedure used to read one or more lines of text from the IOHandler, and stores the values in the AValue
argument.

AReadLinesCount indicates the number of lines of text expected from the IOHandler. When AReadLinesCount contains 0 (zero) or
a negative value, the number of lines of text is read from the IOHandler as an Integer value. Otherwise, the value in
AReadLinesCount must be a positive Integer value supplied by the calling procedure.

ReadStrings calls ReadLn ( 1304) for the number of iterations indicated in AReadLinesCount, and adds each line of text to the
string list in ADest.

Use ReadChar ( 1302), ReadBytes ( 1301), or ReadString ( 1309) to access data in the IOHandler buffer as the requested
data type.

See Also
ReadLn ( 1304)

ReadInteger ( 1303)

ReadChar ( 1302)

ReadBytes ( 1301)

ReadString ( 1309)

TIdIOHandler.RegisterIOHandler Method
Guaranteess that the IOHandler class exists in the registered IOHandler class list.

Pascal
class procedure RegisterIOHandler;
Description
RegisterIOHandler is a class method used to ensure that an IOHandler class reference exists in GIOHandlerClassList for the
current IOHandler class.

On all platforms except .Net, the global list of IOHandler class references is searched using the current class instance. If it is not
found, the class is added to GIOHandlerClassList .

1310 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

The .Net platform does not permit class references as objects, and cannot stored the current IOHandler class in
GIOHandlerClassList.

TIdIOHandler.SetDefaultClass Method
Pascal
class procedure SetDefaultClass;

TIdIOHandler.WaitFor Method
Searches for a specific value in the input received from the data source for the IOHandler.

Pascal
function WaitFor(
const AString: string;
ARemoveFromBuffer: Boolean = True;
AInclusive: Boolean = False
): string;
Parameters
Parameters Description
AString Values to search for in the internal buffer.
ARemoveFromBuffer Indicates if data is removed from the internal buffer. Default value is True.
AInclusive Indicates if extrascted data includes the search value. Default value is False.

Returns
string - Values read from the internal buffer for the IOHandler, or an empty string ('') if the connection is closed.

Description
WaitFor is a String function used to watch for a specific value in the input received from the data source for the IOHandler. WaitFor
iteratively calls CheckForDataOnSource ( 1294) using a 250 millisecond timeout to ensure that data is available for the method.

When the value in AString is detected in the InputBuffer ( 1325) for the IOHandler, it is extracted from the internal buffer and used
as the return value for the method.

ARemoveFromBuffer indicates if all of the data in the buffer up to the specified marker should be extracted from the internal buffer
for the IOHandler. When ARemoveFromBuffer contains True, data is extracted from InputBuffer ( 1325) and stored in the return
value for the method.

AInclusive indicates if data extracted from the InputBuffer ( 1325) should inlude the value indicated in AString. When AInclusive
contains False, the value in AString is not included in the return value.

If the value in AString is not detected in the internal buffer, the process is repeated until a disconnect is detected using the
CheckForDisconnect ( 1295) method.

Please note that byte comparisions using AString and the InputBuffer ( 1325) are case-sensitive.

See Also
InputBuffer ( 1325)

CheckForDataOnSource ( 1294)

CheckForDisconnect ( 1295)

TIdIOHandler.Write Method
Overload List

Method Description
TIdIOHandler.Write (Cardinal, Boolean) Write the specified values to the IOHandler.
( 1312)

Internet Direct (Indy) Version 10.1.5 1311


TIdIOHandler Class Classes

TIdIOHandler.Write (Char) ( 1312) Writes the value specified using the IOHandler.
TIdIOHandler.Write (Int64, Boolean) ( Writes an Int64 value using the IOHandler.
1313)
TIdIOHandler.Write (Integer, Boolean) Write the specified values to the IOHandler.
( 1313)
TIdIOHandler.Write (SmallInt, Boolean) Write the specified values to the IOHandler.
( 1314)
TIdIOHandler.Write (string) ( 1317) Write the specified values to the IOHandler.
TIdIOHandler.Write (TIdBytes) ( Write the specified values to the IOHandler.
1314)
TIdIOHandler.Write (TIdStream, Writes content from a stream to the IOHandler.
Int64, Boolean) ( 1315)
TIdIOHandler.Write (TIdStrings, Write the specified values to the IOHandler.
Boolean) ( 1316)

TIdIOHandler.Write Method (Cardinal, Boolean)


Write the specified values to the IOHandler.

Pascal
procedure Write(
AValue: Cardinal;
AConvert: Boolean = True
); overload;
Parameters
Parameters Description
AValue Values to write to the IOHandler.
AConvert Indicates the order of bytes for the ordinal data type must be converted.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

When AConvert is True, the byte order for AValue is converted from its host-specific byte order to Network byte order using the
HostToNetwork method in GStack ( 3126).

Write calls WriteBytes to copy the converted value to the IOHandler.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (Char)


Writes the value specified using the IOHandler.

Pascal
procedure Write(
AValue: Char
); overload;

1312 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Parameters
Parameters Description
AValue Character to write using the IOHandler.

Description
Write is an overloaded method use to write the value specified in AValue using the IOHandler.

Write calls an overloaded variant of the method using the value in AValue converted to a TIdBytes ( 3007) data type.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (Int64, Boolean)


Writes an Int64 value using the IOHandler.

Pascal
procedure Write(
AValue: Int64;
AConvert: Boolean = True
); overload;
Parameters
Parameters Description
AValue Value to write using the IOHandler.
AConvert Indicates if the byte order for the numeric value should be converted. Default value is True.

Description
Write is an overloaded method used to write the Int64 value in AValue using the IOHandler.

AConvert indicates if the byte order for the numeric value should be converted from its' host-specific representation to network byte
order prior to writing data to the IOHandler. The default value is True, and causes the HostToNetwork method in the GStack (
3126) class instance to be called for the data in AValue.

Write calls an overloaded variant of the method using the value in AValue converted to a TIdBytes ( 3007) data type.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (Integer, Boolean)


Write the specified values to the IOHandler.

Pascal
procedure Write(
AValue: Integer;
AConvert: Boolean = True
); overload;

Internet Direct (Indy) Version 10.1.5 1313


TIdIOHandler Class Classes

Parameters
Parameters Description
AValue Value to write to the IOHandler.
AConvert Indicates the order of bytes for the ordinal data type must be converted.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

When AConvert is True, the byte order for AValue is converted from its host-specific byte order to Network byte order using the
HostToNetwork method in GStack ( 3126).

Write calls WriteBytes to copy the converted value to the IOHandler.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (SmallInt, Boolean)


Write the specified values to the IOHandler.

Pascal
procedure Write(
AValue: SmallInt;
AConvert: Boolean = True
); overload;
Parameters
Parameters Description
AValue Values to write to the IOHandler.
AConvert Indicates the order of bytes for the ordinal data type must be converted.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

When AConvert is True, the byte order for AValue is converted from its host-specific byte order to Network byte order using the
HostToNetwork method in GStack ( 3126).

Write calls WriteBytes to copy the converted value to the IOHandler.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (TIdBytes)


Write the specified values to the IOHandler.

1314 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Pascal
procedure Write(
ABuffer: TIdBytes
); virtual; overload;
Parameters
Parameters Description
ABuffer Values to write to the IOHandler.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

Write calls WriteBytes to copy the values in ABuffer to the IOHandler.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.Write Method (TIdStream, Int64, Boolean)


Writes content from a stream to the IOHandler.

Pascal
procedure Write(
AStream: TIdStream;
ASize: Int64 = 0;
AWriteByteCount: Boolean = False
); virtual; overload;
Parameters
Parameters Description
AStream Stream with content to write to the IOHandler.
ASize Number of bytes from the stream to write to the IOHandler. Default value is 0.
AWriteByteCount Indicates if the bytecount for the operation is written to the IOHandler. Default value is False.

Description
Write is an overloaded method used to write content from a stream to the IOHandler.

AStream is a stream instance with the content to write to the IOHandler.

ASize indicates the number of bytes from the stream to write to the IOHandler. The default value is 0, and signifies that all of the
content in the stream as indicated by its' Size should be written. The value -1 indicates that any content in the stream should be
written starting at the current stream position, and and include all content up to and including the Size of the stream. When ASize
contains a positive non-zero value, the argument value is used as the total number of bytes to write to the IOHandler.

AWriteByteCount indicates if the byte count for the operation is written to the IOHandler. When AWriteByteCount contains True, the
value in ASize is written as the initial step in the write operation. ASize will be written as an Int64 data type when LargeStream (
1326) contains True. ASize will be written as an Integer data type when LargeStream ( 1326) contains False. The default value for
AWriteByteCount is False.

Write can raise an EIdIoHandlerRequiresLargeStream ( 112) exception if ASize is larger than the value MaxInt when LargeStream
( 1326) contains False. What does this really mean? It means that older VCL versions that do not support 64-bit stream sizes and
positions should not call Write using a byte count value in ASize larger than the value MaxInt.

Write signals the OnWorkBegin ( 1328), OnWork ( 1328), and OnWorkEnd ( 1329) event handlers when writing values using
the IOHandler. The expected number of bytes in ASize is passed to the OnWorkBegin ( 1328) event handler. The OnWork (

Internet Direct (Indy) Version 10.1.5 1315


TIdIOHandler Class Classes

1328) event handler is signalled when byte values are output using the IOHandler. The OnWorkEnd ( 1329) event handler is
signalled just prior to completion of the method.

Write iteratively sends blocks of data from the stream in AStream until the requested number of bytes have been read from the
stream and written to the IOHandler. The value in the SendBufferSize ( 1331) property indicates the number of bytes read from
the stream and written to the IOHandler during each iteration of the processing required in the method.

Write can raise an EIdNoDataToRead ( 123) exception when the required number of bytes in ASize cannot be read from the
stream.

Exceptions
Exceptions Description
EIdIoHandlerRequiresLargeStream ( 112) Raised when the requested number of bytes is larger than the maximum value supported for the stream.
EIdNoDataToRead ( 123) Raised with the message RSIdNoDataToRead when a required number of bytes cannot be read from the
stream.

See Also
Write

LargeStream ( 1326)

OnWork ( 1328)

OnWorkBegin ( 1328)

OnWorkEnd ( 1329)

EIdIoHandlerRequiresLargeStream ( 112)

EIdNoDataToRead ( 123)

TIdIOHandler.Write Method (TIdStrings, Boolean)


Write the specified values to the IOHandler.

Pascal
procedure Write(
AValue: TIdStrings;
AWriteLinesCount: Boolean = False
); virtual; overload;
Parameters
Parameters Description
AValue Values to write to the IOHandler.
AWriteLinesCount Indicates the line count should be written to the IOHandler.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

Write calls WriteBufferOpen ( 1320) to enable write buffer for the IOHandler when writing values using the TIdStrings ( 3089)
instance in AValue.

When AWriteLinesCount is True, the line count is written as an Integer value prior to the content in AValue.

Write calls WriteLn ( 1322) using each of the strings in AValue.

Write calls WriteBufferClose ( 1318) to disable write buffer for the IOHandler when writing values using the TIdStrings ( 3089)
instance in AValue.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

1316 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

TIdIOHandler.Write Method (string)


Write the specified values to the IOHandler.

Pascal
procedure Write(
const AOut: string
); virtual; overload;
Parameters
Parameters Description
AOut Values to write to the IOHandler.

Description
Write is an overloaded method in TIdIOHandler ( 1284) used to write various data types from the indicated source to the
IOHandler. Write can use the Indy write buffering mechanism when it has been enabled.

Write calls WriteBytes to copy the values in AOut to the IOHandler.

Call WriteBufferOpen ( 1320) to enable write buffer for the IOHandler.

Call WriteBufferClose ( 1318) to disable write buffer for the IOHandler.

See Also
Write

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferCancel Method
Clears and cancels write ( 1312) buffering for the IOHandler.

Pascal
procedure WriteBufferCancel; virtual;
Description
WriteBufferCancel is a virtual procedure used to clear any existing values in the write ( 1312) buffering mechanism for an
IOHandler. WriteBufferCancel also disables write ( 1312) buffering for subsequent write ( 1312) requests.

WriteBufferCancel calls both the WriteBufferClear ( 1317) and WriteBufferClose ( 1318) methods.

Use WriteBufferFlush ( 1318) to force data in the write ( 1312) buffer to be written to the connection for the IOHandler.

Use WriteBufferOpen ( 1320) to enable write ( 1312) buffering for the IOHandler.

See Also
TIdIOHandler.WriteBufferClear ( 1317)

TIdIOHandler.WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteBufferOpen ( 1320)

TIdIOHandler.WriteBufferClear Method
Discards any exisitng data in the write ( 1312) buffering mechanism.

Pascal
procedure WriteBufferClear; virtual;

Internet Direct (Indy) Version 10.1.5 1317


TIdIOHandler Class Classes

Description
WriteBufferClear is a virtual procedure used to discard any existing values found the write ( 1312) buffering mechanism for the
IOHandler.

WriteBufferClear calls the Clear method found in the TIdBuffer ( 279) instances used for the WriteBuffer property.

Use WriteBufferCancel ( 1317) to clear and disable write ( 1312) buffering for the IOHandler.

Use WriteBufferFlush ( 1318) to force data in the write ( 1312) buffer to be written to the connection for the IOHandler.

See Also
TIdIOHandler.WriteBufferCancel ( 1317)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteBufferClose Method
Disables uses write ( 1312) buffering for the IOHandler connection.

Pascal
procedure WriteBufferClose; virtual;
Description
WriteBufferClose is a virtual procedure used to disable use of buffering when writing data to the connection for the IOHandler.

WriteBufferClose calls WriteBufferFlush ( 1318) to ensure that any existing data in WriteBuffer is written to the IOHandler
connection. WriteBufferClose also frees the WriteBuffer.

Use WriteBufferOpen ( 1320) to enable use of the WriteBuffer for data written to the IOHandler connection.

See Also
TIdIOHandler.WriteBufferOpen ( 1320)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.Write ( 1312)

TIdIOHandler.WriteBytes

TIdIOHandler.WriteBufferFlush Method
Overload List

Method Description
TIdIOHandler.WriteBufferFlush () ( Writes data in the write ( 1312) buffering mechaism to the IOHandler connection.
1318)
TIdIOHandler.WriteBufferFlush Writes data in the write ( 1312) buffering mechaism to the IOHandler connection.
(Integer) ( 1319)

TIdIOHandler.WriteBufferFlush Method ()
Writes data in the write ( 1312) buffering mechaism to the IOHandler connection.

Pascal
procedure WriteBufferFlush; overload;
Description
WriteBufferFlush is an overloaded procedure used to force any existing data in the write ( 1312) buffering mechanism to be written
to the connection for the IOHandler.

WriteBufferFlush calls an overloaded variant of the method using -1 for the number of bytes to write ( 1312) from the buffer to the

1318 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

IOHandler. The default value is -1, and indicates that all data should be written. The number of bytes written is also removed from
WriteBuffer prior to completion of the write ( 1312) request.

WriteBufferFlush call WriteBytes using existing data in WriteBuffer.

Use WriteBufferOpen ( 1320) to enable write ( 1312) buffering for the IOHandler.

Use WriteBufferClose ( 1318) to disable write ( 1312) buffering for the IOHandler.

See Also
WriteBufferFlush

WriteBytes

WriteBuffer

WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferFlush Method (Integer)


Writes data in the write ( 1312) buffering mechaism to the IOHandler connection.

Pascal
procedure WriteBufferFlush(
AByteCount: Integer
); virtual; overload;
Parameters
Parameters Description
AByteCount Number of bytes to write ( 1312) from the buffer to the IOHandler. The default value is -1.

Description
WriteBufferFlush is a virtual procedure used to force any existing data in the write ( 1312) buffering mechanism to be written to the
connection for the IOHandler.

WriteBufferFlush call WriteBytes using existing data in WriteBuffer.

AByteCount indicates the number of bytes to write ( 1312) from the buffer to the IOHandler. The default value is -1, and indicates
that all data should be written. The number of bytes in AByteCount is removed from WriteBuffer prior to completion of the write (
1312) request.

Use WriteBufferOpen ( 1320) to enable write ( 1312) buffering for the IOHandler.

Use WriteBufferClose ( 1318) to disable write ( 1312) buffering for the IOHandler.

See Also
TIdIOHandler.WriteBytes

TIdIOHandler.WriteBuffer

TIdIOHandler.WriteBufferOpen ( 1320)

TIdIOHandler.WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferingActive Method
Indicates if write ( 1312) buffering is enabled for the IOHandler.

Pascal
function WriteBufferingActive: Boolean;
Returns
Boolean - True when write ( 1312) buffering for the IOHandler is enabled.

Internet Direct (Indy) Version 10.1.5 1319


TIdIOHandler Class Classes

Description
WriteBufferingActive is a Boolean function used to determine if write ( 1312) buffering has been enabled for the IOHandler.

WriteBufferingActive returns True when the TIdBuffer ( 279) instance for the WriteBuffer property has been assigned in a call to
WriteBufferOpen ( 1320).

Use WriteBufferClose ( 1318) or WriteBufferCancel ( 1317) to disable write ( 1312) buffering for the IOHandler.

See Also
WriteBufferOpen ( 1320)

WriteBufferClose ( 1318)

WriteBufferCancel ( 1317)

TIdIOHandler.WriteBufferOpen Method
Overload List

Method Description
TIdIOHandler.WriteBufferOpen () ( Enables write ( 1312) buffering for the IOHandler.
1320)
TIdIOHandler.WriteBufferOpen Enables write ( 1312) buffering for the IOHandler.
(Integer) ( 1320)

TIdIOHandler.WriteBufferOpen Method ()
Enables write ( 1312) buffering for the IOHandler.

Pascal
procedure WriteBufferOpen; overload;
Description
WriteBufferOpen is an overloaded method used to enable write ( 1312) buffering for the IOHandler.

WriteBufferOpen allocates the TIdBuffer ( 279) instance used in the WriteBuffer property that stores values to be written to the
IOHandler connection.

WriteBufferOpen calls an overloaded variant of the method using -1 as the threshhold that indicates the number of bytes to
accumulate in the write ( 1312) buffer prior to flushing to the IOHandler connection. The default value is -1, and indicates that all
existing data in WriteBuffer should be flushed at the next opportunity.

Use WriteBufferClose ( 1318) to disable write ( 1312) buffering for the IOHandler.

Used WriteBufferFlush ( 1318) to force existing data in WriteBuffer to be written to the IOHandler connection.

See Also
TIdBuffer ( 279)

TIdIOHandler.WriteBuffer

TIdIOHandler.WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteBufferOpen Method (Integer)


Enables write ( 1312) buffering for the IOHandler.

Pascal
procedure WriteBufferOpen(
AThreshhold: Integer

1320 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

); virtual; overload;
Parameters
Parameters Description
AThreshhold Number of bytes to accumulate in the write ( 1312) buffer prior to flushing to the IOHandler connection. The
default value is -1.

Description
WriteBufferOpen is a virtual procedure used to enable write ( 1312) buffering for the IOHandler.

WriteBufferOpen allocates the TIdBuffer ( 279) instance used in the WriteBuffer property that stores values to be written to the
IOHandler connection.

AThreshhold indicates the number of bytes to accumulate in the write ( 1312) buffer prior to flushing to the IOHandler connection.
The default value is -1, and indicates that all existing data in WriteBuffer should be flushed at the next opportunity.

Use WriteBufferClose ( 1318) to disable write ( 1312) buffering for the IOHandler.

Used WriteBufferFlush ( 1318) to force existing data in WriteBuffer to be written to the IOHandler connection.

See Also
TIdBuffer ( 279)

TIdIOHandler.WriteBuffer

TIdIOHandler.WriteBufferClose ( 1318)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteDirect Method
Moves values to the socket-level transport for the IOHandler.

Pascal
procedure WriteDirect(
var aBuffer: TIdBytes
); virtual;
Parameters
Parameters Description
aBuffer Values to be moved to the socket-level transport for the IOHandler.

Description
WriteDirect is a virtual procedure used as the main mechanism for writing values to the IOHandler.

WriteDirect is called in methods like Write ( 1312) and WriteBufferFlush ( 1318) to move data directly to the socket handle used
for network-level access.

WriteDirect calls CheckForDisconnect ( 1295) to determine if the IOHandler is actively connected ( 1296) to the endpoint for the
transfer. WriteDirect also fires the Send method for an assigned Intercept ( 1326).

See Also
TIdIOHandler.Write ( 1312)

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteFile Method
Writes the contents of a local file to the IOHandler.

Pascal
function WriteFile(
const AFile: String;
AEnableTransferFile: Boolean = False

Internet Direct (Indy) Version 10.1.5 1321


TIdIOHandler Class Classes

): Int64; virtual;
Parameters
Parameters Description
AFile File name to be sent on the IOHandler connection.
AEnableTransferFile Not used at this time.

Returns
Cardinal - Number of bytes in the file written to the IOHandler.

Description
WriteFile is a virtual Cardinal function used to write ( 1312) the entire contents of local file specified in AFile to the IOHandler.

When AFile contains an invalid or missing file name, an EIdFileNotFound ( 83) will be raised.

WriteFile calls write ( 1312) using a temporary TFileStream created for reading the contents of the file in AFile.

WriteFile returns the number of bytes found in the file stream written to the IOHandler.

Exceptions
Exceptions Description
EIdFileNotFound ( 83) RSFileNotFound and the fully qualified file name.

TIdIOHandler.WriteLn Method
Writes a string value to IOHandler.

Pascal
procedure WriteLn(
const AOut: string = ''
); virtual;
Parameters
Parameters Description
AOut Value to send to the IOHandler connection. Default value is ''.

Description
WriteLn is a virtual procedure used to send the string value specified in AOut to the IOHandler.

WriteLn appends the EOL ( 3202) character to the valuein AOut, and calls Write ( 1312) to concatenated value to the write (
1312) buffering mechanism for the IOHandler.

Use Write ( 1312) to send other data types on the IOHandler.

See Also
TIdIOHandler.Write ( 1312)

EOL ( 3202)

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

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

1322 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

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

AStrings is a TIdStrings ( 3089) 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

2822. 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 ( 1322) 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 ( 341), TIdTCPConnection ( 2349), and TIdNNTP ( 1692).

See Also
WriteLn ( 1322)

TIdCommandHandler.Check ( 342)

TIdTCPConnection.WriteRFCStrings ( 2363)

TIdNNTP.IHAVE ( 1719)

TIdIOHandler Properties
The Properties of the TIdIOHandler class are listed here.

Properties
Property Description
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
Destination ( 1325) Endpoint for the IOHandler connection.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.
MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1330) Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.

Internet Direct (Indy) Version 10.1.5 1323


TIdIOHandler Class Classes

RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
WriteBufferThreshhold ( 1331)

Legend
Property
read only

TIdIOHandler.ClosedGracefully Property
Indicates that the connection has been closed by the peer for a connection.

Pascal
property ClosedGracefully: Boolean;
Description
ClosedGracefully is a read-only Boolean property that indicates if a connection has been closed by the peer for the connection.

ClosedGracefully is updated in the CloseGracefully ( 1296) method to indicate when the condition has been encountered during
the IO operation. Use CloseGracefully ( 1296) to set the property value and signal that the connection will end in the previously
described manner.

ClosedGracefully is be used to determine when the connection has been closed by the peer prior to performing an IO operation that
would raise an Exception ( 4733).

ClosedGracefully is generally used in protocol-oriented communications when the server is allowed to close ( 1295) the
connection without signalling its intent to the client, or when a connection has been lost and no data exists in the Indy buffering
mechanism.

Most conversational protocols (such as Mail, News, etc.) disconnect by sending a command to the server telling it that it will
disconnect. The server replies with an acknowledgement of the disconnection request, and then both the client and server
disconnect. In these cases an EIdConnClosedGracefully ( 69) exception should not be raised, and if one occurs it is in fact an
error and should be handled.

In some cases no command will be issued, but both sides know when the other will disconnect based on the protocol. Often a client
will connect, issue one command, receive the response from the server and disconnect. While no explicit command was issued by
the client, the protocol states that the connection should be disconnected after one command and response. Some of the time
protocols are examples of this.

If one side of the connection just disconnects, the other side is left to detect this and then take appropriate action to terminate the
session. With protocols that use this disconnection method you will see an EIdConnClosedGracefully ( 69) exception, and it is
normal behavior indicated by the ClosedGracefully.

See Also
EIdConnClosedGracefully ( 69)

TIdIOHandler.CloseGracefully ( 1296)

TIdIOHandler.ConnectTimeout Property
Milliseconds to wait for successful completion of a connection attempt.

Pascal
property ConnectTimeout: Integer;
Description
ConnectTimeout is an Integer property that indicates the number of milliseconds to wait for successful completion of a connection
attempt for the IOHandler.

The default value for ConnectTimeout is 0, and indicates that the default timeout value for the protocol stack implementation should
be used when establishing the client connection.

1324 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

ConnectTimeout is not used in TIdIOHandler ( 1284), but is provided for compatibility purposes. ConnectTimeout allows a client
using a socket-based IOHandler, like TIdIOHandlerStack ( 1342), to access the protocol stack to set the timeout value.

Use the ConnectTimeout property in the TIdTCPClient ( 2333) to set the connection timeout without specific access to an
IOHandler.

Use ReadTimeout ( 1330) to indicate the timeout value when reading data from the IOHandler.

Applications do not normally assign values directly to the ReadTimeout ( 1330) or ConnectTimeout properties in an IOHandler.
Assign values to the corresponding properties in TIdTCPClient ( 2333) or a descendant class.

See Also
ReadTimeout ( 1330)

TIdIOHandlerStack ( 1342)

TIdTCPClient ( 2333)

TIdIOHandler.Destination Property
Endpoint for the IOHandler connection.

Pascal
property Destination: string;
Description
Destination is a string property that represents the endpoint or identity of the connection for the IOHandler. Destination is used to
represent the concatenation of values from the Host ( 1325) and Port ( 1329) properties in the form:

"127.0.0.1:001"

In IOHandler (a base class), Destination is a simple string property. In descendant classes (like TIdIOHandlerSocket ( 1331)),
Destination is used to read from or write ( 1312) to the Host ( 1325) and POrt properties for the IOHandler.

See Also
TIdIOHandlerSocket.Destination

TIdIOHandler.Host Property
Identifies the address for the endpoint of the IOHandler connection.

Pascal
property Host: string;
Description
Host is a string property that represents the address used as the endpoint for the IOHandler connection.

For TIdIOHandler ( 1284), the address has no significance but is provided for compatiblity with descendant classes. Descendant
classes will contain an address pertinent to the transport mechanism, like a host computer name or an IP address.

Use Destination ( 1325) access a value that contains the string representation for both the Host and Port ( 1329) properties.

See Also
TIdIOHandlerSocket.Host

TIdIOHandler.Destination ( 1325)

TIdIOHandler.InputBuffer Property
Represents the internal storage for values received on the IOHandler connection.

Internet Direct (Indy) Version 10.1.5 1325


TIdIOHandler Class Classes

Pascal
property InputBuffer: TIdBuffer;
Description
InputBuffer is a read-only TIdBuffer ( 279) property that represents the internal storage allocated for the IOHandler.

IOHandlers typically receive more data than they need to complete each request. InputBuffer stores this extra data for future use in
other IOHandler methods.

Values are added to InputBuffer when data is received from the source for the connection, and extracted from InputBuffer when the
various read methods for the IOHandler are called.

InputBuffer is created when the IOHandler is opened in TIdIOHandler.Open ( 1300) and freed in the destructor for the object
instance.

See Also
TIdIOHandler.Open ( 1300)

TIdIOHandler.Intercept Property
Intermediary for actions using the transport and the IOHandler for the connection.

Pascal
property Intercept: TIdConnectionIntercept;
Description
Intercept is a TIdConnectionIntercept ( 368) property used to act as an intermediary between the protocol stack and the IOHandler
for a connection.

Intercept is used to perform operations that result from connecting to or disconnecting from the transport layer for the IOHandler.

Intercept also allows operations to be performed when sending and receiving data for the IOHandler.

Read operations generally call ReadBytes ( 1301) which receives data from the transport for the IOHandler, calls the Receive
method in the Intercept, and moves data to the InputBuffer ( 1325).

Write ( 1312) operations generally call WriteDirect ( 1321) which passes data to the Send method in the Intercept, and send data
using the transport for the IOHandler.

The Intercept must be Enabled to allow the actions for the Intercept to be performed.

Do not create ( 267) instances of TIdConnectionIntercept ( 368) for assignment to the Intercept property. Use descendant
classes (like TIdConnectionInterceptOpenSSL, TIdBlockCipherIntercept, or TIdInterceptThrottler ( 1280)) or create ( 267)
custom descendants that implement the virtual methods of TIdConnectionIntercept ( 368).

See Also
TIdConnectionIntercept ( 368)

TIdIOHandler.LargeStream Property
Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.

Pascal
property LargeStream: Boolean;
Description
LargeStream is a Boolean property that indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
The default value for LargeStream is False, as assigned during initialization of the component.

Set the value in LargeStream to True if stream read and write ( 1312) operations should use the Int64 data type when reading or
writing byte counts in the Read and Write ( 1312) methods.

1326 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

TIdIOHandler.MaxCapturedLines Property
Maximum number of lines permitted when capturing multi-line messages or responses.

Pascal
property MaxCapturedLines: Integer;
Description
MaxCapturedLines is an Integer property that represents the maximum number of lines permitted when capturing multi-line
responses on the IOHandler.

The default value for MaxCapturedLines is Id_IOHandler_MaxCapturedLines ( 3331).

MaxCapturedLines allows clients (and servers) to guard against memory allocation attacks (commonly referred to as buffer
overruns).

MaxCapturedLines is used in the implementation of the Capture ( 1290) method, and causes an EIdMaxCaptureLineExceeded (
114) to be raised when the number of lines for the operation exceeds the property value.

See Also
TIdIOHandler.Capture ( 1290)

Id_IOHandler_MaxCapturedLines ( 3331)

EIdMaxCaptureLineExceeded ( 114)

TIdIOHandler.MaxLineAction Property
Indicates the action performed when the maximum line length is exceeded.

Pascal
property MaxLineAction: TIdMaxLineAction;
Description
MaxLineAction is a TIdMaxLineAction ( 2966) property that indicates the action to perform when the maximum line length for the
IOHandler is exceeded when reading a line from the connection.

MaxLineAction is used in ReadLn ( 1304) and ReadLnSplit ( 1306).

Use MaxLineLength ( 1327) to set the number of bytes permitted as the maximum line length.

See Also
TIdMaxLineAction ( 2966)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.ReadLnSplit ( 1306)

TIdIOHandler.MaxLineLength Property
Determines the maximum length of a line read from the IOHandler for the connection.

Pascal
property MaxLineLength: Integer;
Description
MaxLineLength is an Integer property that represents the maximum line length allowed when reading a line of text from the
IOHandler connection. MaxLineLength is used as a default value in methods like ReadLn ( 1304) when the optional line length
argument is omitted.

The default value for MaxLineLength is IdMaxLineLengthDefault ( 3854) as assigned during initialization of the object instance.

Internet Direct (Indy) Version 10.1.5 1327


TIdIOHandler Class Classes

MaxLineLength is used when MaxLineAction ( 1327) contains maSplit.

MaxLineLength is used in ReadLn ( 1304), ReadLnSplit ( 1306), and InputLn ( 1298).

See Also
TIdIOHandler.MaxLineAction ( 1327)

TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.ReadLnSplit ( 1306)

TIdIOHandler.InputLn ( 1298)

TIdIOHandler.OnWork Event
Event handler for buffered read and write ( 1312) operations.

Pascal
property OnWork;
Description
OnWork is a public TWorkEvent ( 3121) property in TIdIOHandler ( 1284) that is the event handler signalled when a read or
write ( 1312) method is called for the IOHandler. OnWork is generally used to control the update of progress indicators or GUI
components.

The work mode indicates the operation performed and the notification sent to OnWork, and can contain one of the following values:

Value Meaning
wmRead The component is reading data from the peer.
wmWrite The component is sending data to the peer.
AWorkCount Indicates the number of bytes affected by the operation sent to OnWork.

The OnWork event handler is triggered when a notification message is received as data is removed from the internal buffer for the
IOHandler, and when data is written to the destination for the IOHandler connection.

Applications must assign a procedure to the OnWork event handler to allow responding to the event notification.

Use OnWorkBegin ( 1328) to respond to the initiation of a read or write ( 1312) request.

Use OnWorkEnd ( 1329) to respond to the completion of a read or write ( 1312) request.

See Also
TWorkEvent ( 3121)

TIdIOHandler.OnWorkBegin ( 1328)

TIdIOHandler.OnWorkEnd ( 1329)

TIdIOHandler.OnWorkBegin Event
Event handler signalled when a read or write ( 1312) request is started.

Pascal
property OnWorkBegin;
Description
OnWorkBegin is a public TWorkBeginEvent ( 3120) property that represents the event handler signalled when a read or write (
1312) request is initiated for the IOHandler connection.

Applications must assign a procedure to the event handler that accepts arguments as used in TWorkBeginEvent ( 3120).

1328 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandler Class

Use OnWorkEnd ( 1329) to respond to completion of an IO request.

See Also
TIdIOHandler.AllData ( 1289)

TIdIOHandler.Capture ( 1290)

TIdIOHandler.ReadStream ( 1308)

TIdIOHandler.Write ( 1312)

TIdIOHandler.OnWorkEnd Event
Event handler signalled when a read or write ( 1312) request is completed.

Pascal
property OnWorkEnd;
Description
OnWorkEnd is a public TWorkEndEvent ( 3121) property that represents the event handler signalled when a read or write (
1312) request is completed for the IOHandler connection.

Applications must assign a procedure to the event handler that accepts arguments as used in TWorkEndEvent ( 3121).

Use OnWorkBegin ( 1328) to respond to initiation of an IO request.

See Also
TIdIOHandler.AllData ( 1289)

TIdIOHandler.Capture ( 1290)

TIdIOHandler.ReadStream ( 1308)

TIdIOHandler.Write ( 1312)

TIdIOHandler.Opened Property
Indicates if buffer and state properties have been initialized for the IOHandler.

Pascal
property Opened: Boolean;
Description
Opened is a read-only Boolean property that indicates if buffer and state properties have been initialized for the IOHandler in the
Open ( 1300) method. Open ( 1300) sets the value in Opened to True.

Opened is also updated in Close ( 1295).

The value in Opened is used in Connected ( 1296).

See Also
TIdIOHandler.Open ( 1300)

TIdIOHandler.Close ( 1295)

TIdIOHandler.Connected ( 1296)

TIdIOHandler.Port Property
Port number for the IOHandler connection.

Pascal
property Port: Integer;

Internet Direct (Indy) Version 10.1.5 1329


TIdIOHandler Class Classes

Description
Port is an Integer property that represents the port number used for the IOHandler connection. Port has no significance in
TIdIOHandler ( 1284), but is provided for compatibility with descendant classes that require a port number for the transport
mechanism.

Use Host ( 1325) to access the address used as the endpoint for the IOHandler connection.

Use Destination ( 1325) to access the endpoint (Host ( 1325) and Port combination) used for the IOHandler connection.

See Also
TIdIOHandler.Host ( 1325)

TIdIOHandler.Destination ( 1325)

TIdIOHandler.ReadLnTimedout Property
Indicates a timeout occurred when reading a line of text from the IOHandler.

Pascal
property ReadLnTimedout: boolean;
Description
ReadLnTimedout is a read-only boolean property used to indicate that a timeout occurred when attempt to read a line of text in
ReadLn ( 1304). ReadLnTimedout is updated when data is read from the data source for the IOHandler connection.

See Also
TIdIOHandler.ReadLn ( 1304)

TIdIOHandler.ReadTimeout Property
Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.

Pascal
property ReadTimeout: Integer;
Description
ReadTimeout is an Integer property that represents the number of milliseconds to wait for completion of a read request using
IOHandler read methods. ReadTimeout is generally used as a default value when the timeout argument to the various read
methods contains IdTimeoutDefault ( 4331).

Use ConnectTimeout ( 1324) to indicate the timeout value when establishing the connection for socket-based IOHandlers.

See Also
IdTimeoutDefault ( 4331)

ConnectTimeout ( 1324)

TIdIOHandler.RecvBufferSize Property
Indicates the number of bytes to read reading large amounts of data.

Pascal
property RecvBufferSize: Integer;
Description
RecvBufferSize is an Integer property that indicates the number of bytes to read from the IOHandler connection when reading large
amounts of data. RecvBufferSize is the amount of data that will be requested at each read cycle.

RecvBufferSize is used in ReadStream ( 1308) to determine the size of chunks of data read from the IOHandler.

1330 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

See Also
TIdIOHandler.RecvBuffer

TIdIOHandler.ReadStream ( 1308)

TIdIOHandler.SendBufferSize Property
Indicates the buffer size used when writing large chunks of data to the IOHandler connection.

Pascal
property SendBufferSize: Integer;
Description
SendBufferSize is an Integer property that indicates the buffer size used when writing large amounts of data to the transport for the
IOHandler. SendBufferSize is the sized used for each chunk of data used when writing to the transport.

The default value for SendBufferSize is GSendBufferSizeDefault ( 3214).

SendBufferSize is used when Write ( 1312) is called using a TIdStream ( 3087) as the source of data written to the IOHandler
connection.

See Also
TIdStream ( 3087)

GSendBufferSizeDefault ( 3214)

TIdIOHandler.Write ( 1312)

TIdIOHandler.WriteBufferThreshhold Property
Pascal
property WriteBufferThreshhold: Integer;
Description
WriteBufferThreshhold is a read-only Integer property that represents the number of bytes to accumulate in WriteBuffer prior to
flushing data to the connection for the IOHandler.

WriteBufferThreshhold is used in WriteBytes.

The value used in WriteBufferThreshhold is established when write ( 1312) buffering is enabled with a call to WriteBufferOpen (
1320).

Use WriteBufferFlush ( 1318) to force data in WriteBuffer to be written to the IOHandler connection.

See Also
TIdIOHandler.WriteBuffer

TIdIOHandler.WriteBufferFlush ( 1318)

TIdIOHandler.WriteBytes

TIdIOHandlerSocket Class
Implements a IOHandler handler using socket handles.

File
IdIOHandlerSocket ( 4671)

Internet Direct (Indy) Version 10.1.5 1331


TIdIOHandlerSocket Class Classes

Hierarchy

Pascal
TIdIOHandlerSocket = class(TIdIOHandler);
Description
TIdIOHandlerSocket is a TIdIOHandler ( 1284) descendant that implements the Indy IOHandler framework using a socket handle
for the IOHandler connection.

TIdIOHandlerSocket implements abstract and virtual methods inherited from TIdIOHandler ( 1284) that allow the IOHandler to
prepare and establish a connection to a remote computer system, determine when the IOHandler is ready to perform an IO
operation, and perform the data transmission or receipt required for the IOHandler.

TIdIOHandlerSocket also includes properties that access the Binding ( 1337) for the socket-based IOHandler, including UseNagle
( 1341) and IPVersion ( 1340). The following default values are assigned to these properties during initialization of the
component:

Property Value
UseNagle ( 1341) True
IPVersion ( 1340) ID_DEFAULT_IP_VERSION ( 3282)

See Also
TIdIOHandler ( 1284)

TIdIOHandlerStack ( 1342)

TIdIOHandlerStream ( 1348)

TIdIOHandlerSocket.UseNagle ( 1341)

TIdIOHandlerSocket.IPVersion ( 1340)

IndySupport ( 15)

TIdIOHandlerSocket Members
The following tables list the members exposed by TIdIOHandlerSocket.

Properties
Property Description
Binding ( 1337) Represents the socket handle used for the IOHandler connection.
BoundIP ( 1338) Specifies the IP address to use for the IOHandler connection.
BoundPort ( 1338) Indicates the port number for the IOHandler connection.
BoundPortMax ( 1338) Indicates the highest port number for the local connection when using default port number assignment.
BoundPortMin ( 1339) Indicates the lowest port number for the local connection when using default port number assignment.
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
DefaultPort ( 1339) Default port number to use for the port number on the IOHandler connection.
Destination ( 1325) Endpoint for the IOHandler connection.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
IPVersion ( 1340) IP address family supported for the socket-based IOHandler.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.

1332 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnAfterBind ( 1340) Event handler signalled after allocating and binding the socket handle for the IOHandler.
OnBeforeBind ( 1340) Event handler signalled prior to allocating and binding the socket handle for the IOHandler.
OnSocketAllocated ( 1341) Event handler property signalled when the socket handle has been allocated in the Binding ( 1337) for the
IOHandler.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1330) Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.
RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
TransparentProxy ( 1341) Represents the proxy server to use for the IOHandler connection.
UseNagle ( 1341) Indicates the socket connection can use the Nagle algorithm.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
WriteBufferThreshhold ( 1331)

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
BeginWork ( 356) Triggers the OnBeginWork event.
BindingAllocated ( 1334) Determines if the socket handle for the IOHandler has been assigned.
CheckForDataOnSource ( 1294) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1295) Checks state and status information on the transport for the IO handler.
Close ( 1335) Closes the connection for the IOHandler.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1335) Determines if the socket handle for the IOHandler has been allocated and remains open ( 1336).
Create ( 267) Constructor for the object instance.
Destroy ( 1335) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.
InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.
InputLn ( 1298) Reads a line of data from the connection.
MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1336) Establishes the socket handle and connection for the IOHandler.
Readable ( 1300) Indicates if the IOHandler is ready to perform a read request.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
CType ( 267)
Create ( 1274)
Capture ( 1290)

Internet Direct (Indy) Version 10.1.5 1333


TIdIOHandlerSocket Class Classes

ReadLn ( 1304)
Write ( 1311)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.
WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteDirect ( 1321) Moves values to the socket-level transport for the IOHandler.
WriteFile ( 1336) Write ( 1312) the contents of a file to the IOHandler connection.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdIOHandlerSocket Methods
The Methods of the TIdIOHandlerSocket class are listed here.

Methods
Method Description
BindingAllocated ( 1334) Determines if the socket handle for the IOHandler has been assigned.
Close ( 1335) Closes the connection for the IOHandler.
Connected ( 1335) Determines if the socket handle for the IOHandler has been allocated and remains open ( 1336).
Destroy ( 1335) Frees the object instance.
Open ( 1336) Establishes the socket handle and connection for the IOHandler.
WriteFile ( 1336) Write ( 1312) the contents of a file to the IOHandler connection.

Legend
Method
virtual

TIdIOHandlerSocket.BindingAllocated Method
Determines if the socket handle for the IOHandler has been assigned.

Pascal
function BindingAllocated: Boolean;
Returns
Boolean - True when the socket handle has been allocated for the IOHandler.

Description
BindingAllocated is a Boolean function used to determine if the socket handle for the IOHandler has been assigned.
BindingAllocated checks for a valid TIdSocketHandle ( 2071) instance in Binding ( 1337), and determines if the socket handle
has been allocated using the IP protocol stack.

BindingAllocated is used in the Connected ( 1335) method and prior to writing to Binding ( 1337) after a change in the UseNagel

1334 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

property.

See Also
TIdSocketHandle ( 2071)

TIdIOHandlerSocket.Binding ( 1337)

TIdIOHandlerSocket.Connected ( 1335)

TIdIOHandlerSocket.UseNagel

TIdIOHandlerSocket.Close Method
Closes the connection for the IOHandler.

Pascal
procedure Close; override;
Description
Close is an overridden procedure used to disconnect the soket transport for the IOHandler. Close calls the inherited Close method,
and calls the CloseSocket method for an assigned Binding ( 1337).

Use Open ( 1336) to establish the connection for the IOHandler.

See Also
TIdIOHandlerSocket.Binding ( 1337)

TIdIOHandlerSocket.Open ( 1336)

TIdSocketHandle.CloseSocket ( 2076)

TIdIOHandlerSocket.Connected Method
Determines if the socket handle for the IOHandler has been allocated and remains open ( 1336).

Pascal
function Connected: Boolean; override;
Returns
Boolean - True when the socket handle for the IOHandler connection has been allocated.

Description
Connected is an overridden Boolean function used to determine when the socket handle for the IOHandler connection has been
allocated.

The return value for the method is determined by the values provided by BindingAllocated ( 1334) and the inherited Connected
method.

See Also
TIdIOHandlerSocket.BindingAllocated ( 1334)

TIdIOHandler.Connected ( 1296)

TIdIOHandlerSocket.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1335


TIdIOHandlerSocket Class Classes

For platforms other than .Net, Destroy frees resource allocated to the TransparentProxy ( 1341) property. Destroy also frees the
Binding ( 1337) for the IOHandler connection.

Destroy calls the inherited method prior to exiting from the destructor.

TIdIOHandlerSocket.Open Method
Establishes the socket handle and connection for the IOHandler.

Pascal
procedure Open; override;
Description
Open is an overridden procedure in TIdIOHandlerSocket ( 1331) used ensure that a valid Binding ( 1337) exists and has been
established for the IOHandler.

Open calls the inherited Open method.

When the socket handle for the connection in Binding ( 1337) has not been assigned, Open allocates resources for the Binding (
1337) property. If Binding ( 1337) has already been assigned in a previous call to Open, the socket handle is reset.

Reallocating the Binding ( 1337) in Open causes several actions to be performed in order to connect the socket-based IOHandler.

• OnBeforeBind ( 1340) is triggered to allow custom configuration using the event handler procedure for an associated
TIdTCPClientCustom ( 2340) or descendant instance.
• The socket handle and IPVersion ( 1340) values for the Binding ( 1337) are updated.
• Values in BoundIP ( 1338), BoundPort ( 1338), BoundPortMin ( 1339), and BoundPortMax ( 1338) are assigned to the
Binding ( 1337).
• The value in UseNagle ( 1341) is set using the socket options for the socket handle.
• OnAfterBind ( 1340) is triggered to allow processing using the event handler procedure for an associated TIdTCPClientCustom
( 2340) or descendant instance.
Open connects to the remote system using the values in Host ( 1325) and Port ( 1329) when valid values have been assigned to
the properties.

Set the values in Host ( 1325) and Port ( 1329) prior to calling the Open method.

Set the value in UseNagle ( 1341) prior to calling Open to indicate if the send coalescing algorithm is enabled in socket options for
the connection.

Use Close ( 1335) to disconnect the socket handle for the IOHandler connection.

See Also
TIdIOHandler.Host ( 1325)

TIdIOHandler.Port ( 1329)

TIdIOHandler. BoundPortMin ( 1339)

TIdIOHandler. BoundPortMax ( 1338)

TIdIOHandlerSocket.Binding ( 1337)

TIdIOHandlerSocket.WriteFile Method
Write ( 1312) the contents of a file to the IOHandler connection.

Pascal
function WriteFile(
const AFile: String;
AEnableTransferFile: Boolean = False
): Int64; override;

1336 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

Parameters
Parameters Description
AFile File name to write ( 1312) to the IOHandler.
AEnableTransferFile Indicates the optimized filew transfer is enabled for the platform.

Returns
Cardinal - Size of the specified file on the local file system.

Description
WriteFile is an overridden Cardinal function used to write ( 1312) the contents of the file specified in AFile to the socket-based
IOHandler.

WriteFile calls the inherited WriteFile method to copy the contents of the file to the IOHandler.

The return value for the method is the size of the specified file on the local file system.

TIdIOHandlerSocket Properties
The Properties of the TIdIOHandlerSocket class are listed here.

Properties
Property Description
Binding ( 1337) Represents the socket handle used for the IOHandler connection.
BoundIP ( 1338) Specifies the IP address to use for the IOHandler connection.
BoundPort ( 1338) Indicates the port number for the IOHandler connection.
BoundPortMax ( 1338) Indicates the highest port number for the local connection when using default port number assignment.
BoundPortMin ( 1339) Indicates the lowest port number for the local connection when using default port number assignment.
DefaultPort ( 1339) Default port number to use for the port number on the IOHandler connection.
IPVersion ( 1340) IP address family supported for the socket-based IOHandler.
OnAfterBind ( 1340) Event handler signalled after allocating and binding the socket handle for the IOHandler.
OnBeforeBind ( 1340) Event handler signalled prior to allocating and binding the socket handle for the IOHandler.
OnSocketAllocated ( 1341) Event handler property signalled when the socket handle has been allocated in the Binding ( 1337) for the
IOHandler.
TransparentProxy ( 1341) Represents the proxy server to use for the IOHandler connection.
UseNagle ( 1341) Indicates the socket connection can use the Nagle algorithm.

Legend
Property
read only

TIdIOHandlerSocket.Binding Property
Represents the socket handle used for the IOHandler connection.

Pascal
property Binding: TIdSocketHandle;
Description
Binding is a read-only TIdSocketHandle ( 2071) property that represents the socket handle used to establish the network-level
connection to a remote computer system for the socket-based IOHandler.

Binding provides methods used to create ( 267), open ( 1336), close ( 1335), read, write ( 1312), and maintain options used
on the socket descriptor.

Use Open ( 1336) to ensure that the Binding contains a valid socket handle for the IOHandler connection.

Use Close ( 1335) to ensure that Binding is disconnected.

Binding is freed in the destructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1337


TIdIOHandlerSocket Class Classes

See Also
TIdSocketHandle ( 2071)

TIdIOHandlerSocket.Open ( 1336)

TIdIOHandlerSocket.Close ( 1335)

TIdIOHandlerSocket.Destroy ( 1335)

TIdIOHandlerSocket.BoundIP Property
Specifies the IP address to use for the IOHandler connection.

Pascal
property BoundIP: string;
Description
BoundIP is a string property that specifies the local IP address to be used for the IOHandler connection. BoundIP indicates the
specific IP address to use for the Binding ( 1337) when the IOHandler connection is established in Open ( 1336).

Use BoundPort ( 1338) to specify the port number to use in the Binding ( 1337) when the IOHandler connection is established in
Open ( 1336).

See Also
TIdIOHandlerSocket ( 1331)

TIdIOHandlerSocket.Binding ( 1337)

TIdIOHandlerSocket.Open ( 1336)

TIdIOHandlerSocket.BoundPort ( 1338)

TIdIOHandlerSocket.BoundPort Property
Indicates the port number for the IOHandler connection.

Pascal
property BoundPort: Integer;
Description
BoundPort is an Integer property that specifies the local port number to be used for the IOHandler connection. BoundPort is used to
update the Binding ( 1337) when Open ( 1336) is called to establish the IOHandler connection.

BoundPortMin ( 1339) and BoundPortMax ( 1338) indicate the range of port numbers available for selection when BoundPort
contains the default value IdBoundPortDefault ( 3825).

Use BoundIP ( 1338) to specify the IP address to use in the Binding ( 1337) when Open ( 1336) is called to establish the
IOHandler connection.

See Also
TIdIOHandlerSocket.Open ( 1336)

TIdIOHandlerSocket.BoundPortMin ( 1339)

TIdIOHandlerSocket.BoundPortMax ( 1338)

IdBoundPortDefault ( 3825)

TIdIOHandlerSocket.BoundPortMax Property
Indicates the highest port number for the local connection when using default port number assignment.

1338 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

Pascal
property BoundPortMax: Integer;
Description
BoundPortMax is an Integer property that specifies the highest local port number to be used for the IOHandler connection when
using default port number assignment. BoundPortMax is used when Open ( 1336) is called to establsh the connection for the
IOHandler.

Set BoundPortMin ( 1339) to indicate the lowest local port number to be used for the IOHandler connection.

See Also
TIdIOHandlerSocket.Open ( 1336)

TIdIOHandlerSocket.BoundPort ( 1338)

TIdIOHandlerSocket.BoundPortMin ( 1339)

IdBoundPortDefault ( 3825)

TIdIOHandlerSocket.BoundPortMin Property
Indicates the lowest port number for the local connection when using default port number assignment.

Pascal
property BoundPortMin: Integer;
Description
BoundPortMin is an Integer property that specifies the lowest local port number to be used for the IOHandler connection when
using default port number assignment. BoundPortMin is used when Open ( 1336) is called to establsh the connection for the
IOHandler.

Set BoundPortMax ( 1338) to indicate the highest local port number to be used for the IOHandler connection.

See Also
TIdIOHandlerSocket.Open ( 1336)

TIdIOHandlerSocket.BoundPort ( 1338)

TIdIOHandlerSocket.BoundPortMax ( 1338)

IdBoundPortDefault ( 3825)

TIdIOHandlerSocket.DefaultPort Property
Default port number to use for the port number on the IOHandler connection.

Pascal
property DefaultPort: integer;
Description
DefaultPort is an integer property that represents the default port number to use when updating the address and port number used
as an identity value in Destination ( 1325).

DefaultPort is used when reading the value of Destination ( 1325) for an assigned port number that contains 0 (zero). DefaultPort
is also used when setting Port ( 1329) based on a value read from the identifying value in Destination ( 1325).

See Also
TIdIOHandler.Port ( 1329)

TIdIOHandler.Destination ( 1325)

Internet Direct (Indy) Version 10.1.5 1339


TIdIOHandlerSocket Class Classes

TIdIOHandlerSocket.IPVersion Property
IP address family supported for the socket-based IOHandler.

Pascal
property IPVersion: TIdIPVersion;
Description
IPVersion is a TIdIPVersion ( 2962) property that represent IP Address family supported for host IP addresses assigned to the
socket-based IOHandler.

IPVersion is used to initialize value used in the Binding ( 1337) for the IOHandler in ConnectClient.

The default value for IPVersion is ID_DEFAULT_IP_VERSION ( 3282) as assigned during component initialization.

IPVersion is normally assigned by a TIdTCPClient ( 2333) when an IOHandler for the client is created in its Connect method.

See Also
TIdTCPClient.IPVersion ( 2337)

TIdTCPClientCustom.Connect ( 2342)

TIdIOHandlerSocket.OnAfterBind Property
Event handler signalled after allocating and binding the socket handle for the IOHandler.

Pascal
property OnAfterBind: TIdNotifyEvent;
Description
OnAfterBind is a TNotifyEvent property that represents the event handler signalled after allocating and binding the socket handle for
the socket-based IOHandler.

OnAfterBind is signalled during processing in the Open ( 1336) method after the Binding ( 1337) for the socket-based IOHandler
has been allocated, initalized, and connected ( 1335).

Applications must assign a procedure to the event handler to allow responding to the TNotifyEvent event notification.

Use the Owner property to access properties and methods of the TIdTCPClientCustom ( 2340) or descendant that owns the
socket-based IOHandler.

TIdIOHandlerSocket.OnBeforeBind Property
Event handler signalled prior to allocating and binding the socket handle for the IOHandler.

Pascal
property OnBeforeBind: TIdNotifyEvent;
Description
OnBeforeBind is a TNotifyEvent property that represents the event handler signalled prior to allocating and binding the socket
handle for the socket-based IOHandler.

OnBeforeBind is signalled during processing in the Open ( 1336) method before the Binding ( 1337) for the socket-based
IOHandler has been allocated, initalized, and connected ( 1335).

Applications must assign a procedure to the event handler to allow responding to the TNotifyEvent event notification.

Use the Owner property to access properties and methods of the TIdTCPClientCustom ( 2340) or descendant that owns the
socket-based IOHandler.

1340 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerSocket Class

TIdIOHandlerSocket.OnSocketAllocated Property
Event handler property signalled when the socket handle has been allocated in the Binding ( 1337) for the IOHandler.

Pascal
property OnSocketAllocated: TIdNotifyEvent;
Description
OnSocketAllocated is a TNotifyEvent event handler property signalled when the socket handle in the Binding ( 1337) for the
IOHandler has been allocated.

OnSocketAllocated is triggered in the ConnectClient method after the OnBeforeBind ( 1340) event handler has been triggered and
following assignment of IPVersion ( 1340) to the corresponding property in Binding ( 1337).

OnSocketAllocated is triggered before assigment of values for the IP and Port ( 1329) number for the Binding ( 1337) using
BoundIP ( 1338), BoundPortMin ( 1339) and BoundPortMax ( 1338), and before calling the Bind method for the socket handle.

Application must assign a procedure to the event handler to allow responding to the event notification.

See Also
ConnectClient

Binding ( 1337)

BoundPortMin ( 1339)

BoundPortMax ( 1338)

BoundPort ( 1338)

OnBeforeBind ( 1340)

OnAfterBind ( 1340)

TIdIOHandlerSocket.TransparentProxy Property
Represents the proxy server to use for the IOHandler connection.

Pascal
property TransparentProxy: TIdCustomTransparentProxy;
Description
TransparentProxy is a TIdCustomTransparentProxy ( 477) property that represents the proxy server to use for the IOHandler
connection.

Reading the value in TransparentProxy will ensure that a TIdSocksInfo ( 2118) instance has been created for the property.

Assigning a new TIdCustomTransparentProxy ( 477) to the property ensures that an existing value in the property is freed, an that
the correct class type is used for creating the new object instance for the property.

TransparentProxy is freed (when assigned) in Destroy ( 1335).

See Also
TIdCustomTransparentProxy ( 477)

TIdIOHandlerSocket.Destroy ( 1335)

TIdIOHandlerSocket.UseNagle Property
Indicates the socket connection can use the Nagle algorithm.

Pascal
property UseNagle: boolean;

Internet Direct (Indy) Version 10.1.5 1341


TIdIOHandlerStack Class Classes

Description
UseNagle is a boolean property that indicates if the socket handle in Binding ( 1337) can use the Nagle algorithm for send
coalescing during output operations. The default value for UseNagle is True, as assigned in the Create ( 267) constructor.

UseNagle is used when opening the connection for the IOHandler, and determine if the Binding ( 1337) must set socket options
that reflect the use of the algorithm during output operations.

TIdIOHandlerStack Class
Implements an IOHandler handler using socket handles with connection timeouts.

File
IdIOHandlerStack ( 4671)

Hierarchy

Pascal
TIdIOHandlerStack = class(TIdIOHandlerSocket);
Description
TIdIOHandlerStack is a TIdIOHandlerSocket ( 1331) descendant that implements the Indy IOHandler framework using a socket
handle to access TCP/IP protocol stack.

TIdIOHandlerStack overrides methods inherited from TIdIOHandlerSocket ( 1331) that allow the IOHandler to gain access to the
TCP/IP protocol stack for the platform hosting the Indy library. The capabilities provided include:

Resolving Host ( 1325) names in the IP address for the connection.


Preparing and establishing a connection to a remote computer system.
Determining if the protocol stack is ready to perform an IO operation.
Determining if the connection is still valid for the IOHandler.
Reading data from the stack into the internal buffering mechanism.
Writing data in the internal buffering mechanism to the stack.

TIdIOHandlerStack implements timeout capabilities when establishing the connecting, and when reading data from the protocol
stack.

TIdIOHandlerStack also implements support for TIdAntiFreeze ( 2710) when connecting to the remote destination for the
IOHandler.

See Also
TIdIOHandlerSocket ( 1331)

TIdAntiFreeze ( 2710)

IndySupport ( 15)

TIdIOHandlerStack Members
The following tables list the members exposed by TIdIOHandlerStack.

1342 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStack Class

Properties
Property Description
Binding ( 1337) Represents the socket handle used for the IOHandler connection.
BoundIP ( 1338) Specifies the IP address to use for the IOHandler connection.
BoundPort ( 1338) Indicates the port number for the IOHandler connection.
BoundPortMax ( 1338) Indicates the highest port number for the local connection when using default port number assignment.
BoundPortMin ( 1339) Indicates the lowest port number for the local connection when using default port number assignment.
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
DefaultPort ( 1339) Default port number to use for the port number on the IOHandler connection.
Destination ( 1325) Endpoint for the IOHandler connection.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
IPVersion ( 1340) IP address family supported for the socket-based IOHandler.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.
MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnAfterBind ( 1340) Event handler signalled after allocating and binding the socket handle for the IOHandler.
OnBeforeBind ( 1340) Event handler signalled prior to allocating and binding the socket handle for the IOHandler.
OnSocketAllocated ( 1341) Event handler property signalled when the socket handle has been allocated in the Binding ( 1337) for the
IOHandler.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1348) Indicates the milliseconds to wait for a readable ( 1346) IOHandler connection.
RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
TransparentProxy ( 1341) Represents the proxy server to use for the IOHandler connection.
UseNagle ( 1341) Indicates the socket connection can use the Nagle algorithm.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
WriteBufferThreshhold ( 1331)

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
BeginWork ( 356) Triggers the OnBeginWork event.
BindingAllocated ( 1334) Determines if the socket handle for the IOHandler has been assigned.
CheckForDataOnSource ( 1345) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1345) Checks state and status information on the transport for the IO handler.
Close ( 1295) Closes the IO handler and associated Intercepts and transports.
Close ( 1335) Closes the connection for the IOHandler.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1346) Indicates the connection is open ( 1336), or data exists in the internal buffer.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 1296) Frees the object instance.
Destroy ( 1335) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.
InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.

Internet Direct (Indy) Version 10.1.5 1343


TIdIOHandlerStack Class Classes

InputLn ( 1298) Reads a line of data from the connection.


MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1300) Prepares the IOHandler for subsequent read and write ( 1312) requests.
Open ( 1336) Establishes the socket handle and connection for the IOHandler.
Readable ( 1346) Indicates if the IOHandler is ready to perform a read request.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
CType ( 267)
Create ( 1274)
Capture ( 1290)
ReadLn ( 1304)
Write ( 1311)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.
WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteDirect ( 1347) Performs physical writes to the socket handle for the IOHandler.
WriteFile ( 1321) Writes the contents of a local file to the IOHandler.
WriteFile ( 1336) Write ( 1312) the contents of a file to the IOHandler connection.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIOHandlerStack Methods
The Methods of the TIdIOHandlerStack class are listed here.

Methods
Method Description
CheckForDataOnSource ( 1345) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1345) Checks state and status information on the transport for the IO handler.
Connected ( 1346) Indicates the connection is open ( 1336), or data exists in the internal buffer.
Readable ( 1346) Indicates if the IOHandler is ready to perform a read request.
WriteDirect ( 1347) Performs physical writes to the socket handle for the IOHandler.

1344 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStack Class

Legend
Method
virtual

TIdIOHandlerStack.CheckForDataOnSource Method
Determine if data is available in the unbuffered communication layer for the connection.

Pascal
procedure CheckForDataOnSource(
ATimeout: Integer = 0
); override;
Parameters
Parameters Description
ATimeout Milliseconds to wait for the connection to become readable ( 1346), or to return data.

Description
CheckForDataOnSource is an overridden procedure that implements the method used to determine when new data is available for
adding to the buffering mechanism in Indy.

ATimeout indicates the number of milliseconds to wait for the connection to become readable ( 1346), or to return data values for
the read operation.

CheckForDataOnSource requires that the socket handle be Connected ( 1346).

CheckForDataOnSource will call the protected ReadFromSource method to retrieve unbuffered data from the communications
layer, and adds the values to the internal buffer used for subsequent processing.

See Also
CheckForDisconnect ( 1345)

Connected ( 1346)

TIdIOHandlerStack.CheckForDisconnect Method
Checks state and status information on the transport for the IO handler.

Pascal
procedure CheckForDisconnect(
ARaiseExceptionIfDisconnected: Boolean = True;
AIgnoreBuffer: Boolean = False
); override;
Parameters
Parameters Description
ARaiseExceptionIfDisconnected Indicates if exceptions are raised when the connection has closed prematurely.
AIgnoreBuffer Indicates if data in the internal buffer is ignored when the connection has closed prematurely.

Description
CheckForDisconnect is an overridden procedure that implements the method used to inspect the status of the connection prior to or
following a method call that performs an IO operation.

CheckForDisconnect is used primarily to ensure that state and status properties for the IOHandler are synchronized with the
underlying transport mechanism.

ClosedGracefully ( 1324) indicates the the server has closed the connection for the IOHandler. If the socket handle is still
allocated and bound, CheckForDisconnect will call Close ( 1335) and trigger the OnStatus ( 359) event handler for the
connection.

If the connection for the IOHandler has been closed and InputBuffer ( 1325) does not contains unread data in the internal
buffering mechanism, the IOHandler can raise an EIdConnClosedGracefully ( 69) exception.

Internet Direct (Indy) Version 10.1.5 1345


TIdIOHandlerStack Class Classes

Use AIgnoreBuffer to indicate that unread data in InputBuffer ( 1325) should be ignored.

Set ARaiseExceptionIfDisconnected to False to prevent the exception from being raised.

Exceptions
Exceptions Description
EIdConnClosedGracefully ( 69) Raised with the message RSConnectionClosedGracefully.

See Also
Close ( 1335)

OnStatus ( 359)

ClosedGracefully ( 1324)

EIdConnClosedGracefully ( 69)

TIdIOHandlerStack.Connected Method
Indicates the connection is open ( 1336), or data exists in the internal buffer.

Pascal
function Connected: Boolean; override;
Returns
Boolean - True when the connection is open ( 1336), or data exists in the Indy buffer.

Description
Connected is an overridden Boolean function used to indicate that connection for the IOHandler has been established, and that the
internal buffer is assigned or contains existing data.

Connected calls the protected ReadFromSource method with a request of 0 (zero) bytes to check the availability of the data source
for the IOHandler.

Connected calls the inherited method to retrieve the return value for the function. The return value for the function is True when the
InputBuffer ( 1325) contains exisiting data, or when ClosedGracefully ( 1324) is False and the InputBuffer ( 1325) is assigned.

See Also
CheckForDataOnSource ( 1345)

CheckForDisconnect ( 1345)

ClosedGracefully ( 1324)

TIdIOHandlerStack.Readable Method
Indicates if the IOHandler is ready to perform a read request.

Pascal
function Readable(
AMSec: Integer = IdTimeoutDefault
): Boolean; override;
Parameters
Parameters Description
AMSec Number of milliseconds to wait for an IOHandler connection to become ready for a read operation.

Returns
Boolean - True when the connection is ready for the IO request.

Description
Readable is an overridden Boolean function that indicates if the connection for the IOHandler is ready to perform an IO request.

1346 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStack Class

AMSec indicates the number of milliseconds to wait for the IOHandler connection to become ready for the read operation.

The return value for the method is determined by calling the TIdSocketHandle.Readable ( 2078) method in the Binding ( 1337)
for the IOHandler connection.

See Also
TIdIOHandlerSocket.Readable

TIdSocketHandle.Readable ( 2078)

TIdIOHandlerStack.WriteDirect Method
Performs physical writes to the socket handle for the IOHandler.

Pascal
procedure WriteDirect(
var aBuffer: TIdBytes
); override;
Parameters
Parameters Description
aBuffer Values to be written using the socket-based IOHandler.

Description
WriteDirect is an overridden procedure used to implement physical writes to the socket-based IOHandler. WriteDirect is called in
methods like Write ( 1312) and WriteBufferFlush ( 1318) to move data directly to the socket handle used for network-level
access.

WriteDirect calls the inherited WriteDirect method.

An EIdNotConnected ( 125) exception is raised when BindingAllocated ( 1334) contains False, indicating that the socket handle
in Binding ( 1337) is not valid.

WriteDirect determines the size of ABuffer, and uses Binding ( 1337) to write ( 1312) values in ABuffer until all values have been
transmitted using the socket handle. An assigned TIdAntiFreeze ( 2710) instance will be used to determine if CPU cycles should
be yielded during the write ( 1312) operation.

WriteDirect updates the value in ClosedGracefully ( 1324) to True when the number of bytes sent on the socket handle in Binding
( 1337) is 0 (zero), and calls CheckForDisconnect ( 1345) to determine if the IOHandler is actively connected ( 1346) to the
endpoint for the transfer.

WriteDirect triggers the OnWork ( 1328) event handler for the number of bytes written to the socket handle in Binding ( 1337).

Exceptions
Exceptions Description
EIdNotConnected ( 125) Raised with the message RSNotConnected when the socket handle for the IOHandler is no longer allocated.

See Also
Write ( 1312)

WriteBufferFlush ( 1318)

TIdAntiFreeze ( 2710)

ClosedGracefully ( 1324)

BindingAllocated ( 1334)

Binding ( 1337)

OnWork ( 1328)

Internet Direct (Indy) Version 10.1.5 1347


TIdIOHandlerStream Class Classes

TIdIOHandlerStack Properties
The Properties of the TIdIOHandlerStack class are listed here.

Properties
Property Description
ReadTimeout ( 1348) Indicates the milliseconds to wait for a readable ( 1346) IOHandler connection.

Legend
Property

TIdIOHandlerStack.ReadTimeout Property
Indicates the milliseconds to wait for a readable ( 1346) IOHandler connection.

Pascal
property ReadTimeout: Integer;
Description
ReadTimeout is an Integer property that represents the number of milliseconds to wait for completion of a read request using the
methods in the IOHandler.

ReadTimeout is used in ReadFromSource to determine how the timeout argument passed to the method is interpreted. When the
timeout argument passed to ReadFromSource contains the value IdTimeoutDefault ( 4331), the value from ReadTimeout is used
in the method. If the ReadTimeout property contains the value 0 (zero) or the symbolic constant IdTimeoutDefault ( 4331), the
value in IdTimeoutInfinite ( 4331) is used as the timeout interval. When ReadTimeout contains a positive non-zero value, the
number of milliseconds is used as the timeout interval.

IdTimeoutInfinite ( 4331) indicates that timeout values are ignored.

The default value for ReadTimeOut is IdTimeoutDefault ( 4331), as assigned during initialization of the component in the inherited
constructor.

Set the value in ReadTimeout to a larger value when using a client or a server on a low-bandwidth or congested network.

Applications do not normally assign values directly to the ReadTimeout or ConnectTimeout ( 1324) properties in an IOHandler.
Assign values to the corresponding properties in TIdTCPClient ( 2333) or a descendant class.

See Also
IdTimeoutDefault ( 4331)

IdDefTimeout ( 3831)

ReadFromSource

TIdIOHandler ( 1284)

TIdTCPClient ( 2333)

TIdIOHandlerStream Class
Implements a stream-based IOHandler.

File
IdIOHandlerStream ( 4672)

Hierarchy

1348 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStream Class

Pascal
TIdIOHandlerStream = class(TIdIOHandler);
Description
TIdIOHandlerStream is a TIdIOHandler ( 1284) descendant that implements an IOHandler using streams to send and receive data
for the IOHandler.

TIdIOHandlerStream implements methods for the IOHandler framework as specified in TIdIOHandler ( 1284), and implements
properties used to represent streams for send and receive operations.

See Also
TIdIOHandler ( 1284)

TIdIOHandlerStream Members
The following tables list the members exposed by TIdIOHandlerStream.

Properties
Property Description
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
Destination ( 1325) Endpoint for the IOHandler connection.
FreeStreams ( 1355) Indicates the stream instances are owned by the IOHandler.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.
MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1330) Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.
ReceiveStream ( 1355) Stream used for reading from the IOHandler.
RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
SendStream ( 1356) Stream used for writing to the IOHandler.
StreamType ( 1356) Indicate the operations permitted using the data source for the IOHandler.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
WriteBufferThreshhold ( 1331)

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForDataOnSource ( 1351) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1351) Checks state and status information on the transport for the IO handler.
Close ( 1352) Closes the IO handler and associated Intercepts and transports.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1352) Indicates the connection is open ( 1353), and stream(s) are assigned.
Destroy ( 357) Frees the object instance.
Destroy ( 1296) Frees the object instance.

Internet Direct (Indy) Version 10.1.5 1349


TIdIOHandlerStream Class Classes

DoWork ( 357) Triggers the OnWork event handler.


EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.
InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.
InputLn ( 1298) Reads a line of data from the connection.
MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1353) Prepares the stream-based IOHandler for subsequent read and write ( 1312) requests.
Readable ( 1354) Indicates if the IOHandler is ready to perform a read request.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
CType ( 267)
Create ( 1274)
Capture ( 1290)
ReadLn ( 1304)
Write ( 1311)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
Create ( 1353)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.
WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteDirect ( 1354) Implements physical writes to the send stream in the stream-based IOHandler.
WriteFile ( 1321) Writes the contents of a local file to the IOHandler.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Events
Event Description
OnGetStreams ( 1357) Event handler signalled for creating streams for the IOHandler.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIOHandlerStream Methods
The Methods of the TIdIOHandlerStream class are listed here.

1350 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStream Class

Methods
Method Description
CheckForDataOnSource ( 1351) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1351) Checks state and status information on the transport for the IO handler.
Close ( 1352) Closes the IO handler and associated Intercepts and transports.
Connected ( 1352) Indicates the connection is open ( 1353), and stream(s) are assigned.
Create ( 1353)
Open ( 1353) Prepares the stream-based IOHandler for subsequent read and write ( 1312) requests.
Readable ( 1354) Indicates if the IOHandler is ready to perform a read request.
WriteDirect ( 1354) Implements physical writes to the send stream in the stream-based IOHandler.

Legend
Method
virtual

TIdIOHandlerStream.CheckForDataOnSource Method
Determine if data is available in the unbuffered communication layer for the connection.

Pascal
procedure CheckForDataOnSource(
ATimeout: Integer = 0
); override;
Parameters
Parameters Description
ATimeout Milliseconds to wait for the connection to become readable ( 1354), or to return data.

Description
CheckForDataOnSource is an overridden procedure used to allow inspection of the unbuffered data source for the connection in
the IOHandler.

CheckForDataOnSource is an empty implementation in TIdIOHandlerStream ( 1348) that simply implements the abstract virtual
method from the ancestor.

See Also
TIdIOHandlerStream.ReadFromSource

TIdIOHandlerStream.CheckForDisconnect Method
Checks state and status information on the transport for the IO handler.

Pascal
procedure CheckForDisconnect(
ARaiseExceptionIfDisconnected: Boolean = True;
AIgnoreBuffer: Boolean = False
); override;
Parameters
Parameters Description
ARaiseExceptionIfDisconnected Indicates if exceptions are raised when the connection has closed prematurely.
AIgnoreBuffer Indicates if data in the Indy buffer is ignored when the connection has closed prematurely.

Description
CheckForDisconnect is an overridden procedure used to inspect the status of the connection prior to or following a method call that
performs an IO operation.

CheckForDisconnect is used primarily to ensure that state and status properties for the IOHandler are synchronized with the
underlying transport mechanism.

CheckForDisconnect is an empty implementation in TIdIOHandlerStream ( 1348). It is used to implement the abstract virtual

Internet Direct (Indy) Version 10.1.5 1351


TIdIOHandlerStream Class Classes

method from the ancestor class.

TIdIOHandlerStream.Close Method
Closes the IO handler and associated Intercepts and transports.

Pascal
procedure Close; override;
Description
Close is a overridden procedure used to ensure that an assigned Intercept ( 1326) for the connection is also disconnected when
the IO handler is closed.

Close calls the inherited Close method.

Close also frees the stream instances assigned to ReceiveStream ( 1355) and SendStream ( 1356) when FreeStreams ( 1355)
indicates that the IOHandler is the owner of the streams.

Use Open ( 1353) to open ( 1353) the IOHandler and trigger the OnGetStreams ( 1357) event handler for initializing stream
instances.

See Also
TIdIOHandlerStream.ReceiveStream ( 1355)

TIdIOHandlerStream.SendStream ( 1356)

TIdIOHandlerStream.FreeStreams ( 1355)

TIdIOHandlerStream.Connected Method
Indicates the connection is open ( 1353), and stream(s) are assigned.

Pascal
function Connected: Boolean; override;
Returns
Boolean - True when the connection is open ( 1353), or data exists in the Indy buffer.

Description
Connected is an overidden Boolean function used to indicate that connection for the IOHandler has been established, and that a
stream (or streams) have been assigned for the IOHandler.

The return value for the function is True when valid stream instances are assigned for the IOHandler.

Connected uses StreamType ( 1356) to determine the streams be checked for valid stream instances in the IOHandler.
Connected returns True when the following conditions are met for the indicated StreamType ( 1356):

Stream Type Condition


stRead ReceiveStream ( 1355) is assigned.
stWrite SendStream ( 1356) is assigned.
stReadWrite Both ReceiveStream ( 1355) and SendStream ( 1356) are assigned.

See Also
TIdIOHandlerStream.StreamType ( 1356)

TIdIOHandlerStreamType ( 2960)

1352 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStream Class

TIdIOHandlerStream.Create Constructor
Overload List

Method Description
TIdIOHandlerStream.Create
(TIdNativeComponent) ( 1353)
TIdIOHandlerStream.Create
(TIdNativeComponent, TIdStream,
TIdStream) ( 1353)

TIdIOHandlerStream.Create Constructor (TIdNativeComponent)


Pascal
constructor Create(
AOwner: TIdNativeComponent
); overload; reintroduce;
Parameters
Parameters Description
AOwner Type is TIdNativeComponent ( 3061).

Description
Create is an overloaded reintroduced constructor method.

See Also
TIdIOHandlerStream.Create

TIdIOHandlerStream.Create Constructor (TIdNativeComponent, TIdStream, TIdStream)


Pascal
constructor Create(
AOwner: TIdNativeComponent;
AReceiveStream: TIdStream;
ASendStream: TIdStream = nil
); virtual; overload; reintroduce;
Parameters
Parameters Description
AOwner Type is TIdNativeComponent ( 3061).
AReceiveStream Type is TIdStream ( 3087).
ASendStream Type is TIdStream ( 3087). Default value is nil.

Description
Create is an overloaded reintroduced virtual constructor method.

See Also
TIdIOHandlerStream.Create

TIdIOHandlerStream.Open Method
Prepares the stream-based IOHandler for subsequent read and write ( 1312) requests.

Pascal
procedure Open; override;
Description
Open is an overridden procedure used to prepare the IOHandler for read and write ( 1312) operations.

Internet Direct (Indy) Version 10.1.5 1353


TIdIOHandlerStream Class Classes

Open calls the inherited Open method.

Open triggers the OnGetStream event handler, when it has been assigned, using ReceiveStream ( 1355) and SendStream (
1356) as arguments.

Set the value for StreamType ( 1356) in the OnGetStream event handler or the application creating the IOHandler.

Use Close ( 1352) to disable the IOHandler for subsequent read or write ( 1312) operations.

See Also
TIdIOHandlerStream.OnGetStream

TIdIOHandlerStream.StreamType ( 1356)

TIdIOHandlerStream.Close ( 1352)

TIdIOHandlerStream.Readable Method
Indicates if the IOHandler is ready to perform a read request.

Pascal
function Readable(
AMSec: integer = IdTimeoutDefault
): boolean; override;
Parameters
Parameters Description
AMSec Number of milliseconds to wait for an IOHandler connection to become ready for a read operation.

Returns
Boolean - True when the connection is ready for the IO request.

Description
Readable is an overridden Boolean function that indicates if the IOHandler is ready to perform an IO request.

AMSec indicates the number of milliseconds to wait for the IOHandler connection to become ready for the read operation.

The return value for the method is True when ReceiveStream ( 1355) has been assigned a valid stream instance, and the stream
is not positioned at its end.

See Also
TIdIOHandlerStream.ReceiveStream ( 1355)

TIdIOHandlerStream.WriteDirect Method
Implements physical writes to the send stream in the stream-based IOHandler.

Pascal
procedure WriteDirect(
var aBuffer: TIdBytes
); override;
Parameters
Parameters Description
aBuffer Values to be written to the stream-based IOHandler.

Description
WriteDirect is an overridden procedure that implements physical writes to the SendStream ( 1356) for methods in the
stream-based IOHandler.

ABuffer contains the values to be written to the SendStream ( 1356) for the stream-based IOHandler.

WriteDirect ensures that SendStream ( 1356) contains a valid stream instance prior to writing to the TIdStreamVCL ( 2709)

1354 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStream Class

wrapper for the stream instance.

WriteDirect calls the inherited Write ( 1312) method, and calls the TIdStreamVCL.Write ( 1312) method for stream wrapper class
using the values in ABuffer.

See Also
TIdStreamVCL ( 2709)

SendStream ( 1356)

TIdIOHandlerStream Properties
The Properties of the TIdIOHandlerStream class are listed here.

Properties
Property Description
FreeStreams ( 1355) Indicates the stream instances are owned by the IOHandler.
ReceiveStream ( 1355) Stream used for reading from the IOHandler.
SendStream ( 1356) Stream used for writing to the IOHandler.
StreamType ( 1356) Indicate the operations permitted using the data source for the IOHandler.

Legend
Property
read only

TIdIOHandlerStream.FreeStreams Property
Indicates the stream instances are owned by the IOHandler.

Pascal
property FreeStreams: Boolean;
Description
FreeStreams is a Boolean property used to indicate if the stream instances in SendStream ( 1356) and ReceiveStream ( 1355)
are owned by the IOHandler.

FreeStreams is used in Close ( 1352). When FreeStreams is True, stream instances allocated to the ReceiveStream ( 1355) and
SendStream ( 1356) properties are freed in the destructor.

The default value for FreeStreams is True, as assigned in the Create ( 1353) method.

Change the value for FreeStreams to False if streams instances are handled in the application.

Use OnGetStream to create ( 1353) stream instances for the IOHandler.

See Also
TIdIOHandlerStream.Close ( 1352)

TIdIOHandlerStream.Create ( 1353)

TIdIOHandlerStream. Destroy ( 1296)

TIdIOHandlerStream.ReceiveStream ( 1355)

TIdIOHandlerStream.SendStream ( 1356)

TIdIOHandlerStream.OnGetStream

TIdIOHandlerStream.ReceiveStream Property
Stream used for reading from the IOHandler.

Internet Direct (Indy) Version 10.1.5 1355


TIdIOHandlerStream Class Classes

Pascal
property ReceiveStream: TIdStream;
Description
ReceiveStream is a read-only TStream property that represents the stream used for reading from the IOHandler data source when
StreamType ( 1356) contains stRead or stReadWrite.

The stream instance in ReceiveStream is assigned using the argument provided in Create ( 1353).

Use SendStream ( 1356) to access the stream used for writing to the IOHandler.

Use OnGetStream to create ( 1353) and/or update the streams used for the IOHandler.

ReceiveStream is freed in Close ( 1352) when FreeStreams ( 1355) contains True.

TIdIOHandlerStream.SendStream Property
Stream used for writing to the IOHandler.

Pascal
property SendStream: TIdStream;
Description
SendStream is a read-only TStream property that represents the stream used for writing to the IOHandler data source when
StreamType ( 1356) contains stWrite or stReadWrite.

The stream instance in SendStream is assigned using the argument provided in Create ( 1353).

Use ReceiveStream ( 1355) to access the stream used for reading from the IOHandler.

Use OnGetStream to create ( 1353) and/or update the streams used for the IOHandler.

SendStream is freed in Close ( 1352) when FreeStreams ( 1355) contains True.

TIdIOHandlerStream.StreamType Property
Indicate the operations permitted using the data source for the IOHandler.

Pascal
property StreamType: TIdIOHandlerStreamType;
Description
StreamType is a TIdIOHandlerStreamType ( 2960) property used to indicate the types of operations permitted using the data
source for the IOHandler.

StreamType is used in Connected ( 1352) to determine when valid stream instances are assigned for the property value.
StreamType values indicate the following:

Value Meaning
stRead ReceiveStream ( 1355) is assigned.
stWrite SendStream ( 1356) is assigned.
stReadWrite Both ReceiveStream ( 1355) and SendStream ( 1356) are assigned.

The default value for StreamType is stReadWrite as assigned in the Create ( 1353) method.

TIdIOHandlerStream Events
The Events of the TIdIOHandlerStream class are listed here.

1356 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStreamMsg Class

Events
Event Description
OnGetStreams ( 1357) Event handler signalled for creating streams for the IOHandler.

Legend
Event

TIdIOHandlerStream.OnGetStreams Event
Event handler signalled for creating streams for the IOHandler.

Pascal
property OnGetStreams: TIdOnGetStreams;
Description
OnGetStreams is a TIdOnGetStreams ( 3070) property that represents the event handler signalled when stream(s) need to be
created for the IOHandler.

OnGetStreams is triggered in Open ( 1353) when an event handler has been assigned for the property. The ReceiveStream (
1355) and SendStream ( 1356) properties are passed as arguments to the event handler.

Assign a procedure to the event handler to allow responding to the TIdOnGetStreams ( 3070) event notification.

Change the value in FreeStreams ( 1355) to False if the stream instances in ReceiveStream ( 1355) and SendStream ( 1356)
should be freed by the application instead of in the destructor for the IOHandler.

See Also
TIdOnGetStreams ( 3070)

TIdIOHandlerStream.Open ( 1353)

TIdIOHandlerStream.ReceiveStream ( 1355)

TIdIOHandlerStream.SendStream ( 1356)

TIdIOHandlerStream.FreeStreams ( 1355)

TIdIOHandlerStreamMsg Class
Implements a stream-aware IOHandler used to capture ( 1290) RFC 2822-compliant messages.

File
IdMessageClient ( 4683)

Hierarchy

Pascal
TIdIOHandlerStreamMsg = class(TIdIOHandlerStream);
Description
TIdIOHandlerStreamMsg is a TIdIOHandlerStream ( 1348) descendant that implements a stream-aware IOHandler used to
capture ( 1290) RFC 2822-compliant messages.

TIdIOHandlerStreamMsg extends the ancestor class by implementing properties and methods needed to read data from the stream
data source, and to detect when the RFC 2822-compliant message was properly terminated during receipt.

TIdIOHandlerStreamMsg is used in the implementation of the TIdMessageClient.ProcessMessage ( 1558) method, and isolates
the differences between loading a message from a file and loading a message from and incoming TCP stream.

Internet Direct (Indy) Version 10.1.5 1357


TIdIOHandlerStreamMsg Class Classes

See Also
TIdIOHandlerStream ( 1348) TIdMessageClient.ProcessMessage ( 1558)

TIdIOHandlerStreamMsg Members
The following tables list the members exposed by TIdIOHandlerStreamMsg.

Properties
Property Description
ClosedGracefully ( 1324) Indicates that the connection has been closed by the peer for a connection.
ConnectTimeout ( 1324) Milliseconds to wait for successful completion of a connection attempt.
Destination ( 1325) Endpoint for the IOHandler connection.
FreeStreams ( 1355) Indicates the stream instances are owned by the IOHandler.
Host ( 1325) Identifies the address for the endpoint of the IOHandler connection.
InputBuffer ( 1325) Represents the internal storage for values received on the IOHandler connection.
Intercept ( 1326) Intermediary for actions using the transport and the IOHandler for the connection.
LargeStream ( 1326) Indicates byte counts read from or written to the IOHandler should use a 64-bit data type.
MaxCapturedLines ( 1327) Maximum number of lines permitted when capturing multi-line messages or responses.
MaxLineAction ( 1327) Indicates the action performed when the maximum line length is exceeded.
MaxLineLength ( 1327) Determines the maximum length of a line read from the IOHandler for the connection.
OnWork ( 1328) Event handler for buffered read and write ( 1312) operations.
OnWorkBegin ( 1328) Event handler signalled when a read or write ( 1312) request is started.
OnWorkEnd ( 1329) Event handler signalled when a read or write ( 1312) request is completed.
Opened ( 1329) Indicates if buffer and state properties have been initialized for the IOHandler.
Port ( 1329) Port number for the IOHandler connection.
ReadLnTimedout ( 1330) Indicates a timeout occurred when reading a line of text from the IOHandler.
ReadTimeout ( 1330) Indicates the milliseconds to wait for a readable ( 1300) IOHandler connection.
ReceiveStream ( 1355) Stream used for reading from the IOHandler.
RecvBufferSize ( 1330) Indicates the number of bytes to read reading large amounts of data.
SendBufferSize ( 1331) Indicates the buffer size used when writing large chunks of data to the IOHandler connection.
SendStream ( 1356) Stream used for writing to the IOHandler.
StreamType ( 1356) Indicate the operations permitted using the data source for the IOHandler.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.
WriteBufferThreshhold ( 1331)

Methods
Method Description
AfterAccept ( 1289) Specifies the method used to initialize an IOHandler after a new connection request.
AllData ( 1289) Retrieves all data from a connection.
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForDataOnSource ( 1294) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDataOnSource ( 1351) Determine if data is available in the unbuffered communication layer for the connection.
CheckForDisconnect ( 1295) Checks state and status information on the transport for the IO handler.
CheckForDisconnect ( 1351) Checks state and status information on the transport for the IO handler.
Close ( 1295) Closes the IO handler and associated Intercepts and transports.
Close ( 1352) Closes the IO handler and associated Intercepts and transports.
CloseGracefully ( 1296) Updates the ClosedGracefully ( 1324) property that indicates the connection has been closed by the peer.
Connected ( 1296) Indicates the connection is open ( 1300), or data exists in the Indy buffer.
Connected ( 1352) Indicates the connection is open ( 1353), and stream(s) are assigned.
Create ( 1360)
Destroy ( 357) Frees the object instance.
Destroy ( 1296) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InputBufferAsString ( 1297) Provides access to the contents of the Indy input buffer in string form.
InputBufferIsEmpty ( 1297) Indicates the input buffer for the IOHandler does not contain any data.

1358 Internet Direct (Indy) Version 10.1.5


Classes TIdIOHandlerStreamMsg Class

InputBufferToStream ( 1298) Stores the contents of the input buffer to a stream.


InputLn ( 1298) Reads a line of data from the connection.
MakeDefaultIOHandler ( 1299) Creates an instance of the IOHandler using the default class factory.
MakeIOHandler ( 1299) Creates a new instance of an IOHandler using the specified class reference.
Open ( 1300) Prepares the IOHandler for subsequent read and write ( 1312) requests.
Open ( 1353) Prepares the stream-based IOHandler for subsequent read and write ( 1312) requests.
Readable ( 1360) Indicates if the IOHandler is ready to perform input operations.
ReadBytes ( 1301) Perform a read request for IOHandler.
ReadCardinal ( 1301) Reads the ordinal data type from the IOHandler connection.
ReadChar ( 1302) Reads the simple data type from the IOHandler connection.
ReadInt64 ( 1302) Reads a 64-bit Integer data type from the data source for the IOHandler.
ReadInteger ( 1303) Reads the data type from the IOHandler connection.
ReadLnSplit ( 1306) Reads a line from the Indy buffer.
ReadLnWait ( 1307) Waits for a line of text to be read from the IOHandler.
ReadSmallInt ( 1307) Reads the data type from the IOHandler connection.
ReadStream ( 1308) Reads data from the IOHandler into a stream.
ReadString ( 1309) Reads a Delphi string from the IOHandler buffer.
ReadStrings ( 1310) Reads one or more lines of text from the IOHandler into a TIdStrings ( 3089) instance.
RegisterIOHandler ( 1310) Guaranteess that the IOHandler class exists in the registered IOHandler class list.
SetDefaultClass ( 1311)
CType ( 267)
Create ( 1274)
Capture ( 1290)
ReadLn ( 1304)
Write ( 1311)
WriteBufferFlush ( 1318)
WriteBufferOpen ( 1320)
Create ( 1353)
WaitFor ( 1311) Searches for a specific value in the input received from the data source for the IOHandler.
WriteBufferCancel ( 1317) Clears and cancels write ( 1312) buffering for the IOHandler.
WriteBufferClear ( 1317) Discards any exisitng data in the write ( 1312) buffering mechanism.
WriteBufferClose ( 1318) Disables uses write ( 1312) buffering for the IOHandler connection.
WriteBufferingActive ( 1319) Indicates if write ( 1312) buffering is enabled for the IOHandler.
WriteDirect ( 1321) Moves values to the socket-level transport for the IOHandler.
WriteDirect ( 1354) Implements physical writes to the send stream in the stream-based IOHandler.
WriteFile ( 1321) Writes the contents of a local file to the IOHandler.
WriteLn ( 1322) Writes a string value to IOHandler.
WriteRFCStrings ( 1322) Writes a list of RFC-compatible strings to the peer for the IOHandler class instance.

Events
Event Description
OnGetStreams ( 1357) Event handler signalled for creating streams for the IOHandler.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdIOHandlerStreamMsg Methods
The Methods of the TIdIOHandlerStreamMsg class are listed here.

Methods
Method Description
Create ( 1360)

Internet Direct (Indy) Version 10.1.5 1359


TIdIOHandlerStreamMsg Class Classes

Readable ( 1360) Indicates if the IOHandler is ready to perform input operations.

Legend
Constructor
virtual

TIdIOHandlerStreamMsg.Create Constructor
Pascal
constructor Create(
AOwner: TIdNativeComponent;
AReceiveStream: TIdStream;
ASendStream: TIdStream = nil
); override;
Parameters
Parameters Description
AOwner Owner of the object instance.
AReceiveStream Stream used for input in the stream-aware IOHandler.
ASendStream Stream used for output in the stream-aware IOHandler.

Description
Create is the overridden constructor for the object instance.

AOwner is the component that owns the object instance, or Nil when an owner is not specified.

AReceiveStream is the stream used for performing input in the stream-aware IOHandler.

ASendStream is the stream used for performing output in the stream-aware IOHandler.

Create calls the inherited constructor, and assigns the default values for the internal member variables used in the stream-aware
IOHandler.

Use Destroy ( 1296) to free the object instance.

See Also
Destroy ( 1296)

TIdIOHandlerStreamMsg.Readable Method
Indicates if the IOHandler is ready to perform input operations.

Pascal
function Readable(
AMSec: integer = IdTimeoutDefault
): Boolean; override;
Parameters
Parameters Description
AMSec Milliseconds to wait for the IOHandler to be ready for input operations. Default value is IdTimeoutDefault (
4331).

Returns
Boolean - True when the IOHandler is ready and a timeout has not occurred.

Description
Readable is an overridden Boolean function in TIdIOHandlerStreamMsg ( 1357) that indicates if the IOHandler is ready to perform
input operations using the ReceiveStream ( 1355) for the stream-aware IOHandler.

AMSec indicates the number of Milliseconds to wait for the IOHandler to be ready for input operations. The default value is
IdTimeoutDefault ( 4331).

If a previous message termination sequence (CRLF.CRLF) has not been read from the stream data source, the inherited Readble

1360 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddress Class

method is called, and the return value for the method is set to True.

The return value for the method is False when the ReceiveStream ( 1355) is unassigned, or the message termination sequence
has been previously read from the stream data source.

See Also
TIdIOHandlerStream.Readable ( 1354)

TIdIPAddress Class
Represents Internet Addresses in the format required for in IPv4 ( 1365) or IPv6 ( 1366).

File
IdIPAddress ( 4672)

Hierarchy

Pascal
TIdIPAddress = class(TObject);
Description
TIdIPAddress is a TObject descendant used to represent Internet Addresses in the format required for in IPv4 ( 1365) or IPv6 (
1366).

TIdIPAddress implements properties used to read and write the Internet Address as Cardinal, String, and TIdBytes ( 3007) data
types.

TIdIPAddress implements methods used to create ( 1363) a TIdIPAddress instance and to compare IP addresses.

See Also
TIdIPv6Address ( 3040)

TIdIPVersion ( 2962)

TIdBytes ( 3007)

TIdIPAddress Members
The following tables list the members exposed by TIdIPAddress.

Properties
Property Description
AddrType ( 1364) Indicates the format used for the IP address.
HToNBytes ( 1364) Converts an IP address to its Network byte-order representation.
IPAsString ( 1365) Converts an IP address to its representation as a string.
IPv4 ( 1365) Represents an IPv4 IP address as a Cardinal value.
IPv4AsString ( 1365) Represents the IP address in 32-bit dotted-decimal format.
IPv6 ( 1366) Represents an IPv6 IP address as a 64-bit value.
IPv6AsString ( 1366) Represents the IP address in 64-bit colon-delimited hexadecimal format.

Methods
Method Description
CompareAddress ( 1362) Compares the current IP address to a specifed value.
Create ( 1363) Constructor for the object instance.
GetHToNBytes ( 1363)
MakeAddressObject ( 1363) Creates a TIdIPAddress ( 1361) instance for an IP Address.

Internet Direct (Indy) Version 10.1.5 1361


TIdIPAddress Class Classes

Legend
Method
virtual
Property
read only

TIdIPAddress Methods
The Methods of the TIdIPAddress class are listed here.

Methods
Method Description
CompareAddress ( 1362) Compares the current IP address to a specifed value.
Create ( 1363) Constructor for the object instance.
GetHToNBytes ( 1363)
MakeAddressObject ( 1363) Creates a TIdIPAddress ( 1361) instance for an IP Address.

Legend
Method
virtual

TIdIPAddress.CompareAddress Method
Compares the current IP address to a specifed value.

Pascal
function CompareAddress(
const AIP: String;
var Err: Boolean
): Integer;
Parameters
Parameters Description
AIP IP address to compare to the object instance.
Err Indicates an error when tryng to compare IPv4 ( 1365) and IPv6 ( 1366) addresses.

Returns
Integer - 0 when the IP addresses are the same.

Description
CompareAddress is an Integer function used to compare the current value of the IP address to the IP address indicated in AIP.
CompareAddress uses the Cardinal value (for IPv4 ( 1365)) or the Word value (for IPv6 ( 1366)) for the IP addresses when
performing the comparision.

The return value for the function indicates the following:

Value Meaning

---- -----------------------------------------------------

0 Current IP address is the same as the indicated IP.


>0 Current IP address is greater than the indicated IP.
<0 Current IP address is less than the indicated IP.

The IP address for the comparision must have the same TIdIPVersion ( 2962) value, or the value in Err is set to True. Please note
that the return value in this circumstance is still 0 (zero).

1362 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddress Class

See Also
TIdIPVersion ( 2962)

TIdIPAddress.MakeAddressObject ( 1363)

TIdIPAddress.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; virtual;
Description
Create is the constructor for the object instance.

Create calls the inherited constructor, and sets the following properties to their default values:

Property Value
AddrType ( 1364) Id_IPv4
IPv4 ( 1365) 0 (same as '0.0.0.0')

TIdIPAddress.GetHToNBytes Method
Pascal
function GetHToNBytes: TIdBytes;
Returns
TIdBytes ( 3007)

Description
GetHToNBytes class method returns TIdBytes ( 3007)

TIdIPAddress.MakeAddressObject Method
Creates a TIdIPAddress ( 1361) instance for an IP Address.

Pascal
class function MakeAddressObject(
const AIP: String
): TIdIPAddress;
Parameters
Parameters Description
AIP IP address to use for initializing the object instance.

Returns
TIdIPAddress ( 1361) - IP address instance.

Description
MakeAddressObject is a TIdIPAddress ( 1361) class function used to return an initialized instance of TIdIPAddress ( 1361) using
the IP address specified in AIP. AIP can contain the IP address in IPv4 ( 1365) (dotted-decimal) or IPv6 ( 1366) (colon-delimited
hexadecimal) format.

MakeAddressObject attempts to convert the IP address to IPv6 ( 1366) format. If an error is detected, MakeAddressObject
attempts to convert the IP address to IPv4 ( 1365) format. AddrType ( 1364) is updated to indicated the IP version supported for
the specified address.

Internet Direct (Indy) Version 10.1.5 1363


TIdIPAddress Class Classes

The return value for the method is Nil if the IP address contains neither an IPv4 ( 1365) nor an IPv6 ( 1366) internet address. For
instance, using a host name or improperly formatted numeric IP address.

See Also
TIdIPAddress ( 1361)

TIdIPAddress.AddrType ( 1364)

TIdIPAddress Properties
The Properties of the TIdIPAddress class are listed here.

Properties
Property Description
AddrType ( 1364) Indicates the format used for the IP address.
HToNBytes ( 1364) Converts an IP address to its Network byte-order representation.
IPAsString ( 1365) Converts an IP address to its representation as a string.
IPv4 ( 1365) Represents an IPv4 IP address as a Cardinal value.
IPv4AsString ( 1365) Represents the IP address in 32-bit dotted-decimal format.
IPv6 ( 1366) Represents an IPv6 IP address as a 64-bit value.
IPv6AsString ( 1366) Represents the IP address in 64-bit colon-delimited hexadecimal format.

Legend
Property
read only

TIdIPAddress.AddrType Property
Indicates the format used for the IP address.

Pascal
property AddrType: TIdIPVersion;
Description
AddrType is a TIdIPVersion ( 2962) property used to indicate the Internet Address format supported for the IP address.

The default value for AddrType is Id_IPv4, as assigned in Create ( 1363).

AddrType is updated in MakeAdressObject when creating the IP address using the string value for the IP address.

AddrType is used in methods that compare or convert IP addresses using their string and/or structured representations.

See Also
Id_IPv4

TIdIPVersion ( 2962)

TIdIPAddress.HToNBYtes

TIdIPAddress.IPv4AsString ( 1365)

TIdIPAddress.IPv6AsString ( 1366)

TIdIPAddress.MakeAddressObject ( 1363)

TIdIPAddress.HToNBytes Property
Converts an IP address to its Network byte-order representation.

Pascal
property HToNBytes: TIdBytes;

1364 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddress Class

Description
HToNBytes is a read-only TIdBytes ( 3007) property used to access the byte values for an IP address in their Network byte-order
representation.

The length of the return value is dependent on the value in AddrType ( 1364).

HToNBytes use the TIdStack.HostToNetwork ( 2165) method to convert the value for the IP address.

See Also
TIdBytes ( 3007)

TIdStack.HostToNetwork ( 2165)

TIdIPAddress.IPAsString Property
Converts an IP address to its representation as a string.

Pascal
property IPAsString: String;
Description
IPAsString is a read-only String property used to access the current value for the IP address as a string data type.

IPAsString uses the value in AddrType ( 1364) to determine the format for the contents of the property.

For IPv4 ( 1365) addresses (Id_IPv4), the property is represented in its dotted-decimal form; for example, '127.0.0.1'.

For IPv6 ( 1366) addresses (Id_IPv6), the property is represented in its colon-delimited representation; for example,
'00FF:0000:0000:0001:BCAD:0D15:0000:002D'.

See Also
TIdIPAddress.AddrType ( 1364)

TIdIPVersion ( 2962)

TIdIPAddress.IPv4 Property
Represents an IPv4 IP address as a Cardinal value.

Pascal
property IPv4: Cardinal;
Description
IPv4 is a Cardinal property used to read or write the value for an IPv4 IP address using its representation as a Cardinal value.

IPv4 is updated in TIdIPAddress.MakeAddressObject ( 1363) when the class method is used to initialize the TIdIPAddress (
1361) instance.

Use IPv6 ( 1366) to access the TIdIPv6Address ( 3040) instance used for storing an IPv6 ( 1366) internet address.

See Also
TIdIPAddress.MakeAddressObject ( 1363)

TIdIPAddress ( 1361)

TIdIPAddress.IPv6 ( 1366)

TIdIPAddress.IPv4AsString Property
Represents the IP address in 32-bit dotted-decimal format.

Internet Direct (Indy) Version 10.1.5 1365


TIdIPAddrMon Class Classes

Pascal
property IPv4AsString: String;
Description
IPv4AsString is a read-only String property that represents the value of the IP address as a string in IPv4 ( 1365) format (32-bit
dotted-decimal notation). For example: '127.0.0.1'.

IPv4AsString is used in IPAsString ( 1365) when AddrType ( 1364) indicates the IP address uses the IPv4 ( 1365) format.
Reading IPv4AsString when AddrType ( 1364) contains Id_IPv6 returns a empty string ('').

Use IPv6AsString ( 1366) to return the 64-bit colon-delimited hexadecimal representation for the an IP address.

See Also
TIdIPAddress.IPAsString ( 1365)

TIdIPAddress.IPv6AsString ( 1366)

TIdIPv6Address ( 3040)

TIdIPAddress.IPv6 Property
Represents an IPv6 IP address as a 64-bit value.

Pascal
property IPv6: TIdIPv6Address;
Description
IPv6 is a TIdIPv6Address ( 3040) property that represents the IP address as a 64-bit value in IPv6 format.

IPv6 is updated in TIdIPAddress.MakeAddressObject ( 1363) when the class method is used to initialize the TIdIPAddress (
1361) instance.

Use IPv4 ( 1365) to access the Cardinal value used for storing an IPv4 ( 1365) internet address.

See Also
TIdIPv6Address ( 3040)

TIdIPAddress.MakeAddressObject ( 1363)

TIdIPAddress.IPv4 ( 1365)

TIdIPAddress.IPv6AsString Property
Represents the IP address in 64-bit colon-delimited hexadecimal format.

Pascal
property IPv6AsString: String;
Description
IPv6AsString is a read-only String property that represents the value of the IP address as a string in IPv6 ( 1366) format (64-bit
colon-delimited hexadecimal notation). For example: '00FF:0000:0000:0001:BCAD:0D15:0000:002D'.

IPv6AsString is used in IPAsString ( 1365) when AddrType ( 1364) indicates the IP address uses the IPv6 ( 1366) format.
Reading IPv6AsString when AddrType ( 1364) contains Id_IPv4 returns a empty string ('').

Use IPv4AsString ( 1365) to return the 32-bit dotted-decimal representation for the an IP address.

See Also
TIdIPAddress.IPAsString ( 1365)

TIdIPAddress.IPv4AsString ( 1365)

1366 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddrMon Class

TIdIPAddrMon Class
Monitors IP addresses for network adapters in the local system.

File
IdIPAddrMon ( 4672)

Hierarchy

Pascal
TIdIPAddrMon = class(TIdComponent);
Description
TIdIPAddrMon is a TIdComponent ( 355) descendant that implements a component used to monitor IPAddress assignments for
network adapters in the local system.

TIdIPAddrMon uses a thread to monitor IPAddresses ( 1371) for the system, and an event handler to control processing required
when an IP address is altered.

See Also
TIdComponent ( 355)

TIdIPAddrMon Members
The following tables list the members exposed by TIdIPAddrMon.

Properties
Property Description
Active ( 1369) Indicates if network adapters and IP addresses are currently being monitored.
AdapterCount ( 1370) Indicated the number of network adapters for the local system.
Busy ( 1370) Indicates the component is currently checking adapters for assigned IP addresses.
Interval ( 1370) Elapsed number of milliseconds between polling operations for the component.
IPAddresses ( 1371) Represents the current IP addresses assigned to network adapters in the local system.
Thread ( 1371) Represents the thread used to poll for changed IP addresses.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckAdapters ( 1368) Implements monitoring of IP addresses assigned in the local system, and status notifications.
Create ( 267) Constructor for the object instance.
Destroy ( 1368) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
ForceCheck ( 1369) Manually invokes the CheckAdapters ( 1368) method without executing the Thread ( 1371) for the
component.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnStatusChanged ( 1372) Event handler signalled when an IP address is added or removed.

Internet Direct (Indy) Version 10.1.5 1367


TIdIPAddrMon Class Classes

Legend
Method
virtual
Property
read only
Event

TIdIPAddrMon Methods
The Methods of the TIdIPAddrMon class are listed here.

Methods
Method Description
CheckAdapters ( 1368) Implements monitoring of IP addresses assigned in the local system, and status notifications.
Destroy ( 1368) Frees the object instance.
ForceCheck ( 1369) Manually invokes the CheckAdapters ( 1368) method without executing the Thread ( 1371) for the
component.

Legend
Method
virtual

TIdIPAddrMon.CheckAdapters Method
Implements monitoring of IP addresses assigned in the local system, and status notifications.

Pascal
procedure CheckAdapters(
Sender: TObject
);
Parameters
Parameters Description
Sender Component generating the event.

Description
CheckAdapters is procedure used to implement monitoring of IPAddresses ( 1371) assigned in the local system, and status
notifications using the OnStatusChanged ( 1372) event handler.

CheckAdapters uses the Busy ( 1370) property to determine if the method can be synchronously executed in the Thread (
1371), or must wait for completion of a prior call to the Check Adapters method. CheckAdapters is assigned to the OnTimerEvent
for the Thread ( 1371) used in the component.

CheckAdapters gets the current IPAddresses ( 1371) for the component, and compares the current IPAddresses ( 1371) to the
previous values in the property. When a change is detected (an IP address has been added, deleted, or modified), the
OnStatusChanged ( 1372) event handler is signalled using the adapter index and the IP address information.

CheckAdapters sets Busy ( 1370) to False on completion of the method.

See Also
Active ( 1369) IPAddresses ( 1371) OnStatusChanged ( 1372) Busy ( 1370) Thread ( 1371)
TIdIPAddrMonThread.OnTimerEvent

TIdIPAddrMon.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;

1368 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddrMon Class

Description
Destroy is the overridden destructor for the object instance.

Destroy ensures that the Active ( 1369) property is set to False, which forces the Thread ( 1371) to be terminated, freed, and
released.

Destroy frees resources allocated to the IPAddresses ( 1371) property prior to calling the inherited destructor.

TIdIPAddrMon.ForceCheck Method
Manually invokes the CheckAdapters ( 1368) method without executing the Thread ( 1371) for the component.

Pascal
procedure ForceCheck;
Description
ForceCheck is a procedure used to manually invoke the CheckAdapters ( 1368) method without executing the Thread ( 1371)
for the component. ForceCheck calls the CheckAdapters ( 1368) method using Nil as the thread controlling the action.

Calling ForceCheck causes the current IPAddresses ( 1371) for the local system to be filled and examined. This also causes the
OnStatusChanged ( 1372) event handler to be fired when changes to the IPAddresses ( 1371) are detected.

Use ForceCheck to collect the current IPAddresses ( 1371) for thelocal system prior to setting Active ( 1369) to True, and
executing the Thread ( 1371) for the component.

See Also
Active ( 1369) IPAddresses ( 1371) CheckAdapters ( 1368) Thread ( 1371)

TIdIPAddrMon Properties
The Properties of the TIdIPAddrMon class are listed here.

Properties
Property Description
Active ( 1369) Indicates if network adapters and IP addresses are currently being monitored.
AdapterCount ( 1370) Indicated the number of network adapters for the local system.
Busy ( 1370) Indicates the component is currently checking adapters for assigned IP addresses.
Interval ( 1370) Elapsed number of milliseconds between polling operations for the component.
IPAddresses ( 1371) Represents the current IP addresses assigned to network adapters in the local system.
Thread ( 1371) Represents the thread used to poll for changed IP addresses.

Legend
Property
read only

TIdIPAddrMon.Active Property
Indicates if network adapters and IP addresses are currently being monitored.

Pascal
property Active: Boolean;
Description
Active is a Boolean property that indicates if the component is currently monitoring the network adapters and IP addresses in the
local system.

Changing the value in Active to True causes the TIdIPAddrMonThread ( 1372) in Thread ( 1371) to be created using
CheckAdapters ( 1368) as the event handler for the OnTimerEvent in the thread. The Thread ( 1371) is executed. Please not
that the Thread ( 1371) is neither created nor executed at design time.

Internet Direct (Indy) Version 10.1.5 1369


TIdIPAddrMon Class Classes

The initial values in IPAddresses ( 1371) are assigned when Active is set to True.

Setting Active to False causes the Thread ( 1371) for the component to be terminated, freed, and released.

Assign a procedure for the OnStatusChanged ( 1372) event handler proper to setting Active to True.

See Also
Thread ( 1371) CheckAdapters ( 1368) IPAddresses ( 1371)

TIdIPAddrMon.AdapterCount Property
Indicated the number of network adapters for the local system.

Pascal
property AdapterCount: Integer;
Description
AdapterCount is an Integer property that indicates the number of network adapters for the local system. AdapterCount is assigned a
value based on the number of IP addresses detected using the global protocol stack instace variable in GStack ( 3126).

AdapterCount is used when CheckAdapters ( 1368) is called to compare the current IP addresses for local system to the values
stored in the IPAddresses ( 1371) property.

Use IPAddresses ( 1371) to access the string representation of the IP address assigned to adapters in the local system.

See Also
CheckAdapters ( 1368) IPAddresses ( 1371)

TIdIPAddrMon.Busy Property
Indicates the component is currently checking adapters for assigned IP addresses.

Pascal
property Busy: Boolean;
Description
Busy is a Boolean property that indicates if the Thread ( 1371) for component is currently checking adapters for changes to their
assigned IP addresses.

Busy is set to True in CheckAdapters ( 1368) called by the executing Thread ( 1371) for the component. If the Thread ( 1371)
has not completed its polling operation before the Interval ( 1370) has elapsed, the Busy flag prevents subsequent polling until the
thread has completed execution and slept.

Busy is set to False prior to exiting from the CheckAdapters ( 1368) method.

See Also
Thread ( 1371) OnStatusChanged ( 1372) Interval ( 1370) Active ( 1369)

TIdIPAddrMon.Interval Property
Elapsed number of milliseconds between polling operations for the component.

Pascal
property Interval: Cardinal;
Description
Interval is a Cardinal property that represents the number of milliseconds allowed to elapse while checking the current IPAddresses
( 1371) for the local system, or between executions of the Thread ( 1371) for the component.

The default value for Interval is IdIPAddrMonInterval ( 3852), as assigned during initialization of the component.

Interval is assigned to the corresponding property in the TIdIPAddrMonThread ( 1372) instance in Thread ( 1371) that is created

1370 Internet Direct (Indy) Version 10.1.5


Classes TIdIPAddrMon Class

when Active ( 1369) is changed to True.

During execution of the Thread ( 1371), Interval is used to indicate the total number of milliseconds to poll for changes to the
IPAddresses ( 1371) for the component. The Thread ( 1371) will poll for changes to the assigned IP addresses every .5 seconds
(500 ms) until the number of milliseconds in Interval has elapsed.

After polling for changes to the IPAddresses ( 1371) for the component, Interval indicates the total number of milliseconds to
Sleep ( 2904) until the next execution of the Thread ( 1371).

See Also
Thread ( 1371) Active ( 1369) TIdIPAddrMonThread.Interval

TIdIPAddrMon.IPAddresses Property
Represents the current IP addresses assigned to network adapters in the local system.

Pascal
property IPAddresses: TIdStrings;
Description
IPAddresses is a read-only TStrings property that represents the current IP addresses assigned for adapters in the local system.

Resources for the IPAddresses property are assigned during initialization of the component.

Resources for the IPAddresses property are freed in the Destroy ( 1368) method.

Values in the IPAddresses property are updated when CheckAdapters ( 1368) is called, either manually using ForceCheck (
1369) or during execution of the Thread ( 1371) for the component.

Values are added to IPAddresses when a new IP address is detected for a network adapter in the local system. Values are
removed from IPAddresses when an IP address is no longer in use for a network adapter in the local system.

Values stored in the IPAddresses property are used when executing the protected method that triggers the OnStatusChanged (
1372) event handler.

See Also
CheckAdapters ( 1368) ForceCheck ( 1369) OnStatusChanged ( 1372)

TIdIPAddrMon.Thread Property
Represents the thread used to poll for changed IP addresses.

Pascal
property Thread: TIdIPAddrMonThread;
Description
Thread is a read-only TIdIPAddrMonThread ( 1372) property that represents the thread used to poll for changes to IP addresses
assigned to network adapters in the local system.

Thread also provides a method to trigger the OnStatusChanged ( 1372) event handler when IP addresses are changed for
network adapters in the local system.

Thread is created and executed when Active ( 1369) is changed to True for the component. The executing Thread is terminated,
freed, and released when Active ( 1369) is set to False.

Set Interval ( 1370) to specify the elapsed time during polling for changes, and between executions of the polling mechanism.

Set OnStatusChanged ( 1372) to indicate the processing required for the application when an IP address is changed (added or
removed) for one of the network adapters in the local system.

Set Active ( 1369) to True to begin execution of the Thread using the preceeding values or event handler procedures.

Internet Direct (Indy) Version 10.1.5 1371


TIdIPAddrMonThread Class Classes

See Also
TIdIPAddrMonThread ( 1372) OnStatusChanged ( 1372) IPAddresses ( 1371)

TIdIPAddrMon Events
The Events of the TIdIPAddrMon class are listed here.

Events
Event Description
OnStatusChanged ( 1372) Event handler signalled when an IP address is added or removed.

Legend
Event

TIdIPAddrMon.OnStatusChanged Event
Event handler signalled when an IP address is added or removed.

Pascal
property OnStatusChanged: TIdIPAddrMonEvent;
Description
OnStatusChanged is a TIdIPAddrMonEvent ( 3039) property that represents the event handler signalled when an IP address has
been added or removed to the IPAddresses ( 1371) for the component.

OnStatusChanged is used in a protected method that executes when calling CheckAdapters ( 1368).

Arguments passed to the event handler indicate the Thread ( 1371) generating the notification (or nil when ForceCheck ( 1369)
is used), the adapter index for the altered IP address, and the previous and current values for the IP address.

OnStatusChanged is called as a Synchronized method, and allows updating VCL components in the application as result of the
event. Applications must assign a procedure to the event handler to allow responding to the event notification.

See Also
TIdIPAddrMonEvent ( 3039) CheckAdapters ( 1368) ForceCheck ( 1369)

TIdIPAddrMonThread Class
Implements the thread used to monitor network adapters and IP addresses in the local system.

File
IdIPAddrMon ( 4672)

Hierarchy

Pascal
TIdIPAddrMonThread = class(TIdThread);
Description
TIdIPAddrMonThread is a TIdThread ( 2415) descendant that implements the thread used to monitor network adapters in the local
system for changes to their IP addresses.

A TIdIPAddrMonThread instance is used in the implementation of the TIdIPAddrMon ( 1367) component. The
TIdIPAddrMonThread instance is created and executed when the Active property in TIdIPAddrMon ( 1367) is set to True.

1372 Internet Direct (Indy) Version 10.1.5


Classes TIdIPHdr Class

During execution of the thread, the OnTimerEvent event handler is triggered when the Interval for the component has elapsed. The
value in Interval is also used to indicate how long the thread remains active, polling it's Terminated ( 2424) property every .5
seconds, prior to firing the OnTimerEvent.

Execution of the OnTimerEvent event handler is synchronized to the main VCL thread.

When the Interval has elapsed during polling, the thread sleeps for the number of milliseconds indicated in Interval.

Setting the Terminated ( 2424) property for the thread, or setting Active to False in the TIdIPAddrMon ( 1367) component, cause
the thread to stop ( 2420) executing.

See Also
TIdThread ( 2415) TIdIPAddrMon.Active ( 1369) TIdIPAddrMon.CheckAdapters ( 1368) TIdIPAddrMon.Interval ( 1370)

TIdIPHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdIPHdr = class(TIdStruct);
Description
TIdIPHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdIPHdr Members
The following tables list the members exposed by TIdIPHdr.

Properties
Property Description
ip_dst ( 1376)
ip_id ( 1376)
ip_len ( 1376)
ip_off ( 1376)
ip_options ( 1376)
ip_p ( 1376)
ip_src ( 1376)
ip_sum ( 1377)
ip_tos ( 1377)
ip_ttl ( 1377)
ip_verlen ( 1377)

Methods
Method Description
CopyFrom ( 1374)
create ( 1374)
Destroy ( 1374)
ReadStruct ( 1375)
WriteStruct ( 1375)

Internet Direct (Indy) Version 10.1.5 1373


TIdIPHdr Class Classes

Legend
Method
virtual
Property
read only

TIdIPHdr Methods
The Methods of the TIdIPHdr class are listed here.

Methods
Method Description
CopyFrom ( 1374)
create ( 1374)
Destroy ( 1374)
ReadStruct ( 1375)
WriteStruct ( 1375)

Legend
Method
virtual

TIdIPHdr.CopyFrom Method
Pascal
procedure CopyFrom(
const ASource: TIdIPHdr
);
Parameters
Parameters Description
ASource Scope is const. Type is TIdIPHdr ( 1373).

Description
CopyFrom is a method.

TIdIPHdr.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdIPHdr.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

1374 Internet Direct (Indy) Version 10.1.5


Classes TIdIPHdr Class

TIdIPHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdIPHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdIPHdr Properties
The Properties of the TIdIPHdr class are listed here.

Properties
Property Description
ip_dst ( 1376)
ip_id ( 1376)
ip_len ( 1376)
ip_off ( 1376)
ip_options ( 1376)
ip_p ( 1376)
ip_src ( 1376)
ip_sum ( 1377)
ip_tos ( 1377)
ip_ttl ( 1377)
ip_verlen ( 1377)

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 1375


TIdIPHdr Class Classes

TIdIPHdr.ip_dst Property
Pascal
property ip_dst: TIdInAddr;
Description
ip_dst is a Public read-only TIdInAddr ( 1271) property.

TIdIPHdr.ip_id Property
Pascal
property ip_id: word;
Description
ip_id is a Public word property. Write access for the property is implemented using Fip_id.

TIdIPHdr.ip_len Property
Pascal
property ip_len: word;
Description
ip_len is a Public word property. Write access for the property is implemented using Fip_len.

TIdIPHdr.ip_off Property
Pascal
property ip_off: word;
Description
ip_off is a Public word property. Write access for the property is implemented using Fip_off.

TIdIPHdr.ip_options Property
Pascal
property ip_options: longword;
Description
ip_options is a Public longword property. Write access for the property is implemented using Fip_options.

TIdIPHdr.ip_p Property
Pascal
property ip_p: byte;
Description
ip_p is a Public byte property. Write access for the property is implemented using Fip_p.

TIdIPHdr.ip_src Property
Pascal
property ip_src: TIdInAddr;

1376 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastBase Class

Description
ip_src is a Public read-only TIdInAddr ( 1271) property.

TIdIPHdr.ip_sum Property
Pascal
property ip_sum: word;
Description
ip_sum is a Public word property. Write access for the property is implemented using Fip_sum.

TIdIPHdr.ip_tos Property
Pascal
property ip_tos: byte;
Description
ip_tos is a Public byte property. Write access for the property is implemented using Fip_tos.

TIdIPHdr.ip_ttl Property
Pascal
property ip_ttl: byte;
Description
ip_ttl is a Public byte property. Write access for the property is implemented using Fip_ttl.

TIdIPHdr.ip_verlen Property
Pascal
property ip_verlen: byte;
Description
ip_verlen is a Public byte property. Write access for the property is implemented using Fip_verlen.

TIdIPMCastBase Class
Implements the common properties and method for Multicast clients and servers.

File
IdIPMCastBase ( 4673)

Hierarchy

Pascal
TIdIPMCastBase = class(TIdComponent);
Description
TIdIPMCastBase is a TIdComponent ( 355) descendant that implements the the common functionality for both client and server
components that support IP multicasting, as described in the Internet Standards documents:

RFC 1112 - Host Extensions for IP Multicasting

Internet Direct (Indy) Version 10.1.5 1377


TIdIPMCastBase Class Classes

RFC 1458 - Requirements for Multicast Protocols

TIdIPMCastBase implements properties and abstract methods that allow access to and control of the MulticastGroup address, Port,
Active state, and Binding for the component.

Applications do not create ( 267) instances of TIdIPMCastBase. Use TIdIPMCastClient ( 1379) or TIdIPMCastServer ( 1387) to
provide Multicast datagram support.

See Also
TIdComponent ( 355) TIdIPMCastClient ( 1379) TIdIPMCastServer ( 1387)

TIdIPMCastBase Members
The following tables list the members exposed by TIdIPMCastBase.

Properties
Property Description
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsValidMulticastGroup ( 1378) Indicates that an IP address is a member of a multicast group address.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIPMCastBase Methods
The Methods of the TIdIPMCastBase class are listed here.

Methods
Method Description
IsValidMulticastGroup ( 1378) Indicates that an IP address is a member of a multicast group address.

Legend
Method

TIdIPMCastBase.IsValidMulticastGroup Method
Indicates that an IP address is a member of a multicast group address.

1378 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastClient Class

Pascal
function IsValidMulticastGroup(
Value: string
): Boolean;
Parameters
Parameters Description
Value Multicast Group IP address to be verified in the method.

Returns
Boolean - True when hte IP address is a multicast group address.

Description
IsValidMulticastGroup is a Boolean function that indicates if the IP address in Value represents an IP address that is a member of a
multicast group address.

IsValidMulticastGroup returns True when the first byte of the dotted-decimal IP address is in the range identified by the constants
IPMCastLo ( 4338) through IPMCastHi ( 4338). IsValidMulticastGroup will return False when the IP address is not in the
required range, or Value contains a host name instead of a dotted-decimal IP address.

See Also
TIdStack.GetIPInfo IPMCastLo ( 4338) IPMCastHi ( 4338)

TIdIPMCastClient Class
Implements an IP Multicast client.

File
IdIPMCastClient ( 4674)

Hierarchy

Pascal
TIdIPMCastClient = class(TIdIPMCastBase);
Description
TIdIPMCastClient is a TIdIPMCastBase ( 1377) descendant that implements an IP multicast client component using the UDP
transport, as described in the Internet Standards documents:

RFC 1112 - Host Extensions for IP Multicasting.

RFC 1458 - Requirements for Multicast Protocols.

TIdIPMCastClient implements abstract methods from the ancestor class, and provides additional methods and events that allow
use of multiple bindings and an event handler for datagram receipt. TIdIPMCastClient also provides a ListenerThread and an
optional threaded read capability for datagram receipt.

See Also
TIdIPMCastBase ( 1377)

TIdIPMCastListenerThread ( 1384)

TIdSocketHandles ( 2090)

TIPMCastReadEvent ( 3099)

Internet Direct (Indy) Version 10.1.5 1379


TIdIPMCastClient Class Classes

TIdIPMCastClient Members
The following tables list the members exposed by TIdIPMCastClient.

Properties
Property Description
Active ( 1381) Indicates that the client has a binding with a valid socket handle.
Bindings ( 1381) Represents socket descriptor(s) used to listen for incoming data.
BufferSize ( 1382) Indicates the buffer size to use for datagram receipt.
DefaultPort ( 1382) Default port number for socket descriptors created for the multicast client.
MulticastGroup ( 1382) Represents the multicast group IP address.
ThreadedEvent ( 1383) Indicates if threaded reads are performed using an event handler in multicast client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1380) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsValidMulticastGroup ( 1378) Indicates that an IP address is a member of a multicast group address.
CType ( 267)
Create ( 1274)

Events
Event Description
OnIPMCastRead ( 1383) Event handler signalled when a datagram is available for the multicast client.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIPMCastClient Methods
The Methods of the TIdIPMCastClient class are listed here.

Methods
Method Description
Destroy ( 1380) Frees the object instance.

Legend
Destructor
virtual

TIdIPMCastClient.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;

1380 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastClient Class

Description
Destroy is the destructor for the object instance.

Destroy ensures that Active ( 1381) is set to False, and frees and releases resources allocated in the Bindings ( 1381) property.
Destroy calls the inherited method prior to exiting.

See Also
Active ( 1381) Bindings ( 1381)

TIdIPMCastClient Properties
The Properties of the TIdIPMCastClient class are listed here.

Properties
Property Description
Active ( 1381) Indicates that the client has a binding with a valid socket handle.
Bindings ( 1381) Represents socket descriptor(s) used to listen for incoming data.
BufferSize ( 1382) Indicates the buffer size to use for datagram receipt.
DefaultPort ( 1382) Default port number for socket descriptors created for the multicast client.
MulticastGroup ( 1382) Represents the multicast group IP address.
ThreadedEvent ( 1383) Indicates if threaded reads are performed using an event handler in multicast client.

Legend
Property

TIdIPMCastClient.Active Property
Indicates that the client has a binding with a valid socket handle.

Pascal
property Active;
Description
Active is a published Boolean property in TIdIPMCastClient ( 1379). The read access specifier for Active calls an inherited method
to keep track of the design-time value for the property.

Active will be True when it is active at design-time, or when the client currently has a binding with a valid socket handle assigned.

See Also
Bindings ( 1381)

TIdIPMCastClient.Bindings Property
Represents socket descriptor(s) used to listen for incoming data.

Pascal
property Bindings: TIdSocketHandles;
Description
Bindings is a TIdSocketHandles ( 2090) property that represents one or more socket descriptors used to listen for incoming data
packets in the multicast client.

Bindings is used when the TIdIPMCastListenerThread ( 1384) allocated for the client is executed. Bindings is used to set the
socket options required when joining or departing the specified MulticastGroup ( 1382).

See Also
MulticastGroup ( 1382)

TIdSocketHandles ( 2090)

Internet Direct (Indy) Version 10.1.5 1381


TIdIPMCastClient Class Classes

TIdIPMCastListenerThread ( 1384)

TIdIPMCastClient.BufferSize Property
Indicates the buffer size to use for datagram receipt.

Pascal
property BufferSize: Integer;
Description
BufferSize is an Integer property that represents the size of the buffer to allocate when the listener thread receives a datagram for
the multicast client.

The default value for BufferSize is ID_UDP_BUFFERSIZE ( 3824), as assigned during initialization of the component.

See Also
TIdIPMCastListenerThread ( 1384)

ID_UDP_BUFFERSIZE ( 3824)

TIdIPMCastClient.DefaultPort Property
Default port number for socket descriptors created for the multicast client.

Pascal
property DefaultPort: integer;
Description
DefaultPort is an Integer property that represents the default port number used when creating Bindings ( 1381) for the multicast
client.

Changing the value of DefaultPort will also update the value in the TIdSocketHandles.DefaultPort ( 2093) property in Bindings (
1381).

See Also
TIdSocketHandles.DefaultPort ( 2093)

Bindings ( 1381)

TIdIPMCastClient.MulticastGroup Property
Represents the multicast group IP address.

Pascal
property MulticastGroup;
Description
MulticastGroup is a published property in TIdIPMCastClient ( 1379) that identifies the dotted-decimal representation of the
multicast group address for the client. MulticastGroup is used when setting socket options for a binding used by the multicast client.

MulticastGroup must contain an IP address acceptible to IsValidMulticastGroup ( 1378), or an exception will be raised when
creating, accessing, or releasing the Bindings ( 1381) used by the multicast client.

See Also
TIdIPMCastBase.IsValidMulticastGroup ( 1378)

Bindings ( 1381)

1382 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastClient Class

TIdIPMCastClient.ThreadedEvent Property
Indicates if threaded reads are performed using an event handler in multicast client.

Pascal
property ThreadedEvent: boolean;
Description
ThreadedEvent is a Boolean property that indicates if the multicast client should allow use of threaded reads from it's listener thread.

When ThreadEvent is True, the TIdIPMCastListenerThread ( 1384) will use the read method defined in the listener thread to
trigger the TIdIPMCastClient.OnIPMCastRead ( 1383) event handler. When ThreadEvent is False, the read method is
synchronized to the main VCL thread.

The default value for ThreadedEvent is DEF_IMP_THREADEDEVENT ( 3189), as assigned during initialization of the component.

See Also
TIdIPMCastClient.OnIPMCastRead ( 1383)

TIdIPMCastListenerThread.IPMCastRead ( 1386)

TIdIPMCastClient Events
The Events of the TIdIPMCastClient class are listed here.

Events
Event Description
OnIPMCastRead ( 1383) Event handler signalled when a datagram is available for the multicast client.

Legend
Event

TIdIPMCastClient.OnIPMCastRead Event
Event handler signalled when a datagram is available for the multicast client.

Pascal
property OnIPMCastRead: TIPMCastReadEvent;
Description
OnIPMCastRead is a TIPMCastReadEvent ( 3099) property that represents the event handler signalled when a datapacket has
been received on the socket descriptor for the multicast client. OnIPMCastRead allows the client to implement processing required
to read and handle the datagram contents.

Applications must assign a procedure to the TIPMCastReadEvent ( 3099) event handler to allow responding to the event
notification.

The event handler has arguments that include:

Parameter Usage
Sender Multicast client for the event notification.
AData Stream containing the contents of the datagram.
ABinding Socket descriptor used to read the incoming datagram.

See Also
TIPMCastReadEvent ( 3099)

Internet Direct (Indy) Version 10.1.5 1383


TIdIPMCastListenerThread Class Classes

TIdSocketHandle ( 2071)

TIdIPMCastListenerThread Class
Implements a listener thread for incoming multicast client connections.

File
IdIPMCastClient ( 4674)

Hierarchy

Pascal
TIdIPMCastListenerThread = class(TIdThread);
Description
TIdIPMCastListenerThread is a TIdThread ( 2415) descendant that implements the mechanism used to listen for incoming
datagram packets for an active TIdTIdIPMCastClient instance.

TIdIPMCastListenerThread provides properties and methods that allow the listener thread to be executed in order to accept
incoming connections, read and buffer the incoming datagram packets, and optionally signal the associated multicast client of the
operation.

See Also
TIdThread ( 2415)

TIdIPMCastListenerThread Members
The following tables list the members exposed by TIdIPMCastListenerThread.

Properties
Property Description
AcceptWait ( 1387) Indicates the number of milliseconds to wait for selection of socket descriptors.
Data ( 2422) Storage slot for data used by a thread.
Loop ( 2422) Indicates if the thread is Run continuously until Stopped ( 2423).
Name ( 2422) Name assigned to the thread during execution.
ReturnValue ( 2423) Return value from execution of the thread.
StopMode ( 2423) Determines the action taken when the Stop ( 2420) method is called.
Stopped ( 2423) Indicates when a thread is terminated or suspended.
Terminated ( 2424) Indicates if the thread has been halted by calling Terminate ( 2421).
TerminatingException ( 2424) Contains the text of an Exception.Message raised within the Execute method.
TerminatingExceptionClass ( 2424) Represents the class type for an exception raised during Execute.
Yarn ( 2425) Represents the thread or fiber for the scheduler of the thread.

Methods
Method Description
Create ( 1385) Constructor for the object instance.
Destroy ( 1386) Frees the object instance.
IPMCastRead ( 1386) Signals receipt of a datagram packet to the multicast client.
Start ( 2419) Starts or resumes execution of a thread.
Stop ( 2420) Halts execution of the thread instance.
Synchronize ( 2420) Executes a thread method synchronized to the main VCL thread.
Terminate ( 2421) Forces the thread of execution to be halted.
TerminateAndWaitFor ( 2421) Signals a thread to terminate ( 2421) and waits for completion of the Execute method.

1384 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastListenerThread Class

Events
Event Description
OnException ( 2425) Handles exceptions raised in the thread of execution.
OnStopped ( 2426) Represents an event handler signalled when stopping a thread of execution.

Legend
Data Member
Constructor
virtual
Property
read only
Event

TIdIPMCastListenerThread Fields
The Fields of the TIdIPMCastListenerThread class are listed here.

Legend
Data Member

TIdIPMCastListenerThread.FServer Field
Pascal
FServer: TIdIPMCastClient;
Description
FServer

TIdIPMCastListenerThread Methods
The Methods of the TIdIPMCastListenerThread class are listed here.

Methods
Method Description
Create ( 1385) Constructor for the object instance.
Destroy ( 1386) Frees the object instance.
IPMCastRead ( 1386) Signals receipt of a datagram packet to the multicast client.

Legend
Constructor
virtual

TIdIPMCastListenerThread.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
AOwner: TIdIPMCastClient
); reintroduce;
Parameters
Parameters Description
Owner Multicast client that owns the listening thread.

Internet Direct (Indy) Version 10.1.5 1385


TIdIPMCastListenerThread Class Classes

Description
Create is the constructor for the object instance. Create calls the inherited Create method to instantiate a suspended thread. The
value in Owner is assigned to the public member that represents the server for the listener thread, and BufferSize ( 3137) is set to
the corresponding property value in Owner. Create sets the default value for AcceptWait ( 1387) to 1000. Create also allocates
resources used for the Buffer property.

See Also
TIdIPMCastClient ( 1379)

Destroy ( 1386)

TIdIPMCastListenerThread.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees resource allocated to the Buffer property during initialization of the
component.

Destroy calls the Destroy method.

See Also
Buffer

TIdIPMCastListenerThread.IPMCastRead Method
Signals receipt of a datagram packet to the multicast client.

Pascal
procedure IPMCastRead;
Description
IPMCastRead is a procedure that allows the listener thread to signal receipt of a datagram packet to the multicast client.
IPMCastRead uses the public member representing the client context to perform the protected method that signals the
TIdIPMCastClient.OnIPMCastRead ( 1383) event handler.

See Also
TIdIPMCastClient.OnIPMCastRead ( 1383)

TIdIPMCastClient.ThreadedEvent ( 1383)

TIdIPMCastListenerThread Properties
The Properties of the TIdIPMCastListenerThread class are listed here.

Properties
Property Description
AcceptWait ( 1387) Indicates the number of milliseconds to wait for selection of socket descriptors.

Legend
Property

1386 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastServer Class

TIdIPMCastListenerThread.AcceptWait Property
Indicates the number of milliseconds to wait for selection of socket descriptors.

Pascal
property AcceptWait: integer;
Description
AcceptWait is an Integer property that indicates the number of milliseconds that the executing listener thread should wait for
selection of socket descriptors used to read incoming datagrams for the multicast client.

The default value for AcceptWait is 1000, as assigned in the Create ( 1385) constructor.

See Also
TIdIPMCastListenerThread.Run

TIdIPMCastServer Class
Implements an IP Multicast server.

File
IdIPMCastServer ( 4674)

Hierarchy

Pascal
TIdIPMCastServer = class(TIdIPMCastBase);
Description
TIdIPMCastServer is a TIdIPMCastBase ( 1377) descendant that implements an IP multicast server component using the UDP
transport, as described in the Internet Standards documents:

RFC 1112 - Host Extensions for IP Multicasting

RFC 1458 - Requirements for Multicast Protocols

TIdIPMCastServer implements abstract methods from the ancestor class, and provides additional methods and properties used for
loopback diagnostics, setting socket options, and transmission of Multicast datagrams.

See Also
TIdIPMCastClient ( 1379) TIdIPMCastBase ( 1377) IndySupport ( 15)

TIdIPMCastServer Members
The following tables list the members exposed by TIdIPMCastServer.

Properties
Property Description
Active ( 1390) Indicates if the multicast server is active and able to receive and transmit datagram packets.
Binding ( 1390) Socket descriptor for multicast server transmissions.
Loopback ( 1391) Indicates if datagrams for the local network module are used for the server.
MulticastGroup ( 1391) Represents the multicast group IP address.
Port ( 1391) Port number used for datagram transmissions.
TimeToLive ( 1392) Number of hops allowed across routers and gateways for the datagram transmission.
Version ( 269) Identifies the version number for the Indy component suite.

Internet Direct (Indy) Version 10.1.5 1387


TIdIPMCastServer Class Classes

WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1388) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsValidMulticastGroup ( 1378) Indicates that an IP address is a member of a multicast group address.
CType ( 267)
Create ( 1274)
Send ( 1389)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIPMCastServer Methods
The Methods of the TIdIPMCastServer class are listed here.

Methods
Method Description
Destroy ( 1388) Frees the object instance.
Send ( 1389)

Legend
Destructor
virtual

TIdIPMCastServer.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy sets the Active ( 1390) property to False, to ensure that the IP address
for the local binding is removed as a member of the MultiCast Group address.

Destroy calls the inherited Destroy method prior to exiting.

See Also
Active ( 1390) Create ( 267)

1388 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastServer Class

TIdIPMCastServer.Send Method
Overload List

Method Description
TIdIPMCastServer.Send (string) ( Sends a datagram containing a string value.
1389)
TIdIPMCastServer.Send (TIdBytes) ( Sends a datagram containing a arbitrary byte values.
1389)

TIdIPMCastServer.Send Method (TIdBytes)


Sends a datagram containing a arbitrary byte values.

Pascal
procedure Send(
const ABuffer: TIdBytes
); overload;
Parameters
Parameters Description
ABuffer Byte values to be sent in the datagram.

Description
Send is an overloaded procedure that allows the multicast server to send a datagram containing the arbitrary byte values specified
in ABuffer to the group address specified in the MulticastGroup ( 1391) property.

Send calls the MulticastBuffer method using values in the MulticastGroup ( 1391) and Port ( 1391) properties, as well as the
datagramn content specified in ABuffer.

Exceptions
Exceptions Description
EIdMCastNotValidAddress ( 115) Raised when MulticastGroup ( 1391) does not contain a valid IP multicast group address.

See Also
Send MulticastGroup ( 1391) Port ( 1391) EIdMCastNotValidAddress ( 115)

TIdIPMCastServer.Send Method (string)


Sends a datagram containing a string value.

Pascal
procedure Send(
const AData: string
); overload;
Parameters
Parameters Description
AData String value to be sent in the datagram.

Description
Send is an overloaded procedure that allows the multicast server to send a datagram containing the value specified in AData to the
group address specified in the MulticastGroup ( 1391) property.

Send calls the MulticastBuffer method using values in the MulticastGroup ( 1391) and Port ( 1391) properties, as well as the
value and length indicated in AData.

Exceptions
Exceptions Description
EIdMCastNotValidAddress ( 115) Raised when MulticastGroup ( 1391) does not contain a valid IP multicast group address.

Internet Direct (Indy) Version 10.1.5 1389


TIdIPMCastServer Class Classes

See Also
Send MulticastGroup ( 1391) Port ( 1391) EIdMCastNotValidAddress ( 115)

TIdIPMCastServer Properties
The Properties of the TIdIPMCastServer class are listed here.

Properties
Property Description
Active ( 1390) Indicates if the multicast server is active and able to receive and transmit datagram packets.
Binding ( 1390) Socket descriptor for multicast server transmissions.
Loopback ( 1391) Indicates if datagrams for the local network module are used for the server.
MulticastGroup ( 1391) Represents the multicast group IP address.
Port ( 1391) Port number used for datagram transmissions.
TimeToLive ( 1392) Number of hops allowed across routers and gateways for the datagram transmission.

Legend
Property
read only

TIdIPMCastServer.Active Property
Indicates if the multicast server is active and able to receive and transmit datagram packets.

Pascal
property Active;
Description
Active is a published Boolean property in TIdIPMCastServer ( 1387) that indicates if the multicast server is active and able to
receive and transmit datagram packets.

Active uses an overriden read access specifier that ensures that the Binding ( 1390) for the server has been initialized and the
socket handle has been allocated.

Active is set to False when the server is freed using Destroy ( 1388).

See Also
Binding ( 1390) Destroy ( 1388)

TIdIPMCastServer.Binding Property
Socket descriptor for multicast server transmissions.

Pascal
property Binding: TIdSocketHandle;
Returns
TIdSocketHandle ( 2071) - Socket descriptor for the multicast server.

Description
Binding is a read-only TIdSocketHandle ( 2071) property that represents the socket descriptor used by the multicast server to
send ( 1389) datagram packets to multicast clients.

The read access specifier for the property ensures that the Binding has been initialized, and that a datagram socket handle has
been allocated and bound using the MulticastGroup ( 1391) address and group membership socket options. During initialization,
the socket handle also received the value in the TimeToLive ( 1392) property.

The value of the Loopback ( 1391) property is set to True during initialization of the Binding to allow diagnostics.

1390 Internet Direct (Indy) Version 10.1.5


Classes TIdIPMCastServer Class

See Also
Loopback ( 1391) TimeToLive ( 1392) MulticastGroup ( 1391) TIdSocketHandle ( 2071)

TIdIPMCastServer.Loopback Property
Indicates if datagrams for the local network module are used for the server.

Pascal
property Loopback: Boolean;
Description
Loopback is a Boolean property that indicates if Loopback socket options are used on the Binding ( 1390) for the multicast server.
Loopback indicates if the local network module can deliver multicast datagram packets that were transmitted from that network
module.

Changing the value of the Loopback property will result in a change to the socket options for the Binding ( 1390) to ensure that it
reflects the new property value.

The default value for the Loopback is DEF_IMP_LOOPBACK ( 3189), as assigned during initialization of the component.

See Also
Binding ( 1390) DEF_IMP_LOOPBACK ( 3189)

TIdIPMCastServer.MulticastGroup Property
Represents the multicast group IP address.

Pascal
property MulticastGroup;
Description
MulticastGroup is a published property in TIdIPMCastServer ( 1387) that identifies the dotted-decimal representation of the
multicast group address for the server.

MulticastGroup is used when setting socket options for a binding used by the multicast server, and when transmitting datagram
packets to the network interface.

MulticastGroup must contain an IP address acceptable to the IsValidMulticastGroup ( 1378) method, or an exception can be
raised when creating, accessing, or releasing the Binding ( 1390) used by the multicast server.

See Also
TIdIPMCastBase.IsValidMulticastGroup ( 1378) Binding ( 1390) Send ( 1389)

TIdIPMCastServer.Port Property
Port number used for datagram transmissions.

Pascal
property Port;
Description
Port is a published Integer property in TIdIPMCastServer ( 1387) that represents the port number used when sending datagram
transmissions using the Send ( 1389) method.

See Also
Send ( 1389)

Internet Direct (Indy) Version 10.1.5 1391


TIdIPOptions Class Classes

TIdIPMCastServer.TimeToLive Property
Number of hops allowed across routers and gateways for the datagram transmission.

Pascal
property TimeToLive: Byte;
Description
TimeToLive is a Byte property that indicates the number of hops permitted in routers and gateways that must handle the datagram
transmission.

TimeToLive is used to set the socket options for the Binding ( 1390) used by the multicast server. Changing the value of
TimeToLive forces an update to the socket options for the Binding ( 1390).

The default value for TimeToLive is DEF_IMP_TTL ( 3189), as assigned during initialization of the component.

See Also
DEF_IMP_TTL ( 3189) Binding ( 1390)

TIdIPOptions Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdIPOptions = class(TIdStruct);
Description
TIdIPOptions is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdIPOptions Members
The following tables list the members exposed by TIdIPOptions.

Properties
Property Description
ipopt_list ( 1394)

Methods
Method Description
create ( 1393)
get_ipopt_list ( 1393)
ReadStruct ( 1393)
set_ipopt_list ( 1394)
WriteStruct ( 1394)

Legend
Constructor
virtual

1392 Internet Direct (Indy) Version 10.1.5


Classes TIdIPOptions Class

Property

TIdIPOptions Methods
The Methods of the TIdIPOptions class are listed here.

Methods
Method Description
create ( 1393)
get_ipopt_list ( 1393)
ReadStruct ( 1393)
set_ipopt_list ( 1394)
WriteStruct ( 1394)

Legend
Constructor
virtual

TIdIPOptions.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

TIdIPOptions.get_ipopt_list Method
Pascal
function get_ipopt_list(
Index: Integer
): byte;
Parameters
Parameters Description
Index Type is Integer.

Returns
byte

Description
get_ipopt_list is a method.

get_ipopt_list returns a byte value.

TIdIPOptions.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Internet Direct (Indy) Version 10.1.5 1393


TIdIPWatch Class Classes

Description
ReadStruct is a overridden method.

TIdIPOptions.set_ipopt_list Method
Pascal
procedure set_ipopt_list(
Index: Integer;
const Value: byte
);
Parameters
Parameters Description
Index Type is Integer.
Value Scope is const. Type is byte.

Description
set_ipopt_list is a method.

TIdIPOptions.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdIPOptions Properties
The Properties of the TIdIPOptions class are listed here.

Properties
Property Description
ipopt_list ( 1394)

Legend
Property

TIdIPOptions.ipopt_list Property
Pascal
property ipopt_list [Index : Integer]: byte;
Description
ipopt_list is a Public byte property. Write access for the property is implemented using set_ipopt_list ( 1394).

ipopt_list is the default property for the object instance.

1394 Internet Direct (Indy) Version 10.1.5


Classes TIdIPWatch Class

TIdIPWatch Class
Determines the online status and IP addresses for a computer.

File
IdIPWatch ( 4675)

Hierarchy

Pascal
TIdIPWatch = class(TIdComponent);
Description
TIdIPWatch determines Online status, returns current IP address, and (optionally) keeps history of IP addresses issued to the
computer using the class instance.

TIdIPWatch uses CurrentIP ( 1398) to determine online status, and will not establish a new connection using RAS or DUN.

See Also
IndySupport ( 15)

TIdIPWatch Members
The following tables list the members exposed by TIdIPWatch.

Properties
Property Description
Active ( 1398) Indicates that IP history collection is active.
CurrentIP ( 1398) Indicates the most recent IP used by the host.
HistoryEnabled ( 1398) Indicates that the IP history is stored to the history file.
HistoryFilename ( 1399) Identifies the IP history storage file.
IPHistoryList ( 1399) IPHistoryList is a list of IP addresses detected on the local computer.
IsOnline ( 1399) Identifies if the local host is online.
MaxHistoryEntries ( 1400) The maximum number of IP addesses allowed in IPHistoryList ( 1399).
OnStatusChanged ( 1400) OnStatusChanged event handler.
PreviousIP ( 1400) Previous IP address detected on the local computer.
Version ( 269) Identifies the version number for the Indy component suite.
WatchInterval ( 1400) Specifies the interval between checks for an IP address change.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1396) Frees the class instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
ForceCheck ( 1396) Forces collection of the current IP address.
GetVersion ( 269) Version ( 269) number for Indy component suite.
LoadHistory ( 1397) Loads the history of local IP addresses from a file.
LocalIP ( 1397) Current IP address assigned to the local host.
SaveHistory ( 1397) Save IP addresses in IPHistoryList ( 1399) to a file.
CType ( 267)
Create ( 1274)

Internet Direct (Indy) Version 10.1.5 1395


TIdIPWatch Class Classes

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdIPWatch Methods
The Methods of the TIdIPWatch class are listed here.

Methods
Method Description
Destroy ( 1396) Frees the class instance.
ForceCheck ( 1396) Forces collection of the current IP address.
LoadHistory ( 1397) Loads the history of local IP addresses from a file.
LocalIP ( 1397) Current IP address assigned to the local host.
SaveHistory ( 1397) Save IP addresses in IPHistoryList ( 1399) to a file.

Legend
Destructor
virtual

TIdIPWatch.Destroy Destructor
Frees the class instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the class instance. Prior to calling the SaveHistory ( 1397) inherited Destroy method, TIdIPWatch (
1395) performs the following operations:

• Ensures that CurrentIP ( 1398) is in the IPHistoryList ( 1399).


• Disables the TIdIPWatch ( 1395) instance.
• Saves the history list in IPHistoryList ( 1399) to the file identified by HistoryFilename ( 1399).
• Frees the IPHistoryList ( 1399).
See Also
SaveHistory ( 1397)

TIdIPWatch.ForceCheck Method
Forces collection of the current IP address.

Pascal
function ForceCheck: Boolean;
Returns
Boolean - True when an IP address is assigned.

1396 Internet Direct (Indy) Version 10.1.5


Classes TIdIPWatch Class

Description
ForceCheck is a Boolean function that returns a value indicating if the local system is online. ForceCheck does not wait for the
internal TIdIPWatchThread ( 1401) to generate an event notification by calling CheckStatus.

See Also
TIdIPWatchThread ( 1401)

TIdIPWatch.LoadHistory Method
Loads the history of local IP addresses from a file.

Pascal
procedure LoadHistory;
Description
LoadHistory is a procedure used to restore the IPHistoryList ( 1399) from the file identified in HistoryFilename ( 1399).
LoadHistory assigns the most recent IP address from IPHistoryList ( 1399) to the private variable used to maintain the PreviousIP
( 1400) address.

Note: LoadHistory does not restore the history list in the IDE, or any time the component state is csDesigning ( 3178).

See Also
MaxHistoryEntries ( 1400)

TIdIPWatch.LocalIP Method
Current IP address assigned to the local host.

Pascal
function LocalIP: string;
Returns
string - Currennt IP address for the local system.

Description
LocalIP is a String function that returns the currently assigned IP address for the local system from the TCP/IP stack. LocalIP is
used to determine the value of CurrentIP ( 1398).

See Also
TIdStack.LocalAddress ( 2182) CurrentIP ( 1398)

TIdIPWatch.SaveHistory Method
Save IP addresses in IPHistoryList ( 1399) to a file.

Pascal
procedure SaveHistory;
Description
SaveHistory is a procedure used to write the contents of the IPHistoryList ( 1399) to the file identified by HistoryFilename ( 1399)
when the HistoryEnabled ( 1398) property is True. SaveHistory has no effect when the ComponentState is csDesigning ( 3178).

See Also
IPHistoryList ( 1399) HistoryFilename ( 1399) HistoryEnabled ( 1398)

Internet Direct (Indy) Version 10.1.5 1397


TIdIPWatch Class Classes

TIdIPWatch Properties
The Properties of the TIdIPWatch class are listed here.

Properties
Property Description
Active ( 1398) Indicates that IP history collection is active.
CurrentIP ( 1398) Indicates the most recent IP used by the host.
HistoryEnabled ( 1398) Indicates that the IP history is stored to the history file.
HistoryFilename ( 1399) Identifies the IP history storage file.
IPHistoryList ( 1399) IPHistoryList is a list of IP addresses detected on the local computer.
IsOnline ( 1399) Identifies if the local host is online.
MaxHistoryEntries ( 1400) The maximum number of IP addesses allowed in IPHistoryList ( 1399).
OnStatusChanged ( 1400) OnStatusChanged event handler.
PreviousIP ( 1400) Previous IP address detected on the local computer.
WatchInterval ( 1400) Specifies the interval between checks for an IP address change.

Legend
Property
read only

TIdIPWatch.Active Property
Indicates that IP history collection is active.

Pascal
property Active: Boolean;
Description
Active is a Boolean property used to indicate that the class instance is ready to detect new IP addresses. For TIdIPWatch ( 1395),
changing the value of Active also updates the state of the internal TIdIPWatchThread ( 1401) used by the object instance.

The default value for Active is IP_WATCH_ACTIVE.

TIdIPWatch.CurrentIP Property
Indicates the most recent IP used by the host.

Pascal
property CurrentIP: string;
Description
CurrentIP is a read-only String property used to identify the most recent IP address returned by the LocalIP ( 1397) function.

CurrentIP is updated as a result of TIdIPWatchThread ( 1401) event notifications when WatchInterval ( 1400) milliseconds has
elapsed, or by a call to ForceCheck ( 1396).

See Also
TIdIPWatchThread ( 1401)

TIdIPWatch.HistoryEnabled Property
Indicates that the IP history is stored to the history file.

Pascal
property HistoryEnabled: Boolean;

1398 Internet Direct (Indy) Version 10.1.5


Classes TIdIPWatch Class

Description
HistoryEnabled is a Boolean property used to indicate if the IPHistoryList ( 1399) should be saved in SaveHistory ( 1397), or
restored in LoadHistory ( 1397), using the file specified in HistoryFilename ( 1399).

The default value for HistoryEnabled is IP_WATCH_HIST_ENABLED, as assigned in the Create ( 267) constructor.

See Also
IPHistoryList ( 1399) HistoryFilename ( 1399) SaveHistory ( 1397) LoadHistory ( 1397) IP_WATCH_HIST_ENABLED

TIdIPWatch.HistoryFilename Property
Identifies the IP history storage file.

Pascal
property HistoryFilename: string;
Description
HistoryFilename is a String property used to identify the file name for saving and/or restoring the IP addresses in IPHistoryList (
1399). The default value for HistoryFilename is defined in the constant IP_WATCH_HIST_FILENAME ( 4337).

HistoryFilename is used read previous IP addresses into IPHistoryList ( 1399) in the LoadHistory ( 1397) method.
HistoryFilename is also used to store IP addresses, when HistoryEnabled ( 1398) is True, in the SaveHistory ( 1397) method.

See Also
IPHistoryList ( 1399) LoadHistory ( 1397) SaveHistory ( 1397) HistoryEnabled ( 1398) IP_WATCH_HIST_FILENAME (
4337)

TIdIPWatch.IPHistoryList Property
IPHistoryList is a list of IP addresses detected on the local computer.

Pascal
property IPHistoryList: TIdStringList;
Description
IPHistoryList is a read-only TStringList property used as a container for IP addresses detected by the TIdIPWatch ( 1395) class
instance. IPHistoryList does not record an empty IP address ('') or the local IP address 127.0.0.1. IPHistoryList does not record an
IP address when the most recent IP address in the history list matches the current IP address.

IPHistoryList is updated in the methods CheckStatus and Destroy ( 1396).

The IPHistoryList can contain a maximum number of entries identified in the MaxHistoryEntries ( 1400) property. When the the
number of entries exceeds MaxHistoryEntries ( 1400), the oldest IP address in the history list will be deleted.

See Also
MaxHistoryEntries ( 1400)

TIdIPWatch.IsOnline Property
Identifies if the local host is online.

Pascal
property IsOnline: Boolean;
Description
IsOnline is a read-only Boolean property used to identify the current online status. IsOnline is updated in the CheckStatus method,
and is set to True when the current IP address is not empty ('') or the default local host value 127.0.0.1.

The default value for IsOnline is False.

Internet Direct (Indy) Version 10.1.5 1399


TIdIPWatch Class Classes

See Also
CheckStatus CurrentIP ( 1398)

TIdIPWatch.MaxHistoryEntries Property
The maximum number of IP addesses allowed in IPHistoryList ( 1399).

Pascal
property MaxHistoryEntries: Integer;
Description
MaxHistoryEntries is an Integer property used to determine the maximum number of IP address to be maintain in IPHistoryList (
1399). When the number of entries in IPHistoryList ( 1399) exceeds MaxHistoryEntries, the oldest IP address will be deleted from
IPHistoryList ( 1399).

See Also
IPHistoryList ( 1399)

TIdIPWatch.OnStatusChanged Property
OnStatusChanged event handler.

Pascal
property OnStatusChanged: TIdNotifyEvent;
Description
OnStatusChanged is a TNotifyEvent event handler triggered when the value of IsOnline ( 1399) is changed. The
OnStatusChanged event handler is not called when the value of ComponentState is csDesigning ( 3178). The OnStatusChanged
event handler is generally used to update progress indicators or GUI components.

TIdIPWatch.PreviousIP Property
Previous IP address detected on the local computer.

Pascal
property PreviousIP: string;
Description
PreviousIP is a String property, used internally by TIdIPWatch ( 1395), to track the most recently detected IP address. PreviousIP
is used in conjunction with CurrentIP ( 1398) to determine when a new IP address needs to be added to the IPHistoryList ( 1399).

See Also
CurrentIP ( 1398) IPHistoryList ( 1399)

TIdIPWatch.WatchInterval Property
Specifies the interval between checks for an IP address change.

Pascal
property WatchInterval: Cardinal;
Description
WatchInterval is a Cardinal property used to determine the time, in milliseconds, between execution of the event-based timer used
by TIdIPWatch ( 1395). The default value for WatchInterval is IP_WATCH_INTERVAL ( 4337).

WatchInterval is used at runtime when the value in Active ( 1398) changes from False to True. The associated event-based timer
in the internal TIdIPWatchThread ( 1401) instance is created, initialized to use the value in WatchInterval, and the thread is

1400 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

started. If the value in WatchInterval is changed after Active ( 1398) set to True, the Interval property for the internal
TIdIPWatchThread ( 1401) instance is updated to contain the same value.

Example
(Delphi) Changing the interval and event handler for the thread timer event in TIdIPWatch.
IdIPWatch1.WatchInterval := 15000; // 15 seconds
IdIPWatch1.OnStatusChanged := UIShowStatusChange;
IDIPWatch1.Active := True;
See Also
TIdIPWatchThread ( 1401) Active ( 1398) OnStatusChanged ( 1400)

TIdIPWatchThread Class
Provides a Timer-like thread for TIdIPWatch ( 1395).

File
IdIPWatch ( 4675)

Hierarchy

Pascal
TIdIPWatchThread = class(TIdThread);
Description
TIdIPWatchThread is a TIdThread ( 2415) descendant that provides the ability to monitor the local PC for new IP addresses at a
defined interval. By default, TIdIPWatchThread awakens on a specified Interval and triggers the TimerEvent until the thread is
Terminated ( 2424).

TIdIPWatchThread is used in the implementation of TIdIPWatch ( 1395) and is created when the object instance becomes Active.

See Also
TIdIPWatch ( 1395) IndySupport ( 15)

TIdIRC Class
File
IdIRC ( 4675)

Hierarchy

Pascal
TIdIRC = class(TIdCmdTCPClient);
Description
TIdIRC is a TIdCmdTCPClient ( 317) descendant.

See Also
TIdCmdTCPClient ( 317)

Internet Direct (Indy) Version 10.1.5 1401


TIdIRC Class Classes

TIdIRC Members
The following tables list the members exposed by TIdIRC.

Properties
Property Description
AltNickname ( 1423)
Away ( 1423)
BoundIP ( 2335) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2336) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
CommandHandlers ( 321) Collection for TIdCommandHandler ( 341) instances implemented in the client.
ConnectTimeout ( 2336) Millseconds to wait for successful completion of a connection attempt.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ExceptionReply ( 321) Default exception message for the command handler-enabled client.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 2337) IP address or host name for the remote network connection.
IOHandler ( 2364) The input / output mechanism for the connection.
IPVersion ( 2337) Indicates the IP version used for addresses in the client.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
Nickname ( 1423)
OnAfterBind ( 2338) Event handler signalled after the socket handle is bound for the connection.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2338) Event handler signalled proper to binding the socket handle for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 1423)
Port ( 1423)
ReadTimeout ( 2339) Millseconds to wait for successful completion of a read attempt.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
RealName ( 1423)
Replies ( 1423)
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
UserMode ( 1424)
Username ( 1424)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
Action ( 1406)
Ban ( 1406)
BecomeOp ( 1407)
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
Connect ( 1407)
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.

1402 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

CTCPQuery ( 1407)
CTCPReply ( 1407)
Deop ( 1408)
Destroy ( 1408)
Devoice ( 1408)
Die ( 1408)
Disconnect ( 1408)
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
Error ( 1409)
GetAdminInfo ( 1409)
GetChannelTopic ( 1409)
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetMessageOfTheDay ( 1409)
GetNetworkStatus ( 1410)
GetServerInfo ( 1410)
GetServerStatus ( 1410)
GetServerVersion ( 1410)
GetUserInfo ( 1411)
GetVersion ( 269) Version ( 269) number for Indy component suite.
Invite ( 1411)
IsChannel ( 1411)
IsOnIRC ( 1412)
IsOp ( 1412)
IsVoice ( 1412)
Join ( 1412)
Kick ( 1413)
Kill ( 1413)
ListChannel ( 1413)
ListChannelNicknames ( 1414)
ListKnownServerNames ( 1414)
ListNetworkServices ( 1414)
ListServerUsers ( 1414)
Notice ( 1415)
Op ( 1415)
Part ( 1415)
Ping ( 1415)
Pong ( 1416)
QueryServerTime ( 1416)
QueryService ( 1416)
Raw ( 1417)
RegisterService ( 1417)
ReHash ( 1417)
RequestServerConnect ( 1417)
Restart ( 1418)
Say ( 1418)
SayWALLOPS ( 1418)
SetAway ( 1418)
SetChannelKey ( 1419)
SetChannelLimit ( 1419)
SetChannelMode ( 1419)
SetChannelTopic ( 1419)
SetUserMode ( 1420)
SQuit ( 1420)
Summon ( 1420)
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)

Internet Direct (Indy) Version 10.1.5 1403


TIdIRC Class Classes

Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
TraceServer ( 1421)
Unban ( 1421)
Voice ( 1421)
Who ( 1421)
WhoIs ( 1422)
WhoWas ( 1422)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnAdminInfoReceived ( 1425)
OnAfterCommandHandler ( 322) Event handler triggered following execution of a TIdCommand ( 335) in the command handler-enabled client.
OnAway ( 1425)
OnBanListReceived ( 1425)
OnBeforeCommandHandler ( 322) Event handler triggered before execution of a TIdCommand ( 335) in the command handler-enabled client.
OnChannelMode ( 1425)
OnCTCPQuery ( 1426)
OnCTCPReply ( 1426)
OnDCCAccept ( 1426)
OnDCCChat ( 1426)
OnDCCResume ( 1426)
OnDCCSend ( 1426)
OnExceptionListReceived ( 1427)
OnInvitationListReceived ( 1427)
OnInvite ( 1427)
OnInviting ( 1427)
OnIsOnIRC ( 1427)
OnJoin ( 1427)
OnKick ( 1428)
OnKill ( 1428)
OnKillError ( 1428)
OnKnownServersListReceived ( 1428)
OnMOTD ( 1428)
OnNicknameChange ( 1428)
OnNicknameError ( 1429)
OnNicknamesListReceived ( 1429)
OnNotice ( 1429)
OnOp ( 1429)
OnPart ( 1429)
OnPingPong ( 1429)
OnPrivateMessage ( 1430)
OnQuit ( 1430)
OnRaw ( 1430)
OnRehash ( 1430)
OnServerError ( 1430)
OnServerListReceived ( 1430)
OnServerStatsReceived ( 1431)
OnServerTime ( 1431)
OnServerUsersListReceived ( 1431)
OnServerVersion ( 1431)
OnServerWelcome ( 1431)
OnService ( 1431)
OnStatus ( 359) Represents the current connection status event handler.
OnSummon ( 1432)
OnTopic ( 1432)

1404 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

OnTrace ( 1432)
OnUserInfoReceived ( 1432)
OnUserMode ( 1432)
OnWallops ( 1432)
OnWho ( 1433)
OnWhoIs ( 1433)
OnWhoWas ( 1433)

Legend
Method
virtual
Property
read only
Event

TIdIRC Methods
The Methods of the TIdIRC class are listed here.

Methods
Method Description
Action ( 1406)
Ban ( 1406)
BecomeOp ( 1407)
Connect ( 1407)
CTCPQuery ( 1407)
CTCPReply ( 1407)
Deop ( 1408)
Destroy ( 1408)
Devoice ( 1408)
Die ( 1408)
Disconnect ( 1408)
Error ( 1409)
GetAdminInfo ( 1409)
GetChannelTopic ( 1409)
GetMessageOfTheDay ( 1409)
GetNetworkStatus ( 1410)
GetServerInfo ( 1410)
GetServerStatus ( 1410)
GetServerVersion ( 1410)
GetUserInfo ( 1411)
Invite ( 1411)
IsChannel ( 1411)
IsOnIRC ( 1412)
IsOp ( 1412)
IsVoice ( 1412)
Join ( 1412)
Kick ( 1413)
Kill ( 1413)
ListChannel ( 1413)
ListChannelNicknames ( 1414)
ListKnownServerNames ( 1414)
ListNetworkServices ( 1414)
ListServerUsers ( 1414)
Notice ( 1415)
Op ( 1415)
Part ( 1415)
Ping ( 1415)
Pong ( 1416)

Internet Direct (Indy) Version 10.1.5 1405


TIdIRC Class Classes

QueryServerTime ( 1416)
QueryService ( 1416)
Raw ( 1417)
RegisterService ( 1417)
ReHash ( 1417)
RequestServerConnect ( 1417)
Restart ( 1418)
Say ( 1418)
SayWALLOPS ( 1418)
SetAway ( 1418)
SetChannelKey ( 1419)
SetChannelLimit ( 1419)
SetChannelMode ( 1419)
SetChannelTopic ( 1419)
SetUserMode ( 1420)
SQuit ( 1420)
Summon ( 1420)
TraceServer ( 1421)
Unban ( 1421)
Voice ( 1421)
Who ( 1421)
WhoIs ( 1422)
WhoWas ( 1422)

Legend
Method
virtual

TIdIRC.Action Method
Pascal
procedure Action(
ATarget: String;
AMsg: String
);
Parameters
Parameters Description
ATarget Type is String.
AMsg Type is String.

Description
Action is a method.

TIdIRC.Ban Method
Pascal
procedure Ban(
AChannel: String;
AHostmask: String
);
Parameters
Parameters Description
AChannel Type is String.
AHostmask Type is String.

Description
Ban is a method.

1406 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

TIdIRC.BecomeOp Method
Pascal
procedure BecomeOp(
ANickname: String;
APassword: String
);
Parameters
Parameters Description
ANickname Type is String.
APassword Type is String.

Description
BecomeOp is a method.

TIdIRC.Connect Method
Pascal
procedure Connect; override;
Description
Connect is a overridden method.

TIdIRC.CTCPQuery Method
Pascal
procedure CTCPQuery(
ATarget: String;
ACommand: String;
AParameters: String
);
Parameters
Parameters Description
ATarget Type is String.
ACommand Type is String.
AParameters Type is String.

Description
CTCPQuery is a method.

TIdIRC.CTCPReply Method
Pascal
procedure CTCPReply(
ATarget: String;
ACTCP: String;
AReply: String
);
Parameters
Parameters Description
ATarget Type is String.
ACTCP Type is String.
AReply Type is String.

Internet Direct (Indy) Version 10.1.5 1407


TIdIRC Class Classes

Description
CTCPReply is a method.

TIdIRC.Deop Method
Pascal
procedure Deop(
AChannel: String;
ANickname: String
);
Parameters
Parameters Description
AChannel Type is String.
ANickname Type is String.

Description
Deop is a method.

TIdIRC.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdIRC.Devoice Method
Pascal
procedure Devoice(
AChannel: String;
ANickname: String
);
Parameters
Parameters Description
AChannel Type is String.
ANickname Type is String.

Description
Devoice is a method.

TIdIRC.Die Method
Pascal
procedure Die;
Description
Die is a method.

TIdIRC.Disconnect Method
Pascal
procedure Disconnect(
AReason: String = ''

1408 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

); reintroduce;
Parameters
Parameters Description
AReason Type is String.

Description
Disconnect is a reintroduced method.

TIdIRC.Error Method
Pascal
procedure Error(
AMessage: String
);
Parameters
Parameters Description
AMessage Type is String.

Description
Error is a method.

TIdIRC.GetAdminInfo Method
Pascal
procedure GetAdminInfo(
ATarget: String = ''
);
Parameters
Parameters Description
ATarget Type is String.

Description
GetAdminInfo is a method.

TIdIRC.GetChannelTopic Method
Pascal
procedure GetChannelTopic(
AChannel: String
);
Parameters
Parameters Description
AChannel Type is String.

Description
GetChannelTopic is a method.

TIdIRC.GetMessageOfTheDay Method
Pascal
procedure GetMessageOfTheDay(
ATarget: String = ''
);

Internet Direct (Indy) Version 10.1.5 1409


TIdIRC Class Classes

Parameters
Parameters Description
ATarget Type is String.

Description
GetMessageOfTheDay is a method.

TIdIRC.GetNetworkStatus Method
Pascal
procedure GetNetworkStatus(
AHostMask: String = '';
ATarget: String = ''
);
Parameters
Parameters Description
AHostMask Type is String. Default value is ''.
ATarget Type is String.

Description
GetNetworkStatus is a method.

TIdIRC.GetServerInfo Method
Pascal
procedure GetServerInfo(
ATarget: String = ''
);
Parameters
Parameters Description
ATarget Type is String.

Description
GetServerInfo is a method.

TIdIRC.GetServerStatus Method
Pascal
procedure GetServerStatus(
AQuery: TIdIRCStat;
ATarget: String = ''
);
Parameters
Parameters Description
AQuery Type is TIdIRCStat ( 2963).
ATarget Type is String.

Description
GetServerStatus is a method.

TIdIRC.GetServerVersion Method
Pascal
procedure GetServerVersion(

1410 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

ATarget: String = ''


);
Parameters
Parameters Description
ATarget Type is String.

Description
GetServerVersion is a method.

TIdIRC.GetUserInfo Method
Pascal
procedure GetUserInfo(
ANickname: String
);
Parameters
Parameters Description
ANickname Type is String.

Description
GetUserInfo is a method.

TIdIRC.Invite Method
Pascal
procedure Invite(
ANickname: String;
AChannel: String
);
Parameters
Parameters Description
ANickname Type is String.
AChannel Type is String.

Description
Invite is a method.

TIdIRC.IsChannel Method
Pascal
function IsChannel(
AChannel: String
): Boolean;
Parameters
Parameters Description
AChannel Type is String.

Returns
Boolean

Description
IsChannel is a method.

IsChannel returns a Boolean value.

Internet Direct (Indy) Version 10.1.5 1411


TIdIRC Class Classes

TIdIRC.IsOnIRC Method
Pascal
procedure IsOnIRC(
ANickname: String
);
Parameters
Parameters Description
ANickname Type is String.

Description
IsOnIRC is a method.

TIdIRC.IsOp Method
Pascal
function IsOp(
ANickname: String
): Boolean;
Parameters
Parameters Description
ANickname Type is String.

Returns
Boolean

Description
IsOp is a method.

IsOp returns a Boolean value.

TIdIRC.IsVoice Method
Pascal
function IsVoice(
ANickname: String
): Boolean;
Parameters
Parameters Description
ANickname Type is String.

Returns
Boolean

Description
IsVoice is a method.

IsVoice returns a Boolean value.

TIdIRC.Join Method
Pascal
procedure Join(
AChannel: String;
const AKey: String = ''
);

1412 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

Parameters
Parameters Description
AChannel Type is String.
AKey Scope is const. Type is String.

Description
Join is a method.

TIdIRC.Kick Method
Pascal
procedure Kick(
AChannel: String;
ANickname: String;
AReason: String
);
Parameters
Parameters Description
AChannel Type is String.
ANickname Type is String.
AReason Type is String.

Description
Kick is a method.

TIdIRC.Kill Method
Pascal
procedure Kill(
ANickname: String;
AComment: String
);
Parameters
Parameters Description
ANickname Type is String.
AComment Type is String.

Description
Kill is a method.

TIdIRC.ListChannel Method
Pascal
procedure ListChannel(
AChannel: String;
ATarget: String = ''
);
Parameters
Parameters Description
AChannel Type is String.
ATarget Type is String.

Description
ListChannel is a method.

Internet Direct (Indy) Version 10.1.5 1413


TIdIRC Class Classes

TIdIRC.ListChannelNicknames Method
Pascal
procedure ListChannelNicknames(
AChannel: String;
ATarget: String = ''
);
Parameters
Parameters Description
AChannel Type is String.
ATarget Type is String.

Description
ListChannelNicknames is a method.

TIdIRC.ListKnownServerNames Method
Pascal
procedure ListKnownServerNames(
ARemoteHost: String = '';
AHostMask: String = ''
);
Parameters
Parameters Description
ARemoteHost Type is String. Default value is ''.
AHostMask Type is String.

Description
ListKnownServerNames is a method.

TIdIRC.ListNetworkServices Method
Pascal
procedure ListNetworkServices(
AHostMask: String;
AType: String = ''
);
Parameters
Parameters Description
AHostMask Type is String.
AType Type is String.

Description
ListNetworkServices is a method.

TIdIRC.ListServerUsers Method
Pascal
procedure ListServerUsers(
ATarget: String = ''
);
Parameters
Parameters Description
ATarget Type is String.

1414 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

Description
ListServerUsers is a method.

TIdIRC.Notice Method
Pascal
procedure Notice(
ATarget: String;
AMsg: String
);
Parameters
Parameters Description
ATarget Type is String.
AMsg Type is String.

Description
Notice is a method.

TIdIRC.Op Method
Pascal
procedure Op(
AChannel: String;
ANickname: String
);
Parameters
Parameters Description
AChannel Type is String.
ANickname Type is String.

Description
Op is a method.

TIdIRC.Part Method
Pascal
procedure Part(
AChannel: String;
const AReason: String = ''
);
Parameters
Parameters Description
AChannel Type is String.
AReason Scope is const. Type is String.

Description
Part is a method.

TIdIRC.Ping Method
Pascal
procedure Ping(
AServer1: String;
AServer2: String = ''
);

Internet Direct (Indy) Version 10.1.5 1415


TIdIRC Class Classes

Parameters
Parameters Description
AServer1 Type is String.
AServer2 Type is String.

Description
Ping is a method.

TIdIRC.Pong Method
Pascal
procedure Pong(
AServer1: String;
AServer2: String = ''
);
Parameters
Parameters Description
AServer1 Type is String.
AServer2 Type is String.

Description
Pong is a method.

TIdIRC.QueryServerTime Method
Pascal
procedure QueryServerTime(
ATarget: String = ''
);
Parameters
Parameters Description
ATarget Type is String.

Description
QueryServerTime is a method.

TIdIRC.QueryService Method
Pascal
procedure QueryService(
AServiceName: String;
AMessage: String
);
Parameters
Parameters Description
AServiceName Type is String.
AMessage Type is String.

Description
QueryService is a method.

1416 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

TIdIRC.Raw Method
Pascal
procedure Raw(
ALine: String
);
Parameters
Parameters Description
ALine Type is String.

Description
Raw is a method.

TIdIRC.RegisterService Method
Pascal
procedure RegisterService(
const ANickname: String;
const ADistribution: String;
const AInfo: String;
AType: Integer
);
Parameters
Parameters Description
ANickname Scope is const. Type is String.
ADistribution Scope is const. Type is String.
AInfo Scope is const. Type is String.
AType Type is Integer.

Description
RegisterService is a method.

TIdIRC.ReHash Method
Pascal
procedure ReHash;
Description
ReHash is a method.

TIdIRC.RequestServerConnect Method
Pascal
procedure RequestServerConnect(
ATarget: String;
AHost: String;
APort: Integer;
ARemoteHost: String = ''
);
Parameters
Parameters Description
ATarget Type is String.
AHost Type is String.
APort Type is Integer.
ARemoteHost Type is String.

Internet Direct (Indy) Version 10.1.5 1417


TIdIRC Class Classes

Description
RequestServerConnect is a method.

TIdIRC.Restart Method
Pascal
procedure Restart;
Description
Restart is a method.

TIdIRC.Say Method
Pascal
procedure Say(
ATarget: String;
AMsg: String
);
Parameters
Parameters Description
ATarget Type is String.
AMsg Type is String.

Description
Say is a method.

TIdIRC.SayWALLOPS Method
Pascal
procedure SayWALLOPS(
AMessage: String
);
Parameters
Parameters Description
AMessage Type is String.

Description
SayWALLOPS is a method.

TIdIRC.SetAway Method
Pascal
procedure SetAway(
AMsg: String
);
Parameters
Parameters Description
AMsg Type is String.

Description
SetAway is a method.

1418 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

TIdIRC.SetChannelKey Method
Pascal
procedure SetChannelKey(
AChannel: String;
AKey: String
);
Parameters
Parameters Description
AChannel Type is String.
AKey Type is String.

Description
SetChannelKey is a method.

TIdIRC.SetChannelLimit Method
Pascal
procedure SetChannelLimit(
AChannel: String;
ALimit: Integer
);
Parameters
Parameters Description
AChannel Type is String.
ALimit Type is Integer.

Description
SetChannelLimit is a method.

TIdIRC.SetChannelMode Method
Pascal
procedure SetChannelMode(
AChannel: String;
AMode: String;
const AParams: String = ''
);
Parameters
Parameters Description
AChannel Type is String.
AMode Type is String.
AParams Scope is const. Type is String.

Description
SetChannelMode is a method.

TIdIRC.SetChannelTopic Method
Pascal
procedure SetChannelTopic(
AChannel: String;
ATopic: String
);

Internet Direct (Indy) Version 10.1.5 1419


TIdIRC Class Classes

Parameters
Parameters Description
AChannel Type is String.
ATopic Type is String.

Description
SetChannelTopic is a method.

TIdIRC.SetUserMode Method
Pascal
procedure SetUserMode(
ANickname: String;
AMode: String
);
Parameters
Parameters Description
ANickname Type is String.
AMode Type is String.

Description
SetUserMode is a method.

TIdIRC.SQuit Method
Pascal
procedure SQuit(
AHost: String;
AComment: String
);
Parameters
Parameters Description
AHost Type is String.
AComment Type is String.

Description
SQuit is a method.

TIdIRC.Summon Method
Pascal
procedure Summon(
ANickname: String;
ATarget: String = '';
AChannel: String = ''
);
Parameters
Parameters Description
ANickname Type is String.
ATarget Type is String. Default value is ''.
AChannel Type is String.

Description
Summon is a method.

1420 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

TIdIRC.TraceServer Method
Pascal
procedure TraceServer(
ATarget: String = ''
);
Parameters
Parameters Description
ATarget Type is String.

Description
TraceServer is a method.

TIdIRC.Unban Method
Pascal
procedure Unban(
AChannel: String;
AHostmask: String
);
Parameters
Parameters Description
AChannel Type is String.
AHostmask Type is String.

Description
Unban is a method.

TIdIRC.Voice Method
Pascal
procedure Voice(
AChannel: String;
ANickname: String
);
Parameters
Parameters Description
AChannel Type is String.
ANickname Type is String.

Description
Voice is a method.

TIdIRC.Who Method
Pascal
procedure Who(
AMask: String;
AOnlyAdmins: Boolean
);
Parameters
Parameters Description
AMask Type is String.
AOnlyAdmins Type is Boolean.

Internet Direct (Indy) Version 10.1.5 1421


TIdIRC Class Classes

Description
Who is a method.

TIdIRC.WhoIs Method
Pascal
procedure WhoIs(
AMask: String;
ATarget: String = ''
);
Parameters
Parameters Description
AMask Type is String.
ATarget Type is String.

Description
WhoIs is a method.

TIdIRC.WhoWas Method
Pascal
procedure WhoWas(
ANickname: String;
ACount: Integer = -1;
ATarget: String = ''
);
Parameters
Parameters Description
ANickname Type is String.
ACount Type is Integer. Default value is -1.
ATarget Type is String.

Description
WhoWas is a method.

TIdIRC Properties
The Properties of the TIdIRC class are listed here.

Properties
Property Description
AltNickname ( 1423)
Away ( 1423)
Nickname ( 1423)
Password ( 1423)
Port ( 1423)
RealName ( 1423)
Replies ( 1423)
UserMode ( 1424)
Username ( 1424)

Legend
Property
read only

1422 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

TIdIRC.AltNickname Property
Pascal
property AltNickname: String;
Description
AltNickname is a Published String property. Write access for the property is implemented using FAltNickname.

TIdIRC.Away Property
Pascal
property Away: Boolean;
Description
Away is a Public read-only Boolean property.

TIdIRC.Nickname Property
Pascal
property Nickname: String;
Description
Nickname is a Published String property. Write access for the property is implemented using SetNickname.

TIdIRC.Password Property
Pascal
property Password: String;
Description
Password is a Published String property. Write access for the property is implemented using FPassword.

TIdIRC.Port Property
Pascal
property Port;
Description
Port is a Published property. The default value for the property is IdPORT_IRC ( 4040).

TIdIRC.RealName Property
Pascal
property RealName: String;
Description
RealName is a Published String property. Write access for the property is implemented using FRealName.

TIdIRC.Replies Property
Pascal
property Replies: TIdIRCReplies;

Internet Direct (Indy) Version 10.1.5 1423


TIdIRC Class Classes

Description
Replies is a Published TIdIRCReplies ( 1433) property. Write access for the property is implemented using SetIdIRCReplies.

TIdIRC.UserMode Property
Pascal
property UserMode: TIdIRCUserModes;
Description
UserMode is a Published TIdIRCUserModes ( 3054) property. Write access for the property is implemented using
SetIdIRCUserMode.

TIdIRC.Username Property
Pascal
property Username: String;
Description
Username is a Published String property. Write access for the property is implemented using SetUsername.

TIdIRC Events
The Events of the TIdIRC class are listed here.

Events
Event Description
OnAdminInfoReceived ( 1425)
OnAway ( 1425)
OnBanListReceived ( 1425)
OnChannelMode ( 1425)
OnCTCPQuery ( 1426)
OnCTCPReply ( 1426)
OnDCCAccept ( 1426)
OnDCCChat ( 1426)
OnDCCResume ( 1426)
OnDCCSend ( 1426)
OnExceptionListReceived ( 1427)
OnInvitationListReceived ( 1427)
OnInvite ( 1427)
OnInviting ( 1427)
OnIsOnIRC ( 1427)
OnJoin ( 1427)
OnKick ( 1428)
OnKill ( 1428)
OnKillError ( 1428)
OnKnownServersListReceived ( 1428)
OnMOTD ( 1428)
OnNicknameChange ( 1428)
OnNicknameError ( 1429)
OnNicknamesListReceived ( 1429)
OnNotice ( 1429)
OnOp ( 1429)
OnPart ( 1429)
OnPingPong ( 1429)
OnPrivateMessage ( 1430)
OnQuit ( 1430)

1424 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

OnRaw ( 1430)
OnRehash ( 1430)
OnServerError ( 1430)
OnServerListReceived ( 1430)
OnServerStatsReceived ( 1431)
OnServerTime ( 1431)
OnServerUsersListReceived ( 1431)
OnServerVersion ( 1431)
OnServerWelcome ( 1431)
OnService ( 1431)
OnSummon ( 1432)
OnTopic ( 1432)
OnTrace ( 1432)
OnUserInfoReceived ( 1432)
OnUserMode ( 1432)
OnWallops ( 1432)
OnWho ( 1433)
OnWhoIs ( 1433)
OnWhoWas ( 1433)

Legend
Event

TIdIRC.OnAdminInfoReceived Event
Pascal
property OnAdminInfoReceived: TIdIRCAdminInfoRecvEvent;
Description
OnAdminInfoReceived is a Published TIdIRCAdminInfoRecvEvent ( 3041) event handler property. Write access for the property is
implemented using FOnAdminInfo.

TIdIRC.OnAway Event
Pascal
property OnAway: TIdIRCAwayEvent;
Description
OnAway is a Published TIdIRCAwayEvent ( 3041) event handler property. Write access for the property is implemented using
FOnAway.

TIdIRC.OnBanListReceived Event
Pascal
property OnBanListReceived: TIdIRCChanBANListEvent;
Description
OnBanListReceived is a Published TIdIRCChanBANListEvent ( 3041) event handler property. Write access for the property is
implemented using FOnBANList.

TIdIRC.OnChannelMode Event
Pascal
property OnChannelMode: TIdIRCChanModeEvent;

Internet Direct (Indy) Version 10.1.5 1425


TIdIRC Class Classes

Description
OnChannelMode is a Published TIdIRCChanModeEvent ( 3042) event handler property. Write access for the property is
implemented using FOnChanMode.

TIdIRC.OnCTCPQuery Event
Pascal
property OnCTCPQuery: TIdIRCCTCPQueryEvent;
Description
OnCTCPQuery is a Published TIdIRCCTCPQueryEvent ( 3042) event handler property. Write access for the property is
implemented using FOnCTCPQry.

TIdIRC.OnCTCPReply Event
Pascal
property OnCTCPReply: TIdIRCCTCPReplyEvent;
Description
OnCTCPReply is a Published TIdIRCCTCPReplyEvent ( 3042) event handler property. Write access for the property is
implemented using FOnCTCPRep.

TIdIRC.OnDCCAccept Event
Pascal
property OnDCCAccept: TIdIRCDCCAcceptEvent;
Description
OnDCCAccept is a Published TIdIRCDCCAcceptEvent ( 3043) event handler property. Write access for the property is
implemented using FOnDCCAccept.

TIdIRC.OnDCCChat Event
Pascal
property OnDCCChat: TIdIRCDCCChatEvent;
Description
OnDCCChat is a Published TIdIRCDCCChatEvent ( 3043) event handler property. Write access for the property is implemented
using FOnDCCChat.

TIdIRC.OnDCCResume Event
Pascal
property OnDCCResume: TIdIRCDCCResumeEvent;
Description
OnDCCResume is a Published TIdIRCDCCResumeEvent ( 3043) event handler property. Write access for the property is
implemented using FOnDCCResume.

TIdIRC.OnDCCSend Event
Pascal
property OnDCCSend: TIdIRCDCCSendEvent;

1426 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

Description
OnDCCSend is a Published TIdIRCDCCSendEvent ( 3043) event handler property. Write access for the property is implemented
using FOnDCCSend.

TIdIRC.OnExceptionListReceived Event
Pascal
property OnExceptionListReceived: TIdIRCChanEXCListEvent;
Description
OnExceptionListReceived is a Published TIdIRCChanEXCListEvent ( 3041) event handler property. Write access for the property
is implemented using FOnEXCList.

TIdIRC.OnInvitationListReceived Event
Pascal
property OnInvitationListReceived: TIdIRCChanINVListEvent;
Description
OnInvitationListReceived is a Published TIdIRCChanINVListEvent ( 3042) event handler property. Write access for the property is
implemented using FOnINVList.

TIdIRC.OnInvite Event
Pascal
property OnInvite: TIdIRCInviteEvent;
Description
OnInvite is a Published TIdIRCInviteEvent ( 3044) event handler property. Write access for the property is implemented using
FOnInvite.

TIdIRC.OnInviting Event
Pascal
property OnInviting: TIdIRCInvitingEvent;
Description
OnInviting is a Published TIdIRCInvitingEvent ( 3044) event handler property. Write access for the property is implemented using
FOnInviting.

TIdIRC.OnIsOnIRC Event
Pascal
property OnIsOnIRC: TIdIRCIsOnIRCEvent;
Description
OnIsOnIRC is a Published TIdIRCIsOnIRCEvent ( 3045) event handler property. Write access for the property is implemented
using FOnIsOnIRC.

TIdIRC.OnJoin Event
Pascal
property OnJoin: TIdIRCJoinEvent;

Internet Direct (Indy) Version 10.1.5 1427


TIdIRC Class Classes

Description
OnJoin is a Published TIdIRCJoinEvent ( 3045) event handler property. Write access for the property is implemented using
FOnJoin.

TIdIRC.OnKick Event
Pascal
property OnKick: TIdIRCKickEvent;
Description
OnKick is a Published TIdIRCKickEvent ( 3045) event handler property. Write access for the property is implemented using
FOnKick.

TIdIRC.OnKill Event
Pascal
property OnKill: TIdIRCKillEvent;
Description
OnKill is a Published TIdIRCKillEvent ( 3046) event handler property. Write access for the property is implemented using FOnKill.

TIdIRC.OnKillError Event
Pascal
property OnKillError: TIdIRCKillErrorEvent;
Description
OnKillError is a Published TIdIRCKillErrorEvent ( 3045) event handler property. Write access for the property is implemented
using FOnKillError.

TIdIRC.OnKnownServersListReceived Event
Pascal
property OnKnownServersListReceived: TIdIRCKnownServerNamesEvent;
Description
OnKnownServersListReceived is a Published TIdIRCKnownServerNamesEvent ( 3046) event handler property. Write access for
the property is implemented using FOnKnownSvrs.

TIdIRC.OnMOTD Event
Pascal
property OnMOTD: TIdIRCMOTDEvent;
Description
OnMOTD is a Published TIdIRCMOTDEvent ( 3046) event handler property. Write access for the property is implemented using
FOnMOTD.

TIdIRC.OnNicknameChange Event
Pascal
property OnNicknameChange: TIdIRCNicknameChangedEvent;

1428 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

Description
OnNicknameChange is a Published TIdIRCNicknameChangedEvent ( 3047) event handler property. Write access for the property
is implemented using FOnNickChange.

TIdIRC.OnNicknameError Event
Pascal
property OnNicknameError: TIdIRCNickErrorEvent;
Description
OnNicknameError is a Published TIdIRCNickErrorEvent ( 3046) event handler property. Write access for the property is
implemented using FOnNickError.

TIdIRC.OnNicknamesListReceived Event
Pascal
property OnNicknamesListReceived: TIdIRCNickListEvent;
Description
OnNicknamesListReceived is a Published TIdIRCNickListEvent ( 3047) event handler property. Write access for the property is
implemented using FOnNickList.

TIdIRC.OnNotice Event
Pascal
property OnNotice: TIdIRCNoticeEvent;
Description
OnNotice is a Published TIdIRCNoticeEvent ( 3047) event handler property. Write access for the property is implemented using
FOnNotice.

TIdIRC.OnOp Event
Pascal
property OnOp: TIdIRCOpEvent;
Description
OnOp is a Published TIdIRCOpEvent ( 3048) event handler property. Write access for the property is implemented using FOnOp.

TIdIRC.OnPart Event
Pascal
property OnPart: TIdIRCPartEvent;
Description
OnPart is a Published TIdIRCPartEvent ( 3048) event handler property. Write access for the property is implemented using
FOnPart.

TIdIRC.OnPingPong Event
Pascal
property OnPingPong: TIdIRCPingPongEvent;

Internet Direct (Indy) Version 10.1.5 1429


TIdIRC Class Classes

Description
OnPingPong is a Published TIdIRCPingPongEvent ( 3048) event handler property. Write access for the property is implemented
using FOnPingPong.

TIdIRC.OnPrivateMessage Event
Pascal
property OnPrivateMessage: TIdIRCPrivMessageEvent;
Description
OnPrivateMessage is a Published TIdIRCPrivMessageEvent ( 3049) event handler property. Write access for the property is
implemented using FOnPrivMessage.

TIdIRC.OnQuit Event
Pascal
property OnQuit: TIdIRCQuitEvent;
Description
OnQuit is a Published TIdIRCQuitEvent ( 3049) event handler property. Write access for the property is implemented using
FOnQuit.

TIdIRC.OnRaw Event
Pascal
property OnRaw: TIdIRCRawEvent;
Description
OnRaw is a Published TIdIRCRawEvent ( 3049) event handler property. Write access for the property is implemented using
FOnRaw.

TIdIRC.OnRehash Event
Pascal
property OnRehash: TIdIRCRehashEvent;
Description
OnRehash is a Published TIdIRCRehashEvent ( 3049) event handler property. Write access for the property is implemented using
FOnRehash.

TIdIRC.OnServerError Event
Pascal
property OnServerError: TIdIRCServerErrorEvent;
Description
OnServerError is a Published TIdIRCServerErrorEvent ( 3050) event handler property. Write access for the property is
implemented using FOnServerError.

TIdIRC.OnServerListReceived Event
Pascal
property OnServerListReceived: TIdIRCServerListEvent;

1430 Internet Direct (Indy) Version 10.1.5


Classes TIdIRC Class

Description
OnServerListReceived is a Published TIdIRCServerListEvent ( 3050) event handler property. Write access for the property is
implemented using FOnSvrList.

TIdIRC.OnServerStatsReceived Event
Pascal
property OnServerStatsReceived: TIdIRCServerStatsEvent;
Description
OnServerStatsReceived is a Published TIdIRCServerStatsEvent ( 3050) event handler property. Write access for the property is
implemented using FOnSvrStats.

TIdIRC.OnServerTime Event
Pascal
property OnServerTime: TIdIRCSvrTimeEvent;
Description
OnServerTime is a Published TIdIRCSvrTimeEvent ( 3052) event handler property. Write access for the property is implemented
using FOnSvrTime.

TIdIRC.OnServerUsersListReceived Event
Pascal
property OnServerUsersListReceived: TIdIRCServerUsersEvent;
Description
OnServerUsersListReceived is a Published TIdIRCServerUsersEvent ( 3051) event handler property. Write access for the
property is implemented using FOnSvrUsers.

TIdIRC.OnServerVersion Event
Pascal
property OnServerVersion: TIdIRCSvrVersionEvent;
Description
OnServerVersion is a Published TIdIRCSvrVersionEvent ( 3052) event handler property. Write access for the property is
implemented using FOnSvrVersion.

TIdIRC.OnServerWelcome Event
Pascal
property OnServerWelcome: TIdIRCServerWelcomeEvent;
Description
OnServerWelcome is a Published TIdIRCServerWelcomeEvent ( 3051) event handler property. Write access for the property is
implemented using FOnSWelcome.

TIdIRC.OnService Event
Pascal
property OnService: TIdIRCServiceEvent;

Internet Direct (Indy) Version 10.1.5 1431


TIdIRC Class Classes

Description
OnService is a Published TIdIRCServiceEvent ( 3051) event handler property. Write access for the property is implemented using
FOnService.

TIdIRC.OnSummon Event
Pascal
property OnSummon: TIdIRCSummonEvent;
Description
OnSummon is a Published TIdIRCSummonEvent ( 3052) event handler property. Write access for the property is implemented
using FOnSummon.

TIdIRC.OnTopic Event
Pascal
property OnTopic: TIdIRCTopicEvent;
Description
OnTopic is a Published TIdIRCTopicEvent ( 3053) event handler property. Write access for the property is implemented using
FOnTopic.

TIdIRC.OnTrace Event
Pascal
property OnTrace: TIdIRCServerTraceEvent;
Description
OnTrace is a Published TIdIRCServerTraceEvent ( 3051) event handler property. Write access for the property is implemented
using FOnTrace.

TIdIRC.OnUserInfoReceived Event
Pascal
property OnUserInfoReceived: TIdIRCUserInfoRecvEvent;
Description
OnUserInfoReceived is a Published TIdIRCUserInfoRecvEvent ( 3053) event handler property. Write access for the property is
implemented using FOnUserInfo.

TIdIRC.OnUserMode Event
Pascal
property OnUserMode: TIdIRCUserModeEvent;
Description
OnUserMode is a Published TIdIRCUserModeEvent ( 3054) event handler property. Write access for the property is implemented
using FOnUserMode.

TIdIRC.OnWallops Event
Pascal
property OnWallops: TIdIRCWallopsEvent;

1432 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCReplies Class

Description
OnWallops is a Published TIdIRCWallopsEvent ( 3054) event handler property. Write access for the property is implemented
using FOnWallops.

TIdIRC.OnWho Event
Pascal
property OnWho: TIdIRCWhoEvent;
Description
OnWho is a Published TIdIRCWhoEvent ( 3054) event handler property. Write access for the property is implemented using
FOnWho.

TIdIRC.OnWhoIs Event
Pascal
property OnWhoIs: TIdIRCWhoIsEvent;
Description
OnWhoIs is a Published TIdIRCWhoIsEvent ( 3055) event handler property. Write access for the property is implemented using
FOnWhoIs.

TIdIRC.OnWhoWas Event
Pascal
property OnWhoWas: TIdIRCWhoWasEvent;
Description
OnWhoWas is a Published TIdIRCWhoWasEvent ( 3055) event handler property. Write access for the property is implemented
using FOnWhoWas.

TIdIRCReplies Class
File
IdIRC ( 4675)

Hierarchy

Pascal
TIdIRCReplies = class(TIdPersistent);
Description
TIdIRCReplies is a TIdPersistent ( 3073) descendant.

See Also
TIdPersistent ( 3073)

TIdIRCReplies Members
The following tables list the members exposed by TIdIRCReplies.

Internet Direct (Indy) Version 10.1.5 1433


TIdIRCReplies Class Classes

Properties
Property Description
ClientInfo ( 1435)
Finger ( 1435)
UserInfo ( 1435)
Version ( 1435)

Methods
Method Description
Assign ( 1434)
Create ( 1434)

Legend
Method
virtual
Property

TIdIRCReplies Methods
The Methods of the TIdIRCReplies class are listed here.

Methods
Method Description
Assign ( 1434)
Create ( 1434)

Legend
Method
virtual

TIdIRCReplies.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdIRCReplies.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdIRCReplies Properties
The Properties of the TIdIRCReplies class are listed here.

1434 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCServer Class

Properties
Property Description
ClientInfo ( 1435)
Finger ( 1435)
UserInfo ( 1435)
Version ( 1435)

Legend
Property

TIdIRCReplies.ClientInfo Property
Pascal
property ClientInfo: String;
Description
ClientInfo is a Published String property. Write access for the property is implemented using FClientInfo.

TIdIRCReplies.Finger Property
Pascal
property Finger: String;
Description
Finger is a Published String property. Write access for the property is implemented using FFinger.

TIdIRCReplies.UserInfo Property
Pascal
property UserInfo: String;
Description
UserInfo is a Published String property. Write access for the property is implemented using FUserInfo.

TIdIRCReplies.Version Property
Pascal
property Version: String;

TIdIRCServer Class
File
IdIrcServer ( 4677)

Hierarchy

Pascal
TIdIRCServer = class(TIdCmdTCPServer);
Description
TIdIRCServer is a TIdCmdTCPServer ( 326) descendant.

Internet Direct (Indy) Version 10.1.5 1435


TIdIRCServer Class Classes

See Also
TIdCmdTCPServer ( 326)

TIdIRCServer Members
The following tables list the members exposed by TIdIRCServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 330) Frees the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandAdmin ( 1438)
OnCommandAway ( 1438)
OnCommandConnect ( 1439)
OnCommandError ( 1439)

1436 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCServer Class

OnCommandInfo ( 1439)
OnCommandInvite ( 1439)
OnCommandIsOn ( 1439)
OnCommandJoin ( 1439)
OnCommandKick ( 1440)
OnCommandKill ( 1440)
OnCommandLinks ( 1440)
OnCommandList ( 1440)
OnCommandMode ( 1440)
OnCommandNames ( 1440)
OnCommandNick ( 1441)
OnCommandNotice ( 1441)
OnCommandOper ( 1441)
OnCommandOther ( 1441)
OnCommandPart ( 1441)
OnCommandPass ( 1441)
OnCommandPing ( 1442)
OnCommandPong ( 1442)
OnCommandPrivMsg ( 1442)
OnCommandQuit ( 1442)
OnCommandRehash ( 1442)
OnCommandRestart ( 1442)
OnCommandServer ( 1443)
OnCommandSQuit ( 1443)
OnCommandStats ( 1443)
OnCommandSummon ( 1443)
OnCommandTime ( 1443)
OnCommandTopic ( 1443)
OnCommandTrace ( 1444)
OnCommandUser ( 1444)
OnCommandUserHost ( 1444)
OnCommandUsers ( 1444)
OnCommandVersion ( 1444)
OnCommandWallops ( 1444)
OnCommandWho ( 1445)
OnCommandWhoIs ( 1445)
OnCommandWhoWas ( 1445)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Event
Method
virtual
Property
read only

TIdIRCServer Events
The Events of the TIdIRCServer class are listed here.

Events
Event Description
OnCommandAdmin ( 1438)
OnCommandAway ( 1438)
OnCommandConnect ( 1439)

Internet Direct (Indy) Version 10.1.5 1437


TIdIRCServer Class Classes

OnCommandError ( 1439)
OnCommandInfo ( 1439)
OnCommandInvite ( 1439)
OnCommandIsOn ( 1439)
OnCommandJoin ( 1439)
OnCommandKick ( 1440)
OnCommandKill ( 1440)
OnCommandLinks ( 1440)
OnCommandList ( 1440)
OnCommandMode ( 1440)
OnCommandNames ( 1440)
OnCommandNick ( 1441)
OnCommandNotice ( 1441)
OnCommandOper ( 1441)
OnCommandOther ( 1441)
OnCommandPart ( 1441)
OnCommandPass ( 1441)
OnCommandPing ( 1442)
OnCommandPong ( 1442)
OnCommandPrivMsg ( 1442)
OnCommandQuit ( 1442)
OnCommandRehash ( 1442)
OnCommandRestart ( 1442)
OnCommandServer ( 1443)
OnCommandSQuit ( 1443)
OnCommandStats ( 1443)
OnCommandSummon ( 1443)
OnCommandTime ( 1443)
OnCommandTopic ( 1443)
OnCommandTrace ( 1444)
OnCommandUser ( 1444)
OnCommandUserHost ( 1444)
OnCommandUsers ( 1444)
OnCommandVersion ( 1444)
OnCommandWallops ( 1444)
OnCommandWho ( 1445)
OnCommandWhoIs ( 1445)
OnCommandWhoWas ( 1445)

Legend
Event

TIdIRCServer.OnCommandAdmin Event
Pascal
property OnCommandAdmin: TIdIRCOneParmEvent;
Description
OnCommandAdmin is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandAdmin.

TIdIRCServer.OnCommandAway Event
Pascal
property OnCommandAway: TIdIRCOneParmEvent;
Description
OnCommandAway is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is

1438 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCServer Class

implemented using fOnCommandAway.

TIdIRCServer.OnCommandConnect Event
Pascal
property OnCommandConnect: TIdIRCThreeParmEvent;
Description
OnCommandConnect is a Published TIdIRCThreeParmEvent ( 3052) event handler property. Write access for the property is
implemented using fOnCommandConnect.

TIdIRCServer.OnCommandError Event
Pascal
property OnCommandError: TIdIRCOneParmEvent;
Description
OnCommandError is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandError.

TIdIRCServer.OnCommandInfo Event
Pascal
property OnCommandInfo: TIdIRCOneParmEvent;
Description
OnCommandInfo is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandInfo.

TIdIRCServer.OnCommandInvite Event
Pascal
property OnCommandInvite: TIdIRCTwoParmEvent;
Description
OnCommandInvite is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandInvite.

TIdIRCServer.OnCommandIsOn Event
Pascal
property OnCommandIsOn: TIdIRCOneParmEvent;
Description
OnCommandIsOn is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandIsOn.

TIdIRCServer.OnCommandJoin Event
Pascal
property OnCommandJoin: TIdIRCTwoParmEvent;
Description
OnCommandJoin is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is

Internet Direct (Indy) Version 10.1.5 1439


TIdIRCServer Class Classes

implemented using fOnCommandJoin.

TIdIRCServer.OnCommandKick Event
Pascal
property OnCommandKick: TIdIRCThreeParmEvent;
Description
OnCommandKick is a Published TIdIRCThreeParmEvent ( 3052) event handler property. Write access for the property is
implemented using fOnCommandKick.

TIdIRCServer.OnCommandKill Event
Pascal
property OnCommandKill: TIdIRCTwoParmEvent;
Description
OnCommandKill is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandKill.

TIdIRCServer.OnCommandLinks Event
Pascal
property OnCommandLinks: TIdIRCTwoParmEvent;
Description
OnCommandLinks is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandLinks.

TIdIRCServer.OnCommandList Event
Pascal
property OnCommandList: TIdIRCTwoParmEvent;
Description
OnCommandList is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandList.

TIdIRCServer.OnCommandMode Event
Pascal
property OnCommandMode: TIdIRCFiveParmEvent;
Description
OnCommandMode is a Published TIdIRCFiveParmEvent ( 3044) event handler property. Write access for the property is
implemented using fOnCommandMode.

TIdIRCServer.OnCommandNames Event
Pascal
property OnCommandNames: TIdIRCOneParmEvent;
Description
OnCommandNames is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is

1440 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCServer Class

implemented using fOnCommandNames.

TIdIRCServer.OnCommandNick Event
Pascal
property OnCommandNick: TIdIRCTwoParmEvent;
Description
OnCommandNick is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandNick.

TIdIRCServer.OnCommandNotice Event
Pascal
property OnCommandNotice: TIdIRCTwoParmEvent;
Description
OnCommandNotice is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandNotice.

TIdIRCServer.OnCommandOper Event
Pascal
property OnCommandOper: TIdIRCTwoParmEvent;
Description
OnCommandOper is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandOper.

TIdIRCServer.OnCommandOther Event
Pascal
property OnCommandOther: TIdIRCOtherEvent;
Description
OnCommandOther is a Published TIdIRCOtherEvent ( 3048) event handler property. Write access for the property is implemented
using fOnCommandOther.

TIdIRCServer.OnCommandPart Event
Pascal
property OnCommandPart: TIdIRCOneParmEvent;
Description
OnCommandPart is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandPart.

TIdIRCServer.OnCommandPass Event
Pascal
property OnCommandPass: TIdIRCOneParmEvent;
Description
OnCommandPass is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is

Internet Direct (Indy) Version 10.1.5 1441


TIdIRCServer Class Classes

implemented using fOnCommandPass.

TIdIRCServer.OnCommandPing Event
Pascal
property OnCommandPing: TIdIRCTwoParmEvent;
Description
OnCommandPing is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandPing.

TIdIRCServer.OnCommandPong Event
Pascal
property OnCommandPong: TIdIRCTwoParmEvent;
Description
OnCommandPong is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandPong.

TIdIRCServer.OnCommandPrivMsg Event
Pascal
property OnCommandPrivMsg: TIdIRCTwoParmEvent;
Description
OnCommandPrivMsg is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandPrivMsg.

TIdIRCServer.OnCommandQuit Event
Pascal
property OnCommandQuit: TIdIRCOneParmEvent;
Description
OnCommandQuit is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandQuit.

TIdIRCServer.OnCommandRehash Event
Pascal
property OnCommandRehash: TIdIRCGetEvent;
Description
OnCommandRehash is a Published TIdIRCGetEvent ( 3044) event handler property. Write access for the property is
implemented using fOnCommandRehash.

TIdIRCServer.OnCommandRestart Event
Pascal
property OnCommandRestart: TIdIRCGetEvent;
Description
OnCommandRestart is a Published TIdIRCGetEvent ( 3044) event handler property. Write access for the property is implemented

1442 Internet Direct (Indy) Version 10.1.5


Classes TIdIRCServer Class

using fOnCommandRestart.

TIdIRCServer.OnCommandServer Event
Pascal
property OnCommandServer: TIdIRCServerEvent;
Description
OnCommandServer is a Published TIdIRCServerEvent ( 3050) event handler property. Write access for the property is
implemented using fOnCommandServer.

TIdIRCServer.OnCommandSQuit Event
Pascal
property OnCommandSQuit: TIdIRCTwoParmEvent;
Description
OnCommandSQuit is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandSQuit.

TIdIRCServer.OnCommandStats Event
Pascal
property OnCommandStats: TIdIRCTwoParmEvent;
Description
OnCommandStats is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandStats.

TIdIRCServer.OnCommandSummon Event
Pascal
property OnCommandSummon: TIdIRCTwoParmEvent;
Description
OnCommandSummon is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandSummon.

TIdIRCServer.OnCommandTime Event
Pascal
property OnCommandTime: TIdIRCOneParmEvent;
Description
OnCommandTime is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandTime.

TIdIRCServer.OnCommandTopic Event
Pascal
property OnCommandTopic: TIdIRCTwoParmEvent;
Description
OnCommandTopic is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is

Internet Direct (Indy) Version 10.1.5 1443


TIdIRCServer Class Classes

implemented using fOnCommandTopic.

TIdIRCServer.OnCommandTrace Event
Pascal
property OnCommandTrace: TIdIRCOneParmEvent;
Description
OnCommandTrace is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandTrace.

TIdIRCServer.OnCommandUser Event
Pascal
property OnCommandUser: TIdIRCUserEvent;
Description
OnCommandUser is a Published TIdIRCUserEvent ( 3053) event handler property. Write access for the property is implemented
using fOnCommandUser.

TIdIRCServer.OnCommandUserHost Event
Pascal
property OnCommandUserHost: TIdIRCOneParmEvent;
Description
OnCommandUserHost is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandUserHost.

TIdIRCServer.OnCommandUsers Event
Pascal
property OnCommandUsers: TIdIRCOneParmEvent;
Description
OnCommandUsers is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandUsers.

TIdIRCServer.OnCommandVersion Event
Pascal
property OnCommandVersion: TIdIRCOneParmEvent;
Description
OnCommandVersion is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is
implemented using fOnCommandVersion.

TIdIRCServer.OnCommandWallops Event
Pascal
property OnCommandWallops: TIdIRCOneParmEvent;
Description
OnCommandWallops is a Published TIdIRCOneParmEvent ( 3047) event handler property. Write access for the property is

1444 Internet Direct (Indy) Version 10.1.5


Classes TIdListenerThread Class

implemented using fOnCommandWallops.

TIdIRCServer.OnCommandWho Event
Pascal
property OnCommandWho: TIdIRCTwoParmEvent;
Description
OnCommandWho is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandWho.

TIdIRCServer.OnCommandWhoIs Event
Pascal
property OnCommandWhoIs: TIdIRCTwoParmEvent;
Description
OnCommandWhoIs is a Published TIdIRCTwoParmEvent ( 3053) event handler property. Write access for the property is
implemented using fOnCommandWhoIs.

TIdIRCServer.OnCommandWhoWas Event
Pascal
property OnCommandWhoWas: TIdIRCThreeParmEvent;
Description
OnCommandWhoWas is a Published TIdIRCThreeParmEvent ( 3052) event handler property. Write access for the property is
implemented using fOnCommandWhoWas.

TIdKA9QFTPListItem Class
File
IdFTPListParseKA9Q ( 4638)

Hierarchy

Pascal
TIdKA9QFTPListItem = class(TIdFTPListItem);
Description
TIdKA9QFTPListItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

TIdListenerThread Class
Listener thread for TCP Servers.

Internet Direct (Indy) Version 10.1.5 1445


TIdListenerThread Class Classes

File
IdCustomTCPServer ( 4609)

Hierarchy

Pascal
TIdListenerThread = class(TIdThread);
Description
TIdListenerThread is a TIdThread ( 2415) descendant that listens for client connections for a multi-threaded TCP-based server.
One or more instances of TIdListenerThread are used in TIdTCPServer ( 2375), and descendants classes, to detect new client
connection requests and to spawn new executable tasks (or contexts) for each successful connection to the server.

TIdListenerThread extends the ancestor class by implementing the BeforeRun, Run, and AfterRun methods, and the OnBeforeRun
( 1449) event handler property.

TIdListenerThread instances are created using the Bindings allocated for a TIdTCPServer ( 2375) instance when the server
becomes active. TIdListenerThread maintains a reference to the server that owns the listening thread to provide access to the
properties and methods of the server from within the TIdListenerThread instance. TIdListenerThread also maintains a Binding (
1448) used for socket operations for the listener thread.

During execution of the listener thread, the Scheduler for the server is accessed to acquire the thread /fiber / yarn used for the new
client connection to the server. The server is updated to reflect the context (both the connection and the thread / fiber of execution)
for the new client connection accepted by the listening thread.

See Also
TIdTCPServer ( 2375)

TIdThread ( 2415)

TIdSocketHandle ( 2071)

IndySupport ( 15)

TIdListenerThread Members
The following tables list the members exposed by TIdListenerThread.

Properties
Property Description
Binding ( 1448) Represents the socket descriptor used to listen for new client connections.
Data ( 2422) Storage slot for data used by a thread.
Loop ( 2422) Indicates if the thread is Run continuously until Stopped ( 2423).
Name ( 2422) Name assigned to the thread during execution.
ReturnValue ( 2423) Return value from execution of the thread.
Server ( 1448) Server context for the listener thread.
StopMode ( 2423) Determines the action taken when the Stop ( 2420) method is called.
Stopped ( 2423) Indicates when a thread is terminated or suspended.
Terminated ( 2424) Indicates if the thread has been halted by calling Terminate ( 2421).
TerminatingException ( 2424) Contains the text of an Exception.Message raised within the Execute method.
TerminatingExceptionClass ( 2424) Represents the class type for an exception raised during Execute.
Yarn ( 2425) Represents the thread or fiber for the scheduler of the thread.

Methods
Method Description
Create ( 1447) Constructor for the Listener thread.
Destroy ( 2419) Frees the object instance.
Start ( 2419) Starts or resumes execution of a thread.

1446 Internet Direct (Indy) Version 10.1.5


Classes TIdListenerThread Class

Stop ( 2420) Halts execution of the thread instance.


Synchronize ( 2420) Executes a thread method synchronized to the main VCL thread.
Terminate ( 2421) Forces the thread of execution to be halted.
TerminateAndWaitFor ( 2421) Signals a thread to terminate ( 2421) and waits for completion of the Execute method.

Events
Event Description
OnBeforeRun ( 1449) Event handler signalled before execution of a TCP server listener thread.
OnException ( 2425) Handles exceptions raised in the thread of execution.
OnStopped ( 2426) Represents an event handler signalled when stopping a thread of execution.

Legend
Constructor
virtual
Property
read only
Event

TIdListenerThread Methods
The Methods of the TIdListenerThread class are listed here.

Methods
Method Description
Create ( 1447) Constructor for the Listener thread.

Legend
Constructor

TIdListenerThread.Create Constructor
Constructor for the Listener thread.

Pascal
constructor Create(
AServer: TIdCustomTCPServer;
ABinding: TIdSocketHandle
); reintroduce;
Parameters
Parameters Description
AServer Server ( 1448) that owns the listener thread.
ABinding Socket handle in the server Bindings for the listener thread.

Description
Create is the constructor for TIdListenerThread ( 1445) and intializes the class instance. Create calls the inherited constructor.

Creates sets the Binding ( 1448) property for the listener thread to the socket handle passed in the ABinding argument.

Create also sets the Server ( 1448) property to the owner of the listener thread as identified by the parameter AServer.

See Also
TIdCustomTCPServer ( 453)

TIdTCPServer ( 2375)

Binding ( 1448)

Server ( 1448)

Internet Direct (Indy) Version 10.1.5 1447


TIdListenerThread Class Classes

TIdListenerThread Properties
The Properties of the TIdListenerThread class are listed here.

Properties
Property Description
Binding ( 1448) Represents the socket descriptor used to listen for new client connections.
Server ( 1448) Server context for the listener thread.

Legend
Property
read only

TIdListenerThread.Binding Property
Represents the socket descriptor used to listen for new client connections.

Pascal
property Binding: TIdSocketHandle;
Description
Binding is a TIdSocketHandle ( 2071) property that represents the socket descriptor used by the listener thread to listen for new
client connections to the TIdTCPServer ( 2375).

Binding is initialized in the Create ( 1447) constructor, and contains a socket descriptor allocated for listener threads on the server
when it becomes active.

See Also
TIdSocketHandle ( 2071)

TIdCustomTCPServer ( 453)

TIdTCPServer ( 2375)

TIdListenerThread.Server Property
Server context for the listener thread.

Pascal
property Server: TIdCustomTCPServer;
Description
Server is a read-only TIdCustomTCPServer ( 453) property that provides the server context for the TIdListenerThread ( 1445).
The Server property provides access to properties and methods in the TCP server that owns the listener thread. Server is used
during execution of the listener thread to gain access to the IOHandler, Scheduler, MaxConnections, Contexts, ContextClass
properties in TIdCustomTCPServer ( 453).

The value in Server is assigned using the parameter value specified in the Create ( 1447) method.

See Also
TIdCustomTCPServer ( 453)

TIdListenerThread Events
The Events of the TIdListenerThread class are listed here.

1448 Internet Direct (Indy) Version 10.1.5


Classes TIdLocalEvent Class

Events
Event Description
OnBeforeRun ( 1449) Event handler signalled before execution of a TCP server listener thread.

Legend
Event

TIdListenerThread.OnBeforeRun Event
Event handler signalled before execution of a TCP server listener thread.

Pascal
property OnBeforeRun: TIdNotifyThreadEvent;
Description
OnBeforeRun is a TIdNotifyThreadEvent ( 3066) property that represents the event handler signalled prior to execution of the
listener thread for the TCP server.

OnBeforeRun is given the value assigned to the OnBeforeListenerRun event handler in TIdCustomTCPServer ( 453), and can be
used to perform logging or initalization tasks proper to starting the listener thread.

OnBeforeRun is triggered during start ( 2419)-up for the TCP server when the value in the TIdCustomTCPServer.Active ( 458)
property is set to True.

See Also
TIdNotifyThreadEvent ( 3066)

TIdTCPServer.OnBeforeListenerRun

TIdTCPServer.Active

TIdLocalEvent Class
Event type signalled for thread-based notification messages.

File
IdGlobal ( 4650)

Hierarchy

Pascal
TIdLocalEvent = class(TEvent);
Description
TIdLocalEvent is a TEvent ( 207) descendant that specifies the event type signalled to the thread-based notification list when
there are pending synchronization requests for an Indy thread instance.

See Also
TIdSync ( 2264)

TIdLocalEvent Members
The following tables list the members exposed by TIdLocalEvent.

Internet Direct (Indy) Version 10.1.5 1449


TIdLocalEvent Class Classes

Methods
Method Description
Create ( 1450) Constructor for the object instance.
Destroy ( 210) Frees the object instance.
ResetEvent ( 210) Clears the waitable event handler.
SetEvent ( 210) Sets the signal for the event.
Create ( 209)
WaitFor ( 211) Blocks the current thread until the current event receives a signal.
WaitForEver ( 1450) Waits until another thread signals the event object.

Legend
Constructor
virtual

TIdLocalEvent Methods
The Methods of the TIdLocalEvent class are listed here.

Methods
Method Description
Create ( 1450) Constructor for the object instance.
WaitForEver ( 1450) Waits until another thread signals the event object.

Legend
Constructor

TIdLocalEvent.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
const AInitialState: Boolean = False;
const AManualReset: Boolean = False
); reintroduce;
Parameters
Parameters Description
AInitialState Indicates if the initial signal state is cleared. Default value is False.
AManualReset Indicates if the signal state is reset for a waiting thread. Default value is False.

Description
Create is the reintroduced constructor for the object instance. Create calls the inherited Create method using the input parameters
to initialize the object instance.

TIdLocalEvent ( 1449) is created using the default Event attributes to allow inheritance of the security attributes of the process that
creates the event.

When AInitialState is False, the TIdLocalEvent ( 1449) is created with the initial event signal state cleared (not set).

When AManualReset is False, the TIdLocalEvent ( 1449) can be automatically reset when the single thread that waits on the
signal is released. It does not require a call to ResetEvent ( 210).

TIdLocalEvent.WaitForEver Method
Waits until another thread signals the event object.

Pascal
function WaitForEver: TWaitResult; overload;

1450 Internet Direct (Indy) Version 10.1.5


Classes TIdLogBase Class

Returns
TWaitResult ( 2989) - The resulting signal state for the event.

Description
WaitForEver is a TWaitResult ( 2989) function that waits until the signal for the event object is turned on. WaitForEver will pause
until the event is signalled.

WaitForEver returns one of the following TWaitResult ( 2989) values:

Value Meaning
wrSignaled The signal of the event object was set.
wrAbandoned The event object was destroyed before the event was signalled.
wrError An error occurred while waiting.
wrTimeout A timeout occurred before the event was signalled.

Use the LastError property for an error code giving detailed information about the result.

See Also
TIdSync ( 2264)

TIdLogBase Class
Defines an ancestor for logging components in the Indy library.

File
IdLogBase ( 4677)

Hierarchy

Pascal
TIdLogBase = class(TIdConnectionIntercept);
Description
TIdLogBase is a TIdConnectionIntercept ( 368) descendant that specifies the interface and framework used for information about
Indy communication components.

TIdLogBase implements overridden methods and event handlers that extend TIdConnectionIntercept ( 368) to perform logging
when open ( 1454), close ( 1453), connect ( 1453), disconnect ( 1454), send ( 1455), and receive ( 1454) operations are
performed.

Messages written to the log may optionally transform EOL ( 3202) characters (Carriage Return + Line Feed by default) to the
token '<EOL ( 3202)>' the destination for the log messages. A log message can optionally include the date and time it was written
to the log.

TIdLogBase contains abstract virtual methods that specify the destination for log messages. TIdLogBase descendants must
implement the virtual methods in the class to resolve where log messages are stored, or written.

See Also
TIdConnectionIntercept ( 368)

TIdLogDebug ( 1457)

TIdLogEvent ( 1457)

Internet Direct (Indy) Version 10.1.5 1451


TIdLogBase Class Classes

TIdLogFile ( 1460)

TIdLogStream ( 1463)

IndySupport ( 15)

TIdLogBase Members
The following tables list the members exposed by TIdLogBase.

Properties
Property Description
Active ( 1456) Starts or stops logging of messages for the intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
LogTime ( 1456) Indicates if log messages contain a date and timestamp.
ReplaceCRLF ( 1456) Indicates that line-end characters in a message should be replaced with textual tags.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Close ( 1453) Specifies the method used to close stage for the logging intercept.
Connect ( 1453)
Create ( 267) Constructor for the object instance.
Destroy ( 1453) Frees the object instance.
Disconnect ( 1454) Writes a log message and closes the logging intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Open ( 1454) Specifies the method used to open the storage for the logging intercept.
Receive ( 1454) Writes log messages when data is received with the intercept.
Send ( 1455) Writes log messages when data is sent with the intercept.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdLogBase Methods
The Methods of the TIdLogBase class are listed here.

Methods
Method Description
Close ( 1453) Specifies the method used to close stage for the logging intercept.
Connect ( 1453)
Destroy ( 1453) Frees the object instance.
Disconnect ( 1454) Writes a log message and closes the logging intercept.

1452 Internet Direct (Indy) Version 10.1.5


Classes TIdLogBase Class

Open ( 1454) Specifies the method used to open the storage for the logging intercept.
Receive ( 1454) Writes log messages when data is received with the intercept.
Send ( 1455) Writes log messages when data is sent with the intercept.

Legend
Method
virtual

TIdLogBase.Close Method
Specifies the method used to close stage for the logging intercept.

Pascal
procedure Close; virtual;
Description
Close is a procedure that specifies the method used to close the storage mechanism used for the logging intercept.

Use Open ( 1454) to open ( 1454) the storage mechanism or destination for log messages written to the intercept.

TIdLogBase ( 1451) does not specify the storage mechanism or destination for log messages written to the intercept. Close is an
empty implementaion in TIdLogBase ( 1451). Use a descendant class that provides an overridden Close method.

See Also
TIdLogFile ( 1460)

TIdLogStream ( 1463)

TIdLogEvent ( 1457)

TIdLogDebug ( 1457)

TIdLogBase.Open ( 1454)

TIdLogBase.Connect Method
Pascal
procedure Connect(
AConnection: TIdNativeComponent
); override;
Parameters
Parameters Description
AConnection Type is TIdNativeComponent ( 3061).

Description
TIdLogBase.Connect overridden method.

TIdLogBase.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy sets Active ( 1456) to False, and calls the inherited destructor.

Internet Direct (Indy) Version 10.1.5 1453


TIdLogBase Class Classes

TIdLogBase.Disconnect Method
Writes a log message and closes the logging intercept.

Pascal
procedure Disconnect; override;
Description
Disconnect is a procedure used to write a log message when a connection is closed for the intercept.

When Active ( 1456) contains True, a log message is written to indicate the change in the connection state and the the inherited
Disconnect method is called to close ( 1453) the intercept.

The log message may contain an optional date and timestamp when LogTime ( 1456) contains True.

Set Active ( 1456) to False to disable message logging on the intercept.

Use Connect ( 1453) to establish the logging intercept.

See Also
TIdLogBase.Connect ( 1453)

TIdLogBase.Active ( 1456)

TIdLogBase.LogTime ( 1456)

RSLogDisconnected

TIdLogBase.Open Method
Specifies the method used to open the storage for the logging intercept.

Pascal
procedure Open; virtual;
Description
Open is a procedure that specifies the method used to open the storage mechanism used for the logging intercept.

Use Close ( 1453) to close ( 1453) the storage mechanism or destination for log messages written to the intercept.

TIdLogBase ( 1451) does not specify the storage mechanism or destination for log messages written to the intercept. Open is an
empty implementaion in TIdLogBase ( 1451). Use a descendant class that provides an overridden Open method.

See Also
TIdLogFile ( 1460)

TIdLogStream ( 1463)

TIdLogEvent ( 1457)

TIdLogDebug ( 1457)

TIdLogBase.Close ( 1453)

TIdLogBase.Receive Method
Writes log messages when data is received with the intercept.

Pascal
procedure Receive(
var ABuffer: TIdBytes
); override;

1454 Internet Direct (Indy) Version 10.1.5


Classes TIdLogBase Class

Parameters
Parameters Description
ABuffer Values from a receive operation to write to the logging intercept.

Description
Receive is an overriden procedure in TIdLogBase ( 1451) that implements logging the contents in the buffer specified by ABuffer
as part of a Receive operation.

Active ( 1456) must contain True, or no operation is performed in Receive.

When Active ( 1456) is True, Receive calls the inherited method prior to constructing the contents of the log message from
ABuffer. When LogTime ( 1456) is True, the current date and time stamp is prepended to the log message. When ReplaceCRLF
( 1456) is True, all instances of CR ( 3174), LF ( 4341), and EOL ( 3202) in the message are replaced with their tag
counterparts, "<CR ( 3174)>", "<LF ( 4341)>", and "<EOL ( 3202)>".

Receive wites the log message containing the generated and received values to the storage destination for the logging intercept.

Set Active ( 1456) to False to disable logging with intercept.

Use Send ( 1455) to implement logging the contents in a Send ( 1455) operation.

See Also
TIdLogBase.LogTime ( 1456)

TIdLogBase.Send ( 1455)

TIdLogBase.Active ( 1456)

TIdLogBase.ReplaceCRLF ( 1456)

TIdLogBase.Send Method
Writes log messages when data is sent with the intercept.

Pascal
procedure Send(
var ABuffer: TIdBytes
); override;
Parameters
Parameters Description
ABuffer Values from a send operation to write to the logging intercept.

Description
Send is an overriden procedure in TIdLogBase ( 1451) that implements logging the contents in the buffer specified by ABuffer as
part of a Send operation.

Active ( 1456) must contain True, or no operation is performed in Send.

When Active ( 1456) is True, Send calls the inherited method prior to constructing the contents of the log message from ABuffer.
When LogTime ( 1456) is True, the current date and time stamp is prepended to the log message. When ReplaceCRLF ( 1456)
is True, all instances of CR ( 3174), LF ( 4341), and EOL ( 3202) in the message are replaced with their tag counterparts,
"<CR ( 3174)>", "<LF ( 4341)>", and "<EOL ( 3202)>".

Send wites the log message containing the generated and received values to the storage destination for the logging intercept.

Set Active ( 1456) to False to disable logging with intercept.

Use Receive ( 1454) to implement logging the contents in a Receive ( 1454) operation.

See Also
TIdLogBase.LogTime ( 1456)

TIdLogBase.Receive ( 1454)

Internet Direct (Indy) Version 10.1.5 1455


TIdLogBase Class Classes

TIdLogBase.Active ( 1456)

TIdLogBase.ReplaceCRLF ( 1456)

TIdLogBase Properties
The Properties of the TIdLogBase class are listed here.

Properties
Property Description
Active ( 1456) Starts or stops logging of messages for the intercept.
LogTime ( 1456) Indicates if log messages contain a date and timestamp.
ReplaceCRLF ( 1456) Indicates that line-end characters in a message should be replaced with textual tags.

Legend
Property

TIdLogBase.Active Property
Starts or stops logging of messages for the intercept.

Pascal
property Active: Boolean;
Description
Active is a Boolean property used to start or stop logging of messages when using methods that alter the connection state or
input/output buffer for the intercept.

Set Active to True to begin message logging. The logging destination will be Opened if it is currently Closed. Set Active to False to
stop message logging. The logging destination will be Closed if it is currently Active.

Active is also used in overridden methods to determine if the logging intercept should call the inhertied method and write logging
messages to indicate the action performed.

The default value for the Active property is False, but can be overridden when the compent is loaded in the VCL component
streaming architecture.

Active is set to False when the component is freed in Destroy ( 1453).

TIdLogBase.LogTime Property
Indicates if log messages contain a date and timestamp.

Pascal
property LogTime: Boolean;
Description
LogTime is a Boolean property that indicates if log messages for the intercept should contain a date and timestamp value. LogTime
is used in various methods in the class as a part of message formatting routines.

When LogTime is True, messages written with the logging intercept will contain the current data and timestamp value when the
message is written. When LogTime is False, the log message will contain only the text that reflects the action performed.

The default value for LogTime is True, as assigned in Create ( 267).

TIdLogBase.ReplaceCRLF Property
Indicates that line-end characters in a message should be replaced with textual tags.

1456 Internet Direct (Indy) Version 10.1.5


Classes TIdLogEvent Class

Pascal
property ReplaceCRLF: Boolean;
Description
ReplaceCRLF is a Boolean property that indicates if the line-end characters CR ( 3174), LF ( 4341), and EOL ( 3202) in a log
message should be replace with their tag counterparts "<CR ( 3174)>", "<LF ( 4341)>", and "<EOL ( 3202)>".

ReplaceCRLF is used in the Receive ( 1454) and Send ( 1455) methods prior to writing the log message for the intercept.

The default value for ReplaceCRLF is True, as assigned in the Create ( 267) constructor.

See Also
TIdLogBase.LogTime ( 1456)

TIdLogBase.Receive ( 1454)

TIdLogBase.Send ( 1455)

TIdLogDebug Class
Implements a logging intercept that writes messages to the debugger for the compiler/platform.

File
IdLogDebug ( 4677)

Hierarchy

Pascal
TIdLogDebug = class(TIdLogBase);
Description
TIdLogDebug is an implementation of the ancestor class TIdLogBase ( 1451), and extends the framework for logging information
about Indy communication components to the DebugOutput ( 2759) stream.

TIdLogDebug uses the DebugOutput ( 2759) function to write log messages to the debugger for the compiler / platform.

TIdLogDebug is very useful for capturing information about Indy communication components for debugging, trouble-shooting, and
general feedback purposes.

See Also
TIdLogBase ( 1451)

DebugOutput ( 2759)

IndySupport ( 15)

TIdLogEvent Class
Implements an event-based logging intercept for data input/output and connection status messages.

File
IdLogEvent ( 4678)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1457


TIdLogEvent Class Classes

Pascal
TIdLogEvent = class(TIdLogBase);
Description
TIdLogEvent is a TIdLogBase ( 1451) descendant that extends the Indy logging framework to include support for event-based
notifications of input/output or status change notifications for the logging intercept.

TIdLogEvent publishes event handlers for data receipt and transmission, as well as an event handler for notifications in the socket
connection state.

See Also
TIdLogBase ( 1451)

TIdLogEvent.OnReceived ( 1459)

TIdLogEvent.OnSent ( 1459)

TIdLogEvent.OnStatus ( 1460)

TIdLogEvent Members
The following tables list the members exposed by TIdLogEvent.

Properties
Property Description
Active ( 1456) Starts or stops logging of messages for the intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
LogTime ( 1456) Indicates if log messages contain a date and timestamp.
ReplaceCRLF ( 1456) Indicates that line-end characters in a message should be replaced with textual tags.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Close ( 1453) Specifies the method used to close stage for the logging intercept.
Connect ( 369)
Connect ( 1453)
Create ( 267) Constructor for the object instance.
Destroy ( 1453) Frees the object instance.
Disconnect ( 369) Responds to socket disconnection notifications.
Disconnect ( 1454) Writes a log message and closes the logging intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Open ( 1454) Specifies the method used to open the storage for the logging intercept.
Receive ( 370) Receives values for the connection intercept.
Receive ( 1454) Writes log messages when data is received with the intercept.
Send ( 370) Sends values for the connection intercept.
Send ( 1455) Writes log messages when data is sent with the intercept.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnReceived ( 1459) Event handler for data received on the logging intercept.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.
OnSent ( 1459) Event handler for data received on the logging intercept.

1458 Internet Direct (Indy) Version 10.1.5


Classes TIdLogEvent Class

OnStatus ( 1460) Event handler for changes in the connection status for the logging intercept.

Legend
Event
Method
virtual
Property
read only

TIdLogEvent Events
The Events of the TIdLogEvent class are listed here.

Events
Event Description
OnReceived ( 1459) Event handler for data received on the logging intercept.
OnSent ( 1459) Event handler for data received on the logging intercept.
OnStatus ( 1460) Event handler for changes in the connection status for the logging intercept.

Legend
Event

TIdLogEvent.OnReceived Event
Event handler for data received on the logging intercept.

Pascal
property OnReceived: TLogItemDataEvent;
Description
OnReceived is a TLogItemDataEvent ( 3099) property that represents the event handler signalled when data is received on the
logging intercept.

OnReceived is triggered in the Receive ( 1454) method, and allows the user to specify the processing to occur for the event.

Applications must assign a procedure with the required parameters for the event handler in order to respond to the event
notification.

See Also
TLogItemDataEvent ( 3099)

TIdLogEvent.OnSent Event
Event handler for data received on the logging intercept.

Pascal
property OnSent: TLogItemDataEvent;
Description
OnSent is a TLogItemDataEvent ( 3099) property that represents the event handler signalled when data is sent on the logging
intercept.

OnSent is triggered in the Send ( 1455) method, and allows the user to specify the processing to occur for the event.

Applications must assign a procedure with the required parameters for the event handler in order to respond to the event
notification.

See Also
TLogItemDataEvent ( 3099)

Internet Direct (Indy) Version 10.1.5 1459


TIdLogFile Class Classes

TIdLogEvent.OnStatus Event
Event handler for changes in the connection status for the logging intercept.

Pascal
property OnStatus: TLogItemStatusEvent;
Description
OnStatus is a TLogItemStatusEvent ( 3100) property that represents the event handler signalled for changes in the connection
status for the logging intercept.

OnStatus is triggering in the Connect ( 1453) and Disconnect ( 1454) methods.

Applications must assign a procedure to the event handler with the required parameters in order to respond to the event notification.

See Also
TLogItemStatusEvent ( 3100)

TIdLogFile Class
Implements an Indy logging intercept that can write log messages to a file.

File
IdLogFile ( 4678)

Hierarchy

Pascal
TIdLogFile = class(TIdLogBase);
Description
TIdLogFile is a TIdLogBase ( 1451) descendant that implements an Indy logging intercept that can write log messages to a file.

TIdLogFile overrides methods in the ancestor class to implement opening and closing of a log file, as well as enhanced message
logging using both message text and data values for send ( 1455) and receive ( 1454) operations.

TIdLogFile introduces properties and methods that specify the file name used to store log messages, and the TIdStreamVCL (
2709) instance used to perform output operations.

See Also
TIdLogBase ( 1451)

TIdLogFile Members
The following tables list the members exposed by TIdLogFile.

Properties
Property Description
Active ( 1456) Starts or stops logging of messages for the intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
Filename ( 1462) File used to store messages written using the logging intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
LogTime ( 1456) Indicates if log messages contain a date and timestamp.

1460 Internet Direct (Indy) Version 10.1.5


Classes TIdLogFile Class

ReplaceCRLF ( 1456) Indicates that line-end characters in a message should be replaced with textual tags.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Close ( 1461) Closes the output destination for messages written using the logging intercept.
Connect ( 369)
Connect ( 1453)
Create ( 267) Constructor for the object instance.
Destroy ( 1453) Frees the object instance.
Disconnect ( 369) Responds to socket disconnection notifications.
Disconnect ( 1454) Writes a log message and closes the logging intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Open ( 1462) Opens the output destination for messages written using the logging intercept.
Receive ( 370) Receives values for the connection intercept.
Receive ( 1454) Writes log messages when data is received with the intercept.
Send ( 370) Sends values for the connection intercept.
Send ( 1455) Writes log messages when data is sent with the intercept.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdLogFile Methods
The Methods of the TIdLogFile class are listed here.

Methods
Method Description
Close ( 1461) Closes the output destination for messages written using the logging intercept.
Open ( 1462) Opens the output destination for messages written using the logging intercept.

Legend
Method
virtual

TIdLogFile.Close Method
Closes the output destination for messages written using the logging intercept.

Pascal
procedure Close; override;
Description
Close is an overridden procedure used to close the output destination for messages written using the logging intercept.

Close frees resources allocated to the internal TIdStreamVCL ( 2709) instance used to write log messages the filename specified

Internet Direct (Indy) Version 10.1.5 1461


TIdLogFile Class Classes

in Filename ( 1462).

Use Open ( 1462) to allocate the internal TIdStreamVCL ( 2709) instance used to write log messages to the filename specified
in Filename ( 1462).

Close does not call the inherited method.

See Also
TIdLogFile.Filename ( 1462)

TIdLogFile.Open ( 1462)

TIdLogBase.Close ( 1453)

TIdLogFile.Open Method
Opens the output destination for messages written using the logging intercept.

Pascal
procedure Open; override;
Description
Open is an overridden procedure used to open the output destination for messages written using the logging intercept.

Open allocates resources for the internal TIdStreamVCL ( 2709) instance used to write log messages the filename specified in
Filename ( 1462).

When Filename ( 1462) does not already exist, it is created. For an existing file in Filename ( 1462), the stream is positioned at
its end to append new log messages.

Use Close ( 1461) to free the internal TIdStreamVCL ( 2709) instance used to write log messages to the file specified in
Filename ( 1462).

Open does not call the inherited method.

Open cannot be called from within the form designer or IDE; it has no effect and the method is exited without performing any action.

See Also
TIdLogFile.Filename ( 1462)

TIdLogFile.Close ( 1461)

TIdLogBase.Open ( 1454)

TIdLogFile Properties
The Properties of the TIdLogFile class are listed here.

Properties
Property Description
Filename ( 1462) File used to store messages written using the logging intercept.

Legend
Property

TIdLogFile.Filename Property
File used to store messages written using the logging intercept.

Pascal
property Filename: String;

1462 Internet Direct (Indy) Version 10.1.5


Classes TIdLogStream Class

Description
Filename is a TFilename property that represent the fully-qualified file name to use as storage for messages written using the
logging intercept.

Filename is use in Open ( 1462) to create ( 267) an internal TIdStreamVCL ( 2709) instance used to write message to the file.

Changing the value in the Filename can result in an EIdException ( 76) being raised when the internal TIdStreamVCL ( 2709)
instance has already been allocated by calling Open ( 1462).

Use Close ( 1461) to close ( 1461) the file and stream used for messages written using the logging intercept.

Exceptions
Exceptions Description
EIdException ( 76) With the message in RSLogFileAlreadyOpen.

See Also
TIdLogFile.Open ( 1462)

TIdLogFile.Close ( 1461)

TIdLogStream Class
Implements an Indy logging intercept using stream-based storage for log messages.

File
IdLogStream ( 4679)

Hierarchy

Pascal
TIdLogStream = class(TIdLogBase);
Description
TIdLogStream is a TIdLogBase ( 1451) descendant that implements an Indy logging intercept using stream-based storage for
data. TIdLogStream implements InputStream and OutputStream properties used as the targets for incoming and outgoing data from
the logging intercept.

TIdLogStream provides overridden protected methods that implement passing incoming and outgoing data to the assigned
InputStream and OutputStream properties.

TIdLogStream also specifies an overriden protected method that writes status messages for logging send ( 1455) and receive (
1454) operations using the logging class instance. It is an empty implementation. Descendant classes must reimplement the
method to specify the destination for status messages.

TIdLogStream simply forwards the data for Send ( 1455) and Receive ( 1454) methods to the appropriate stream. No textual
messages or date/timestamp values are included the values written to the input or output streams.

See Also
TIdLogBase ( 1451)

TIdLogStream.InputStream

TIdLogStream.OutputStream

TIdLogStream Members
The following tables list the members exposed by TIdLogStream.

Internet Direct (Indy) Version 10.1.5 1463


TIdLogStream Class Classes

Properties
Property Description
Active ( 1456) Starts or stops logging of messages for the intercept.
Connection ( 371) Connection to be handled in the intercept.
Data ( 371) Provides context or other data for the connection intercept.
FreeStreams ( 1465) Indicates if streams are freed by the logging intercept.
Intercept ( 372)
IsClient ( 372) Indicates that the conncetion intercept is for a client connection.
LogTime ( 1456) Indicates if log messages contain a date and timestamp.
ReceiveStream ( 1466) Stream used for writing data received in the logging intercept.
ReplaceCRLF ( 1456) Indicates that line-end characters in a message should be replaced with textual tags.
SendStream ( 1466) Stream used for writing data sent in the logging intercept.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Close ( 1453) Specifies the method used to close stage for the logging intercept.
Connect ( 369)
Connect ( 1453)
Create ( 267) Constructor for the object instance.
Destroy ( 1453) Frees the object instance.
Disconnect ( 1465) Closes the streams used in the logging intercept.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Open ( 1454) Specifies the method used to open the storage for the logging intercept.
Receive ( 370) Receives values for the connection intercept.
Receive ( 1454) Writes log messages when data is received with the intercept.
Send ( 370) Sends values for the connection intercept.
Send ( 1455) Writes log messages when data is sent with the intercept.
CType ( 267)
Create ( 1274)

Events
Event Description
OnConnect ( 372) Specifies the event handler for connection notifications.
OnDisconnect ( 373) Specifies the event handler for disconnect ( 369) notifications.
OnReceive ( 373) Allows data handling or transformation for intercepted read operations.
OnSend ( 374) Allows data handling or transformation for intercepted write operations.

Legend
Method
virtual
Property
read only
Event

TIdLogStream Methods
The Methods of the TIdLogStream class are listed here.

Methods
Method Description
Disconnect ( 1465) Closes the streams used in the logging intercept.

Legend
Method
virtual

1464 Internet Direct (Indy) Version 10.1.5


Classes TIdLogStream Class

TIdLogStream.Disconnect Method
Closes the streams used in the logging intercept.

Pascal
procedure Disconnect; override;
Description
Disconnect is an overridden procedure that closes the streams used for sending and receiveing data on the logging intercept.

When FreeStreams ( 1465) contains True, Disconnect will free resource allocated to the ReceiveStream ( 1466) and
SendStream ( 1466) properties.

When FreeStreams ( 1465) contains False, no action is performed in the Disconnect method.

Use Connect ( 1453) open ( 1454) the streams used for the logging intercept.

See Also
TIdLogStream.Connect ( 1453)

TIdLogStream.FreeStreams ( 1465)

TIdLogStream Properties
The Properties of the TIdLogStream class are listed here.

Properties
Property Description
FreeStreams ( 1465) Indicates if streams are freed by the logging intercept.
ReceiveStream ( 1466) Stream used for writing data received in the logging intercept.
SendStream ( 1466) Stream used for writing data sent in the logging intercept.

Legend
Property

TIdLogStream.FreeStreams Property
Indicates if streams are freed by the logging intercept.

Pascal
property FreeStreams: Boolean;
Description
FreeStreams is a Boolean property that indicates if the streams in ReceiveStream ( 1466) and SendStream ( 1466) can be freed
by the logging intercept.

The default value for FreeStreams is True, as assigned in the Create ( 267) constructor.

FreeStream is used in Disconnect ( 1465) to determine if the resources allocated to the ReceiveStream ( 1466) and SendStream
( 1466) properties are freed, or if the stream instances are owned by the application.

See Also
TIdLogStream.Create ( 267)

TIdLogStream. Destroy ( 1453)

TIdLogStream.ReceiveStream ( 1466)

TIdLogStream.SendStream ( 1466)

Internet Direct (Indy) Version 10.1.5 1465


TIdLongWord Class Classes

TIdLogStream.ReceiveStream Property
Stream used for writing data received in the logging intercept.

Pascal
property ReceiveStream: TIdStream;
Description
ReceiveStream is a TStream property that represents the destination for data received in the logging intercept.

Applications must assign a TStream instance to the ReceiveStream property to allow logging for data received in the logging
intercept.

Set FreeStreams ( 1465) to True if the stream instance can be freed when Disconnect ( 1465) is called for the logging intercept.

When the intercept is Active ( 1456), data received by the logging intercept is written to ReceiveStream. No textual messages or
date / timestamp values are written to ReceiveStream.

Use SendStream ( 1466) to indicate the stream used for writing data sent on the logging intercept.

See Also
TIdLogStream.FreeStreams ( 1465)

TIdLogStream.SendStream ( 1466)

TIdLogStream.SendStream Property
Stream used for writing data sent in the logging intercept.

Pascal
property SendStream: TIdStream;
Description
SendStream is a TStream property that represents the destination for data sent in the logging intercept.

Applications must assign a TStream instance to the SendStream property to allow logging for data sent in the logging intercept.

Set FreeStreams ( 1465) to True if the stream instance can be freed when Disconnect ( 1465) is called for the logging intercept.

When the intercept is Active ( 1456), data sent by the logging intercept is written to SendStream. No textual messages or date /
timestamp values are written to SendStream.

Use ReceiveStream ( 1466) to indicate the stream used for writing data received on the logging intercept.

See Also
TIdLogStream.FreeStreams ( 1465)

TIdLogStream.ReceiveStream ( 1466)

TIdLongWord Class
File
IdStruct ( 4732)

Hierarchy

Pascal
TIdLongWord = class(TIdUnion);

1466 Internet Direct (Indy) Version 10.1.5


Classes TIdLongWord Class

Description
TIdLongWord is a TIdUnion ( 2535) descendant.

See Also
TIdUnion ( 2535)

TIdLongWord Members
The following tables list the members exposed by TIdLongWord.

Properties
Property Description
BytesLen ( 2537)
s_b1 ( 1468)
s_b2 ( 1468)
s_b3 ( 1468)
s_b4 ( 1468)
s_l ( 1468)
s_w1 ( 1469)
s_w2 ( 1469)

Methods
Method Description
create ( 1467)
ReadStruct ( 2262)
ReadStruct ( 2536)
WriteStruct ( 2262)
WriteStruct ( 2536)

Legend
Constructor
virtual
Property
read only

TIdLongWord Methods
The Methods of the TIdLongWord class are listed here.

Methods
Method Description
create ( 1467)

Legend
Constructor
virtual

TIdLongWord.create Constructor
Pascal
constructor create; override;
Description
create is a overridden constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1467


TIdLongWord Class Classes

TIdLongWord Properties
The Properties of the TIdLongWord class are listed here.

Properties
Property Description
s_b1 ( 1468)
s_b2 ( 1468)
s_b3 ( 1468)
s_b4 ( 1468)
s_l ( 1468)
s_w1 ( 1469)
s_w2 ( 1469)

Legend
Property

TIdLongWord.s_b1 Property
Pascal
property s_b1: Byte;
Description
s_b1 is a Public Byte property. Write access for the property is implemented using Sets_b1.

TIdLongWord.s_b2 Property
Pascal
property s_b2: Byte;
Description
s_b2 is a Public Byte property. Write access for the property is implemented using Sets_b2.

TIdLongWord.s_b3 Property
Pascal
property s_b3: Byte;
Description
s_b3 is a Public Byte property. Write access for the property is implemented using Sets_b3.

TIdLongWord.s_b4 Property
Pascal
property s_b4: Byte;
Description
s_b4 is a Public Byte property. Write access for the property is implemented using Sets_b4.

TIdLongWord.s_l Property
Pascal
property s_l: Cardinal;

1468 Internet Direct (Indy) Version 10.1.5


Classes TIdLPR Class

Description
s_l is a Public Cardinal property. Write access for the property is implemented using Set_l.

TIdLongWord.s_w1 Property
Pascal
property s_w1: word;
Description
s_w1 is a Public word property. Write access for the property is implemented using SetS_w1.

TIdLongWord.s_w2 Property
Pascal
property s_w2: word;
Description
s_w2 is a Public word property. Write access for the property is implemented using SetS_w2.

TIdLPR Class
Implements a Line Printer Daemon Protocol (LPR) client.

File
IdLPR ( 4679)

Hierarchy

Pascal
TIdLPR = class(TIdTCPClientCustom);
Description
TIdLPR is a TIdTCPClientCustom ( 2340) descendant that implements a Line Printer Daemon Protocol (LPR) client, as described
in the Internet Standards document:

RFC 1179 - Line Printer Daemon Protocol

The LPR protocol is used to add, remove, and get the status of print ( 1472) jobs from a spool on a remote computer. The LPR
protocol was developed around the Berkeley version of Unix and later formalized in RFC 1179.

See Also
TIdTCPClientCustom ( 2340) IndySupport ( 15)

TIdLPR Members
The following tables list the members exposed by TIdLPR.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.

Internet Direct (Indy) Version 10.1.5 1469


TIdLPR Class Classes

BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ControlFile ( 1474) Control file for the current print ( 1472) job.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
IOHandler ( 2364) The input / output mechanism for the connection.
JobId ( 1474) Identifies the current print ( 1472) Job ID number.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Queue ( 1474) Name of the print ( 1472) queue (spool) that is used with GetQueueState ( 1471), Print ( 1472), and
PrintFile ( 1472).
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 1471) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetQueueState ( 1471) This method requests that the server send the status of print ( 1472) jobs in a spool.
GetVersion ( 269) Version ( 269) number for Indy component suite.
PrintFile ( 1472) This sends a file to the daemon for printing.
PrintWaitingJobs ( 1473) Requests that the server print ( 1472) all of the print ( 1472) jobs that are waiting in the queue.
RemoveJobList ( 1473) This requests that the daemon remove a list of jobs from its queue.
CType ( 267)
Create ( 1274)
Print ( 1472)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnLPRStatus ( 1475) This event is triggered to indicate the status of the TIdLPR ( 1469) object.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual

1470 Internet Direct (Indy) Version 10.1.5


Classes TIdLPR Class

Property
read only
Event

TIdLPR Methods
The Methods of the TIdLPR class are listed here.

Methods
Method Description
Destroy ( 1471) Frees the object instance.
GetQueueState ( 1471) This method requests that the server send the status of print ( 1472) jobs in a spool.
Print ( 1472)
PrintFile ( 1472) This sends a file to the daemon for printing.
PrintWaitingJobs ( 1473) Requests that the server print ( 1472) all of the print ( 1472) jobs that are waiting in the queue.
RemoveJobList ( 1473) This requests that the daemon remove a list of jobs from its queue.

Legend
Destructor
virtual

TIdLPR.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the TIdLPR ( 1469) object instance. Destroy frees resources allocated in the ControlFile ( 1474)
property prior to calling the inherited Destroy method.

See Also
ControlFile ( 1474)

TIdLPR.GetQueueState Method
This method requests that the server send the status of print ( 1472) jobs in a spool.

Pascal
function GetQueueState(
const AShortFormat: Boolean = false;
const AList: String = ''
): String;
Parameters
Parameters Description
AShortFormat This parameter indicates if the daemon should send an abbreviated listing.

Returns
String - the status of the print ( 1472) jobs from the server.

Description
This method requests that the server send the status of print ( 1472) jobs in a spool.

Internet Direct (Indy) Version 10.1.5 1471


TIdLPR Class Classes

TIdLPR.Print Method
Overload List

Method Description
TIdLPR.Print (String) ( 1472) This method sends text to the daemon for printing.
TIdLPR.Print (TIdBytes) ( 1472) This method sends text to the daemon for printing.

TIdLPR.Print Method (String)


This method sends text to the daemon for printing.

Pascal
procedure Print(
AText: String
); overload;
Parameters
Parameters Description
AText a string to be printed

Description
Print is a method used to send output text to the LPR daemon for printing.

See Also
PrintFile ( 1472) Print PrintFile ( 1472)

TIdLPR.Print Method (TIdBytes)


This method sends text to the daemon for printing.

Pascal
procedure Print(
const ABuffer: TIdBytes
); overload;
Parameters
Parameters Description
ABuffer An array of characters to print

Description
Print is a method used to send output text to the LPR daemon for printing.

See Also
PrintFile ( 1472) Print PrintFile ( 1472)

TIdLPR.PrintFile Method
This sends a file to the daemon for printing.

Pascal
procedure PrintFile(
AFileName: String
);
Parameters
Parameters Description
AFileName The file to be printed.

1472 Internet Direct (Indy) Version 10.1.5


Classes TIdLPR Class

Description
PrintFile is a method used to send the contents of a file to the LPR daemon for printing.

See Also
Queue ( 1474) Print ( 1472)

TIdLPR.PrintWaitingJobs Method
Requests that the server print ( 1472) all of the print ( 1472) jobs that are waiting in the queue.

Pascal
procedure PrintWaitingJobs;
Description
PrintWaitingJobs is a method used to request printing for all of the print ( 1472) jobs waiting in the queue specified by the Queue
( 1474) property.

See Also
Queue ( 1474)

TIdLPR.RemoveJobList Method
This requests that the daemon remove a list of jobs from its queue.

Pascal
procedure RemoveJobList(
AList: String;
const AAsRoot: Boolean = False
);
Parameters
Parameters Description
AList a list of print ( 1472) job numbers from the person specified in the ControlFile.UserName property or if the
AsRoot parameter is true, this can be the UserNames whose jobs are to be deleted
AsRoot If this parameter is true, the AList parameter can be this can be the UserNames whose jobs are to be deleted.
If false, the only jobs that can be deleted are for the user specified in the ControlFile.UserName property. The
root account is the system administrator or Unix Super User.

Description
This requests that the daemon remove a list of jobs from its queue (specified in the Queue ( 1474) property).

See Also
TIdLPRControlFile.UserName ( 1481) Queue ( 1474)

TIdLPR Properties
The Properties of the TIdLPR class are listed here.

Properties
Property Description
ControlFile ( 1474) Control file for the current print ( 1472) job.
JobId ( 1474) Identifies the current print ( 1472) Job ID number.
Queue ( 1474) Name of the print ( 1472) queue (spool) that is used with GetQueueState ( 1471), Print ( 1472), and
PrintFile ( 1472).

Legend
Property

Internet Direct (Indy) Version 10.1.5 1473


TIdLPR Class Classes

TIdLPR.ControlFile Property
Control file for the current print ( 1472) job.

Pascal
property ControlFile: TIdLPRControlFile;
Description
ControlFile is a TIdLPRControlFile ( 1475) property that represents the control file for the current print ( 1472) job.

The control file specifies the parameters for the print ( 1472) job and is sent when a request is sent to the LPR daemon.

See Also
TIdLPR ( 1469) TIdLPRControlFile ( 1475)

TIdLPR.JobId Property
Identifies the current print ( 1472) Job ID number.

Pascal
property JobId: String;
Description
JobId is a String property that identifies the print ( 1472) Job Identification number for LPR print ( 1472) job. Changing the value
in JobID ensures that JobID is less than 999. Values greater than or equal to 999 are ignored, and reset to 1 when the print (
1472) job is generated. JobID is sent as a parameter to the OnLPRStatus ( 1475) event handler.

See Also
OnLPRStatus ( 1475)

TIdLPR.Queue Property
Name of the print ( 1472) queue (spool) that is used with GetQueueState ( 1471), Print ( 1472), and PrintFile ( 1472).

Pascal
property Queue: String;
Description
Queue is a String property that represents the name of the print ( 1472) queue (spool) that is used with the GetQueueState (
1471), Print ( 1472), and PrintFile ( 1472) methods.

See Also
GetQueueState ( 1471) Print ( 1472) PrintFile ( 1472) RemoveJobList ( 1473) PrintWaitingJobs ( 1473)

TIdLPR Events
The Events of the TIdLPR class are listed here.

Events
Event Description
OnLPRStatus ( 1475) This event is triggered to indicate the status of the TIdLPR ( 1469) object.

Legend
Event

1474 Internet Direct (Indy) Version 10.1.5


Classes TIdLPRControlFile Class

TIdLPR.OnLPRStatus Event
This event is triggered to indicate the status of the TIdLPR ( 1469) object.

Pascal
property OnLPRStatus: TIdLPRStatusEvent;
Parameters
Parameters Description
ASender the object that triggered this event
AStatus The state of the TIdLPR ( 1469) queue
AStatusText The JobID, an error message if AStatus equals psError, or the queue results if AStatus equals psQueueState.

Description
OnLPRStatus is a TIdLPRStatusEvent ( 3056) property that represents the event handler triggered to indicate the status of the
TIdLPR ( 1469) object.

See Also
TIdLPRStatusEvent ( 3056)

TIdLPRControlFile Class
Encapsulates an LPR control file.

File
IdLPR ( 4679)

Hierarchy

Pascal
TIdLPRControlFile = class(TIdPersistent);
Description
TIdLPRControlFile is a TPersistent descendant that encapsulates an LPR control file. An LPR control file specifies printing settings
for a particular print job.

TIdLPRControlFile is the type used to represent the TIdLPR.ControlFile ( 1474) property.

See Also
TIdLPR.ControlFile ( 1474)

TIdLPRControlFile Members
The following tables list the members exposed by TIdLPRControlFile.

Properties
Property Description
BannerClass ( 1477) Class name to be printed on the banner page.
BannerPage ( 1477) Indicates that the LPR print job control contains a banner page.
FileFormat ( 1478) Specifies the format of the file you are sending to the LPR daemon.
HostName ( 1478) Name of the computer that requested the print job.
IndentCount ( 1478) Specifies the column indenting count for the print job.
JobName ( 1479) Specifies the job name to be printed on the banner page.
MailWhenPrinted ( 1479) Indicates the LPR daemon should mail the user when the print job is finished.

Internet Direct (Indy) Version 10.1.5 1475


TIdLPRControlFile Class Classes

OutputWidth ( 1479) Specifies the maximum number of columns for the print job.
TroffBoldFont ( 1479) Indicates the font control settings for a Bold font in a print job.
TroffItalicFont ( 1480) Indicates the font control settings for an Italic font in a print job.
TroffRomanFont ( 1480) Indicates the font control settings for a Roman font in a print job.
TroffSpecialFont ( 1480) Indicates the font control settings for Special fonts in a print job.
UserName ( 1481) User name for the person who submitted the print job.

Methods
Method Description
Assign ( 1476)
Create ( 1476) Constructor for the TIdLPRControlFile ( 1475) object instance.

Legend
Method
virtual
Property

TIdLPRControlFile Methods
The Methods of the TIdLPRControlFile class are listed here.

Methods
Method Description
Assign ( 1476)
Create ( 1476) Constructor for the TIdLPRControlFile ( 1475) object instance.

Legend
Method
virtual

TIdLPRControlFile.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is an overridden method.

TIdLPRControlFile.Create Constructor
Constructor for the TIdLPRControlFile ( 1475) object instance.

Pascal
constructor Create;
Description
Create is the constructor for the TIdLPRControlFile ( 1475) object instance.

Create calls the inherited Create method, and initializes values on the HostName ( 1478), FileFormat ( 1478), IndentCount (
1478), BannerPage ( 1477), and OutputWidth ( 1479) properties.

HostName ( 1478) can contain the value "unknown" if the local IP address or host name cannot be retrieved.

1476 Internet Direct (Indy) Version 10.1.5


Classes TIdLPRControlFile Class

See Also
HostName ( 1478) FileFormat ( 1478) IndentCount ( 1478) BannerPage ( 1477) OutputWidth ( 1479)

TIdLPRControlFile Properties
The Properties of the TIdLPRControlFile class are listed here.

Properties
Property Description
BannerClass ( 1477) Class name to be printed on the banner page.
BannerPage ( 1477) Indicates that the LPR print job control contains a banner page.
FileFormat ( 1478) Specifies the format of the file you are sending to the LPR daemon.
HostName ( 1478) Name of the computer that requested the print job.
IndentCount ( 1478) Specifies the column indenting count for the print job.
JobName ( 1479) Specifies the job name to be printed on the banner page.
MailWhenPrinted ( 1479) Indicates the LPR daemon should mail the user when the print job is finished.
OutputWidth ( 1479) Specifies the maximum number of columns for the print job.
TroffBoldFont ( 1479) Indicates the font control settings for a Bold font in a print job.
TroffItalicFont ( 1480) Indicates the font control settings for an Italic font in a print job.
TroffRomanFont ( 1480) Indicates the font control settings for a Roman font in a print job.
TroffSpecialFont ( 1480) Indicates the font control settings for Special fonts in a print job.
UserName ( 1481) User name for the person who submitted the print job.

Legend
Property

TIdLPRControlFile.BannerClass Property
Class name to be printed on the banner page.

Pascal
property BannerClass: String;
Description
BannerClass is a String property that represents the class name to be printed on the banner page.

The name must be 31 or fewer characters. The name can be omitted. If it is, the name of the host on which the file is printed will be
used. The class is conventionally used to display the host from which the printing job originated.

TIdLPRControlFile.BannerPage Property
Indicates that the LPR print job control contains a banner page.

Pascal
property BannerPage: Boolean;
Description
BannerPage is a Boolean property that indicates the LPR print job control contains a banner page.

The default value for BannerPage is DEF_BANNERPAGE ( 3181).

Use the BannerClass ( 1477) property to identify the type of banner page required.

See Also
DEF_BANNERPAGE ( 3181) BannerClass ( 1477)

Internet Direct (Indy) Version 10.1.5 1477


TIdLPRControlFile Class Classes

TIdLPRControlFile.FileFormat Property
Specifies the format of the file you are sending to the LPR daemon.

Pascal
property FileFormat: TIdLPRFileFormat;
Description
FileFormat is a TIdLPRFileFormat ( 2963) property that specifies the format of the file you are sending to the daemon, or how the
file is to be printed by the daemon.

FileFormat can contain one of the following values:

Value Meaning

---------------- --------------------------------------------------

ffCIF CalTech Intermediate Form


ffDVI DVI (TeX output)
ffFormattedText add formatting as needed to text file
ffPlot - Berkeley Unix plot library
ffControlCharText text file with control characters
ffDitroff ditroff output
ffPostScript Postscript output file (.PS)
ffPR 'pr' format
ffFORTRAM FORTRAN carriage control
ffTroff Troff output
ffSunRaster Sun raster format file (.RAS,.RAST,.SUN,.SR,.SCR)

The default value for FileFormat is DEF_FILEFORMAT.

See Also
TIdLPRFileFormat ( 2963)

TIdLPRControlFile.HostName Property
Name of the computer that requested the print job.

Pascal
property HostName: String;
Description
HostName is a String property that represents the name of the computer that requested the print job. By default, this will be the
address of the user's computer.

TIdLPRControlFile.IndentCount Property
Specifies the column indenting count for the print job.

Pascal
property IndentCount: Integer;

1478 Internet Direct (Indy) Version 10.1.5


Classes TIdLPRControlFile Class

Description
IndentCount is an Integer property that specifies the Indenting count for the print job. The Indenting count specifies the number of
columns to indenting the content of the print job.

The default value for IndentCount is DEF_INDENTCOUNT ( 3190).

See Also
OutputWidth ( 1479)

TIdLPRControlFile.JobName Property
Specifies the job name to be printed on the banner page.

Pascal
property JobName: String;
Description
JobName is a String property that is the job name to be printed on the banner page for the print job.

See Also
HostName ( 1478) UserName ( 1481)

TIdLPRControlFile.MailWhenPrinted Property
Indicates the LPR daemon should mail the user when the print job is finished.

Pascal
property MailWhenPrinted: Boolean;
Description
MailWhenPrinted is a Boolean property that indicates if the LPR daemon should send mail to the user identified in UserName (
1481) when the LPR print job is finished. The default value for MailWhenPrinted is DEF_MAILWHENPRINTED ( 3190).

MailWhenPrinted is used when TIdLPR ( 1469) generates a print stream including control data for a job.

See Also
UserName ( 1481) TIdLPR ( 1469)

TIdLPRControlFile.OutputWidth Property
Specifies the maximum number of columns for the print job.

Pascal
property OutputWidth: Integer;
Description
OutputWidth is an Integer property that specifies the maximum number of columns for the print job.

Use IndentCount ( 1478) to specify the number of columns to use for the left margin of the print job.

The default value for OutputWidth is DEF_OUTPUTWIDTH ( 3192).

See Also
IndentCount ( 1478)

TIdLPRControlFile.TroffBoldFont Property
Indicates the font control settings for a Bold font in a print job.

Internet Direct (Indy) Version 10.1.5 1479


TIdLPRControlFile Class Classes

Pascal
property TroffBoldFont: String;
Description
TroffBoldFont is a String property that indicates the control settings to use for a Bold font face when generating formatted text in a
TIdLPR ( 1469) print job.

Use TroffRomanFont ( 1480), TroffItalicFont ( 1480), and TroffSpecialFont ( 1480) to specify other font settings for the print job.

See Also
TroffRomanFont ( 1480) TroffItalicFont ( 1480) TroffSpecialFont ( 1480) FileFormat ( 1478) TIdLPRFileFormat ( 2963)

TIdLPRControlFile.TroffItalicFont Property
Indicates the font control settings for an Italic font in a print job.

Pascal
property TroffItalicFont: String;
Description
TroffItalicFont is a String property that indicates the control settings to use for an Italic font face when generating formatted text in a
TIdLPR ( 1469) print job.

Use TroffBoldFont ( 1479), TroffRomanFont ( 1480), and TroffSpecialFont ( 1480) to specify other font settings for the print job.

See Also
TroffBoldFont ( 1479) TroffRomanFont ( 1480) TroffSpecialFont ( 1480) FileFormat ( 1478) TIdLPRFileFormat ( 2963)

TIdLPRControlFile.TroffRomanFont Property
Indicates the font control settings for a Roman font in a print job.

Pascal
property TroffRomanFont: String;
Description
TroffRomanFont is a String property that indicates the control settings to use for a Roman font face when generating formatted text
in a TIdLPR ( 1469) print job.

Use TroffBoldFont ( 1479), TroffItalicFont ( 1480), and TroffSpecialFont ( 1480) to specify other font settings for the print job.

See Also
TroffBoldFont ( 1479) TroffItalicFont ( 1480) TroffSpecialFont ( 1480) FileFormat ( 1478) TIdLPRFileFormat ( 2963)

TIdLPRControlFile.TroffSpecialFont Property
Indicates the font control settings for Special fonts in a print job.

Pascal
property TroffSpecialFont: String;
Description
TroffSpecialFont is a String property that indicates the control settings to use for special fonts when generating formatted text in a
TIdLPR ( 1469) print job.

Use TroffBoldFont ( 1479), TroffItalicFont ( 1480), and TroffRomanFont ( 1480) to specify other font settings for the print job.

See Also
TroffBoldFont ( 1479) TroffItalicFont ( 1480) TroffRomanFont ( 1480) FileFormat ( 1478) TIdLPRFileFormat ( 2963)

1480 Internet Direct (Indy) Version 10.1.5


Classes TIdMailBox Class

TIdLPRControlFile.UserName Property
User name for the person who submitted the print job.

Pascal
property UserName: String;
Description
UserName is a String property that represents the User name for the person who submitted the print job or the user requesting that
some of their jobs be deleted.

See Also
TIdLPR.RemoveJobList ( 1473)

TIdMailBox Class
Represents information about an IMAP4 mailbox.

File
IdMailBox ( 4680)

Hierarchy

Pascal
TIdMailBox = class(TIdBaseComponent);
Description
TIdMailBox is a TIdBaseComponent ( 266) descendant that represents information about a mailbox selected using the IMAP4
protocol. TIdMailBox identifies the Attributes ( 1484) of the mailbox, updateable flags, state information, and the list of messages
in the currently seleted mailbox.

TIdMailBox can also indicate dynamic information, such as message numbers found that meet some search criteria, or a list
messages that have been marked for deletion in the mailbox.

TIdMailBox is the type used to represent the TIdIMAP4.MailBox ( 1245) property, and is updated when the IMAP4 client performs
a Select, Examine, or Status operation using the IMAP4 protocol.

See Also
TIdIMAP4.MailBox ( 1245)

TIdMailBox Members
The following tables list the members exposed by TIdMailBox.

Properties
Property Description
Attributes ( 1484) Indicates mailbox attributes for the currently selected mailbox.
ChangeableFlags ( 1485) Represents the permanent flags for am IMAP4 mailbox.
FirstUnseenMsg ( 1485) Initial message number containing an "Unseen" flag.
Flags ( 1485) Indicates IMAP4 flags set for the current message.
MessageList ( 1486)
Name ( 1486) Identifies the mailbox in the IMAP4 mailbox hierarchy.
RecentMsgs ( 1486) Indicates the number of messages added since the last mailbox access.
State ( 1486) Indicates if the mailbox allows read and write access.

Internet Direct (Indy) Version 10.1.5 1481


TIdMailBox Class Classes

TotalMsgs ( 1487) Indicates the number of messages in the currently selected mailbox.
UIDNext ( 1487) Indicates the next UID value for a messaged added to the mailbox.
UIDValidity ( 1487) Indicates the mailbox UID value for a messaged added to the mailbox.
UnseenMsgs ( 1488) Indicates the number of unread messages in the current mailbox.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Clear ( 1483) Reset properties of the mailbox to their default values.
Create ( 267) Constructor for the object instance.
Destroy ( 1484) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Legend
Data Member
Method
virtual
Property
read only

TIdMailBox Fields
The Fields of the TIdMailBox class are listed here.

Legend
Data Member

TIdMailBox.DeletedMsgs Field
Indicates message numbers that have been marked for deletion.

Pascal
DeletedMsgs: TLongIntArray;
Description
DeletedMsgs is a public TLongIntArray ( 3101) member used to hopld an array of LongInt values, and indicates message
numbers that have been marked for deletion in the currently selected mailbox.

DeletedMsgs is updated in TIdIMAP4.SelectMailBox ( 1205), and may be used by the IMAP 4 client for display purposes.
DeletedMsgs can be provided an an argument to the TIdIMAP4.DeleteMsgs ( 1165) method after an update on the IMAP4 client.

Use TIdIMAP4.ExpungeMailBox ( 1168) to physically remove messages marked for deletion.

See Also
TIdIMAP4.ExpungeMailBox ( 1168)

TIdIMAP4.SelectMailBox ( 1205)

TLongIntArray ( 3101)

TIdMailBox.SearchResult Field
COntains message numbers that match the criteria in a mailbox search.

Pascal
SearchResult: TLongIntArray;

1482 Internet Direct (Indy) Version 10.1.5


Classes TIdMailBox Class

Description
SearchResult is a public TLongIntArray ( 3101) member, and contains an Array of LongInt values. SearchResult will be used to
hold message numbers that match the search criteria specified in a call to TIdIMAP4.SearchMailBox ( 1205).

SearchResult is updated when the response from the IMAP4 server is parsed from LastCmdResult.

See Also
TIdIMAP4.SearchMailBox ( 1205)

TLongIntArray ( 3101)

TIdIMAP4SearchRec ( 2958)

TIdMailBox Methods
The Methods of the TIdMailBox class are listed here.

Methods
Method Description
Clear ( 1483) Reset properties of the mailbox to their default values.
Destroy ( 1484) Frees the object instance.

Legend
Method
virtual

TIdMailBox.Clear Method
Reset properties of the mailbox to their default values.

Pascal
procedure Clear; virtual;
Description
Clear is a procedure used to reset properties of the mailbox to their default values. Clear returns the mailbox to the state that exists
prior to selection of the current mailbox using an IMAP4 client. Clear resets the following properties to the indicated values:

Property Default Value


TotalMsgs ( 1487) 0
RecentMsgs ( 1486) 0
UnseenMsgs ( 1488) 0
FirstUnseenMsg ( 1485) 0
UIDValidity ( 1487) '' (empty string)
UIDNext ( 1487) '' (empty string)
Name ( 1486) '' (empty string)
State ( 1486) msReadOnly
Attributes ( 1484) maNoselect
Flags ( 1485) [] (empty set)
ChangeableFlags ( 1485) [] (empty set)

Clear also removes the contents of the DeleteMsgs, SearchResult ( 1482), and MessageList ( 1486) container properties.

Internet Direct (Indy) Version 10.1.5 1483


TIdMailBox Class Classes

See Also
TIdIMAP4 ( 1150)

TIdMailBoxAttributes ( 2965)

TIdMessageFlagsSet ( 3059)

TIdMessageFlagsSet ( 3059)

TIdMessageCollection ( 1561)

TIdMailBoxState ( 2965)

TIdMailBox.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance, and frees resources allocated in the object instance like MessageList ( 1486).
Destroy calls the inherited Destroy method prior to exiting the method.

See Also
TIdMailBox.Create ( 267)

TIdMailBox.MessageList ( 1486)

TIdMailBox Properties
The Properties of the TIdMailBox class are listed here.

Properties
Property Description
Attributes ( 1484) Indicates mailbox attributes for the currently selected mailbox.
ChangeableFlags ( 1485) Represents the permanent flags for am IMAP4 mailbox.
FirstUnseenMsg ( 1485) Initial message number containing an "Unseen" flag.
Flags ( 1485) Indicates IMAP4 flags set for the current message.
MessageList ( 1486)
Name ( 1486) Identifies the mailbox in the IMAP4 mailbox hierarchy.
RecentMsgs ( 1486) Indicates the number of messages added since the last mailbox access.
State ( 1486) Indicates if the mailbox allows read and write access.
TotalMsgs ( 1487) Indicates the number of messages in the currently selected mailbox.
UIDNext ( 1487) Indicates the next UID value for a messaged added to the mailbox.
UIDValidity ( 1487) Indicates the mailbox UID value for a messaged added to the mailbox.
UnseenMsgs ( 1488) Indicates the number of unread messages in the current mailbox.

Legend
Property

TIdMailBox.Attributes Property
Indicates mailbox attributes for the currently selected mailbox.

Pascal
property Attributes: TIdMailBoxAttributes;
Description
Attributes is a TIdMailBoxAttributes ( 2965) property that indicates the mailbox attributes associated with the currently selected

1484 Internet Direct (Indy) Version 10.1.5


Classes TIdMailBox Class

mailbox. Attributes can contain values defined in TIdMailBoxAttributes ( 2965).

Attributes is updated when the resulting values from TIdIMAP4.ListMailBoxes ( 1173) are parsed.

See Also
TIdIMAP4.ListMailBoxes ( 1173)

TIdMailBox.ChangeableFlags Property
Represents the permanent flags for am IMAP4 mailbox.

Pascal
property ChangeableFlags: TIdMessageFlagsSet;
Description
ChangeableFlags is a TIdMessageFlagsSet ( 3059) property that represents the permanent flags indicated when a mailbox is
selected using TIdIMAP4.SelectMailBox ( 1205).

See Also
TIdIMAP4.SelectMailBox ( 1205)

TIdMailBox.FirstUnseenMsg Property
Initial message number containing an "Unseen" flag.

Pascal
property FirstUnseenMsg: LongInt;
Description
FirstUnseenMsg is a LongInt property that indicates the initial message in MessageList ( 1486) that contains the IMAP4 UNSEEN
message flag in the Flags ( 1485) property.

FirstUnseenMsg is determined when the results from TIdIMAP4.SelectMailBox ( 1205) are parsed, and can be used by the IMAP4
client to determine which message should be active when the mailbox is loaded.

See Also
TIdMailBox.MessageList ( 1486)

TIdIMAP4.SelectMailBox ( 1205)

TIdMessageCollection ( 1561)

TIdMailBox.Flags Property
Indicates IMAP4 flags set for the current message.

Pascal
property Flags: TIdMessageFlagsSet;
Description
Flags is a TIdMessageFlagsSet ( 3059) property that contains values that indicates the flags set for the current message.

Flags is updated when TIdIMAP4.Retrieve ( 1176) is used to fetch a message from the IMAP4 server. Flags is used when the
message is added or updated on the IMAP4 server.

See Also
TIdMessageFlagsSet ( 3059)

TIdIMAP4.Retrieve ( 1176)

Internet Direct (Indy) Version 10.1.5 1485


TIdMailBox Class Classes

TIdMailBox.MessageList Property
Pascal
property MessageList: TIdMessageCollection;
Description
MessageList is a Public TIdMessageCollection ( 1561) property

TIdMailBox.Name Property
Identifies the mailbox in the IMAP4 mailbox hierarchy.

Pascal
property Name: String;
Description
Name is a String property that identifies the mailbox in the IMAP4 mailbox hierarchy. Name is updated when
TIdIMAP4.SelectMailBox ( 1205) is used to access a mailbox on the IMAP4 server.

Name is also provided as an argument to the TIdIMAP4 ( 1150) methods CreateMailBox, DeleteMailBox, ExamineMailBox, and
StatusMailBox.

See Also
TIdIMAP4.SelectMailBox ( 1205)

TIdIMAP4.CreateMailBox ( 1163)

TIdIMAP4.DeleteMailBox ( 1164)

TIdIMAP4.ExamineMailBox ( 1167)

TIdIMAP4.StatusMailBox ( 1208)

TIdMailBox.RecentMsgs Property
Indicates the number of messages added since the last mailbox access.

Pascal
property RecentMsgs: LongInt;
Description
RecentMsgs is a LongInt property that indicates the number of messages in MessageList ( 1486) that contain the "Recent"
message flag.

RecentMsgs are those that have been added to the mailbox since the last time the mailbox was selected.

TIdMailBox.State Property
Indicates if the mailbox allows read and write access.

Pascal
property State: TIdMailBoxState;
Description
State is a TIdMailBoxState ( 2965) property that indicates the mailbox state detected in the results for TIdIMAP4.SelectMailBox (
1205).

msReadWrite indicates that the currently selected mailbox allows creating new messages, updating message flags and attributes,
and deletion of messasges.

1486 Internet Direct (Indy) Version 10.1.5


Classes TIdMailBox Class

msReadOnly indicates that the currently select mailbox will nbot allow updates to the IMAP mailbox.

See Also
TIdMailBoxState ( 2965)

TIdIMAP4.SelectMailBox ( 1205)

TIdMailBox.TotalMsgs Property
Indicates the number of messages in the currently selected mailbox.

Pascal
property TotalMsgs: LongInt;
Description
TotalMsgs is a LongInt property that indicates the number of messages in MessageList ( 1486) for the currently selected mailbox.

TotalMsgs is updated when the IMAP client performs a call to either the SelectMailBox, ExamineMailBox, or StatusMailBox
methods.

See Also
TIdMailBox.MessageList ( 1486)

TIdIMAP4.SelectMailBox ( 1205)

TIdIMAP4.ExamineMailBox ( 1167)

TIdIMAP4.StatusMailBox ( 1208)

TIdMailBox.UIDNext Property
Indicates the next UID value for a messaged added to the mailbox.

Pascal
property UIDNext: String;
Description
UIDNext is a String property that indicates the next Unique Identifier value (UID) that will be assigned to a new message added to
the currently selected mailbox. UIDNext is used with UIDValidity ( 1487) to determine the permanent Uniqueness identifier for a
message in the currently selected mailbox.

UIDNext is updatd when the IMAP4 client executes the TIdIMAP4.StatusMailBox ( 1208) method.

See Also
TIdMailBox.UIDValidity ( 1487)

TIdIMAP4.StatusMailBox ( 1208)

TIdMailBox.UIDValidity Property
Indicates the mailbox UID value for a messaged added to the mailbox.

Pascal
property UIDValidity: String;
Description
UIDValidity is a String property that indicates the Unique Identifier Validity value for the currently selected mailbox. UIDValidity is
used with UIDNext ( 1487) to determine the permanent Uniqueness identifier for a message in the currently selected mailbox.

UIDValidity is updatd when the IMAP4 client executes the TIdIMAP4.StatusMailBox ( 1208) method, or when a new mailbox is
selected using TIdIMAP4.SelectMailBox ( 1205).

Internet Direct (Indy) Version 10.1.5 1487


TIdMappedFTP Class Classes

See Also
TIdMailBox.UIDNext ( 1487)

TIdIMAP4.StatusMailBox ( 1208)

TIdIMAP4.SelectMailBox ( 1205)

TIdMailBox.UnseenMsgs Property
Indicates the number of unread messages in the current mailbox.

Pascal
property UnseenMsgs: LongInt;
Description
UnseenMsgs is a LongInt property that indicates the number of messages in the currently selected mailbox that have not been read
by the IMAP4 client.

UnseenMsgs is updated when the results from the TIdIMAP4.StatusMailBox ( 1208) method are parsed.

See Also
TIdIMAP4.StatusMailBox ( 1208)

TIdMappedFTP Class
File
IdMappedFTP ( 4680)

Hierarchy

Pascal
TIdMappedFTP = class(TIdMappedPortTCP);
Description
TIdMappedFTP is a TIdMappedPortTCP ( 1505) descendant.

See Also
TIdMappedPortTCP ( 1505)

TIdMappedFTP Members
The following tables list the members exposed by TIdMappedFTP.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1490)
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.

1488 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedFTP Class

ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 1490)
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OutboundDcMode ( 1490)
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.
OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdMappedFTP Properties
The Properties of the TIdMappedFTP class are listed here.

Properties
Property Description
DefaultPort ( 1490)
MappedPort ( 1490)
OutboundDcMode ( 1490)

Internet Direct (Indy) Version 10.1.5 1489


TIdMappedFtpContext Class Classes

Legend
Property

TIdMappedFTP.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_FTP ( 3998).

TIdMappedFTP.MappedPort Property
Pascal
property MappedPort: Integer;
Description
MappedPort is a Published property. The default value for the property is IdPORT_FTP ( 3998).

TIdMappedFTP.OutboundDcMode Property
Pascal
property OutboundDcMode: TIdMappedFtpOutboundDcMode;
Description
OutboundDcMode is a Published TIdMappedFtpOutboundDcMode ( 2966) property. Write access for the property is implemented
using FOutboundDcMode. The default value for the property is fdcmClient.

TIdMappedFtpContext Class
File
IdMappedFTP ( 4680)

Hierarchy

Pascal
TIdMappedFtpContext = class(TIdMappedPortContext);
Description
TIdMappedFtpContext is a TIdMappedPortContext ( 1500) descendant.

See Also
TIdMappedPortContext ( 1500)

TIdMappedFtpContext Members
The following tables list the members exposed by TIdMappedFtpContext.

Properties
Property Description
BeforeRunDone ( 2332)

1490 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedFtpContext Class

Connection ( 379) Represents the peer connection for a client session on the TCP server.
ConnectTimeOut ( 1502) Indicates the number of milliseconds to wait for a successful outbound connection.
Data ( 2332) A user-specified object with values used during execution of the task.
DataAvailList ( 1503) List of socket handles with data available for the proxied client connection.
DataChannelThread ( 1492)
FtpCmdLine ( 1492)
FtpCommand ( 1493)
FtpParams ( 1493)
Host ( 1493)
NetData ( 1503) Stores value read from the local or remote connections for the proxied session.
OutboundClient ( 1504) Represents the remote connection for the proxied client session.
OutboundHost ( 1493)
OutboundPort ( 1493)
Port ( 1493)
ReadList ( 1504) List of socket handles representing the local and remote connections for the proxied client connection.
Server ( 1504) Provides access to the server context for the client session.
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 1492)
Destroy ( 378) Frees the object instance.
Destroy ( 1502) Frees the objet instance.
Destroy ( 2331) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

TIdMappedFtpContext Methods
The Methods of the TIdMappedFtpContext class are listed here.

Methods
Method Description
Create ( 1492)

Legend
Constructor
virtual

Internet Direct (Indy) Version 10.1.5 1491


TIdMappedFtpContext Class Classes

TIdMappedFtpContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); override;
Parameters
Parameters Description
AConnection Type is TIdTCPConnection ( 2349).
AYarn Type is TIdYarn ( 2632).
AList Type is TIdThreadList ( 3093). Default value is nil.

Description
Create is a overridden constructor for the object instance.

TIdMappedFtpContext Properties
The Properties of the TIdMappedFtpContext class are listed here.

Properties
Property Description
DataChannelThread ( 1492)
FtpCmdLine ( 1492)
FtpCommand ( 1493)
FtpParams ( 1493)
Host ( 1493)
OutboundHost ( 1493)
OutboundPort ( 1493)
Port ( 1493)

Legend
Property
read only

TIdMappedFtpContext.DataChannelThread Property
Pascal
property DataChannelThread: TIdMappedFtpDataThread;
Description
DataChannelThread is a Public read-only TIdMappedFtpDataThread ( 1494) property.

TIdMappedFtpContext.FtpCmdLine Property
Pascal
property FtpCmdLine: string;
Description
FtpCmdLine is a Public read-only string property.

1492 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedFtpDataThread Class

TIdMappedFtpContext.FtpCommand Property
Pascal
property FtpCommand: string;
Description
FtpCommand is a Public string property. Write access for the property is implemented using FFtpCommand.

TIdMappedFtpContext.FtpParams Property
Pascal
property FtpParams: string;
Description
FtpParams is a Public string property. Write access for the property is implemented using FFtpParams.

TIdMappedFtpContext.Host Property
Pascal
property Host: string;
Description
Host is a Public string property. Write access for the property is implemented using FHost.

TIdMappedFtpContext.OutboundHost Property
Pascal
property OutboundHost: string;
Description
OutboundHost is a Public string property. Write access for the property is implemented using FOutboundHost.

TIdMappedFtpContext.OutboundPort Property
Pascal
property OutboundPort: Integer;
Description
OutboundPort is a Public Integer property. Write access for the property is implemented using FOutboundPort.

TIdMappedFtpContext.Port Property
Pascal
property Port: Integer;
Description
Port is a Public Integer property. Write access for the property is implemented using FPort.

Internet Direct (Indy) Version 10.1.5 1493


TIdMappedFtpDataThread Class Classes

TIdMappedFtpDataThread Class
File
IdMappedFTP ( 4680)

Hierarchy

Pascal
TIdMappedFtpDataThread = class(TIdThread);
Description
TIdMappedFtpDataThread is a TIdThread ( 2415) descendant.

See Also
TIdThread ( 2415)

TIdMappedFtpDataThread Members
The following tables list the members exposed by TIdMappedFtpDataThread.

Properties
Property Description
Connection ( 1496)
Data ( 2422) Storage slot for data used by a thread.
Loop ( 2422) Indicates if the thread is Run continuously until Stopped ( 2423).
MappedFtpThread ( 1496)
Name ( 2422) Name assigned to the thread during execution.
NetData ( 1496)
OutboundClient ( 1496)
ReturnValue ( 2423) Return value from execution of the thread.
StopMode ( 2423) Determines the action taken when the Stop ( 2420) method is called.
Stopped ( 2423) Indicates when a thread is terminated or suspended.
Terminated ( 2424) Indicates if the thread has been halted by calling Terminate ( 2421).
TerminatingException ( 2424) Contains the text of an Exception.Message raised within the Execute method.
TerminatingExceptionClass ( 2424) Represents the class type for an exception raised during Execute.
Yarn ( 2425) Represents the thread or fiber for the scheduler of the thread.

Methods
Method Description
Create ( 1495)
Destroy ( 1495)
Start ( 2419) Starts or resumes execution of a thread.
Stop ( 2420) Halts execution of the thread instance.
Synchronize ( 2420) Executes a thread method synchronized to the main VCL thread.
Terminate ( 2421) Forces the thread of execution to be halted.
TerminateAndWaitFor ( 2421) Signals a thread to terminate ( 2421) and waits for completion of the Execute method.

Events
Event Description
OnException ( 2425) Handles exceptions raised in the thread of execution.
OnStopped ( 2426) Represents an event handler signalled when stopping a thread of execution.

1494 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedFtpDataThread Class

Legend
Constructor
virtual
Property
read only
Event

TIdMappedFtpDataThread Methods
The Methods of the TIdMappedFtpDataThread class are listed here.

Methods
Method Description
Create ( 1495)
Destroy ( 1495)

Legend
Constructor
virtual

TIdMappedFtpDataThread.Create Constructor
Pascal
constructor Create(
AMappedFtpThread: TIdMappedFtpContext
); reintroduce;
Parameters
Parameters Description
AMappedFtpThread Type is TIdMappedFtpContext ( 1490).

Description
Create is a reintroduced constructor for the object instance.

TIdMappedFtpDataThread.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdMappedFtpDataThread Properties
The Properties of the TIdMappedFtpDataThread class are listed here.

Properties
Property Description
Connection ( 1496)
MappedFtpThread ( 1496)
NetData ( 1496)
OutboundClient ( 1496)

Legend
Property
read only

Internet Direct (Indy) Version 10.1.5 1495


TIdMappedPOP3 Class Classes

TIdMappedFtpDataThread.Connection Property
Pascal
property Connection: TIdTcpConnection;
Description
Connection is a Public read-only TIdTcpConnection property.

TIdMappedFtpDataThread.MappedFtpThread Property
Pascal
property MappedFtpThread: TIdMappedFtpContext;
Description
MappedFtpThread is a Public read-only TIdMappedFtpContext ( 1490) property.

TIdMappedFtpDataThread.NetData Property
Pascal
property NetData: string;
Description
NetData is a Public string property. Write access for the property is implemented using FNetData.

TIdMappedFtpDataThread.OutboundClient Property
Pascal
property OutboundClient: TIdTCPConnection;
Description
OutboundClient is a Public read-only TIdTCPConnection ( 2349) property.

TIdMappedPOP3 Class
File
IdMappedPOP3 ( 4681)

Hierarchy

Pascal
TIdMappedPOP3 = class(TIdMappedTelnet);
Description
TIdMappedPOP3 is a TIdMappedTelnet ( 1514) descendant.

See Also
TIdMappedTelnet ( 1514)

1496 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPOP3 Class

TIdMappedPOP3 Members
The following tables list the members exposed by TIdMappedPOP3.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowedConnectAttempts ( 449)
AllowedConnectAttempts ( 1516)
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1498)
Greeting ( 1499)
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 1499)
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReplyUnknownCommand ( 1499)
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
UserHostDelimiter ( 1499)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1498)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCheckHostPort ( 450)
OnCheckHostPort ( 1516)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.

Internet Direct (Indy) Version 10.1.5 1497


TIdMappedPOP3 Class Classes

OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdMappedPOP3 Methods
The Methods of the TIdMappedPOP3 class are listed here.

Methods
Method Description
Destroy ( 1498)

Legend
Destructor
virtual

TIdMappedPOP3.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdMappedPOP3 Properties
The Properties of the TIdMappedPOP3 class are listed here.

Properties
Property Description
DefaultPort ( 1498)
Greeting ( 1499)
MappedPort ( 1499)
ReplyUnknownCommand ( 1499)
UserHostDelimiter ( 1499)

Legend
Property

TIdMappedPOP3.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property. The default value for the property is IdPORT_POP3 ( 4165).

1498 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortContext Class

TIdMappedPOP3.Greeting Property
Pascal
property Greeting: TIdReplyPOP3;
Description
Greeting is a Published TIdReplyPOP3 ( 1849) property. Write access for the property is implemented using SetGreeting.

TIdMappedPOP3.MappedPort Property
Pascal
property MappedPort: Integer;
Description
MappedPort is a Published property. The default value for the property is IdPORT_POP3 ( 4165).

TIdMappedPOP3.ReplyUnknownCommand Property
Pascal
property ReplyUnknownCommand: TIdReplyPOP3;
Description
ReplyUnknownCommand is a Published TIdReplyPOP3 ( 1849) property. Write access for the property is implemented using
SetReplyUnknownCommand.

TIdMappedPOP3.UserHostDelimiter Property
Pascal
property UserHostDelimiter: String;
Description
UserHostDelimiter is a Published String property. Write access for the property is implemented using FUserHostDelimiter.

TIdMappedPOP3Thread Class
File
IdMappedPOP3 ( 4681)

Hierarchy

Pascal
TIdMappedPOP3Thread = class(TIdMappedTelnetThread);
Description
TIdMappedPOP3Thread is a TIdMappedTelnetThread ( 1516) descendant.

See Also
TIdMappedTelnetThread ( 1516)

Internet Direct (Indy) Version 10.1.5 1499


TIdMappedPortContext Class Classes

TIdMappedPortContext Class
Implements the executable task created for each client connection to a TIdMappedPortTCP ( 1505) server.

File
IdMappedPortTCP ( 4681)

Hierarchy

Pascal
TIdMappedPortContext = class(TIdContext);
Description
TIdMappedPortContext is a TIdContext ( 376) descendant that implements the executable task created for each client connection
to a TIdMappedPortTCP ( 1505) server.

TIdMappedPortContext is the class type assigned to the TIdMappedPortTCP.ContextClass property, and is used when a listener
thread accepts a new connection to the server.

TIdMappedPortContext introduces properties for the proxied client session, including:

Property Description
Server ( 1504) Provides access propeties and methods in the TIdMappedPortTCP ( 1505) server for the proxied client
connection.
ConnectTimeout Timeout in milliseconds for establishing the outbound connect for the proxied client session.
NetData ( Buffer used to exchange data between the local and remote connections for the proxied session.
1503)
OutboundClient Remote connection established when the client establishes the proxied session.
( 1504)
ReadList ( List of Socket handles used for the local and remote connections.
1504)
DataAvailList List of Socket handles having data available for read or write operations.
( 1503)

TIdMappedPortContext introduces a protected OutboundConnect method that establishes the outbound connection for the proxied
client session using the MappedHost and MappedPort properties for the server. This method also ensures that an IOHandler exists
for the outbound connection from the proxy server, and that event handlers are signalled for both the local and remote connection in
the proxied client session.

See Also
TIdContext ( 376) TIdMappedPortTCP.ContextClass

TIdMappedPortContext Members
The following tables list the members exposed by TIdMappedPortContext.

Properties
Property Description
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
ConnectTimeOut ( 1502) Indicates the number of milliseconds to wait for a successful outbound connection.

1500 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortContext Class

Data ( 2332) A user-specified object with values used during execution of the task.
DataAvailList ( 1503) List of socket handles with data available for the proxied client connection.
NetData ( 1503) Stores value read from the local or remote connections for the proxied session.
OutboundClient ( 1504) Represents the remote connection for the proxied client session.
ReadList ( 1504) List of socket handles representing the local and remote connections for the proxied client connection.
Server ( 1504) Provides access to the server context for the client session.
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 1501)
Destroy ( 1502) Frees the objet instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

TIdMappedPortContext Methods
The Methods of the TIdMappedPortContext class are listed here.

Methods
Method Description
Create ( 1501)
Destroy ( 1502) Frees the objet instance.

Legend
Constructor
virtual

TIdMappedPortContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); override;
Parameters
Parameters Description
AConnection Type is TIdTCPConnection ( 2349).
AYarn Type is TIdYarn ( 2632).
AList Type is TIdThreadList ( 3093). Default value is nil.

Internet Direct (Indy) Version 10.1.5 1501


TIdMappedPortContext Class Classes

Description
Create is the overridden constructor for the object instance.

TIdMappedPortContext.Destroy Destructor
Frees the objet instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy free and releases reources allocated to the following properties:

OutboundClient ( 1504)
ReadList ( 1504)
DataAvailList ( 1503)

Destroy calls the inherited destructor prior to exiting from the method.

See Also
Create ( 1501) OutboundClient ( 1504) ReadList ( 1504) DataAvailList ( 1503)

TIdMappedPortContext Properties
The Properties of the TIdMappedPortContext class are listed here.

Properties
Property Description
ConnectTimeOut ( 1502) Indicates the number of milliseconds to wait for a successful outbound connection.
DataAvailList ( 1503) List of socket handles with data available for the proxied client connection.
NetData ( 1503) Stores value read from the local or remote connections for the proxied session.
OutboundClient ( 1504) Represents the remote connection for the proxied client session.
ReadList ( 1504) List of socket handles representing the local and remote connections for the proxied client connection.
Server ( 1504) Provides access to the server context for the client session.

Legend
Property
read only

TIdMappedPortContext.ConnectTimeOut Property
Indicates the number of milliseconds to wait for a successful outbound connection.

Pascal
property ConnectTimeOut: Integer;
Description
ConnectTimeOut is an Integer property that indicates the number of milliseconds to wait for a successful outbound connection in
the proxied client session.

ConnectTimeOut is used in the protected OutboundConnect method, and is assigned as the connection timeout value for the
IOHandler created for the OutboundClient ( 1504) connection.

The default value for ConnectTimeout is IdTimeoutDefault ( 4331).

1502 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortContext Class

TIdMappedPortContext.DataAvailList Property
List of socket handles with data available for the proxied client connection.

Pascal
property DataAvailList: TIdSocketList;
Description
DataAvailList is a read-only TIdSocketList ( 2094) property that contains socket handles with data available for the proxied client
connection.

DataAvailList is updated and used during execution of the TIdMappedPortContext ( 1500) task to contain the TIdSocketHandle (
2071) instances that have data available for reading by the local client Connection ( 379) or the OutboundClient ( 1504) for the
proxied session.

When DataAvailList contains the socket handle assigned to the IOHandler for the local Connection ( 379), data is read from the
connection and stored in the NetData ( 1503) property for subsequent use in the OnExecute event handler for the context.
Non-blank values in NetData ( 1503) are then written to the OutboundClient ( 1504).

When DataAvailList contains the socket handle assigned to the IOHandler for the OutboundClient ( 1504) connection, data is read
from the connection and stored in the NetData ( 1503) property for subsequent use in the OnOutboundData event handler for the
context. Non-blank values in NetData ( 1503) are then written to the local client Connection ( 379).

Use ReadList ( 1504) to access the socket handles for the local connection and the outbound client connection regardless of data
availability.

See Also
NetData ( 1503) ReadList ( 1504) Connection ( 379) OutBoundClient TIdSocketHandle ( 2071)
TIdMappedPortTCP.OnExecute ( 1510) TIdMappedPortTCP.OnOutboundData ( 1511)

TIdMappedPortContext.NetData Property
Stores value read from the local or remote connections for the proxied session.

Pascal
property NetData: String;
Description
NetData is a String property that represents the storage used for data passed between the local client Connection ( 379) and the
OutboundClient ( 1504) connection for the proxied client session.

NetData is updated and used during execution of the task when TIdMappedPortTCP ( 1505) triggers execution of the client
context. Socket handles in DataAvailList ( 1503) are used to determine when values are available from the local client Connection
( 379) or the OutboundClient ( 1504) connection for the proxied session.

During execution, values available from the local client Connection ( 379) is read and stored in NetData for subsequent use in the
OnExecute event handler for the server. Non-blank values in NetData are written to the OutboundClient ( 1504) connection
following execution of the event handler.

Values available from the OutboundClient ( 1504) connection is also read and stored in NetData for subsequent use in the
OnOutboundClientData event handler for the server. Non-blank values in NetData are written to the local client connection following
execution of the event handler.

Values in NetData can be modified or removed in either event handler prior to transmission to its ultimate destination.

See Also
DataAvailList ( 1503) Connection ( 379) OutboundClient ( 1504) TIdMappedPortTCP.OnExecute ( 1510)
TIdMappedPortTCP.OnOnOutboundClientData

Internet Direct (Indy) Version 10.1.5 1503


TIdMappedPortContext Class Classes

TIdMappedPortContext.OutboundClient Property
Represents the remote connection for the proxied client session.

Pascal
property OutboundClient: TIdTCPConnection;
Description
OutboundClient is a TIdTCPConnection ( 2349) property that represents the remote connection for the proxied client session.

OutboundClient is created and initialized when the TIdMappedPortTCP ( 1505) in Server ( 1504) accepts the new local client
Connection ( 379).

OutboundClient is given values in the Host and Port properties that correspond to the MappedHost and MappedPort properties for
the Server ( 1504). A socket-based IOHandler is created for OutboundClient that uses the value in ConnectTimeOut ( 1502) for
the delay allowed before the remote connection attempt is aborted.

The OutboundClient calls its Connect method, and immediately checks for available data on both the local client Connection (
379) and the OutboundClient connection.

Any exception raised when creating the OutboundClient connection causes the local client Connection ( 379) to be closed as well.

Both Connection ( 379) and OutboundClient are used extensively in Server ( 1504) procedures that trigger event handlers during
execution of the client context.

The OutboundClient connection is closed during Server ( 1504) processing that implements the Disconnect method for the local
client Connection ( 379).

Resources allocated to OutboundClient are freed in the Destroy ( 1502) method.

See Also
Connection ( 379) Server ( 1504) TIdTCPConnection ( 2349) TIdMappedPortTCP ( 1505) TIdMappedPortTCP.MappedHost
( 1507) TIdMappedPortTCP.MappedPort ( 1508) TIdMappedPortTCP.OnConnect ( 1509) TIdMappedPortTCP.OnDisconnect
( 1509) TIdMappedPortTCP.OnOutboundConnect ( 1510) TIdMappedPortTCP.OnOutboundDisconnect ( 1511)

TIdMappedPortContext.ReadList Property
List of socket handles representing the local and remote connections for the proxied client connection.

Pascal
property ReadList: TIdSocketList;
Description
ReadList is a read-only TIdSocketList ( 2094) property that contains socket handles with used for the Connection ( 379) and
OutboundClient ( 1504) connections for the proxied client session.

ReadList is updated and used during Server ( 1504) processing that triggers the OnConnect and OnOutboundCOnnect event
handlers for the client context.

ReadList is also use to populate the list of socket handles in DataAvailList ( 1503).

See Also
NetData ( 1503) DataAvailList ( 1503) Connection ( 379) OutBoundClient TIdSocketHandle ( 2071)
TIdMappedPortTCP.OnConnect ( 1509) TIdMappedPortTCP.OnOutboundConnect ( 1510)

TIdMappedPortContext.Server Property
Provides access to the server context for the client session.

Pascal
property Server: TIdMappedPortTCP;

1504 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortTCP Class

Description
Server is a TIdMappedPortTCP ( 1505) property that provides access to the server context for the client session.

Server is assigned a value when the client context is created by a listener thread for the executing TIdMappedPortTCP ( 1505)
server.

Server is used to access the values in its MappedHost and MappedPort properties when opening the connection for the
OutboundClient ( 1504).

See Also
TIdMappedPortTCP ( 1505) TIdMappedPortTCP.MappedHost ( 1507) TIdMappedPortTCP.MappedPort ( 1508)

TIdMappedPortTCP Class
Implements a port mapping proxy server for TCP connections to a remote computer.

File
IdMappedPortTCP ( 4681)

Hierarchy

Pascal
TIdMappedPortTCP = class(TIdCustomTCPServer);
Description
TIdMappedPortTCP is a TIdTCPServer ( 2375) descendant that implements a port mapping proxy server for connections to a
remote computer system.

TIdMappedPortTCP listens for connections on a designated port number, and makes an outbound connection to another server
using another specified port number. Listener thread(s) defined in the Bindings ( 461) for TIdMappedPortTCP create ( 267) new
thread- or fiber-based sessions using the ContextClass ( 461) defined for the server.

TIdMappedPortTCP provides event handler properties specific to the ContextClass ( 461) for the server (TIdMappedPortContext
( 1500)), such as:

OnBeforeConnect ( 1508)
OnConnect ( 1509)
OnDisconnect ( 1509)
OnExecute ( 1510)
OnOutboundConnect ( 1510)
OnOutboundDisconnect ( 1511)
OnOutboundData ( 1511)

The following diagram illustrates some the interactions for event handlers connections used in the server and client contexts
defined in TIdMappedPortContext ( 1500).

Internet Direct (Indy) Version 10.1.5 1505


TIdMappedPortTCP Class Classes

TIdMappedPortTCP is useful in implementing transparent proxy server programs.

See Also
TIdTCPServer ( 2375) TIdMappedPortContext ( 1500) IndySupport ( 15)

TIdMappedPortTCP Members
The following tables list the members exposed by TIdMappedPortTCP.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 1508) Represents the port number to use for outbound connections in the port mapping proxy server.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

1506 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortTCP Class

GetVersion ( 269) Version ( 269) number for Indy component suite.


CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.
OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdMappedPortTCP Properties
The Properties of the TIdMappedPortTCP class are listed here.

Properties
Property Description
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 1508) Represents the port number to use for outbound connections in the port mapping proxy server.

Legend
Property

TIdMappedPortTCP.MappedHost Property
Represents the IP address or host name to use for outbound connections in the port mapping proxy server.

Pascal
property MappedHost: String;
Description
MappedHost is a String property that represents the IP address or host name to use for outbound connections in the mapping proxy
server.

Values in MappedHost and MappedPort ( 1508) are used in the Host and Port number for the connection opened to the remote
system when a listener thread accepts a new local client connection. MappedHost and MappedPort ( 1508) are assigned to the
Host and Port values for the OutboundClient in the TIdMappedPortContext ( 1500) created for the proxied client session.

Assign values for the MappedHost and MappedPort ( 1508) properties prior to setting Active ( 458) to True and starting the
listener thread(s) for the server.

See Also
TIdTCPClient ( 2333) TIdTCPClient.Host ( 2337) TIdTCPClient.Port ( 2339)

Internet Direct (Indy) Version 10.1.5 1507


TIdMappedPortTCP Class Classes

TIdMappedPortTCP.MappedPort Property
Represents the port number to use for outbound connections in the port mapping proxy server.

Pascal
property MappedPort: Integer;
Description
MappedPort is a published property that represents the port number to use for outbound connections in the mapping proxy server.

Values in MappedHost ( 1507) and MappedPort are used in the Host and Port number for the connection opened to the remote
system when a listener thread accepts a new local client connection. MappedHost ( 1507) and MappedPort are assigned to the
Host and Port values for the OutboundClient in the TIdMappedPortContext ( 1500) created for the proxied client session.

Assign values for the MappedHost ( 1507) and MappedPort properties prior to setting Active ( 458) to True and starting the
listener thread(s) for the server.

See Also
TIdTCPClient ( 2333) TIdTCPClient.Host ( 2337) TIdTCPClient.Port ( 2339)

TIdMappedPortTCP Events
The Events of the TIdMappedPortTCP class are listed here.

Events
Event Description
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.
OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.

Legend
Event

TIdMappedPortTCP.OnBeforeConnect Event
Event handler signalled prior to opening the local client connection for a proxied client session.

Pascal
property OnBeforeConnect: TIdServerThreadEvent;
Description
OnBeforeConnect is a TIdMappedPortContextEvent property that represents the event handler signalled prior to opening the local
client connection for a proxied client session.

Event handlers are signalled in the following order during server processing for new client connections:

• OnBeforeConnect
• OnConnect ( 1509)
• OnOutboundConnect ( 1510)
• OnExecute ( 1510)
• OnOutboundData ( 1511)
Assign a procedure to the OnBeforeConnect event handler to allow responding to a connection request during execution of a

1508 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortTCP Class

TIdMappedPortContext ( 1500) instance in the server.

See Also
TIdMappedPortContext ( 1500) TIdMappedPortContextEvent OnConnect ( 1509) OnOutboundConnect ( 1510) OnExecute (
1510) OnOutboundData ( 1511)

TIdMappedPortTCP.OnConnect Event
Event handler signalled when the local client for the proxied connection has been connected.

Pascal
property OnConnect: TIdServerThreadEvent;
Description
OnConnect is a TIdMappedPortContextEvent property that represents the event handler signalled when the local client for the
proxied connection has been connected.

Event handlers are signalled in the following order during server processing for new client connections:

• OnBeforeConnect ( 1508)
• OnConnect
• OnOutboundConnect ( 1510)
• OnExecute ( 1510)
• OnOutboundData ( 1511)
Assign a procedure to the OnConnect event handler to allow responding to the new connection during execution of a
TIdMappedPortContext ( 1500) instance in the server.

Use OnOutboundConnect ( 1510) to perform processing required when the connection to the remote system in MappedHost (
1507) and MappedPort ( 1508) has been configured and opened for the proxied connection.

See Also
TIdMappedPortContextEvent TIdMappedPortContext ( 1500) OnBeforeConnect ( 1508) OnOutboundConnect ( 1510)
OnExecute ( 1510) OnOutboundData ( 1511) MappedHost ( 1507) MappedPort ( 1508)

TIdMappedPortTCP.OnDisconnect Event
Event handler signalled when the local client for the proxied connection is disconnected.

Pascal
property OnDisconnect: TIdServerThreadEvent;
Description
OnDisconnect is a TIdMappedPortContextEvent property that represents the event handler signalled when the local client for the
proxied connection is disconnected.

Event handlers are signalled in the following order during server processing for closing proxied client connections:

• OnDisconnect
• OnOutboundDisconnect ( 1511)
Assign a procedure to the OnDisconnect event handler to allow responding to the closed connection during execution of a
TIdMappedPortContext ( 1500) instance in the server.

Use OnOutboundDisconnect ( 1511) to perform processing required when the connection to the remote system in MappedHost (
1507) and MappedPort ( 1508) has been closed for the proxied connection. OnOutboundDisconnect ( 1511) is not triggered if
the client connection to the remote system has not been successfully opened.

Internet Direct (Indy) Version 10.1.5 1509


TIdMappedPortTCP Class Classes

See Also
TIdMappedPortContextEvent TIdMappedPortContext ( 1500) OnOutboundDisconnect ( 1511)

TIdMappedPortTCP.OnExecute Event
Event handler signalled to perform data handling for the local client in the proxied connection.

Pascal
property OnExecute: TIdServerThreadEvent;
Description
OnExecute is a TIdMappedPortContextEvent property that represents the event handler signalled to perform data handling for the
local client in the proxied connection.

OnExecute is used in the protected method that controls execution of the Contexts ( 462) allocated for the server.

Prior to triggering the OnExecute event handler, the ReadList for the proxied session is is used to determine is data is available on
the local or remote connections.

When data is available from the local client connection, the values are stored in the NetData property for the
TIdMappedPortContext ( 1500) for use in the OnExecute event handler.

Applications must assign a procedure to the OnExecute event handler to allow responding to the event notification. Values in the
NetData property for the ContextClass ( 461) can be modified or removed in OnExecute by setting NetData to an empty string ('').

Following execution of the OnExecute event handler, the OnOutboundData ( 1511) event handler is signalled and non-blank
values in the NetData property for the ContextClass ( 461) instance are written to the remote connection.

When data is available from the remote connection, the values are stored in the NetData property for the TIdMappedPortContext (
1500) for use in the OnOutboundData ( 1511) event handler.

Following execution of the OnOutboundData ( 1511) event handler, non-blank values in the NetData property for the ContextClass
( 461) instance are written to the local client connection.

If the remote connection for the proxied session has been closed, both the OnOutboundDisconnect ( 1511) and OnDisconnect (
1509) event handlers are signalled and the local client connection is closed.

See Also
ContextClass ( 461) Contexts ( 462) ReadList DataAvailList OnOutboundData ( 1511) OnOutboundDisconnect ( 1511)
OnDisconnect ( 1509) TIdMappedPortContextEvent TIdMappedPortContext ( 1500) TIdMappedPortContext.NetData ( 1503)

TIdMappedPortTCP.OnOutboundConnect Event
Event handler signalled when the remote system connection for the proxied session has been connected.

Pascal
property OnOutboundConnect: TIdMappedPortOutboundConnectEvent;
Description
OnOutboundConnect is a TIdMappedPortOutboundConnectEvent ( 3057) property that represents the event handler signalled
when the remote connection is opened for a proxied client connection on the server.

Event handlers are signalled in the following order during server processing for new client connections:

• OnBeforeConnect ( 1508)
• OnConnect ( 1509)
• OnOutboundConnect
• OnExecute ( 1510)

1510 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortTCP Class

• OnOutboundData ( 1511)
Assign a procedure to the OnOutboundConnect event handler to allow responding to the new remote connection during execution
of a TIdMappedPortContext ( 1500) instance in the server.

Use OnConnect ( 1509) to perform processing required when the local client connection has been configured and opened for the
proxied session.

See Also
TIdMappedPortContextEvent TIdMappedPortContext ( 1500) OnBeforeConnect ( 1508) OnOutboundConnect OnExecute (
1510) OnOutboundData ( 1511) MappedHost ( 1507) MappedPort ( 1508)

TIdMappedPortTCP.OnOutboundData Event
Event handler signalled to perform data handling for the remote client connection in the proxied session.

Pascal
property OnOutboundData: TIdServerThreadEvent;
Description
OnOutboundData is a TIdMappedPortContextEvent property that represents the event handler signalled to perform data handling
for the remote client connection in the proxied session.

OnOutboundData is used in the protected method that controls execution of the Contexts ( 462) allocated for the server.

Prior to triggering the OnOutboundData event handler, the ReadList for the proxied session is is used to determine is data is
available on the local or remote connections.

When data is available from the local client connection, the values are stored in the NetData property for the
TIdMappedPortContext ( 1500) for use in the OnExecute ( 1510) event handler.

Applications must assign a procedure to the OnExecute ( 1510) event handler to allow responding to the event notification. Values
in the NetData property for the ContextClass ( 461) can be modified or removed in OnExecute ( 1510) by setting NetData to an
empty string ('').

Following execution of the OnExecute ( 1510) event handler, the OnOutboundData event handler is signalled and non-blank
values in the NetData property for the ContextClass ( 461) instance are written to the remote connection.

When data is available from the remote connection, the values are stored in the NetData property for the TIdMappedPortContext (
1500) for use in the OnOutboundData event handler.

Following execution of the OnOutboundData event handler, non-blank values in the NetData property for the ContextClass ( 461)
instance are written to the local client connection.

If the remote connection for the proxied session has been closed, both the OnOutboundDisconnect ( 1511) and OnDisconnect (
1509) event handlers are signalled and the local client connection is closed.

See Also
ContextClass ( 461) Contexts ( 462) ReadList DataAvailList OnExecute ( 1510) OnOutboundData OnOutboundDisconnect (
1511) OnDisconnect ( 1509) TIdMappedPortContextEvent TIdMappedPortContext ( 1500) TIdMappedPortContext.NetData (
1503)

TIdMappedPortTCP.OnOutboundDisconnect Event
Event handler signalled when the remote connection for the proxied session is disconnected.

Pascal
property OnOutboundDisconnect: TIdServerThreadEvent;
Description
OnOutboundDisconnect is a TIdMappedPortContextEvent property that represents the event handler signalled when the remote
system connection for the proxied session is disconnected.

Internet Direct (Indy) Version 10.1.5 1511


TIdMappedPortUDP Class Classes

Event handlers are signalled in the following order during server processing for closing proxied client connections:

• OnDisconnect ( 1509)
• OnOutboundDisconnect
Assign a procedure to the OnOutboundDisconnect event handler to allow responding to the closed connection during execution of a
TIdMappedPortContext ( 1500) instance in the server.

OnOutboundDisconnect is not triggered if the client connection to the remote system has not been successfully opened.

Use OnDisconnect ( 1509) to perform processing required when the local client connection has been closed for the proxied
session.

See Also
TIdMappedPortContextEvent TIdMappedPortContext ( 1500) OnDisconnect ( 1509)

TIdMappedPortUDP Class
Implements a tunnel for UDP connections to a remote computer system.

File
IdMappedPortUDP ( 4681)

Hierarchy

Pascal
TIdMappedPortUDP = class(TIdUDPServer);
Description
TIdMappedPortUDP is a TIdUDPServer ( 2530) descendant that implements a tunnel for connections to a remote computer
system using the UDP protocol.

TIdMappedPortUDP listens for connections on a designated host address and port number, and makes a surrogate connection to
another server using a specified port number. This is useful for certain types of proxy programs. TIdMappedPortUDP also
implements an event notification mechanism for new connection requests.

See Also
TIdMappedPortTCP ( 1505) TIdUDPServer ( 2530) IndySupport ( 15)

TIdMappedPortUDP Members
The following tables list the members exposed by TIdMappedPortUDP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 2533) Port number used to listen for new connections.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
MappedHost ( 1513) Identifies the host name or IP address for the remote system.
MappedPort ( 1514) Identifies the port number for the remote system.

1512 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedPortUDP Class

OnRequest ( 1514) Event handler for a connection request to a remote system.


ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Property
read only
Method
virtual
Event

TIdMappedPortUDP Properties
The Properties of the TIdMappedPortUDP class are listed here.

Properties
Property Description
MappedHost ( 1513) Identifies the host name or IP address for the remote system.
MappedPort ( 1514) Identifies the port number for the remote system.
OnRequest ( 1514) Event handler for a connection request to a remote system.

Legend
Property

TIdMappedPortUDP.MappedHost Property
Identifies the host name or IP address for the remote system.

Pascal
property MappedHost: string;
Description
MappedHost is a string property that identifies the host name or IP address for the connection to a remote system. MappedHost is

Internet Direct (Indy) Version 10.1.5 1513


TIdMappedTelnet Class Classes

used in DoUDPRead when the surrogate UDP connection is created for the current connection request.

See Also
DoUDPRead

TIdMappedPortUDP.MappedPort Property
Identifies the port number for the remote system.

Pascal
property MappedPort: Integer;
Description
MappedPort is a published property that identifies the port number for the connection to a remote system.

MappedPort is used in DoUDPRead when the surrogate UDP connection is created for the current connection request.

See Also
DoUDPRead

TIdMappedPortUDP.OnRequest Property
Event handler for a connection request to a remote system.

Pascal
property OnRequest: TIdNotifyEvent;
Description
OnRequest is a TNotifyEvent event handler property used to respond to connection requests using a surrogate UDP client
connection to a remote system.

Applications must assign a procedure to the event handler to allow response to the event notification.

OnRequest is triggered in DoUDPRead prior to establishing the surrogate connection to a remote system for the local UDP client.

See Also
DoUDPRead

TIdMappedTelnet Class
File
IdMappedTelnet ( 4682)

Hierarchy

Pascal
TIdMappedTelnet = class(TIdCustomMappedTelnet);
Description
TIdMappedTelnet is a TIdCustomMappedTelnet ( 447) descendant.

See Also
TIdCustomMappedTelnet ( 447)

1514 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedTelnet Class

TIdMappedTelnet Members
The following tables list the members exposed by TIdMappedTelnet.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
AllowedConnectAttempts ( 1516)
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 449)
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MappedHost ( 1507) Represents the IP address or host name to use for outbound connections in the port mapping proxy server.
MappedPort ( 449)
MappedPort ( 1508) Represents the port number to use for outbound connections in the port mapping proxy server.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeConnect ( 1508) Event handler signalled prior to opening the local client connection for a proxied client session.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCheckHostPort ( 1516)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnConnect ( 1509) Event handler signalled when the local client for the proxied connection has been connected.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnDisconnect ( 1509) Event handler signalled when the local client for the proxied connection is disconnected.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnExecute ( 1510) Event handler signalled to perform data handling for the local client in the proxied connection.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnOutboundConnect ( 1510) Event handler signalled when the remote system connection for the proxied session has been connected.
OnOutboundData ( 1511) Event handler signalled to perform data handling for the remote client connection in the proxied session.
OnOutboundDisconnect ( 1511) Event handler signalled when the remote connection for the proxied session is disconnected.
OnStatus ( 359) Represents the current connection status event handler.

Internet Direct (Indy) Version 10.1.5 1515


TIdMappedTelnetThread Class Classes

Legend
Property
read only
Event
Method
virtual

TIdMappedTelnet Properties
The Properties of the TIdMappedTelnet class are listed here.

Properties
Property Description
AllowedConnectAttempts ( 1516)

Legend
Property

TIdMappedTelnet.AllowedConnectAttempts Property
Pascal
property AllowedConnectAttempts: Integer;
Description
AllowedConnectAttempts is a Published Integer property. Write access for the property is implemented using
SetAllowedConnectAttempts. The default value for the property is -1.

TIdMappedTelnet Events
The Events of the TIdMappedTelnet class are listed here.

Events
Event Description
OnCheckHostPort ( 1516)

Legend
Event

TIdMappedTelnet.OnCheckHostPort Event
Pascal
property OnCheckHostPort: TIdMappedTelnetCheckHostPort;
Description
OnCheckHostPort is a Published TIdMappedTelnetCheckHostPort ( 3057) event handler property. Write access for the property is
implemented using FOnCheckHostPort.

TIdMappedTelnetThread Class
File
IdMappedTelnet ( 4682)

1516 Internet Direct (Indy) Version 10.1.5


Classes TIdMappedTelnetThread Class

Hierarchy

Pascal
TIdMappedTelnetThread = class(TIdMappedPortContext);
Description
TIdMappedTelnetThread is a TIdMappedPortContext ( 1500) descendant.

See Also
TIdMappedPortContext ( 1500)

TIdMappedTelnetThread Members
The following tables list the members exposed by TIdMappedTelnetThread.

Properties
Property Description
AllowedConnectAttempts ( 1518)
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
ConnectTimeOut ( 1502) Indicates the number of milliseconds to wait for a successful outbound connection.
Data ( 2332) A user-specified object with values used during execution of the task.
DataAvailList ( 1503) List of socket handles with data available for the proxied client connection.
NetData ( 1503) Stores value read from the local or remote connections for the proxied session.
OutboundClient ( 1504) Represents the remote connection for the proxied client session.
ReadList ( 1504) List of socket handles representing the local and remote connections for the proxied client connection.
Server ( 1504) Provides access to the server context for the client session.
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 378)
Create ( 1501)
Create ( 2330) Constructor for the object instance.
Destroy ( 378) Frees the object instance.
Destroy ( 1502) Frees the objet instance.
Destroy ( 2331) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Property
read only
Method
virtual
Event

Internet Direct (Indy) Version 10.1.5 1517


TIdMatchItem Class Classes

TIdMappedTelnetThread Properties
The Properties of the TIdMappedTelnetThread class are listed here.

Properties
Property Description
AllowedConnectAttempts ( 1518)

Legend
Property
read only

TIdMappedTelnetThread.AllowedConnectAttempts Property
Pascal
property AllowedConnectAttempts: Integer;
Description
AllowedConnectAttempts is a Public read-only Integer property.

TIdMatchItem Class
Implements a collection item class maintained for a DICT MATCH command response received in TIdDICT ( 552).

File
IdDICTCommon ( 4615)

Hierarchy

Pascal
TIdMatchItem = class(TIdCollectionItem);
Description
TIdMatchItem is a TIdCollectionItem ( 3011) descendant that implements a collection item class for DICT MATCH command
responses received in TIdDICT ( 552).

TIdMatch is the item class maintained in the TIdMatchList ( 1519) collection as created in the TIdDICT.Match ( 560) method.

See Also
TIdCollectionItem ( 3011)

TIdMatchList ( 1519)

TIdDICT.Match ( 560)

TIdMatchItem Members
The following tables list the members exposed by TIdMatchItem.

Properties
Property Description
DB ( 1519)
Word ( 1519)

1518 Internet Direct (Indy) Version 10.1.5


Classes TIdMatchList Class

Legend
Property

TIdMatchItem Properties
The Properties of the TIdMatchItem class are listed here.

Properties
Property Description
DB ( 1519)
Word ( 1519)

Legend
Property

TIdMatchItem.DB Property
Pascal
property DB: String;
Description
DB is a Published String property. Write access for the property is implemented using FDB.

TIdMatchItem.Word Property
Pascal
property Word: String;
Description
Word is a Published String property. Write access for the property is implemented using FWord.

TIdMatchList Class
Implements a collection for DICT MATCH command responses received in TIdDICT ( 552).

File
IdDICTCommon ( 4615)

Hierarchy

Pascal
TIdMatchList = class(TIdCollection);
Description
TIdMatchList is a TIdCollection ( 3011) descendant that implements a collection for DICT MATCH command responses received
in TIdDICT ( 552).

TIdMatchList manages TIdMatch instances added to the collection in the TIdDICT.Match ( 560) method.

See Also
TIdCollection ( 3011)

TIdMatch

Internet Direct (Indy) Version 10.1.5 1519


TIdMatchList Class Classes

TIdDICT.Match ( 560)

TIdMatchList Members
The following tables list the members exposed by TIdMatchList.

Properties
Property Description
Items ( 1521)

Methods
Method Description
Add ( 1520)
Create ( 1520)
IndexOf ( 1521)

Legend
Method
virtual
Property

TIdMatchList Methods
The Methods of the TIdMatchList class are listed here.

Methods
Method Description
Add ( 1520)
Create ( 1520)
IndexOf ( 1521)

Legend
Method
virtual

TIdMatchList.Add Method
Pascal
function Add: TIdMatchItem;
Returns
TIdMatchItem ( 1518)

Description
Add is a method.

Add returns a TIdMatchItem ( 1518) value.

TIdMatchList.Create Constructor
Pascal
constructor Create; virtual; reintroduce;
Description
Create is a reintroduced,virtual constructor.

1520 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

TIdMatchList.IndexOf Method
Pascal
function IndexOf(
AItem: TIdMatchItem
): Integer;
Parameters
Parameters Description
AItem Type is TIdMatchItem ( 1518).

Returns
Integer

Description
IndexOf is a method.

IndexOf returns a Integer value.

TIdMatchList Properties
The Properties of the TIdMatchList class are listed here.

Properties
Property Description
Items ( 1521)

Legend
Property

TIdMatchList.Items Property
Pascal
property Items [AIndex: Integer]: TIdMatchItem;
Description
Items is a Public TIdMatchItem ( 1518) property. Write access for the property is implemented using SetItems.

Items is the default property for the object instance.

TIdMessage Class
Encapsulates an Internet Message used with standards-based transmission protocols.

File
IdMessage ( 4682)

Hierarchy

Pascal
TIdMessage = class(TIdBaseComponent);
Description
TIdMessage encapsulates a complete Internet Message as described in the Internet Standards documents:

Internet Direct (Indy) Version 10.1.5 1521


TIdMessage Class Classes

RFC 2822 - Internet Message Format

RFC 1036 - Standard for Interchange of USENET Messages

RFC 1049 - Content-type header field for Internet messages.

RFC 1437 - The Extension of MIME Content-Types to a New Medium.

RFC 1896 - The text/enriched MIME Content-type.

RFC 2387 - The MIME Multipart/Related Content-type.

Internet Assigned Numbering Authority (IANA) Official Media Types

TIdMessage supports Multipurpose Internet Mail Extensions (MIME) as described in the Internet Standards documents:

RFC 2045 - Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies

RFC 2046 - Multipurpose Internet Mail Extensions (MIME), Part Two: Media Types

RFC 2047 - Multipurpose Internet Mail Extensions (MIME), Part Three: Message Header Extensions for Non-ASCII Text

RFC 2048 - Multipurpose Internet Mail Extensions (MIME), Part Four: Registration Procedures

RFC 2049 - Multipurpose Internet Mail Extensions (MIME), Part Five: Conformance Criteria and Examples

TIdMessage is used in conjunction with message-based transmission protocols such as POP3, SMTP, IMAP4, and NNTP.

See Also
TIdPOP3 ( 1772)

TIdSMTP ( 2017)

TIdNNTP ( 1692)

TIdIMAP4 ( 1150)

IndySupport ( 15)

TIdMessage Members
The following tables list the members exposed by TIdMessage.

Properties
Property Description
AttachmentEncoding ( 1536) Identifies the default encoding mechanism used for message parts.
AttachmentTempDirectory ( 1537) Path to use when creating or accessing the temporary files for file-based attachments in the message.
BccList ( 1537) Indicates blind carbon copy recipients for the message.
Body ( 1538) Represents the body of the message.
CCList ( 1538) Carbon copy recipients for the message.
CharSet ( 1539) Indicates the character set used for the message.
ContentDisposition ( 1540) Indicates presentation and storage parameters for the message.
ContentTransferEncoding ( 1540) Specifies the MIME encoding for the message during message transmission.
ContentType ( 1541) Identifies the MIME media type for the message.
ConvertPreamble ( 1542) Indicates if a misplaced message body is converted prior to transmission.
Date ( 1543) The date a message was sent.
Encoding ( 1543) Identifies the encoding algorithm for message attachments.
ExceptionOnBlockedAttachments ( 1544) Indicates if an exception occurs when a file-based attachment cannot be created in MessageParts ( 1548).
ExtraHeaders ( 1544) Additional headers for the message.
Flags ( 1545) Represents mailbox message flags for the message.
From ( 1545) Identifies the original author of the message.
FromList ( 1546) List of original authors for the message.
Headers ( 1546) Header values for the message.
InReplyTo ( 1547) Original message identifier for a response message.
IsEncoded ( 1547) Indicates when the message body is MIME-encoded.
IsMsgSinglePartMime ( 1547) Indicates if a single message part exists for a MIME-encoded message.

1522 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

LastGeneratedHeaders ( 1547) Provides access to headers used during transmission of the mail message.
MessageParts ( 1548) List of message parts for the message.
MIMEBoundary ( 1548) Represents MIME boundary markers for the message.
MsgId ( 1548) Message identifier assigned to the message.
NewsGroups ( 1548) Identifies newsgroup to receive the message.
NoDecode ( 1549) Requests a message in raw form.
NoEncode ( 1549) Indicates if encoding can be omitted for Headers ( 1546) and Body ( 1538) prior to message transmission.
Organization ( 1550) Identifies the organizational affiliation for the message author.
Priority ( 1550) Identifies the message priority.
ReceiptRecipient ( 1551) Return receipt email address.
Recipients ( 1551) Identifies the recipients of a message.
References ( 1552) Identifies the reply-to messages.
ReplyTo ( 1552) Identifies the delivery address for message replies.
Sender ( 1553) Identifies the sender of the message.
Subject ( 1553) Identifies the subject for the message.
UID ( 1553) Unique Identifier for a message.
UseNowForDate ( 1554) Indicates that the message uses the current date and time when sent.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AddHeader ( 1524) Adds a header and value to the message.
Clear ( 1525) Clears the header and body for the message.
ClearBody ( 1525) Clears the contents of the message body.
ClearHeader ( 1525) Clear ( 1525) the contents of the message header.
Create ( 267) Constructor for the object instance.
Destroy ( 1526) Frees the object instance.
DetermineIfMsgIsSinglePartMime ( 1527) Indicates if the message has multiple message parts.
DoCreateAttachment ( 1528) Implements creating a new message attachment.
ExtractCharSet ( 1528) Captures and removes a character set parameter present in a RFC 2822-compliant message header.
GenerateHeader ( 1529) Creates the list of headers for the message.
GetVersion ( 269) Version ( 269) number for Indy component suite.
InitializeISO ( 1530) Initializes the default values for the content transfer encoding, encoding, and character sets for the message.
IsBodyEmpty ( 1531) Indicates if the Body ( 1538) for the message is blank.
IsBodyEncodingRequired ( 1531) Determines if encoding is required to represent lines in the Body ( 1538) of the message.
LoadFromFile ( 1532) Loads message headers and message parts from a file.
LoadFromStream ( 1533) Loads message headers and message parts from an input stream.
ProcessHeaders ( 1534) Updates message properties based on header values in the message.
SaveToFile ( 1534) Stores message headers and contents in a file.
SaveToStream ( 1535) Stores message headers and message parts to an output stream.
CType ( 267)
Create ( 1274)

Events
Event Description
OnCreateAttachment ( 1554) Event handler triggered to create ( 267) a new attachment for the message.
OnInitializeISO ( 1555) Event triggered to maintain content transfer encoding, header encoding, and character set used for the mail
message.

Legend
Method
virtual
Property
read only
Event

TIdMessage Methods
The Methods of the TIdMessage class are listed here.

Internet Direct (Indy) Version 10.1.5 1523


TIdMessage Class Classes

Methods
Method Description
AddHeader ( 1524) Adds a header and value to the message.
Clear ( 1525) Clears the header and body for the message.
ClearBody ( 1525) Clears the contents of the message body.
ClearHeader ( 1525) Clear ( 1525) the contents of the message header.
Destroy ( 1526) Frees the object instance.
DetermineIfMsgIsSinglePartMime ( 1527) Indicates if the message has multiple message parts.
DoCreateAttachment ( 1528) Implements creating a new message attachment.
ExtractCharSet ( 1528) Captures and removes a character set parameter present in a RFC 2822-compliant message header.
GenerateHeader ( 1529) Creates the list of headers for the message.
InitializeISO ( 1530) Initializes the default values for the content transfer encoding, encoding, and character sets for the message.
IsBodyEmpty ( 1531) Indicates if the Body ( 1538) for the message is blank.
IsBodyEncodingRequired ( 1531) Determines if encoding is required to represent lines in the Body ( 1538) of the message.
LoadFromFile ( 1532) Loads message headers and message parts from a file.
LoadFromStream ( 1533) Loads message headers and message parts from an input stream.
ProcessHeaders ( 1534) Updates message properties based on header values in the message.
SaveToFile ( 1534) Stores message headers and contents in a file.
SaveToStream ( 1535) Stores message headers and message parts to an output stream.

Legend
Method
virtual

TIdMessage.AddHeader Method
Adds a header and value to the message.

Pascal
procedure AddHeader(
const AValue: string
);
Parameters
Parameters Description
Value header name and value in "NAME: VALUE" form.

Description
AddHeader is a procedure used to add a header name and value to the Headers ( 1546) for the message. Value is the RFC 2822
message header to be added in the "NAME: VALUE" form. AddHeader is a convenience method that calls the Add method in
Headers ( 1546) using the contents of Value.

AddHeader can be used to add standard or experimental headers after the message has loaded the header values in
TIdMessageClient ( 1555), and set property values using ProcessHeaders ( 1534). For headers that have corresponding
properties in TIdMessage ( 1521), use the property to read or write the value for the header.

Use ExtraHeaders ( 1544) for custom message headers that need to be kept in a separate or distinct container until the message
is transmitted or stored.

AddHeader does not perform line folding for long header values. Use methods and properties in Header to ensure that header
folding is respected when using long header values.

See Also
TIdMessageClient ( 1555)

TIdHeaderList ( 1024)

IdMessage. Headers ( 1546)

TIdMessage.ExtraHeaders ( 1544)

TIdMessage.ProcessHeaders ( 1534)

1524 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

TIdMessage.Clear Method
Clears the header and body for the message.

Pascal
procedure Clear; virtual;
Description
Clear is a procedure used to clear the values stored in both the Headers ( 1546) and Body ( 1538) of the message.

Clear calls ClearHeader ( 1525) to remove the contents of the message header.

Clear calls ClearBody ( 1525) to remove the contents of the message body including any text or attachments founbd in the
MessageParts ( 1548) collection.

Clear is called in LoadFromStream ( 1533) to reset the content of the message prior to loading values from the stream.

When the message is used with TIdNNTP ( 1692), Clear is called prior to retrieving the newsgroup article or headers.

When the message is used with TIdPOP3 ( 1772), Clear is called prior to retrieving the headers or body content for the email
message.

See Also
TIdMessage.ClearHeader ( 1525)

TIdMessage.ClearBody ( 1525)

TIdMessage.ClearBody Method
Clears the contents of the message body.

Pascal
procedure ClearBody;
Description
ClearBody is a procedure used to clear ( 1525) the contents of the message body.

ClearBody will ensure that text lines in Body ( 1538) are remove by calling Body.Clear ( 1525). ClearBody also removes any
items in the MessageParts ( 1548) collection by calling MessageParts.Clear ( 1525).

Use ClearHeader ( 1525) to remove the contents the message Header, or Clear ( 1525) to remove both the Header and the
Body ( 1538) of the message.

See Also
TIdMessage.ClearHeader ( 1525)

TIdMessage.Clear ( 1525)

TIdMessage.MessageParts ( 1548)

TIdMessage.ClearHeader Method
Clear ( 1525) the contents of the message header.

Pascal
procedure ClearHeader;
Description
ClearHeader is a procedure used to clear ( 1525) the contents of the message Headers ( 1546) and their associated properties.
ClearHeader will reset the following properties to their default values:

Internet Direct (Indy) Version 10.1.5 1525


TIdMessage Class Classes

BccList ( 1537)
CcList
ContentDisposition ( 1540)
ContentTransferEncoding ( 1540)
ContentType ( 1541)
ConvertPreamble ( 1542)
Date ( 1543)
Encoding ( 1543)
ExtraHeaders ( 1544)
FCharSet
FMIMEBoundary
FSender
Flags ( 1545)
From ( 1545)
Headers ( 1546)
LastGeneratedHeaders ( 1547)
NewsGroups ( 1548)
Organization ( 1550)
Priority ( 1550)
ReceiptRecipient ( 1551)
Recipients ( 1551)
References ( 1552)
ReplyTo ( 1552)
Subject ( 1553)
UseNowForDate ( 1554)

Use ClearBody ( 1525) to remove the contents the message Body ( 1538), or Clear ( 1525) to remove both the Header and the
Body ( 1538) of the message.

See Also
ClearBody ( 1525)

Clear ( 1525)

TIdMessage.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing resources allocated to properties in the Create (
267) constructor, including:

Body ( 1538)
Recipients ( 1551)

1526 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

BccList ( 1537)
CcList
MessageParts ( 1548)
NewsGroups ( 1548)
Headers ( 1546)
ExtraHeaders ( 1544)
From ( 1545)
FromList ( 1546)
ReplyTo ( 1552)
Sender ( 1553)
ReceiptRecipient ( 1551)
MIMEBoundary ( 1548)
LastGeneratedHeaders ( 1547)

Destroy calls the inherited Destroy method to complete destruction of the object instance.

See Also
TIdMessage.Create ( 267)

TIdMessage.DetermineIfMsgIsSinglePartMime Method
Indicates if the message has multiple message parts.

Pascal
function DetermineIfMsgIsSinglePartMime: Boolean;
Returns
Boolean - True when a single message part exists for a MIME-encoded message.

Description
DetermineIfMsgIsSinglePartMime is a Boolean function used to indicate if the message has been constructed using multiple
message parts.

DetermineIfMsgIsSinglePartMime returns False when any of the following conditions are met:

• Encoding ( 1543) <> meMIME


• MessageParts.Count <> 1
• IsBodyEmpty ( 1531) = False
DetermineIfMsgIsSinglePartMime is used to ensure that generated headers in LastGeneratedHeaders ( 1547) are properly
updated in TIdMessage.GenerateHeaders.

For a MIME-encoded message, the RFC 2822 "MIME-Version ( 269)" header to be set to the value "1.0". If multiple message
parts are used (when DetermineIfMsgIsSinglePartMime returns False), the relevant header for ContentType ( 1541) (and its
optional CharSet ( 1539) and MIMEBoundary ( 1548) parameters) is generated.

DetermineIfMsgIsSinglePartMime updates the value in the IsMsgSinglePartMime ( 1547) property to reflect the return value for
the method.

See Also
ContentType ( 1541)

CharSet ( 1539)

Internet Direct (Indy) Version 10.1.5 1527


TIdMessage Class Classes

Encoding ( 1543)

MessageParts ( 1548)

IsBodyEmpty ( 1531)

IsMsgSinglePartMime ( 1547)

TIdMessage.DoCreateAttachment Method
Implements creating a new message attachment.

Pascal
procedure DoCreateAttachment(
const AHeaders: TIdStrings;
var VAttachment: TIdAttachment
); virtual;
Parameters
Parameters Description
AHeaders Headers ( 1546) for the attachment.
AAttachment Attachment created and added to the MessageParts ( 1548) for the message.

Description
DoCreateAttachment is a procedure used to implement creating a new message attachment. DoCreateAttachment will trigger the
OnCreateAttachment ( 1554) event handler, when it has been assigned, to create ( 267) the attachment using the values in
AHeaders.

If AAttachment does not contain a valid object instance after triggering OnCreateAttachment ( 1554), CreateAttachmentClass is
used to create ( 267) the attachment in the MessageParts ( 1548) for the message.

DoCreateAttachment is called in TIdMessageClient ( 1555) (and descendant classes) when an attcahments needs to be created
during processing for a message.

TIdMessage.ExtractCharSet Method
Captures and removes a character set parameter present in a RFC 2822-compliant message header.

Pascal
function ExtractCharSet(
AContentType: string
): string;
Parameters
Parameters Description
AContentType Message header to be examined for the optional character set parameter.

Returns
String - Value for the character set parameter, or any empty string.

Description
ExtractCharSet is a String function used to capture and remove a character set parameter present in RFC 2822-compliant message
headers.

AContentType is the RFC 2822 message header to be examined for the optional character set parameter.

The return value for the method is the content for the character set parameter, or any empty string when the message header does
not contain the "CHARSET=" argument.

ExtractCharSet is used when processing message headers during receipt of a message in ProcessHeaders ( 1534) to generate
the value for the CharSet ( 1539) property.

1528 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

See Also
ProcessHeaders ( 1534)

CharSet ( 1539)

TIdMessage.GenerateHeader Method
Creates the list of headers for the message.

Pascal
procedure GenerateHeader;
Description
GenerateHeader is a procedure used to create ( 267) and populate the MIME-encoded list of message headers in
LastGeneratedHeaders ( 1547).

A number of operations are performed in GenerateHeader to prepare for generating headers for the message.

MessageParts ( 1548) are counted to update the value used when comparing the Encoding ( 1543) and content transfer
encodings for the message and message parts.

If the encoding is meDefault, the user wants to automatically determine the encoding mechanism based on values found in the
message and message parts.

If there are no attachments, the simplest type, just the headers followed by the message body: UU does this for us (note there are
no attachments, picking meUU will not generate any UU-encoded message content).

When are attachments, the default encoding used is MIME-encoding.

GenerateHeader compares the Encoding ( 1543) for the message to the content tranfer encoding used for any MessageParts (
1548). Any unexpected content transfer encoding values are converted to 'base64'. If the message sahould not support
attachments in an encoded body, the content transfer encoding for the message is cleared.

For MIME-encoded messages, the ContentType ( 1541) is determined for any omitted content type, and the MIMEBoundary (
1548) for the message is generated.

GenerateHeader uses the message encoders for the message parts to initialize the headers for message. If a message encoder
contains a Charset value, it is appended to ContentType ( 1541).

If Encoding ( 1543) contains a value other than meMIME, and the message has multipart/related or multipart/alternative message
parts, an EIdMessageException ( 116) will be raised.

GenerateHeader calls InitializeISO ( 1530) to determine the encoding used for headers in the message, and adjust the character
set based on IdCharactersetNames.

LastGeneratedHeaders ( 1547) is cleared, and any existing values in Headers ( 1546) is assigned to the LastGeneratedHeaders
( 1547) property.

The message headers handled in GenerateHeader and added to LastGeneratedHeaders ( 1547), includes:

From ( 1545)
Subject ( 1553)
To
Cc
Bcc
Newsgroups
In-Reply-To
Content-Type
MIME-Version ( 269)

Internet Direct (Indy) Version 10.1.5 1529


TIdMessage Class Classes

Content-Transfer-Encoding ( 1543)
Sender ( 1553)
Reply-To
Organization ( 1550)
Disposition-Notification-To
References ( 1552)
Date ( 1543)
X-Priority ( 1550)

GenerateHeader performs special processing for the values used in some headers in LastGeneratedHeaders ( 1547).

Header Processing

---------------------------- ----------------------------------------

"In-Reply-To:" Header will contain the value in the Subject ( 1553) property when InReplyTo ( 1547) is an empty string.
"MIME-Version ( 269):" Assigned the value "1.0" only when the encoding is resolved to meMIME.
"Content-Transfer-Encoding ( 1543):" Assigned only when the encoding is resolved to meMIME.
"Date ( 1543):" Assigned the current date and time when UseNowForDate ( 1554) is True, or the value in the Date ( 1543)
property when UseNowForDate ( 1554) is False.
"X-Priority ( 1550):" Omitted when the the Priority ( 1550) property contains the value mpNormal.

GenerateHeader appends any existing values in ExtraHeaders ( 1544) to LastGeneratedHeaders ( 1547) to capture the headers
values that may have been created by a UA. Duplicate header names are permitted.

See Also
TIdHeaderList ( 1024)

EIdMessageException ( 116)

TIdMessage.InitializeISO Method
Initializes the default values for the content transfer encoding, encoding, and character sets for the message.

Pascal
procedure InitializeISO(
var VTransferHeader: TTransfer;
var VHeaderEncoding: Char;
var VCharSet: String
);
Parameters
Parameters Description
VTransferHeader Content transfer encoding for header values.
VHeaderEncoding Encoding ( 1543) for header values.
VCharSet Character set for the messsage.

Description
InitializeISO is a procedure used to initialize the default values for the content transfer encoding, encoding, and character sets for
the message.

VTransferHeader is assigned the value bit8.

VHeaderEncoding is assigned the value 'B' for base64 encoding.

1530 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

VCharSet is assigned the IdCharsetNames ( 3825) value for the client's default character set as indicated in IdGetDefaultCharSet
( 2817).

When the default character set contains the folowing value, the associated action is performed:

Character Set Action


idcsISO_2022_JP VTransferHeader is set to iso2022jp
idcsISO_8859_1 VHeaderEncoding is set 'Q' quoted-printable enconding.
idcsUNICODE_1_1 VCharSet is set to the IdCharsetNames ( 3825) value for idcsUTF_8.

InitializeISO trigger the OnInitializeISO ( 1555) event handler using the values for the method parameters.

TIdMessage.IsBodyEmpty Method
Indicates if the Body ( 1538) for the message is blank.

Pascal
function IsBodyEmpty: Boolean;
Returns
Boolean - True when the message body is empty, or contains only whitespace.

Description
IsBodyEmpty is a Boolean function that indicates if the Body ( 1538) for the message is blank. IsBodyEmpty examines if the
contents of lines in the Body ( 1538), and returns true if any value other than the following is encountered:

• CR ( 3174)
• LF ( 4341)
• TAB ( 4393)
• SPACE
IsBodyEmpty is used in the implementation of the DetermineIfMsgIsSinglePartMime ( 1527) method.

See Also
DetermineIfMsgIsSinglePartMime ( 1527)

Body ( 1538)

TIdMessage.IsBodyEncodingRequired Method
Determines if encoding is required to represent lines in the Body ( 1538) of the message.

Pascal
function IsBodyEncodingRequired: Boolean;
Returns
Boolean - True when the Body ( 1538) contains values that require encoding. value Decimal 127.

Description
IsBodyEncodingRequired is a Boolean function used to determine if encoding is required to represent lines in the Body ( 1538) of
the message.

IsBodyEncodingRequired returns False if all of the lines in the Body ( 1538) can be expressed using the 7bit encoding value.
IsBodyEncodingRequired

Internet Direct (Indy) Version 10.1.5 1531


TIdMessage Class Classes

TIdMessage.LoadFromFile Method
Loads message headers and message parts from a file.

Pascal
procedure LoadFromFile(
const AFileName: string;
const AHeadersOnly: Boolean = False
);
Parameters
Parameters Description
AFileName File containing values to load into the message.
AHeadersOnly Indicates if only headers for the message should be loaded from the file. Default value is False.

Description
LoadFromFile is a procedure that loads the headers and optional contents for a message from the file name specified in AFilename.
If AFilename is not a valid file name on the the local file system, an EIdMessageCannotLoad ( 116) exception will be raised and
the method will be aborted.

Existing content in the TIdMessage ( 1521) instance is cleared prior to loading the values found in the specified file name.

LoadFromFile creates an instance of TFileStream to be used to reading the values for the message instance. The file stream is
created using the file mode constants that allow shared read with denied write priviliges (fmOpenRead ( 3206) fmShareDenyWrite
( 3208)). LoadFromFile calls LoadFromStream ( 1533) using the file stream to perform the physical input operation. The
TFileStream instance is freed prior to exiting from the method.

When AHeadersOnly is True, only header values up to and including the blank line delimiter in RFC message headers will be read
from the input file. When AHeadersOnly is False, both message Headers ( 1546) and MessageParts ( 1548) will be read and
stored in the message instance.

Use SaveToFile ( 1534) to create ( 267) a file suitable for use with LoadFromFile. Use LoadFromSteam to read message
contents from a TStream descendant. Use SaveToStream ( 1535) to populate a stream with values suitable for use with
LoadFromSteam.

Both LoadFromFile and LoadFromStream ( 1533) are designed to handle messages written using the SaveToStream ( 1535) or
SavedToFile methods in the Indy TIdMessage ( 1521) component. These methods create ( 267) an encoded version of the
message contents that matches the protocol tranmissions used when the message is transmitted using TIdSMTP ( 2017)
including the message terminator characters (CRLF.CRLF). If you are trying to import .EML message files from MS Outlook
Express, or another email client, make sure that the text file contains the message terminator sequence. An exception will be raised
if LoadFromFile or LoadFromStream ( 1533) are used to load files that do not include the message terminator sequence.

Please not that TIdMessage ( 1521) has no pre-defined mechanism that determines paths or file names used for local storage of
message instances. That is an implementation detail specific to the mail or news client constructed using the Indy components.

Exceptions
Exceptions Description
EIdMessageCannotLoad ( 116) Raised with the message RSIdMessageCannotLoad when the specified file name does not exist.
EIdException ( 76) Raised with the message RSMsgClientUnkownMessagePartType when an unknown message part type is
encountered when processing the body of a message part.

Example
[Delphi] Loading a message instance from a disk file.
// var Msg: TIdMessage;
// Msg := TIdMessage.Create(Nil);

// load headers only


Msg.LoadFromFile(sStorePath + sFilename, True);

// load complete message including message parts


Msg.LoadFromFile(sStorePath + sFilename, False);

// Msg.Free;

1532 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

See Also
TIdMessage.LoadFromStream ( 1533)

TIdMessage.SaveToFile ( 1534)

TIdMessage.SaveToStream ( 1535)

EIdMessageCannotLoad ( 116)

TIdMessage.LoadFromStream Method
Loads message headers and message parts from an input stream.

Pascal
procedure LoadFromStream(
AStream: TIdStream;
const AHeadersOnly: Boolean = False
);
Parameters
Parameters Description
AStream Source used to read headers and message parts.
AHeadersOnly Indicates if only headers should be loaded. Default value is False.

Description
LoadFromStream is a procedure that allows loading of headers and optional message parts for the TIdMessage ( 1521) instance
from the stream identified in AStream.

AStream is a TIdStream ( 3087) descendant and represents the data source that will be used read values to be stored in the
message instance. AStream can be any TStream descendant suitable for use in the as the input stream in a TIdIOHandlerStream
( 1348) instance.

The current position in AStream is not changed at any time during the LoadFromStream method. LoadFromStream uses the current
stream position to perform the physical input operation, and leaves the stream at the position following the read operation.

AHeadersOnly indicates if only message headers should be loaded for the message instance. When AHeadersOnly is False, the
entire message including all Headers ( 1546) and MessageParts ( 1548) will be loaded from AStream.

LoadFromStream creates an instance of TIdMessageClient ( 1555), and calls TIdMessageClient.ProcessMessage ( 1558) to


perform the physical input required to load values into the message instance. The TIdMessageClient ( 1555) instance is freed
prior to exiting from the method.

Both LoadFromFile ( 1532) and LoadFromStream are designed to handle messages written using the SaveToStream ( 1535) or
SavedToFile methods in the Indy TIdMessage ( 1521) component. These methods create ( 267) an encoded version of the
message contents that matches the protocol tranmissions used when the message is transmitted using TIdSMTP ( 2017)
including the message terminator characters (CRLF.CRLF). If you are trying to import .EML message files from MS Outlook
Express, or another email client, make sure that the text file contains the message terminator sequence. An exception will be raised
if LoadFromFile ( 1532) or LoadFromStream are used to load files that do not include the message terminator sequence.

Exceptions
Exceptions Description
EIdMessageCannotLoad ( 116) Raised with the message RSIdMessageCannotLoad when the specified file name does not exist.
EIdException ( 76) Raised with the message RSMsgClientUnkownMessagePartType when an unknown message part type is
encountered when processing the body of a message part.

See Also
TIdMessage.MessageParts ( 1548)

TIdMessage.Headers ( 1546)

TIdIOHandlerStream ( 1348)

TIdMessageClient ( 1555)

Internet Direct (Indy) Version 10.1.5 1533


TIdMessage Class Classes

TIdMessage.ProcessHeaders Method
Updates message properties based on header values in the message.

Pascal
procedure ProcessHeaders;
Description
ProcessHeaders is a procedure that updates message properties based on header values found in the message. ProcessHeaders
examines the TIdHeaderList ( 1024) property Headers ( 1546) to retrieve values that can be expressed as TIdMessage ( 1521)
properties, including the following:

BccList ( 1537)
CCList ( 1538)
Charset
ContentDisposition ( 1540)
ContentTransferEncoding ( 1540)
ContentType ( 1541)
Date ( 1543)
FromList ( 1546)
From ( 1545)
MIMEBoundary ( 1548)
MsgId ( 1548)
Newsgroups
Organization ( 1550)
Priority ( 1550)
ReceiptRecipient ( 1551)
Recipients ( 1551)
References ( 1552)
ReplyTo ( 1552)
Sender ( 1553)
Subject ( 1553)

ProcessHeaders is used when a TIdMessageClient ( 1555) client (or descendant) receives the content for the TIdMessage (
1521) instance.

See Also
TIdMessageClient ( 1555)

TIdHeaderList ( 1024)

TIdMessage.SaveToFile Method
Stores message headers and contents in a file.

Pascal
procedure SaveToFile(
const AFileName: string;
const AHeadersOnly: Boolean = False
);

1534 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

Parameters
Parameters Description
AFileName File to use for storing the message.
AHeadersOnly Message should store only headers to the file.

Description
SaveToFile is a procedure used to store the headers and/or message parts for the message in the file specified in AFilename. If the
file specified in AFileName already exists, the file is deleted prior to creating the output for the current message.

AHeadersOnly indicates if only message headers should be written for the message instance. When AHeadersOnly is False, the
entire message including all Headers ( 1546) and MessageParts ( 1548) will be stored in the output file.

SaveToFile calls SaveToStream ( 1535) using an internal file stream to perform the physical output operation. The file stream
instance is freed prior to exiting from the method.

Use LoadFromFile ( 1532) to retrieve the contents of a specified file created using SaveToFile in the current message instance.

See Also
TIdMessage.LoadFromFile ( 1532)

TIdMessage.LoadFromStream ( 1533)

TIdMessage.SaveToStream ( 1535)

TIdMessage.SaveToStream Method
Stores message headers and message parts to an output stream.

Pascal
procedure SaveToStream(
AStream: TIdStream;
const AHeadersOnly: Boolean = False
);
Parameters
Parameters Description
AStream Destination used to write headers and message parts.
AHeadersOnly Indicates if only headers should be stored. Default value is False.

Description
SaveToStream is a procedure that allows storage of headers and optional message parts for the TIdMessage ( 1521) instance to
the stream identified in AStream.

AStream is a TIdStream ( 3087) descendant and represents the destination that will be used to write values in the message
instance. AStream can be any TStream descendant suitable for use as the output stream in a TIdIOHandlerStream ( 1348)
instance.

AHeadersOnly indicates if only message headers should be written for the message instance. When AHeadersOnly is False, the
entire message including all Headers ( 1546) and MessageParts ( 1548) will be stored in AStream.

SaveToStream creates an instance of TIdMessageClient ( 1555) and TIdIOHandlerStream ( 1348), and calls
TIdMessageClient.SaveMsg to perform the physical output required to store values from the message instance. The
TIdMessageClient ( 1555) instance and the IOIHandler are freed prior to exiting from the method.

The current position in AStream is not changed before writing in the SaveToStream method. SaveToStream uses the current
stream position to perform the physical output operation, and leaves the stream at the position following the write operation.

See Also
TIdMessage.MessageParts ( 1548)

TIdMessage.Headers ( 1546)

TIdIOHandlerStream ( 1348)

Internet Direct (Indy) Version 10.1.5 1535


TIdMessage Class Classes

TIdMessageClient ( 1555)

TIdMessageClient.SendMsg ( 1560)

TIdMessage Properties
The Properties of the TIdMessage class are listed here.

Properties
Property Description
AttachmentEncoding ( 1536) Identifies the default encoding mechanism used for message parts.
AttachmentTempDirectory ( 1537) Path to use when creating or accessing the temporary files for file-based attachments in the message.
BccList ( 1537) Indicates blind carbon copy recipients for the message.
Body ( 1538) Represents the body of the message.
CCList ( 1538) Carbon copy recipients for the message.
CharSet ( 1539) Indicates the character set used for the message.
ContentDisposition ( 1540) Indicates presentation and storage parameters for the message.
ContentTransferEncoding ( 1540) Specifies the MIME encoding for the message during message transmission.
ContentType ( 1541) Identifies the MIME media type for the message.
ConvertPreamble ( 1542) Indicates if a misplaced message body is converted prior to transmission.
Date ( 1543) The date a message was sent.
Encoding ( 1543) Identifies the encoding algorithm for message attachments.
ExceptionOnBlockedAttachments ( 1544) Indicates if an exception occurs when a file-based attachment cannot be created in MessageParts ( 1548).
ExtraHeaders ( 1544) Additional headers for the message.
Flags ( 1545) Represents mailbox message flags for the message.
From ( 1545) Identifies the original author of the message.
FromList ( 1546) List of original authors for the message.
Headers ( 1546) Header values for the message.
InReplyTo ( 1547) Original message identifier for a response message.
IsEncoded ( 1547) Indicates when the message body is MIME-encoded.
IsMsgSinglePartMime ( 1547) Indicates if a single message part exists for a MIME-encoded message.
LastGeneratedHeaders ( 1547) Provides access to headers used during transmission of the mail message.
MessageParts ( 1548) List of message parts for the message.
MIMEBoundary ( 1548) Represents MIME boundary markers for the message.
MsgId ( 1548) Message identifier assigned to the message.
NewsGroups ( 1548) Identifies newsgroup to receive the message.
NoDecode ( 1549) Requests a message in raw form.
NoEncode ( 1549) Indicates if encoding can be omitted for Headers ( 1546) and Body ( 1538) prior to message transmission.
Organization ( 1550) Identifies the organizational affiliation for the message author.
Priority ( 1550) Identifies the message priority.
ReceiptRecipient ( 1551) Return receipt email address.
Recipients ( 1551) Identifies the recipients of a message.
References ( 1552) Identifies the reply-to messages.
ReplyTo ( 1552) Identifies the delivery address for message replies.
Sender ( 1553) Identifies the sender of the message.
Subject ( 1553) Identifies the subject for the message.
UID ( 1553) Unique Identifier for a message.
UseNowForDate ( 1554) Indicates that the message uses the current date and time when sent.

Legend
Property
read only

TIdMessage.AttachmentEncoding Property
Identifies the default encoding mechanism used for message parts.

Pascal
property AttachmentEncoding: string;

1536 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

Description
AttachmentEncoding is a String property that identifies the encoding mechanism used for message parts that are attachments in
the message.

AttachmentEncoding normally contains values that include:

'MIME'
'UUE'
'XXE'

Changing the value in AttachmentEncoding updates the default encoding used for all message parts in the message by setting the
same value in the MessageParts ( 1548) collection. This also ensures that a registered encoder class type is located for
subsequent handling of the content in the message parts.

Set the value in Encoding ( 1543) to indicate the encoding mechanism for the message Body ( 1538).

See Also
TIdMessageParts.AttachmentEncoding ( 1625)

TIdMessage.Encoding ( 1543)

TIdMessage.AttachmentTempDirectory Property
Path to use when creating or accessing the temporary files for file-based attachments in the message.

Pascal
property AttachmentTempDirectory: string;
Description
AttachmentTempDirectory is a string property that indicates the path to use when creating or accessing the temporary files needed
for file-based attachments in the message. AttachmentTempDirectory is used when TIdAttachmentFile ( 236) instances are added
to the MessageParts ( 1548) for the message.

When assigning a new value to AttachmentTempDirectory, a trailing path delimiter in the new property value is removed. Changing
the value in AttachmentTempDirectory after loading or creating file-based attachments does not affect the temp file path or stored
path name used for the existing attachments. Assign the value for the AttachmentTempDirectory property prior to loading a
message or manipulating the MessageParts ( 1548) in the message.

See Also
MessageParts ( 1548)

TIdAttachmentFile.StoredPathName ( 244)

TIdMessage.BccList Property
Indicates blind carbon copy recipients for the message.

Pascal
property BccList: TIdEmailAddressList;
Description
BccList is a TIdEMailAddressList ( 647) property used to store email addresses for recipients that will receive a carbon copy of the
message, but do not appear in the RFC 2822 message header "To:" for the message.

BccList is often used for mailing list applications, where members of the mailing list should receive a copy of a message addressed
to the list.

Use Recipients ( 1551) to identify email addresses included in the RFC 2822 message header "To:".

Internet Direct (Indy) Version 10.1.5 1537


TIdMessage Class Classes

Use CCList ( 1538) to indicate additional message recipients that may appear in the RFC 2822 message headers for the message.

Example
(Delphi) Updating a list of email addresses
AMessage.CCList.EmailAddresses :=
'"John Doe" <jdoe@some.net>, "Jane Doe" <janed@another.net>';

with AMessage.BCCList.Add do
begin
Name := 'John Doe';
Address := 'jdoe@some.net';
end;

with AMessage.BCCList.Add do
begin
Name := 'Jane Doe';
Address := 'janed@another.net';
end;
See Also
TIdEMailAddressList ( 647)

TIdEMailAddressItem ( 641)

TIdMessage.CCList ( 1538)

TIdMessage.Recipients ( 1551)

TIdMessage.Body Property
Represents the body of the message.

Pascal
property Body: TIdStrings;
Description
Body is a TStrings property that contains the textual values that make up the body of the message. Body normally contains values
when the ContentType ( 1541) for the message is a member of the "text/*" MIME family.

When ContentType ( 1541) contains a value in the "multipart/*" MIME family, use MessageParts ( 1548) to access one or more
TIdText ( 2404) instances that represent the message content.

When IsEncoded ( 1547) is True, Body contains values that are encoded using the encoding scheme identified in
ContentTransferEncoding ( 1540).

When IsEncoded ( 1547) is False, Body contains ASCII text that represents the entire contents of the message.

See Also
TIdMessage.IsEncoded ( 1547)

TIdMessage.MessageParts ( 1548)

TIdMessage.ContentType ( 1541)

TIdMessage.CCList Property
Carbon copy recipients for the message.

Pascal
property CCList: TIdEmailAddressList;
Description
CCList is a TIdEMailAddressList ( 647) property used to store the email address of recipients that will receive a carbon copy of the
message.

1538 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

Use BccList ( 1537) to indicate recipients that will receive a carbon copy of the message, but do not appear in the "To:" headers
for the original Recipients ( 1551) of the message.

Example
(Delphi) Updating a list of CC:d email addresses
AMessage.CCList.EmailAddresses :=
'"John Doe" <jdoe@some.net>, "Jane Doe" <janed@another.net>';

// or....

with AMessage.CCList.Add do
begin
Name := 'John Doe';
Address := 'jdoe@some.net';
end;

with AMessage.CCList.Add do
begin
Name := 'Jane Doe';
Address := 'janed@another.net';
end;
See Also
TIdEMailAddressList ( 647)

TIdEMailAddressItem ( 641)

TIdMessage.BccList ( 1537)

TIdMessage.Recipients ( 1551)

TIdMessage.CharSet Property
Indicates the character set used for the message.

Pascal
property CharSet: string;
Description
CharSet is a String property that indicates the character set expected in message contents. CharSet can contains one of the official
names for character sets as identified in IdCharsetNames ( 3825).

The up-to-date list of character set names and aliases can be found at:

Internet Assigned Numbering Authority (IANA) Official Character Sets

Character set information may also be supplied as an argument in the content type for individual items in the MessageParts (
1548) collection. The value in CharSet will be updated using the content type argument value when message properties are read in
ProcessHeaders ( 1534).

CharSet is used to populate the content type argument when message headers are updated in GenerateHeader ( 1529).

CharSet has been defined primarily for use with textual data. However, it is possible that non-textual data might also specify a
charset value.

Example
IdMessage.Sender := 'calserver@myorg.net';
IdMessage.From.Text := sOrgBy;
IdMessage.Subject := '[CAL] ' + sEventType;
IdMessage.Recipients.EmailAddresses := sAttendees;
IdMessage.Priority := mpHigh;
IdMessage.ContentType := 'text/plain';
IdMessage.CharSet := 'US-ASCII';

IdMessage.Body.Text :=
'Event: ' + sEventType + EOL +
'Date: ' + FormatDateTime('mm/dd/yyyy hh:nn', dtMeeting) +

Internet Direct (Indy) Version 10.1.5 1539


TIdMessage Class Classes

EOL +
'Duration: ' + sDuration +
EOL +
'Location: ' + sLocation +
EOL +
'Organizer: ' + sOrgBy +
EOL +
'Attendees: ' + sAttendees +
EOL + EOL +
memoComments.Text;

IdSMTP.Send(IdMessage);
See Also
TIdMessage.MessageParts ( 1548)

TIdMessage.ContentType ( 1541)

TIdText ( 2404)

TIdAttachment ( 227)

TIdMessageParts ( 1623)

IdCharsetNames ( 3825)

TIdMessage.ContentDisposition Property
Indicates presentation and storage parameters for the message.

Pascal
property ContentDisposition: string;
Description
ContentDisposition is a String property that represents the value for the Internet Message header "Content-Disposition", as
described in the Internet Standards document:

RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field

ContentDisposition indicates presentation information for the message and can contain values and optional parameters.

ContentDisposition can contain the value "inline" for an Internet Message where the body part should be display immediately, and
in the order in which it occurs.

ContentDisposition can contain the value "attachment" followed by additional parameters to indicate that the message part is
separate from the main body of the message. The parameter "filename" can be used to suggest a filename where the message part
is detached and stored in a separate file. Other parameters can include "creation-date", "modification-date", "read-date", and "size".

ContentDisposition refers to the presentation and storage parameters for the entire message. Use
TIdAttachment.ContentDisposition ( 234) to access values for a given attachment in MessageParts ( 1548).

See Also
TIdMessage.MessageParts ( 1548)

TIdAttachment.ContentDisposition ( 234)

TIdMessage.ContentTransferEncoding Property
Specifies the MIME encoding for the message during message transmission.

Pascal
property ContentTransferEncoding: string;
Description
ContentTransferEncoding is a String property that specifies the MIME encoding used to represent message data transferred using
a mail transport protocol.

1540 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

Common values for ContentTransferEncoding include the following:

Value Meaning

---------------- ------------------------------------------------

7bit Message contains 7-bit un-encoded US-ASCII data.


8bit Message contains 8-bit un-encoded data.
binary Message contains an un-encoded octet stream.
quoted-printable Message contents transformed to 7-bit US-ASCII using quoted-printable encoding algorithm.
base64 Message contents transformed to 7-bit US-ASCII using Base64 encoding algorithm.

Use ContentType ( 1541) to determine the MIME media family and subtype for a message.

See Also
TIdMessage.ContentType ( 1541)

TIdMessage.ContentType Property
Identifies the MIME media type for the message.

Pascal
property ContentType: string;
Description
ContentType is a String property that specifies the MIME media type and subtype for the message. ContentType is used to identify
and describe the data contained in the body of the message, and to fully specify the native representation (canonical form) of such
data.

ContentType allows a user agent to determine how to present data for the message. The ability to recognize the ContentType for
the message, and invoke the appropriate display process accordingly, will improve the readability of messages and allow the
exchange of messages containing mathematical symbols, or foreign language characters.

ContentType contains information about the media type, subtype, and optional parameter information in the following notation:

type/subtype; param=value
In general, the top-level media type is used to declare the general type of data, while the subtype specifies a specific format for that
type of data. An initial set of seven top-level media types are defined in RFC 2046, including:

Media Type
text
image
audio
video
application
message
multipart

Five of these are discrete types whose content is essentially opaque as far as MIME processing is concerned. The remaining two
are composite types whose contents require additional handling by MIME processors. This set of top-level media types is intended
to be substantially complete. It is expected that additions to the larger set of supported types can generally be accomplished by the
creation of new subtypes of these initial types. In the future, more top-level types may be defined.

Internet Direct (Indy) Version 10.1.5 1541


TIdMessage Class Classes

Parameters are modifiers of the media subtype, and do not fundamentally affect the nature of the content. The set of meaningful
parameters depends on the media type and subtype. Most parameters are associated with a single specific subtype. However, a
given top-level media type may define parameters which are applicable to any subtype of that type. The type, subtype, and
parameter names are not case sensitive. For example, TEXT, Text, and TeXt are all equivalent top-level media types. Parameter
values may be case sensitive, but sometimes are interpreted in a case-insensitive fashion, depending on the intended use. (For
example, multipart boundaries are case-sensitive, but the "access-type" parameter for message/External-body is not
case-sensitive.)

The default content type for RFC 2822 messages without a MIME Content-Type header are taken by this protocol to be plain text in
the US-ASCII character set, which can be explicitly specified as:

text/plain; charset=us-ascii
Use the CharSet ( 1539) property to indicate the character set required (or detected) for the message body. Use
ContentTransferEncoding ( 1540) to identify the encoding scheme for the message. For additional information on ContentType
values and their usage, please refer to the following Internet Standards and reference documents:

RFC 2822 - Standard for the Format of ARPA Internet Text Messages

RFC 1049 - Content-type header field for Internet messages.

RFC 1437 - The Extension of MIME Content-Types to a New Medium.

RFC 1896 - The text/enriched MIME Content-type.

RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies

RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types

RFC 2387 - The MIME Multipart/Related Content-type.

Internet Assigned Numbering Authority (IANA) Official Media Types

See Also
TIdMessage.ContentTransferEncoding ( 1540)

TIdMessage.CharSet ( 1539)

TIdMessage.ConvertPreamble Property
Indicates if a misplaced message body is converted prior to transmission.

Pascal
property ConvertPreamble: Boolean;
Description
ConvertPreamble is a Boolean property that indicates if a misplaced message body should be converted for multipart
MIME-encoded messages prior to sending the message using TIdMessageClient ( 1555).

ConvertPreamble is an attempt by the Indy developers to save the programmer from knowing some of the more intricate rules
about creating multipart MIME-encoded messages. For instance, a multipart MIME message is generally indicated by the following
property values:

Property Value
Encoding ( 1543) meMIME
ContentType ( 1541) 'multipart/alternative', 'multipart/related', 'multipart/mixed'

In this scenario, the Body ( 1538) in TIdMessage ( 1521) is not supposed to be used for text that represents a message body.
One or more TIdText ( 2404) instances are supposed to be created that represent each of the message bodies. The reason? The
TIdMessage.Body ( 1538) property is being populated during transmission with the MIME preamble represented by the
SThisIsMultiPartMessageInMIMEFormat resource string.

1542 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

In common usage, developers were creating message parts for some representations of message bodies and continuing to use
TIdMessage.Body ( 1538) as a message body as well. Rather than continually insisting that programmers learn the rules for
constructing multipart MIME messages, the Indy library has specified the ConvertPreamble property and implemented its use
during message transmission.

When ConvertPreamble contains True (and the preceeding criteria has been met), any non-blank value in the TIdMessage.Body (
1538) property is converted to a TIdText ( 2404) instance and stored as the initial item in the MessageParts ( 1548) property.
The TIdText ( 2404) instance is given the following property values:

Property Value
ContentType ( 1541) 'text/plain'
ContentTransfer '7bit'

If the default property values in the TIdText ( 2404) instance are not appropriate for your usage, create ( 267) a TIdText ( 2404)
in MessageParts ( 1548) with the correct values and remove the contents of TIdMessage.Body ( 1538) that triggers this action.

The default value for ConvertPreamble is True, as assigned in the ClearHeader ( 1525) method.

If you want to set your own preamble text rather than the default SThisIsMultiPartMessageInMIMEFormat, then put your preamble
text in Body ( 1538) and set ConvertPreamble to False.

ConvertPreamble is used in the TIdMessageClient.SendBody method.

TIdMessage.Date Property
The date a message was sent.

Pascal
property Date: TIdDateTime;
Description
Date is a TDateTime property that represents the TDateTime, expressed in the local timezone, when the message was sent.

For an incoming message, Date contains the value read from the RFC 2822 message header "Date:".

For an outgoing messsage, Date contains the value written to the RFC 2822 message header "Date:", or the current timestamp
when UseNowForDate ( 1554) is True.

See Also
TIdMessage.UseNowForDate ( 1554)

TIdMessage.Encoding Property
Identifies the encoding algorithm for message attachments.

Pascal
property Encoding: TIdMessageEncoding;
Description
Encoding is a TIdMessageEncoding ( 2968) property that represents the value to use for identifying the encoding algorithm for the
Body ( 1538) in the message. Encoding may contain one of the following values and meanings:

Value Meaning
meDefault Use the message encoding detected by Indy.
meMIME Use MIME encoding rules for the message content.
meUU Use UU-Encoding for the message content.

Internet Direct (Indy) Version 10.1.5 1543


TIdMessage Class Classes

meXX Use XX-Encoding for the message content.

When the value in Encoding is changed, the corresponding textual representation for the algortihm is stored in AttachmentEncoding
( 1536); for

Example

"MIME"
"UUE"
"XXE"

Encoding is used in GenerateHeader to ensure that ContentType and Charset reflect the values found in the body and attachments
stored in message parts.

The default value for Encoding is meDefault as assigned in the Create constructor.

See Also
TIdMessageEncoding ( 2968)

TIdMessage.ContentType ( 1541)

TIdMessage.CharSet ( 1539) TIdMessage.Body ( 1538)

TIdMessage.AttachmentEncoding ( 1536)

TIdMessage.ExceptionOnBlockedAttachments Property
Indicates if an exception occurs when a file-based attachment cannot be created in MessageParts ( 1548).

Pascal
property ExceptionOnBlockedAttachments: Boolean;
Description
ExceptionOnBlockedAttachments is a Boolean property used to indicate if an exception is raised when a file-based attachment
cannot be created in MessageParts ( 1548).

ExceptionOnBlockedAttachments is used when lading data into a TIdAttachmentFile ( 236) instance in message parts.

The default value for ExceptionOnBlockedAttachments is False as assigned during initialization of the component.

TIdMessage.ExtraHeaders Property
Additional headers for the message.

Pascal
property ExtraHeaders: TIdHeaderList;
Description
ExtraHeaders is a TIdHeaderList ( 1024) property used as a container for custom headers in the message.

ExtraHeaders is used to store header values for the message that are not represented as properties of TIdMessage ( 1521).
ExtraHeaders is generally used to store values that might be added by a Mail User Agent, or for custom extension tokens beginning
with "x-" as described in RFC 2822.

Use the Methods and Properties in TIdHeaderList ( 1024) to maintain the custom message headers. For example:
TIdHeaderList.Add, TIdHeaderList.Values ( 1030), TIdHeaderList.AddStdValues ( 1025).

When a message is sent using a protocol transport provider, like TIdSMTP ( 2017) or TIdNNTP ( 1692), values in ExtraHeaders
are merged with values in the Header property during transmission. The same action is performed when calling the SaveToFile (
1534) or SaveToStream ( 1535) methods.

ExtraHeaders is not used for messages received using a protocol transport provider, or when using the the LoadFromFile ( 1532)

1544 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

and LoadFromStream ( 1533) methods. Use the Headers ( 1546) property to access message headers in a received (or loaded)
message.

Example
(Delphi) Adding a custom message header.
IdMessage1.ExtraHeaders.Values['X-Newsreader'] := 'FooNews 1.0';
IdMessage1.ExtraHeaders.Add('X-Mailer: FooMail 1.0');
See Also
TIdMessage.GenerateHeader ( 1529)

TIdMessage.Headers ( 1546)

TIdHeaderList ( 1024)

TIdMessage.Flags Property
Represents mailbox message flags for the message.

Pascal
property Flags: TIdMessageFlagsSet;
Description
Flags is a TIdMessageFlagsSet ( 3059) property that represents state, visibility, and persistence information about a message.
Flags can used with components and protocols which provide access to and manuipulation of a mailbox address like TIdPOP3 (
1772), TTIdIMAP4, or TIdMailbox.

Flags may contain one or more of the enumerated values in TIdMessageFlags ( 2968).

See Also
TIdMessageFlagsSet ( 3059)

TIdPOP3 ( 1772)

TIdIMAP4 ( 1150)

TIdMailBox ( 1481)

TIdMessage.From Property
Identifies the original author of the message.

Pascal
property From: TIdEmailAddressItem;
Description
From is a TIdEMailAddressItem ( 641) property that identifies the original author of the message. From is updated using name
and address token values found in the RFC 2822 message header "From:" for received messages.

When creating a new message, values must be assigned to properties in the From component prior to transmission.

Use the following properties to get or set the values for the TIdEMailAddressItem ( 641):

From.Text
From.Name
From.Address

FromList ( 1546) is used when reading or writing the value for the From property. The From property accesses the initial
TIdEmailAddressItem address in the FromList ( 1546) property.

Internet Direct (Indy) Version 10.1.5 1545


TIdMessage Class Classes

From may not contain the same value as Sender ( 1553) when a message is forwarded.

See Also
TIdEMailAddressItem ( 641)

TIdMessage.Sender ( 1553)

TIdMessage.FromList ( 1546)

TIdMessage.FromList Property
List of original authors for the message.

Pascal
property FromList: TIdEmailAddressList;
Description
FromList is a TIdEmailAddressList property that represents the list of email addresses used in the "From ( 1545):" header for the
email message.

FromList identifies the original authors of the message. FromList is updated using name and address token values found in the
RFC 2822 message header "From ( 1545):" for received messages.

FromList is used when reading or writing the value for the From ( 1545) property. The From ( 1545) property accesses the initial
TIdEmailAddressItem address in the FromList property.

FromList is updated in ClearHeader ( 1525) and ProcessHeader.

See Also
From ( 1545)

ClearHeader ( 1525)

GenerateHeader ( 1529)

ProcessHeader

TIdMessage.Headers Property
Header values for the message.

Pascal
property Headers: TIdHeaderList;
Description
Headers is a read-only TIdHeaderList ( 1024) property used to store the header values for the message in their raw RFC
2822-compliant form. Headers is updated in AddHeader ( 1524) and ClearHeader ( 1525), when message properties
represented as header values are updated.

Headers is used during processing in ProcessHeader as the source for values stored in message properties. Headers is used to
store the property values for the message in GenerateHeader ( 1529).

Use ExtraHeaders ( 1544) to store and retrieve experimental (or custom) header values not represented as TIdMessage ( 1521)
properties.

See Also
TIdMessage.AddHeader ( 1524)

TIdMessage.ExtraHeaders ( 1544)

TIdMessage.ProcessHeaders ( 1534)

TIdMessage.GenerateHeader ( 1529)

TIdHeaderList ( 1024)

1546 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

TIdMessage.InReplyTo Property
Original message identifier for a response message.

Pascal
property InReplyTo: String;
Description
InReplyTo is a String property that represents the original message identifier for a response message. Reading or Writing the value
in InReplyTo forces "<" and ">" brackets to be added to the message identifier if they are not already present.

InReplyTo is used to provide the value for the "In-Reply-To:" RFC message header in GenerateHeader ( 1529).

TIdMessage.IsEncoded Property
Indicates when the message body is MIME-encoded.

Pascal
property IsEncoded: Boolean;
Description
IsEncoded is a Boolean property used to indicate that the message body is encoded with the scheme specified in
ContentTransferEncoding ( 1540).

When IsEncoded is True, use MessageParts ( 1548) to access the text of the message body. When IsEncoded is False, the
message body contains ASCII text and can be updated using Body ( 1538).

TIdMessage.IsMsgSinglePartMime Property
Indicates if a single message part exists for a MIME-encoded message.

Pascal
property IsMsgSinglePartMime: Boolean;
Description
IsMsgSinglePartMime is a Boolean property that indicates if a single message part exists for a MIME-encoded message.

IsMsgSinglePartMime is set to False in DetermineIfMsgIsSinglePartMime ( 1527) when any of the following conditions are met:

• Encoding ( 1543) <> meMIME


• MessageParts.Count <> 1
• IsBodyEmpty ( 1531) = False
See Also
DetermineIfMsgIsSinglePartMime ( 1527)

TIdMessage.LastGeneratedHeaders Property
Provides access to headers used during transmission of the mail message.

Pascal
property LastGeneratedHeaders: TIdHeaderList;
Description
LastGeneratedHeaders is a read-only TIdHeaderList ( 1024) property that represents the RFC message headers generated for
the message in the GenerateHeader ( 1529) method.

Internet Direct (Indy) Version 10.1.5 1547


TIdMessage Class Classes

LastGeneratedHeaders retains and allows access to a copy of the headers used during transmission of the mail message.

TIdMessage.MessageParts Property
List of message parts for the message.

Pascal
property MessageParts: TIdMessageParts;
Description
MessageParts is a TIdMessagePartsList used to store the TIdMessagePart ( 1614) components that make up the message.
MessageParts can contain two TIdMessagePart ( 1614) descendants: TIdText ( 2404) and TIdAttachment ( 227).

MessageParts is used when IsEncoded ( 1547) is set to True (on sending), or NoDecode ( 1549) is set to false for receiving.

TIdMessage.MIMEBoundary Property
Represents MIME boundary markers for the message.

Pascal
property MIMEBoundary: TIdMIMEBoundary;
Description
MIMEBoundary is a TIdMIMEBoundary ( 1629) property that represents the container for boundary marker strings and parent
message part identifiers used in the message.

MIMEBoundary contents are in reverse order of their usage in the message.

MIMEBoundary is updated when headers are processed from an incoming message, or when message parts are written to the
output stream by a message client.

See Also
TIdMIMEBoundary ( 1629)

TIdMessageClient ( 1555)

TIdMessage.MessageParts ( 1548)

TIdMessage.MsgId Property
Message identifier assigned to the message.

Pascal
property MsgId: string;
Description
MsgID is a String property that represents the unique message identifier for the message. MsgID contains the value from the RFC
2822 message header 'Message-Id:', as used in the NNTP protocol.

MsgID is normally assigned by the server that receives the message, and stored in the message when headers are processed
during receipt. A value assigned to MsgID prior to transmission is likely to be ignored on the server that receives the message.

Use UID ( 1553) to get the unique message identifer for POP3 and IMAP4 protocols.

See Also
UID ( 1553)

TIdMessage.NewsGroups Property
Identifies newsgroup to receive the message.

1548 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

Pascal
property NewsGroups: TIdStrings;
Description
NewsGroups is a TStrings property that is used to store the Newsgroup names where the message should be posted on an NNTP
server. Newsgroups is used to construct the value for the RFC message header 'Newsgroups:'.

Newsgroups is significant when the message is retrieved or posted using a NNTP client. NewsGroups has no relevance when
sending a message with the SMTP protocol.

TIdMessage.NoDecode Property
Requests a message in raw form.

Pascal
property NoDecode: Boolean;
Description
NoDecode is a Boolean property used to indicate that the message should be retrieved without decoding the contents of the
message. The default value of NoDecode is False.

When NoDecode is False, the message will be retrieved and added to MessageParts ( 1548) as text or attachments according to
their MIME content types and transfer encodings. There can be one or more MessageParts ( 1548) (TIdText ( 2404) type) added
for the message bodies, and additional MessagePart items (TIdAttachment ( 227) type) for each message attachment.

When NoDecode is True, the entire message will be retreived and stored in Body ( 1538) in its MIME-encoded form. No decoding
based on Content Types or Tranfer Encodings are performed for the message or attachments.

Example
(Delphi) Reading a message from a POP3 client.
AMsg.NoDecode := False;
APOP3.Retrieve(1, AMsg);

for i := 0 to Pred(AMsg.MessageParts.Count) do
begin
if (AMsg.MessageParts.Items[i] is TIdAttachment) then
begin
listviewAtt.Add(TIdAttachment(AMsg.MessageParts.Items[i]).Filename);
end

else
begin
if AMsg.MessageParts.Items[intIndex] is TIdText then
begin
memoBody.Lines.AddStrings(TIdText(AMsg.MessageParts.Items[i]).Body);
end;
end;
end;
See Also
TIdMessage.MessageParts ( 1548)

TIdMessage.Body ( 1538)

TIdText ( 2404)

TIdAttachment ( 227)

TIdMessage.NoEncode Property
Indicates if encoding can be omitted for Headers ( 1546) and Body ( 1538) prior to message transmission.

Internet Direct (Indy) Version 10.1.5 1549


TIdMessage Class Classes

Pascal
property NoEncode: Boolean;
Description
NoEncode is a Boolean property that indicates if encoding should be performed when sending message headers and other content.
NoEncode can be used when the TIdMessage ( 1521) instance has been loaded using values that have already been encoded, or
require no encoding prior to transmission.

The default value for NoEncode is ID_MSG_NODECODE ( 3576) as assigned in the Create ( 267) constructor.

NoEncode is used in TIdMessageClient.SendMsg ( 1560). When NoEncode is True, Headers ( 1546) and the optional Body (
1538) for the message will be written by the message client using WriteStrings.

When NoEncode is True, items in the MessageParts ( 1548) collection are not sent by the message client.

See Also
TIdMessage.Create ( 267)

TIdMessage.MessageParts ( 1548)

ID_MSG_NODECODE ( 3576)

TIdMessageClient.SendMsg ( 1560)

TIdMessage.Organization Property
Identifies the organizational affiliation for the message author.

Pascal
property Organization: string;
Description
Organization is a String property that identifies the organizational affiliation for the message author. Organization represents the
value used in the RFC 2822 message header "Organization:".

There are no validation constraints associated with the Organization property or the corresponding message header.

See Also
TIdMessage.From ( 1545)

TIdMessage.Sender ( 1553)

TIdMessage.Priority Property
Identifies the message priority.

Pascal
property Priority: TIdMessagePriority;
Description
Priority is a TIdMessagePriority ( 2970) property that describes the message priority. Priority can contain one of the following
values:

mpHighest
mpHigh
mpNormal
mpLow
mpLowest

1550 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

The default value for Priority is ID_MSG_PRIORITY ( 3576).

TIdMessage.ReceiptRecipient Property
Return receipt email address.

Pascal
property ReceiptRecipient: TIdEmailAddressItem;
Description
ReceiptRecipient is a TIdEMailAddressItem ( 641) property used to identify the address where a return receipt for the message
should be delivered. The values in ReceiptRecipient are used in the RFC 2822 message header "Disposition-Notification-To:". A
blank value in ReceiptRecipient indicates that a return receipt is not desired.

Use the following properties to get or set the values for the TIdEMailAddressItem ( 641):

ReceiptRecipient.Text
ReceiptRecipient.Name
ReceiptRecipient.Address

Including an email address in ReceiptRecipient does not guarantee that a receipt notice will be generated when the message is
received; the recipient can always cancel the request.

See Also
TIdMessage.Sender ( 1553)

TIdMessage.From ( 1545)

TIdEMailAddressItem ( 641)

TIdMessage.Recipients Property
Identifies the recipients of a message.

Pascal
property Recipients: TIdEmailAddressList;
Description
Recipients is a TIdEMailAddressList ( 647) property used to store a collection of TIdEmailAddressItem values that identify the
recipients of the message. Recipients contains email addresses receiving the message as indicated in the RFC 2822 message
header "To:".

Use the EmailAddresses property in Recipients to get/set a delimited list of all email addresses in the collection. Use methods in
Recipients like Add, Insert, or Delete to maintain individual email addresses in the collection.

Use CCList ( 1538) to indicate email addresses receiving a Carbon Copy of the message. Use BCCList to indicate email
addresses receiving a Blind Carbon Copy of the message.

Example
(Delphi) Updating a list of recipient email addresses
// method One
AMessage.Recipients.EmailAddresses :=
'"John Doe" <jdoe@some.net>, ' +
'"Jane Doe" <janed@another.net>';

// method Two
with AMessage.Recipients.Add do
begin
Name := 'John Doe';

Internet Direct (Indy) Version 10.1.5 1551


TIdMessage Class Classes

Address := 'jdoe@some.net';
end;

with AMessage.Recipients.Add do
begin
Name := 'Jane Doe';
Address := 'janed@another.net';
end;

// method Three
with AMessage.Recipients.Add do
Text := '"John Doe" ';

with AMessage.Recipients.Add do
Text := '"Jane Doe" ';
See Also
TIdEMailAddressList ( 647)

TIdEMailAddressItem ( 641)

TIdMessage.CCList ( 1538)

TIdMessage.BccList ( 1537)

TIdMessage.References Property
Identifies the reply-to messages.

Pascal
property References: string;
Description
References is a String property that contains a list of message identifiers for which the message is a reply. References contains the
value for the RFC 2822 message header 'References:'.

References is used by NNTP newsreader applications to create ( 267) a threaded article display.

TIdMessage.ReplyTo Property
Identifies the delivery address for message replies.

Pascal
property ReplyTo: TIdEmailAddressList;
Description
ReplyTo is a TIdEmailAddressItem property that specifies the email address where replies to this message should be delivered.
ReplyTo is used when the delivery address is different than the values in the the From ( 1545) property. ReplyTo contains values
used in the RFC 2822 message header "Reply-To:".

Use the following properties to get or set the values for the TIdEMailAddressItem ( 641):

ReplyTo.Text
ReplyTo.Name
ReplyTo.Address

Use ReceiptRecipient ( 1551) to indicate the address to use for delivery receipt notifications.

See Also
TIdEMailAddressItem ( 641)

TIdMessage.From ( 1545)

1552 Internet Direct (Indy) Version 10.1.5


Classes TIdMessage Class

TIdMessage.Sender ( 1553)

TIdMessage.ReceiptRecipient ( 1551)

TIdMessage.Sender Property
Identifies the sender of the message.

Pascal
property Sender: TIdEmailAddressItem;
Description
Sender is a TIdEMailAddressItem ( 641) property used to indicate the person sending the message. Sender is normally used
when a message has been forwarded from a person who is not the original message author. Sender contains the value from the
RFC 2822 message header "Sender:".

Use the following properties to get or set the values for the TIdEMailAddressItem ( 641):

Sender.Text
Sender.Name
Sender.Address

Use From ( 1545) or FromList ( 1546) to access the original author(s) of the message.

See Also
TIdEMailAddressItem ( 641)

TIdMessage.From ( 1545)

TIdMessage.FromList ( 1546)

TIdMessage.Subject Property
Identifies the subject for the message.

Pascal
property Subject: string;
Description
Subject is a String property that identifies the subject for the message. Subject contains the value for the RFC 2822 message
Header "Subject:".

Set the value in Subject, along with Recipients ( 1551), CCList ( 1538), and BccList ( 1537), prior to sending or posting the
message.

See Also
TIdMessage.Headers ( 1546)

TIdMessage.UID Property
Unique Identifier for a message.

Pascal
property UID: String;
Description
UID is a String property that represents the Unique Identifier message attribute assigned to a message in mail-related protocols like
IMAP4 and POP3. The content and format of UID is based on requirements in the mail protocol.

Internet Direct (Indy) Version 10.1.5 1553


TIdMessage Class Classes

For messages retrieved using TIdIMAP4 ( 1150), UID will contain the string representation of the persistent 32-bit integer value
stored in mailbox data associated with the message envelope. The value in UID is assigned when a message instance is created
and updated in the message collection used in TIdIMAP4.UIDRetrieveAllEnvelopes ( 1215).

For messages retrieved using TIdPOP3 ( 1772), UID may contain the arbitrary 70-byte value (maximum) which identifies a
message in the POP3 maildrop. In POP3, individual byte values in UID must be in the range 0x21 to 0x7E.

Messages marked as deleted in the POP3 maildrop are not returned with a UID value.

See Also
TIdIMAP4 ( 1150)

TIdPOP3 ( 1772)

TIdMessage.UseNowForDate Property
Indicates that the message uses the current date and time when sent.

Pascal
property UseNowForDate: Boolean;
Description
UseNowForDate is a Boolean property that indicates the message should use the current date and time in the Date ( 1543)
property when the message is sent to the server.

Assigning a non-empty TDateTime value to the Date ( 1543) property in the message cause UseNowFOrDate to return False.

The default value for UseNowForDate is ID_MSG_USENOWFORDATE.

UseNowForDate is used in GenerateHeader ( 1529) to determine if the current date and time are assigned for the message Date
( 1543) when UseNowForDate contains true.

When UseNowForDate contains False, the value in the Date ( 1543) property is used in the headers for the message. This usage
is most common when loading previously transmitted messages for relay.

See Also
Date ( 1543)

GenerateHeader ( 1529)

TIdMessage Events
The Events of the TIdMessage class are listed here.

Events
Event Description
OnCreateAttachment ( 1554) Event handler triggered to create ( 267) a new attachment for the message.
OnInitializeISO ( 1555) Event triggered to maintain content transfer encoding, header encoding, and character set used for the mail
message.

Legend
Event

TIdMessage.OnCreateAttachment Event
Event handler triggered to create ( 267) a new attachment for the message.

Pascal
property OnCreateAttachment: TIdCreateAttachmentEvent;

1554 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageClient Class

Description
OnCreateAttachment is an TIdCreateAttachmentEvent ( 3016) property that represents the event handler signalled when creating
an attachment for the message.

OnCreateAttachment allows the message instance to control the mechanism used for creating attachments in the message during
processing in TIdMessageClient.ReceiveBody.

OnCreateAttachment can be used to create ( 267) a TIdAttachmentFile ( 236) or TIdAttachmentMemory ( 244) instance, as
required, and to set the headers for the attachment as detected using TIdMessageDecoder ( 1563) in
TIdMessageClient.ReceiveBody.

Applications must assign a procedure to the event handler property to allow responding to the event notification. When the event
handler is unassigned, or the attachment returned by the event handler is unassigned, the CreateAttachmentClass property is used
to create ( 267) a new attachment.

See Also
TIdMessage.CreateAttachmentClass

TIdMessage.MessageParts ( 1548)

TIdMessageClient.ReceiveBody

TIdMessageDecoder ( 1563)

TIdMessage.OnInitializeISO Event
Event triggered to maintain content transfer encoding, header encoding, and character set used for the mail message.

Pascal
property OnInitializeISO: TIdInitializeIsoEvent;
Description
OnInitializeISO is a TIdInitializeIsoEvent ( 3037) property that represents the event handler triggered when the content transfer,
header and language encodings are determined for mail message prior to encoding for transmission.

OnInitializeISO allows the application to set parameter values in the event notification.

The initial parameter values are assigned in TIdMessage.InitializeISO ( 1530). The transfer encoding for the message is set to
8-bit encoding. The header encoding defaults to base64. The default character sets is set to the value indicated in IdCharsetNames
( 3825) using IdGetDefaultCharSet ( 2817).

OnInitializeISO can be used to override these default settings.

Applications must assign a procedure to the event handler to allow responding to the event notification.

See Also
TIdMessage.InitializeISO ( 1530)

TIdMessage.GenerateHeader ( 1529)

IdCharsetNames ( 3825)

IdGetDefaultCharSet ( 2817)

TIdMessageClient Class
Implements an Internet Message Format client.

File
IdMessageClient ( 4683)

Internet Direct (Indy) Version 10.1.5 1555


TIdMessageClient Class Classes

Hierarchy

Pascal
TIdMessageClient = class(TIdExplicitTLSClient);
Description
TIdMessageClient is a TIdTCPClientCustom ( 2340) descendant that implements a generic Internet Message Format client.
TIdMessageClient can read and write Internet messages compliant with the RFC 2822 message specification, as described in the
Internet Standards document:

RFC 2822 - Internet Message Format

TIdMessageClient provides methods and properties needed to handle transmission and receipt of both the headers and the body
for an Internet message, including line folding. TIdMessageClient also implements message processing methods used to convert
the RFC 2822 header values in a message to properties in a TIdMessage ( 1521) instance.

TIdMessageClient is the ancestor for classes that implement support for specific transport protocols like IMAP4, POP3, NNTP, and
SMTP.

See Also
TIdTCPClientCustom ( 2340) TIdExplicitTLSClient ( 687) TIdIMAP4 ( 1150) TIdNNTP ( 1692) TIdPOP3 ( 1772)
TIdSMTPBase ( 2028) IndySupport ( 15)

TIdMessageClient Members
The following tables list the members exposed by TIdMessageClient.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 690)
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
MsgLineFold ( 1561) Identifies the line folding character sequence for the message client.
MsgLineLength ( 1561) Maximum line length.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.

1556 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageClient Class

CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.


Connect ( 689)
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 1557) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
SendMsg ( 1560) Sends message headers and body content on the client connection.
CType ( 267)
Create ( 1274)
ProcessMessage ( 1558)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 691)

Legend
Method
virtual
Property
read only
Event

TIdMessageClient Methods
The Methods of the TIdMessageClient class are listed here.

Methods
Method Description
Destroy ( 1557) Frees the object instance.
ProcessMessage ( 1558)
SendMsg ( 1560) Sends message headers and body content on the client connection.

Legend
Destructor
virtual

TIdMessageClient.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;

Internet Direct (Indy) Version 10.1.5 1557


TIdMessageClient Class Classes

Description
Destroy is the overridden destructor for the object instance.

TIdMessageClient.ProcessMessage Method
Overload List

Method Description
TIdMessageClient.ProcessMessage Receives and processes message headers and contents into a TIdMessage (
(TIdMessage, Boolean) ( 1558) 1521) instance.
TIdMessageClient.ProcessMessage Receives and processes message headers and contents into a TIdMessage (
(TIdMessage, string, Boolean) ( 1559) 1521) instance.
TIdMessageClient.ProcessMessage Receives and processes message headers and contents into a TIdMessage (
(TIdMessage, TIdStream, Boolean) ( 1521) instance.
1558)

TIdMessageClient.ProcessMessage Method (TIdMessage, Boolean)


Receives and processes message headers and contents into a TIdMessage ( 1521) instance.

Pascal
procedure ProcessMessage(
AMsg: TIdMessage;
AHeaderOnly: Boolean = False
); overload;
Parameters
Parameters Description
AMsg Message to receive header and contents.
AHeaderOnly Retrieve message headers only. Default is False.

Description
ProcessMessage is an overloaded method in TIdMessageClient ( 1555) that implements receiving and processing of message
headers and contents from a file with the contents of the Internet message.

ProcessMessage ensures that the IOHandler ( 2364) for the message client is assigned and initialized for the operation.

The default implementation of ProcessMessage uses the IOHandler ( 2364) assigned to the client to receive the header and
optional body of the message, and stores data in the message instance specified in AMsg.

AHeaderOnly indicates that the message client will retrieve only the headers for the message, and will not populate the contents of
the message body. The default behavior (when AHeaderOnly is False) is to retrieve the entire message including both header and
body contents.

ProcessMessage does not make any assumptions about the contents of the TIdMessage ( 1521) instance in AMsg. In other
words, ProcessMessage does not call TIdMessage.Clear ( 1525) before receiving header or body content. The application must
call TIdMessage.Clear ( 1525) when reusing a TIdMessage ( 1521) instance for message retrieval.

See Also
TIdMessageClient.ProcessMessage TIdIOHandler ( 1284) TIdIOHandlerSocket ( 1331) TIdIOHandlerStream ( 1348)
TIdMessage ( 1521)

TIdMessageClient.ProcessMessage Method (TIdMessage, TIdStream, Boolean)


Receives and processes message headers and contents into a TIdMessage ( 1521) instance.

Pascal
procedure ProcessMessage(
AMsg: TIdMessage;

1558 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageClient Class

AStream: TIdStream;
AHeaderOnly: Boolean = False
); overload;
Parameters
Parameters Description
AMsg Message to receive header and contents.
AStream Stream containing headers and contents to be loaded.
AHeaderOnly Retrieve message headers only. Default is False.

Description
ProcessMessage is an overloaded method in TIdMessageClient ( 1555) that implements receiving and processing of message
headers and contents from a file with the contents of the Internet message.

ProcessMessage ensures that the IOHandler ( 2364) for the message client is assigned and initialized for the operation.

The stream-based variant of ProcessMessage creates a TIdIOHandlerStream ( 1348) instance that can be used to load data from
the stream specified in AStream into the message specified in AMsg. The IOHandler ( 2364) is opened prior to receiving the
headers or body content in the Internet message. The TIdIOHandlerStream ( 1348) instance is freed prior to exiting from the
method.

AHeaderOnly indicates that the message client will retrieve only the headers for the message, and will not populate the contents of
the message body. The default behavior (when AHeaderOnly is False) is to retrieve the entire message including both header and
body contents.

ProcessMessage does not make any assumptions about the contents of the TIdMessage ( 1521) instance in AMsg. In other
words, ProcessMessage does not call TIdMessage.Clear ( 1525) before receiving header or body content. The application must
call TIdMessage.Clear ( 1525) when reusing a TIdMessage ( 1521) instance for message retrieval.

See Also
TIdMessageClient.ProcessMessage

TIdIOHandler ( 1284)

TIdIOHandlerSocket ( 1331)

TIdIOHandlerStream ( 1348)

TIdMessage ( 1521)

TIdMessageClient.ProcessMessage Method (TIdMessage, string, Boolean)


Receives and processes message headers and contents into a TIdMessage ( 1521) instance.

Pascal
procedure ProcessMessage(
AMsg: TIdMessage;
const AFilename: string;
AHeaderOnly: Boolean = False
); overload;
Parameters
Parameters Description
AMsg Message to receive header and contents.
AFilename File name containing the contents of the headers and body for the message.
AHeaderOnly Retrieve message headers only. Default is False.

Description
ProcessMessage is an overloaded method in TIdMessageClient ( 1555) that implements receiving and processing of message
headers and body contents from a file containing the Internet message.

ProcessMessage ensures that the IOHandler ( 2364) for the message client is assigned and initialized for the operation.

The file-based variant of ProcessMessage creates a TFileStream used to access message data in the file specified by AFilename,
and calls the stream-based variant of ProcessMessage to load message data into AMsg. The TFileStream instance is freed prior to

Internet Direct (Indy) Version 10.1.5 1559


TIdMessageClient Class Classes

exiting from the method.

AHeaderOnly indicates that the message client will retrieve only the headers for the message, and will not populate the contents of
the message body. The default behavior (when AHeaderOnly is False) is to retrieve the entire message including both header and
body contents.

ProcessMessage does not make any assumptions about the contents of the TIdMessage ( 1521) instance in AMsg. In other
words, ProcessMessage does not call TIdMessage.Clear ( 1525) before receiving header or body content. The application must
call TIdMessage.Clear ( 1525) when reusing a TIdMessage ( 1521) instance for message retrieval.

See Also
TIdMessageClient.ProcessMessage TIdIOHandler ( 1284) TIdIOHandlerSocket ( 1331) TIdIOHandlerStream ( 1348)
TIdMessage ( 1521)

TIdMessageClient.SendMsg Method
Sends message headers and body content on the client connection.

Pascal
procedure SendMsg(
AMsg: TIdMessage;
AHeadersOnly: Boolean = False
); virtual; overload;
Parameters
Parameters Description
AMsg Message to be sent by the client.
AHeaderOnly Client will write only headers. Default value is False.

Description
SendMsg is a virtual procedure in TIdMessageClient ( 1555) that performs the processing required to send the RFC
2822-compliant message headers and optional message parts from the message specified in AMsg using the message client.

SendMsg writes the RFC 2822-compliant message headers in AMsg. When AHeaderOnly is False, SendMsg also sends the
contents of the message body or message parts.

When the message instance in AMsg indicates that encoding is not required (it has already been encoded using another method)
values in the headers and optional body or message parts are written directly to the IOHandler ( 2364). Otherwise all values in the
message are encoded using the content encoding, transfer encoding, and character set indicated in the message instance.

Descendant classes may override the default SendMsg behavior to implement protocol specific message transmission
requirements.

See Also
TIdMessage.NoEncode ( 1549) TIdMessage.CharSet ( 1539) TIdMessage.ContentTransferEncoding ( 1540)
TIdMessage.Encoding ( 1543) TIdMessage.Body ( 1538) TIdMessage.MessageParts ( 1548) TIdIOHandler ( 1284)

TIdMessageClient Properties
The Properties of the TIdMessageClient class are listed here.

Properties
Property Description
MsgLineFold ( 1561) Identifies the line folding character sequence for the message client.
MsgLineLength ( 1561) Maximum line length.

Legend
Property

1560 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageCollection Class

TIdMessageClient.MsgLineFold Property
Identifies the line folding character sequence for the message client.

Pascal
property MsgLineFold: string;
Description
MsgLineFold is a String property that identifies the line folding character sequence inserted at the beginning of a folded line in the
message client.

The default value for MsgLineFold is TAB ( 4393), as assigned during initialization of the component.

See Also
TAB ( 4393) MsgLineLength ( 1561)

TIdMessageClient.MsgLineLength Property
Maximum line length.

Pascal
property MsgLineLength: integer;
Description
MsgLineLength is an Integer property that specifies the maximum length of a header line. If the length is exceeded, the header line
is folded by inserting a new line and the MsgLineFold ( 1561) character sequence during transmission of an Internet message.

The default value for MsgLineLength is 79, as assigned during initialization of the component.

See Also
MsgLineFold ( 1561)

TIdMessageCollection Class
Implements a collection for Indy messages.

File
IdMessageCollection ( 4688)

Hierarchy

Pascal
TIdMessageCollection = class(TIdCollection);
Description
TIdMessageCollection is a TCollection descendant that implements a container for TIdMessageItem ( 1611) object instances.
TIdMessageCollection is the type used for the TIdMailbox.MessageList property, and for arguments used when retrieving
messages and headers using an IMAP4 client.

TIdMessageCollection enhances the ancestor class by ensuring that collection items added to the container are TIdMessageItem
( 1611) instances.

TIdMessageCollection extends the ancestor class by providing indexed access to TIdMessage ( 1521) instances in the container
using the Messages ( 1563) property.

Internet Direct (Indy) Version 10.1.5 1561


TIdMessageCollection Class Classes

See Also
TIdMessage ( 1521)

TIdMessageItem ( 1611)

TIdMessageCollection.Add ( 1562)

TIdMessageCollection.Messages ( 1563)

TIdMessageCollection Members
The following tables list the members exposed by TIdMessageCollection.

Properties
Property Description
Messages ( 1563) Provides indexed access to a message item in the collection.

Methods
Method Description
Add ( 1562) Adds new message items to the collection.

Legend
Method
Property

TIdMessageCollection Methods
The Methods of the TIdMessageCollection class are listed here.

Methods
Method Description
Add ( 1562) Adds new message items to the collection.

Legend
Method

TIdMessageCollection.Add Method
Adds new message items to the collection.

Pascal
function Add: TIdMessageItem;
Returns
TIdMessageItem ( 1611) - new collection item added to the collection.

Description
Add is an overridden TIdMessageItem ( 1611) function that creates new items in the collection.

Add ensures that collection items are cast to a TIdMessageItem ( 1611) instance after calling the inherited Add method.

The return value for the method is the TIdMessageItem ( 1611) added to the collection.

See Also
TIdMessageItem ( 1611)

1562 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoder Class

TIdMessageCollection Properties
The Properties of the TIdMessageCollection class are listed here.

Properties
Property Description
Messages ( 1563) Provides indexed access to a message item in the collection.

Legend
Property

TIdMessageCollection.Messages Property
Provides indexed access to a message item in the collection.

Pascal
property Messages [index: Integer]: TIdMessage;
Description
Messages is an Integer indexed TIdMessage ( 1521) property that provides access to the TIdMessage ( 1521) contained in a
collection item. Index values must be in the range 0 to Count-1.

Messages is the default property for the collection.

The following statements are equivalent, and return the same TIdMessage ( 1521) instance from the collection:

// AMailbox: TIdMailbox
MAgent.RenderPreview(AMailbox.MessageList.Messages[i]);
MAgent.RenderPreview(AMailbox.MessageList[i]);
See Also
TIdMessage ( 1521)

TIdMessageItem ( 1611)

TIdMailbox.MessageList

TIdMessageDecoder Class
Implements a decoder for RFC-2822 compliant message parts.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageDecoder = class(TIdComponent);
Description
TIdMessageDecoder is a TIdComponent ( 355) descendant that implements a decoder for RFC-2822 compliant message parts.

TIdMessageDecoder provides properties and methods used to read and process RFC message headers and body lines from a
TStream descendant.

TIdMessageDecoder is a base class that establishes the framework for Indy message decoders. TIdMessageDecoder
descendants, like TIdMessageDecoderMIME ( 1579) and TIdMessageDecoderUUE ( 1584), further refine the message decoder

Internet Direct (Indy) Version 10.1.5 1563


TIdMessageDecoder Class Classes

framework by implementing support for encoding schemes for message parts.

TIdMessageDecoder and descendant classes are used when TIdMessageClient ( 1555) (or a descendant like TIdIMAP4 (
1150)) needs to decode message parts during receipt of the body for a message.

See Also
TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderXXE

TIdMessageDecoderQuotedPrintable

IndySupport ( 15)

TIdMessageDecoder Members
The following tables list the members exposed by TIdMessageDecoder.

Properties
Property Description
Filename ( 1567) Represents the file name for storing RFC-2822 message attachments.
FreeSourceStream ( 1567) Indicates if the stream passed to the message decoder should be freed in the destructor.
Headers ( 1568) Represents the RFC message headers in an RFC-2822 compliant message part .
PartType ( 1568) Represents the type for an RFC message part.
SourceStream ( 1569) Providess access to a RFC-822 message as a stream construct.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1565) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReadBody ( 1565) Specifies the message decoder method used to extract an RFC-2822 message body.
ReadHeader ( 1566) Specifies the method used to read an RFC message body.
ReadLn ( 1566) Reads a line from an RFC message part.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageDecoder Methods
The Methods of the TIdMessageDecoder class are listed here.

1564 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoder Class

Methods
Method Description
Destroy ( 1565) Frees the object instance.
ReadBody ( 1565) Specifies the message decoder method used to extract an RFC-2822 message body.
ReadHeader ( 1566) Specifies the method used to read an RFC message body.
ReadLn ( 1566) Reads a line from an RFC message part.

Legend
Destructor
virtual
abstract

TIdMessageDecoder.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance.

Destroy frees and releases resources allocated to the Headers ( 1568) and SourceStream ( 1569) properties.

Destroy calls the the inherited Destroy method prior to exit.

See Also
TIdMessageDecoder.Headers ( 1568)

TIdMessageDecoder.SourceStream ( 1569)

TIdMessageDecoder.ReadBody Method
Specifies the message decoder method used to extract an RFC-2822 message body.

Pascal
function ReadBody(
ADestStream: TIdStream;
var AMsgEnd: Boolean
): TIdMessageDecoder; virtual; abstract;
Parameters
Parameters Description
ADestStream Stream where message body content will be stored.
AMsgEnd Indicates the end of the message was encountered.

Returns
TIdMessageDecoder ( 1563) - Message decoder used to process the message part.

Description
ReadBody is an abstract virtual function in TIdMessageDecoder ( 1563) that Specifies the method used to extract an RFC-2822
message body in TIdMessageDecoder ( 1563) descendants to the stream specified in ADestStream.

AMsgEnd is a variable parameter that indicates the end of the message was encountered while reading the body of the message or
message part.

TIdMessageDecoder ( 1563) descendants must re-implement the ReadBody method to provide support for the appropriate
encoding algorithm and/or processing based on specific RFC message header values.

See Also
TIdMessageDecoderMIME ( 1579)

Internet Direct (Indy) Version 10.1.5 1565


TIdMessageDecoder Class Classes

TIdMessageDecoderMIME.ReadBody ( 1581)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderUUE.ReadBody ( 1585)

TIdMessageDecoderXXE

TIdMessageDecoderXXE.ReadBody

TIdMessageDecoder.ReadHeader ( 1566)

TIdMessageDecoder.ReadHeader Method
Specifies the method used to read an RFC message body.

Pascal
procedure ReadHeader; virtual;
Description
ReadHeader is a virtual procedure in TIdMessageDecoder ( 1563) that specifies the method used to read an RFC-2822 compliant
message body. TIdMessageDecoder ( 1563) descendants, like TIdMessageDecoderMIME ( 1579) and
TIdMessageDecoderUUE ( 1584), must override ReadHeader to implement storage of parsed header names and values in
message Headers ( 1568).

ReadHeader must also update PartType ( 1568) based on header values specific to the message decoder class. Additional
properties in a descendant class may also require updates based on values detected in Header.

See Also
TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderXXE

TIdMessageDecoderQuotedPrintable

TIdMessageDecoder.Headers ( 1568)

TIdMessageDecoder.PartType ( 1568)

TIdMessageDecoder.ReadLn Method
Reads a line from an RFC message part.

Pascal
function ReadLn(
const ATerminator: string = LF
): string;
Parameters
Parameters Description
ATerminator Default value is LF ( 4341).

Returns
String - Line read from the message part.

Description
ReadLn is a String function in TIdMessageDecoder ( 1563) that reads a single line from an RFC-2822 compliant message part.
ReadLn uses SourceStream ( 1569), cast to a TIdStream ( 3087) instance, as the origin of data for the TIdStream.ReadLn
method.

The return value for ReadLn can be an empty string ("") when the line from SourceStream ( 1569) consists only of a line
termination character sequence, or the end of SourceStream ( 1569) has been reached.

1566 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoder Class

See Also
TIdStream ( 3087)

TIdStream.ReadLn

TIdMessageDecoder Properties
The Properties of the TIdMessageDecoder class are listed here.

Properties
Property Description
Filename ( 1567) Represents the file name for storing RFC-2822 message attachments.
FreeSourceStream ( 1567) Indicates if the stream passed to the message decoder should be freed in the destructor.
Headers ( 1568) Represents the RFC message headers in an RFC-2822 compliant message part .
PartType ( 1568) Represents the type for an RFC message part.
SourceStream ( 1569) Providess access to a RFC-822 message as a stream construct.

Legend
Property
read only

TIdMessageDecoder.Filename Property
Represents the file name for storing RFC-2822 message attachments.

Pascal
property Filename: string;
Description
Filename is a read-only String property that represents the file name for an attachment in a RFC-2822 compliant message part.
Filename is used by TIdMessageDecoder ( 1563) descendants, like TIdMessageDecoderMIME ( 1579),
TIdMessageDecoderUUE ( 1584), and TIdMessageDecoderUUE ( 1584).

See Also
TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoder.FreeSourceStream Property
Indicates if the stream passed to the message decoder should be freed in the destructor.

Pascal
property FreeSourceStream: Boolean;
Description
FreeSourceStream is a Boolean property that indicates if TIdStream ( 3087) instances passed to the message decoder should be
freed in the destructor for the object instance.

Set FreeSourceStream to True allow freeing the source stream in the Destroy ( 1565) method, as opposed to setting its value to
Nil.

The default value for FreeSourceStream is True, as assigned during initialization of the component.

Internet Direct (Indy) Version 10.1.5 1567


TIdMessageDecoder Class Classes

TIdMessageDecoder.Headers Property
Represents the RFC message headers in an RFC-2822 compliant message part .

Pascal
property Headers: TIdStrings;
Description
Headers is a read-only TStrings property that represents the RFC message headers in an RFC-2822 compliant message part.
Headers is used by TIdMessageDecoder ( 1563) descendants to store the header values parsed from the message part.

Headers will contain a TStrings representation of header names and values that orignate in RFC-2822 form. For example, the
following RFC-2822 message header is stored in Headers in the following form:

RFC-2822 Message Header Content-Transfer-Encoding: base64


Header representation Content-Transfer-Encoding=base64

Use TStrings methods and properties to access Header values in TIdMessageDecoder ( 1563).

Example
AMsgDecoder.Headers.Add('x-custom-header=somevalue');
AMsgDecoder.Headers.Values['content-disposition'] := 'inline';
iPos := AMsgDecoder.Headers.IndexOf('content-type');
See Also
TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoder.PartType Property
Represents the type for an RFC message part.

Pascal
property PartType: TIdMessageCoderPartType;
Description
PartType is a read-only TIdMessageCoderPartType ( 2967) property that represents the message part type detected for an
RFC-822 compliant message part.

PartType is used in TIdMessageDecoder ( 1563) descendants, like TIdMessageDecoderMIME ( 1579),


TIdMessageDecoderUUE ( 1584), and TIdMessageDecoderUUE ( 1584).

PartType is updated when ReadHeader ( 1566) is called to extract the RFC message headers in a message part. PartType is
used in ReadBody ( 1565) to determine the TIdDecoder ( 530) descendant that will be needed to process the message part.

See Also
TIdMessageCoderPartType ( 2967)

TIdMessageDecoder ( 1563)

TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoder.ReadHeader ( 1566)

TIdMessageDecoder.ReadBody ( 1565)

1568 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderInfo Class

TIdMessageDecoder.SourceStream Property
Providess access to a RFC-822 message as a stream construct.

Pascal
property SourceStream: TIdStream;
Description
SourceStream is a TStream property in TIdMessageDecoder ( 1563) that provides access to the contents of an RFC-2822
message part. SourceStream is used in the ReadLn ( 1566) and ReadLnSplit methods to retrieve a single line from the RFC
2822-compliant message part.

Applications are responsible for creating and assigning the TStream instance for the SourceStream property. SourceStream is freed
in the Destroy ( 1565) method.

See Also
TIdMessageDecoder.ReadLn ( 1566)

TIdMessageDecoder.ReadLnSplit

TIdMessageDecoder.Destroy ( 1565)

TIdMessageDecoderInfo Class
Represents information about registered decoder classes and detects coder usage for message part contents.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageDecoderInfo = class;
Description
TIdMessageDecoderInfo is a TObject descendant that specifies the base class for representing information about registered
decoder classes. TIdMessageDecoderInfo also provides a mechanism to detect when a decoder is suitable for use in decoding the
contents of a message part, and returns a reference to the decoder class.

All methods in TIdMessageDecoderInfo are virtual. Descendant classes, like TIdMessageDecoderInfoMIME ( 1571) and
TIdMessageDecoderInfoUUE ( 1573), should implement the constructor and pertinent methods to provide support for specific
encoding algorithms.

Instances of TIdMessageDecoderInfo and descendant classes are stored in a global TIdMessageDecoderList ( 1575) variable to
indicate that the decoder class is registered and available for use with message parts.

See Also
TIdMessageDecoderInfoMIME ( 1571)

TIdMessageDecoderInfoUUE ( 1573)

TIdMessageDecoderList ( 1575)

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 1569


TIdMessageDecoderInfo Class Classes

TIdMessageDecoderInfo Members
The following tables list the members exposed by TIdMessageDecoderInfo.

Methods
Method Description
CheckForStart ( 1570) Specifies a method for retrieving a decoder class instance, and associating the decoder with a given message.
Create ( 1571) Constructor for the object instance.

Legend
Method
abstract
virtual

TIdMessageDecoderInfo Methods
The Methods of the TIdMessageDecoderInfo class are listed here.

Methods
Method Description
CheckForStart ( 1570) Specifies a method for retrieving a decoder class instance, and associating the decoder with a given message.
Create ( 1571) Constructor for the object instance.

Legend
Method
abstract
virtual

TIdMessageDecoderInfo.CheckForStart Method
Specifies a method for retrieving a decoder class instance, and associating the decoder with a given message.

Pascal
function CheckForStart(
ASender: TIdMessage;
const ALine: string
): TIdMessageDecoder; virtual; abstract;
Parameters
Parameters Description
ASender Message associated with the decoder instance.
ALine Encoded message part content to be examined to determine the appropriate decoder class.

Returns
TIdMessageDecoder ( 1563) - Decoder class instance to use for the message part.

Description
CheckForStart is an abstract virtual function in TIdMessageDecoderInfo ( 1569) that specifies a method for retrieving a decoder
class instance, and associating the decoder class instance with a specific message.

ASender is the TIdMessage ( 1521) to be associated with the decoder class instance.

ALine is a line from the message part that will be examined to determine if the registered decoder can be used for decoding the
message part.

Descendant classes, like TIdMessageDecoderInfoMIME ( 1571) and TIdMessageDecoderInfoUUE ( 1573), must implement
comparisons to determine if ALine contains a marker signifying the start of a block using the specific encoding algorithm. If ALine
contains the appropriate signature, a message decoder instance is created for ASender in the function return value. Otherwise the
function return value is Nil.

1570 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderInfoMIME Class

See Also
TIdMessageDecoderInfoMIME ( 1571)

TIdMessageDecoderInfoUUE ( 1573)

TIdMessage ( 1521)

TIdMessageDecoder ( 1563)

TIdMessageDecoderMIME ( 1579)

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; virtual;
Description
Create is the constructor for the object instance. Create is a virtual constructor that can be re-implemented in descendant classes to
provide the capability needed for the derived class instance.

See Also
TIdMessageDecoderInfoMIME ( 1571)

TIdMessageDecoderInfoUUE ( 1573)

TIdMessageDecoderInfoMIME Class
Represents a registered decoder class and detects the decoder boundary marker in a message part.

File
IdMessageCoderMIME ( 4684)

Hierarchy

Pascal
TIdMessageDecoderInfoMIME = class(TIdMessageDecoderInfo);
Description
TIdMessageDecoderInfoMIME is a TIdMessageDecoderInfo ( 1569) descendant that implements the specifics of a registered
decoder class for MIME-encoded RFC message parts.

TIdMessageDecoderInfoMIME reimplements methods of the ancestor class to detect the presence of a MIMEBoundary in the
associated message, and create ( 1571) a new MIME decoder instance for the message.

See Also
TIdMessageDecoderInfo ( 1569)

TIdMessageDecoderInfoUUE ( 1573)

TIdMessageDecoderInfoXXE

IndySupport ( 15)

Internet Direct (Indy) Version 10.1.5 1571


TIdMessageDecoderInfoMIME Class Classes

TIdMessageDecoderInfoMIME Members
The following tables list the members exposed by TIdMessageDecoderInfoMIME.

Methods
Method Description
CheckForStart ( 1572) Detects a MIME boundary and creates a decoder class for the associated document.
Create ( 1571) Constructor for the object instance.

Legend
Method
virtual

TIdMessageDecoderInfoMIME Methods
The Methods of the TIdMessageDecoderInfoMIME class are listed here.

Methods
Method Description
CheckForStart ( 1572) Detects a MIME boundary and creates a decoder class for the associated document.

Legend
Method
virtual

TIdMessageDecoderInfoMIME.CheckForStart Method
Detects a MIME boundary and creates a decoder class for the associated document.

Pascal
function CheckForStart(
ASender: TIdMessage;
const ALine: string
): TIdMessageDecoder; override;
Parameters
Parameters Description
ASender Message to associate with a decoder class.
ALine Line from a message header to check for a MIME boundary.

Returns
TIdMessageDecoder ( 1563) - Decoder class instance for the message.

Description
CheckForStart is an overridden TIdMessageDecoder ( 1563) function in TIdMessageDecoderInfoMIME ( 1571) that is used to
create ( 1571) a decoder for MIME message parts.

CheckForStart will create ( 1571) a decoder instance for the message in ASender when the MIME boundary marker in ASender is
detected in ALine, or when ASender has an empty MIMEBoundary and the ContentTransferEncoding is 'base64' or
'quoted-printable'.

Under all other conditions, the return value for the method is Nil.

See Also
TIdMessageDecoder ( 1563)

TIdMessage.MIMEBoundary ( 1548)

TIdMessage.ContentTransferEncoding ( 1540)

1572 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderInfoUUE Class

TIdMessage ( 1521)

TIdMessageDecoderInfoUUE Class
Represents information about the registered decoder class used for decoding UUEncoded message parts.

File
IdMessageCoderUUE ( 4687)

Hierarchy

Pascal
TIdMessageDecoderInfoUUE = class(TIdMessageDecoderInfo);
Description
TIdMessageDecoderInfoUUE is a TIdMessageDecoderInfo ( 1569) descendant that represents information about the registered
decoder class used for decoding UUEncoded message parts.

TIdMessageDecoderInfoUUE extends the ancestor class to provide support for detecting the specifics of a UUEncoded packet, as
well as representing information about the RFC message part in message headers.

See Also
TIdMessageDecoderInfo ( 1569)

IndySupport ( 15)

TIdMessageDecoderInfoUUE Members
The following tables list the members exposed by TIdMessageDecoderInfoUUE.

Methods
Method Description
CheckForStart ( 1573) Implements detection of a UUEncoded packet, and creates the message coder for the message part.
Create ( 1571) Constructor for the object instance.

Legend
Method
virtual

TIdMessageDecoderInfoUUE Methods
The Methods of the TIdMessageDecoderInfoUUE class are listed here.

Methods
Method Description
CheckForStart ( 1573) Implements detection of a UUEncoded packet, and creates the message coder for the message part.

Legend
Method
virtual

TIdMessageDecoderInfoUUE.CheckForStart Method
Implements detection of a UUEncoded packet, and creates the message coder for the message part.

Internet Direct (Indy) Version 10.1.5 1573


TIdMessageDecoderInfoYenc Class Classes

Pascal
function CheckForStart(
ASender: TIdMessage;
const ALine: string
): TIdMessageDecoder; override;
Parameters
Parameters Description
ASender Message containing the message part.
ALine Line from the message part to be examined for UUEncode formatting.

Returns
TIdMessageDecoder ( 1563) - Message Decoder class to use for the message part.

Description
CheckForStart is an overridden TIdMessageDecoder ( 1563) function in TIdMessageDecoderInfoUUE ( 1573) that implements
recognizing information in UUEncoded message packet, like the header section and PermissionCode, as well as constructing a
TIdMessageDecoderUUE ( 1584) for the associated message.

CheckForStart examines ALine to determine if it contains a UUencode header section, which consists of the keyword "begin" and
the space-delimited values for PermissionCode and Filename. If the header section is detected, CheckForStart also sets PartType
to ptAttachment.

See Also
TIdMessageDecoder ( 1563)

TIdMessageDecoderInfoYenc Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
TIdMessageDecoderInfoYenc = class(TIdMessageDecoderInfo);
Description
TIdMessageDecoderInfoYenc TIdMessageDecoderInfo ( 1569) descendant

See Also
TIdMessageDecoderInfo ( 1569)

TIdMessageDecoderInfoYenc Members
The following tables list the members exposed by TIdMessageDecoderInfoYenc.

Methods
Method Description
CheckForStart ( 1575)
Create ( 1571) Constructor for the object instance.

Legend
Method
virtual

1574 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderList Class

TIdMessageDecoderInfoYenc Methods
The Methods of the TIdMessageDecoderInfoYenc class are listed here.

Methods
Method Description
CheckForStart ( 1575)

Legend
Method
virtual

TIdMessageDecoderInfoYenc.CheckForStart Method
Pascal
function CheckForStart(
ASender: TIdMessage;
const ALine: string
): TIdMessageDecoder; override;
Parameters
Parameters Description
ASender
ALine

Returns
TIdMessageDecoder ( 1563)

Description
CheckForStart overridden

TIdMessageDecoderList Class
Provides a framework for registering and retrieving decoder classes for RFC 2822-compliant message parts.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageDecoderList = class;
Description
TIdMessageDecoderList is a TObject descendant that provides a framework for registering and retrieving decoder classes for RFC
2822-compliant message parts.

All methods in TIdMessageDecoderList, except the Constructor and Destructor, are class methods that provide for registering a
new decoder class, accessing a decoder by name, and determining when a decoder is appropriate for use on a given message part.

Items added to the registered decoder list are derived from the TIdMessageDecoderInfo ( 1569) class.

See Also
TIdMessageEncoderList ( 1601)

Internet Direct (Indy) Version 10.1.5 1575


TIdMessageDecoderList Class Classes

TIdMessageDecoderInfo ( 1569)

IndySupport ( 15)

TIdMessageDecoderList Members
The following tables list the members exposed by TIdMessageDecoderList.

Methods
Method Description
ByName ( 1576) Locates an instance of a registered decoder class by name.
CheckForStart ( 1577) Determines the registered decoder class instance to be used for an RFC 2822 message part.
Create ( 1577) Constructor for the object instance.
Destroy ( 1578) Frees the object instance.
RegisterDecoder ( 1578) Adds a decoder class to the list of registered decoder classes.

Legend
Method
virtual

TIdMessageDecoderList Methods
The Methods of the TIdMessageDecoderList class are listed here.

Methods
Method Description
ByName ( 1576) Locates an instance of a registered decoder class by name.
CheckForStart ( 1577) Determines the registered decoder class instance to be used for an RFC 2822 message part.
Create ( 1577) Constructor for the object instance.
Destroy ( 1578) Frees the object instance.
RegisterDecoder ( 1578) Adds a decoder class to the list of registered decoder classes.

Legend
Method
virtual

TIdMessageDecoderList.ByName Method
Locates an instance of a registered decoder class by name.

Pascal
class function ByName(
const AName: string
): TIdMessageDecoderInfo;
Parameters
Parameters Description
AName Decoder class name to be located.

Returns
TIdMessageDecoderInfo ( 1569) - Container for information and class type for the registered decoder class.

Description
ByName is a TIdMessageDecoderInfo ( 1569) class function used to locate an instance of a registered decoder class by the name
specified in AName.

ByName searches the global list of registered decoder classes in GMessageDecoderList to locate an instance with a name
matching the value in AName. If there is no registered decoder class with a name matching AName, an EIdException ( 76) is
raised with the constant message RSMessageDecoderNotFound and the value in AName.

1576 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderList Class

Exceptions
Exceptions Description
EIdException ( 76) With the message RSMessageDecoderNotFound.

See Also
TIdMessageDecoderInfo ( 1569)

EIdException ( 76)

RSMessageDecoderNotFound

TIdMessageDecoderList.CheckForStart Method
Determines the registered decoder class instance to be used for an RFC 2822 message part.

Pascal
class function CheckForStart(
ASender: TIdMessage;
const ALine: string
): TIdMessageDecoder;
Parameters
Parameters Description
ASender Message to be associated with the decoder class instance.
ALine Text to be examined to determine the decoder needed for the message part.

Returns
TIdMessageDecoder ( 1563) - Decoder class instance for the message part.

Description
CheckForStart is a TIdMessageDecoder ( 1563) class function used to determine the registered decoder class instance to be
applied when decoding the RFC 822 message part.

CheckForStart examines the global list of registered decoder classes in GMessageDecoderList, and calls the
TIdMessageDecoderInfo.CheckForStart ( 1570) method for each decoder class instance in the list. When a decoder class is found
for the message part, the method exits and returns the TIdMessageDecoderInfo ( 1569) instance for the message part. If no
decoder class is located for the message part, the return value for CheckForStart is Nil.

ASender is the message instance to associate with the registered decoder class instance in the return value.

ALine contains data to be examined when determining if the decoder class can be used for the message part containing the data in
ALine. ALine generally represents the initial data in the message, like a MIME boundary marker or the initial values in a transfer
encoded block.

Use RegisterDecoder ( 1578) to add an instance of TIdMessageDecoderInfo ( 1569) or descendant classes to the global
decoder list in GMessageDecoderList.

CheckForStart calls the TIdMessageDecoderInfo.CheckForStart ( 1570) method, which is declared as an abstract virtual method.
So CheckForStart will actually invoke the overridden method in method table for the descendant decoder class instances.

See Also
TIdMessageDecoderInfo ( 1569)

TIdMessageDecoderInfo.CheckForStart ( 1570)

TIdMessageDecoderList.RegisterDecoder ( 1578)

TIdMessageDecoderList.Create Constructor
Constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1577


TIdMessageDecoderList Class Classes

Pascal
constructor Create;
Description
Create is the Constructor for the object instance, and calls the inherited Create method.

Create also initializes an internal list used to identify and retrieve registered message coder class instances during processing of
TIdMessage ( 1521) instances.

See Also
TIdMessage ( 1521)

TIdMessageDecoderList.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance.

Destroy iterates over the list of registered coder class instances that have been used to decode portions of TIdMessage ( 1521)
instances, and frees each TIdMessageDecoderInfo ( 1569) instance. When all registered decoder class instances have been
freed, Destroy also frees the internal list.

Destroy calls the inherited Destroy destructor prior to exiting from the method.

See Also
TIdMessage.MessageParts ( 1548)

TIdMessageDecoderInfo ( 1569)

TIdMessageDecoderList.Create ( 1577)

TIdMessageDecoderList.RegisterDecoder Method
Adds a decoder class to the list of registered decoder classes.

Pascal
class procedure RegisterDecoder(
const AMessageCoderName: string;
AMessageCoderInfo: TIdMessageDecoderInfo
);
Parameters
Parameters Description
AMessageCoderName Name to used for identification of the registered decoder class.
AMessageCoderInfo Decoder class information to be registered.

Description
RegisterDecoder is a class procedure in TIdMessageDecoderList ( 1575) that adds information about decoder classes for RFC
2822-compliant message parts to the list of registered decoder classes.

RegisterDecoder ensures that the list for registered decoder classes has been initalized to an instance of TIdMessageDecoderList
( 1575). RegisterDecoder adds the decoder information in AMessageCoderInfo to the list with the name specified in
AMessageCoderName.

RegisterDecoder is called as part of the initialization section of the unit that contains the decoder class, like
IdMessageCoderMIME.pas ( 4684), IdMessageCoderUUE.pas ( 4687), and IdMessageCoderXXE.pas ( 4687).

The global list containing Registered decoder class instances is freed as part of finalization for the IdMessageCoder.pas ( 4683)

1578 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderMIME Class

unit.

See Also
TIdMessageDecoderInfo ( 1569)

TIdMessageEncoderInfo ( 1592)

IdMessageCoderMIME.pas ( 4684)

IdMessageCoderUUE.pas ( 4687)

IdMessageCoderXXE.pas ( 4687)

TIdMessageDecoderMIME Class
Implements a decoder for RFC 2822-compliant MIME message parts.

File
IdMessageCoderMIME ( 4684)

Hierarchy

Pascal
TIdMessageDecoderMIME = class(TIdMessageDecoder);
Description
TIdMessageDecoderMIME is a TIdMessageDecoder ( 1563) descendant that extends the ancestor class to implement a decoder
for RFC 2822-compliant MIME message parts.

TIdMessageDecoderMIME provides methods and properties used to detect the MIMEBoundary ( 1584), as well as read the RFC
message headers and body in an encoded RFC message part.

See Also
TIdMessageDecoder ( 1563)

TIdMessageDecoderMIME.MIMEBoundary ( 1584)

TIdMessageDecoderMIME.ReadHeader ( 1582)

TIdMessageDecoderMIME.ReadBody ( 1581)

TIdMessageDecoderMIME Members
The following tables list the members exposed by TIdMessageDecoderMIME.

Properties
Property Description
BodyEncoded ( 1583) Indicates if a message has an encoded body.
Filename ( 1567) Represents the file name for storing RFC-2822 message attachments.
FreeSourceStream ( 1567) Indicates if the stream passed to the message decoder should be freed in the destructor.
Headers ( 1568) Represents the RFC message headers in an RFC-2822 compliant message part .
MIMEBoundary ( 1584) Represents the boundary marker for a MIME-encoded RFC-822 message part.
PartType ( 1568) Represents the type for an RFC message part.
SourceStream ( 1569) Providess access to a RFC-822 message as a stream construct.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Internet Direct (Indy) Version 10.1.5 1579


TIdMessageDecoderMIME Class Classes

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckAndSetType ( 1580)
Create ( 1581)
Destroy ( 357) Frees the object instance.
Destroy ( 1565) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetAttachmentFilename ( 1581)
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReadBody ( 1581) Decodes the contents of a MIME-encode message part.
ReadHeader ( 1582) Implements the method used to read an RFC message header from a MIME-encoded message part.
ReadLn ( 1566) Reads a line from an RFC message part.
RemoveInvalidCharsFromFilename ( 1583)
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdMessageDecoderMIME Methods
The Methods of the TIdMessageDecoderMIME class are listed here.

Methods
Method Description
CheckAndSetType ( 1580)
Create ( 1581)
GetAttachmentFilename ( 1581)
ReadBody ( 1581) Decodes the contents of a MIME-encode message part.
ReadHeader ( 1582) Implements the method used to read an RFC message header from a MIME-encoded message part.
RemoveInvalidCharsFromFilename ( 1583)

Legend
Method
virtual

TIdMessageDecoderMIME.CheckAndSetType Method
Pascal
procedure CheckAndSetType(
const AContentType: string;
AContentDisposition: string
);
Parameters
Parameters Description
AContentType Type is string.
AContentDisposition Type is string.

1580 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderMIME Class

Description
CheckAndSetType

TIdMessageDecoderMIME.Create Constructor
Pascal
constructor Create(
AOwner: TIdNativeComponent;
const ALine: string
); overload; reintroduce;
Parameters
Parameters Description
AOwner Type is TIdNativeComponent ( 3061).
ALine Scope is const. Type is string.

Description
TIdMessageDecoderMIME.Create overloaded reintroduced constructor method.

See Also
TIdMessageDecoderMIME.Create

TIdMessageDecoderMIME.GetAttachmentFilename Method
Pascal
function GetAttachmentFilename(
const AContentType: string;
const AContentDisposition: string
): string;
Parameters
Parameters Description
AContentType Type is string.
AContentDisposition Type is string.

Returns
string

Description
GetAttachmentFilename returns string

TIdMessageDecoderMIME.ReadBody Method
Decodes the contents of a MIME-encode message part.

Pascal
function ReadBody(
ADestStream: TIdStream;
var VMsgEnd: Boolean
): TIdMessageDecoder; override;
Parameters
Parameters Description
ADestStream Stream to receive the decode message part contents.
VMsgEnd Indicates the message terminator was found in the message body.

Returns
TIdMessageDecoder ( 1563) - Decoder used for the message part, or Nil.

Internet Direct (Indy) Version 10.1.5 1581


TIdMessageDecoderMIME Class Classes

Description
ReadBody is a TIdMessageDecoder ( 1563) function used to convert the MIME-encoded contents of an RFC message part to its
textual representation.

When BodyEncoded ( 1583) contains True, the ContentTransferEncoding from the TIdMessage ( 1521) instance that owns the
decoder is used to create ( 1581) a decoder class instance for the message part. Otherwise, the 'Content-Transfer-Encoding'
value in Headers ( 1568) is used to initialize the decoder class instance .

ReadBody returns the TIdMessageDecoder ( 1563) instance to be used for the message part, or Nil when the message part is not
an encoded attachment. When an attachment is detected, the content-transfer-encoding header is used to determine the proper
decoder.

The following decoders are used based on the content transfer encoding values:

Content Transfer Decoder Class


base64 TIdDecoderMIME ( 542)
quoted-printable TIdDecoderQuotedPrintable ( 545)
7bit No decoder is required

ReadBody reads the message part content, one line at a time, using the ReadLnSplit method. If a MIMEBoundary ( 1584) is
detected in the line, a new TIdMessageDecoderMIME ( 1579) instance is created for the new message part, and the method is
exited. If a message terminator (CRLF + '.' + CRLF) is encountered, VMsgEnd is set to True and the method is exited.

ReadBody uses the message decoder, when present, to convert the encoded data for the message part. Decoded message part
contents are written to ADestStream until a blank line (or message terminator) is read from the encoded message part.

See Also
TIdMessageDecoder ( 1563)

TIdMessageDecoderMIME.ReadHeader Method
Implements the method used to read an RFC message header from a MIME-encoded message part.

Pascal
procedure ReadHeader; override;
Description
ReadHeader is an overridden procedure in TIdMessageDecoderMIME ( 1579) that implements the method used to read an RFC
2822-compliant message header from a MIME-encoded message part.

When BodyEncoded ( 1583) is True, ReadHeader examines the ContentType and ContentDisposition for the TIdMessage (
1521) instance to determine the PartType ( 1568) and Filename ( 1567) for the message part.

When BodyEncoded ( 1583) is False, ReadHeader calls ReadLn ( 1566) to retrieve lines from the message part until a blank
line, that signals the end of message headers, is retrieved. Message headers are added to the Headers ( 1568) property, with
folded header lines being added to the most recent message header.

For message parts having a ContentType in the 'multipart/*' MIME type, the existing MIME boundary for the message is stored in
the MIMEBoundary ( 1584) property. For other instances, the MIMEBoundary ( 1584) property is pushed on the boundary stack
for the TIdMessage ( 1521) instance.

When ReadHeader has retrieved all message header lines, the content-type and content-disposition headers are examined to
determine if the message part contains an attachment.

ReadHeader will update the message part type to ptText when an attachment is not found. When an attachment is indicated in the
content-disposition message header, ReadHeader sets the message part type to ptAttachment and parses an optional filename into
the Filename ( 1567) property.

1582 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderMIME Class

See Also
TIdMessageDecoder ( 1563)

TIdMessageDecoderQuotedPrintable

TIdMessageDecoderUUE ( 1584)

TIdMessageDecoderXXE

TIdMessageDecoderMIME.RemoveInvalidCharsFromFilename Method
Pascal
function RemoveInvalidCharsFromFilename(
const AFilename: string
): string;
Parameters
Parameters Description
AFilename Type is string.

Returns
string

Description
RemoveInvalidCharsFromFilename returns string

TIdMessageDecoderMIME Properties
The Properties of the TIdMessageDecoderMIME class are listed here.

Properties
Property Description
BodyEncoded ( 1583) Indicates if a message has an encoded body.
MIMEBoundary ( 1584) Represents the boundary marker for a MIME-encoded RFC-822 message part.

Legend
Property

TIdMessageDecoderMIME.BodyEncoded Property
Indicates if a message has an encoded body.

Pascal
property BodyEncoded: Boolean;
Description
BodyEncoded is a Boolean property that indicates the TIdMessageDecoderMIME ( 1579) instance is owned by a TIdMessage (
1521), and has a non-blank value in the TIdMessage.ContentTransferEncoding ( 1540) property for the message that owns the
decoder.

BodyEncoded is initialized in the Create ( 1581) constructor, and may contain False when the TIdMessage ( 1521) has a
MIMEBoundary ( 1584). BodyEncoded is also used in ReadHeader ( 1582) and ReadBody ( 1581) methods to determine if the
ContentTransferEncoding, ContentType, and ContentDisposition values are read from mesasage headers or the acutal body of the
message.

See Also
TIdMessage ( 1521)

TIdMessageDecoderMIME.ReadHeader ( 1582)

Internet Direct (Indy) Version 10.1.5 1583


TIdMessageDecoderUUE Class Classes

TIdMessageDecoderMIME.ReadBody ( 1581)

TIdMessageDecoderMIME.MIMEBoundary Property
Represents the boundary marker for a MIME-encoded RFC-822 message part.

Pascal
property MIMEBoundary: string;
Description
MIMEBoundary is a String property that represents the boundary marker for a MIME-encoded RFC 2822-compliant message part.

MIMEBoundary is updated in the Create ( 1581) constructor when the owner of the decoder class instance is a TIdMessage (
1521). The TIdMessage.MIMEBoundary ( 1548) property is used as the value of the MIMEBoundary for the decoder class.

See Also
TIdMessageDecoderMIME.Create ( 1581)

TIdMessage.MIMEBoundary ( 1548)

TIdMessageDecoderUUE Class
Implements support for decoding RFC 2822-compliant message parts using the UUDecode algorithm.

File
IdMessageCoderUUE ( 4687)

Hierarchy

Pascal
TIdMessageDecoderUUE = class(TIdMessageDecoder);
Description
TIdMessageDecoderUUE is a TIdMessageDecoder ( 1563) descendant that implements support for decoding RFC
2822-compliant message parts using the UUDecode algorithm.

TIdMessageDecoderUUE extends the ancestor class to provide support for detecting both UUE- and XXE-encoded body lines, as
well as the inconsistent use of FillChar at the end of the encoded data stream.

See Also
TIdMessageDecoder ( 1563)

IndySupport ( 15)

TIdMessageDecoderUUE Members
The following tables list the members exposed by TIdMessageDecoderUUE.

Properties
Property Description
CodingType ( 1586) Indicates the type of decoder created for decoding the content for the message part.
Filename ( 1567) Represents the file name for storing RFC-2822 message attachments.
FreeSourceStream ( 1567) Indicates if the stream passed to the message decoder should be freed in the destructor.
Headers ( 1568) Represents the RFC message headers in an RFC-2822 compliant message part .
PartType ( 1568) Represents the type for an RFC message part.

1584 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderUUE Class

SourceStream ( 1569) Providess access to a RFC-822 message as a stream construct.


Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 1565) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReadBody ( 1585) Implements reading and decoding the body of an RFC 2822-compliant message part using the UUDecode
algorithm.
ReadHeader ( 1566) Specifies the method used to read an RFC message body.
ReadLn ( 1566) Reads a line from an RFC message part.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdMessageDecoderUUE Methods
The Methods of the TIdMessageDecoderUUE class are listed here.

Methods
Method Description
ReadBody ( 1585) Implements reading and decoding the body of an RFC 2822-compliant message part using the UUDecode
algorithm.

Legend
Method
virtual

TIdMessageDecoderUUE.ReadBody Method
Implements reading and decoding the body of an RFC 2822-compliant message part using the UUDecode algorithm.

Pascal
function ReadBody(
ADestStream: TIdStream;
var AMsgEnd: Boolean
): TIdMessageDecoder; override;
Parameters
Parameters Description
ADestStream Stream to receive the decoded contents of the message part.
AMsgEnd Indicates if the end of the message was encountered.

Internet Direct (Indy) Version 10.1.5 1585


TIdMessageDecoderYenc Class Classes

Returns
TIdMessageDecoder ( 1563) - Message decoder class used for the message part.

Description
ReadBody is an overridden TIdMessageDecoder ( 1563) function in TIdMessageDecoderUUE ( 1584) that implements reading
and decoding of an RFC 2822-compliant message part using the UUDecode algorithm.

ReadBody constructs an internal decoder class, either TIdDecoderUUE ( 546) or TIdDecoderXXE ( 547), based on the value of
the length byte in the encoded body line. If the body line does not contain a value expected for UUE- or XXE-encoded lines, an
EIdException ( 76) will be raised with the constant message RSUnrecognizedUUEEncodingScheme.

ReadBody calls ReadLn ( 1566) until the end of the encoded message stream is reached. Each line read from the input stream is
processed using the DecodeToStream method for the decoder class instance.

See Also
TIdMessageDecoder ( 1563)

TIdDecoderUUE ( 546)

TIdDecoderUUE.DecodeToStream

EIdException ( 76)

RSUnrecognizedUUEEncodingScheme

TIdMessageDecoderUUE Properties
The Properties of the TIdMessageDecoderUUE class are listed here.

Properties
Property Description
CodingType ( 1586) Indicates the type of decoder created for decoding the content for the message part.

Legend
Property
read only

TIdMessageDecoderUUE.CodingType Property
Indicates the type of decoder created for decoding the content for the message part.

Pascal
property CodingType: string;
Description
CodingType is a read-only string property that indicates the type of decoder created for decoding the content for the message part.
CodingType is updated in ReadBody ( 1585) when the initial line of data is examined for the encoded length byte at the beginning
of the encoded data block.

CodingType may contain the following values:

Value Meaning
'UUE' TIdDecoderUUE ( 546) is used for decoding.
'XXE' TIdDecoderXXE ( 547) is used for decoding.

1586 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageDecoderYenc Class

TIdMessageDecoderYenc Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
TIdMessageDecoderYenc = class(TIdMessageDecoder);
Description
TIdMessageDecoderYenc TIdMessageDecoder ( 1563) descendant

See Also
TIdMessageDecoder ( 1563)

TIdMessageDecoderYenc Members
The following tables list the members exposed by TIdMessageDecoderYenc.

Properties
Property Description
Filename ( 1567) Represents the file name for storing RFC-2822 message attachments.
FreeSourceStream ( 1567) Indicates if the stream passed to the message decoder should be freed in the destructor.
Headers ( 1568) Represents the RFC message headers in an RFC-2822 compliant message part .
PartType ( 1568) Represents the type for an RFC message part.
SourceStream ( 1569) Providess access to a RFC-822 message as a stream construct.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 1565) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReadBody ( 1588)
ReadHeader ( 1566) Specifies the method used to read an RFC message body.
ReadLn ( 1566) Reads a line from an RFC message part.
CType ( 267)
Create ( 1274)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only

Internet Direct (Indy) Version 10.1.5 1587


TIdMessageEncoder Class Classes

Event

TIdMessageDecoderYenc Methods
The Methods of the TIdMessageDecoderYenc class are listed here.

Methods
Method Description
ReadBody ( 1588)

Legend
Method
virtual

TIdMessageDecoderYenc.ReadBody Method
Pascal
function ReadBody(
ADestStream: TIdStream;
var AMsgEnd: Boolean
): TIdMessageDecoder; override;
Parameters
Parameters Description
ADestStream
AMsgEnd

Returns
TIdMessageDecoder ( 1563)

Description
ReadBody is an overridden TIdMessageDecoder ( 1563) function

TIdMessageEncoder Class
Implements an encoder for RFC 2822-compliant message parts.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageEncoder = class(TIdComponent);
Description
TIdMessageEncoder is a TIdComponent ( 355) descendant that implements an encoder for RFC 2822-compliant message parts.

TIdMessageEncoder provides properties and methods used to process RFC message header and body lines using either a file or a
TStream descendant. TIdMessageEncoder is a base class that establishes the framework for Indy message encoders.

TIdMessageEncoder descendants, like TIdMessageEncoderMIME ( 1604), TIdMessageEncoderUUE ( 1607), and


TIdMessageEncoderXXE ( 1609), further refine the message Encoder framework by implementing support for specific encoding
schemes.

1588 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoder Class

See Also
TIdMessageEncoderMIME ( 1604)

TIdMessageEncoderUUE ( 1607)

TIdMessageEncoderXXE ( 1609)

IndySupport ( 15)

TIdMessageEncoder Members
The following tables list the members exposed by TIdMessageEncoder.

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Encode ( 1590)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageEncoder Methods
The Methods of the TIdMessageEncoder class are listed here.

Methods
Method Description
Encode ( 1590)

Legend
Method
abstract

Internet Direct (Indy) Version 10.1.5 1589


TIdMessageEncoder Class Classes

TIdMessageEncoder.Encode Method
Overload List

Method Description
TIdMessageEncoder.Encode (string, Constructs the encoded contents for an RFC 2822-compliant message part.
TIdStream) ( 1590)
TIdMessageEncoder.Encode
(TIdStream, TIdStream) ( 1590)

TIdMessageEncoder.Encode Method (TIdStream, TIdStream)


Pascal
procedure Encode(
ASrc: TIdStream;
ADest: TIdStream
); virtual; abstract; overload;
Parameters
Parameters Description
ASrc Type is TIdStream ( 3087).
ADest Type is TIdStream ( 3087).

Description
Encode is an overloaded, abstract, virtual method.

See Also
TIdMessageEncoder.Encode

TIdMessageEncoder.Encode Method (string, TIdStream)


Constructs the encoded contents for an RFC 2822-compliant message part.

Pascal
procedure Encode(
const AFilename: string;
ADest: TIdStream
); overload;
Parameters
Parameters Description
AFilename File name used to retrieve the un-encoded contents of the message part.
ADest Stream where the encoder message part will be written.

Description
Encode is an overloded procedure in TIdMessageEncoder ( 1588) that retrieves the un-encoded values of an RFC
2822-compliant message part, and constructs the encoded contents of the message part.

AFilename specifies the file name used to retrieve the un-encoded contents of the message part.

ADest is a TIdStream ( 3087) descendant where the encoded message part will be written.

The file-based variant of Encode reads the contents of the file specified in AFilename, and writes the encoded contents to the
stream specified in ADest. This variant of Encode creates a temporary file stream for AFilename, and calls the abstract Encode
method using the temporary file stream.

See Also
TIdMessageEncoderMIME ( 1604)

TIdMessageEncoderUUE ( 1607)

1590 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderInfo Class

TIdMessageEncoderXXE ( 1609)

TIdMessageEncoderQuotedPrintable ( 1606)

TIdMessageEncoder.Encode

TIdMessageEncoder Properties
The Properties of the TIdMessageEncoder class are listed here.

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.

Legend
Property

TIdMessageEncoder.Filename Property
Identifies the file name that contains the contents of an RFC-822 message part.

Pascal
property Filename: string;
Description
Filename is a String property that identifies the file system location that contains the contents of an RFC 2822-compliant message
part. Filename can be updated to indicate that the RFC message part contents originate from the local file system rather than an
inline stream.

Use Encode ( 1590) with Filename as the input source to perform encoding from a file.

See Also
TIdMessageEncoder.Encode ( 1590)

TIdMessageEncoder.PermissionCode Property
Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.

Pascal
property PermissionCode: integer;
Description
PermissionCode is an Integer property that identifies the Unix user permissions required to acccess an RFC 2822-compliant
message part.

PermissionCode is used by TIdMessageEncoder ( 1588) like TIdMessageEncoderUUE ( 1607) and TIdMessageEncoderXXE (


1609), which support optional user permissions for encoding operations. PermissionCode is used by these classes to identify, in the
encoded contents, the user permissions required for decoding operations only.

PermissionCode is expressed as an Integer, in the form used by the Unix user permission flags. The default value for
PermissionCode is 660, as established in the Create ( 267) contructor.

See Also
TIdMessageEncoderUUE ( 1607)

TIdMessageEncoderXXE ( 1609)

TIdMessageEncoder.Encode ( 1590)

TIdMessageEncoder. Create ( 267)

Internet Direct (Indy) Version 10.1.5 1591


TIdMessageEncoderInfo Class Classes

TIdMessageEncoderInfo Class
Represents information about registered encoder classes and generates RFC message headers for the encoder class.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageEncoderInfo = class;
Description
TIdMessageEncoderInfo is a TObject descendant that specifies the base class for representing information about registered
encoder classes. TIdMessageEncoderInfo also provides a mechanism to create ( 1593) RFC 2822-compliant headers for the
encoder class in an associated TIdMessage ( 1521) instance.

Descendant classes, like TIdMessageEncoderInfoMIME ( 1594), TIdMessageEncoderInfoUUE ( 1597), and


TIdMessageEncoderInfoXXE ( 1599), should reimplement the virtual methods in TIdMessageEncoderInfo to provide support for
assigning the correct MessageEncoderClass ( 1594) class type and InitializeHeaders ( 1593) values for the specific encoder.

See Also
IdMessageCoder.pas ( 4683)

TIdMessageEncoderInfoMIME ( 1594)

TIdMessageEncoderInfoUUE ( 1597)

TIdMessageEncoderInfoXXE ( 1599)

TIdMessageEncoderList ( 1601)

IndySupport ( 15)

TIdMessageEncoderInfo Members
The following tables list the members exposed by TIdMessageEncoderInfo.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1593) Constructor for the object instance.
InitializeHeaders ( 1593) Specifies a method for generating RFC 2822 headers for a message.

Legend
Constructor
virtual
Property
read only

1592 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderInfo Class

TIdMessageEncoderInfo Methods
The Methods of the TIdMessageEncoderInfo class are listed here.

Methods
Method Description
Create ( 1593) Constructor for the object instance.
InitializeHeaders ( 1593) Specifies a method for generating RFC 2822 headers for a message.

Legend
Constructor
virtual

TIdMessageEncoderInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; virtual;
Description
Create is the Constructor for the object instance.

Create calls the inherited Constructor to initialize th object instance.

Descendant classes, like TIdMessageEncoderInfoMIME ( 1594), TIdMessageEncoderInfoUUE ( 1597), and


TIdMessageEncoderInfoXXE ( 1599) must assign the correct class type value for MessageEncoderClass ( 1594) in their
overridden Constructors.

See Also
TIdMessageEncoderInfoMIME ( 1594)

TIdMessageEncoderInfoUUE ( 1597)

TIdMessageEncoderInfoXXE ( 1599)

TIdMessageEncoderInfo.MessageEncoderClass ( 1594)

TIdMessageEncoderInfo.InitializeHeaders Method
Specifies a method for generating RFC 2822 headers for a message.

Pascal
procedure InitializeHeaders(
AMsg: TIdMessage
); virtual;
Parameters
Parameters Description
AMsg Message instance to be updated with RFC message headers.

Description
InitializeHeaders is a virtual procedure in TIdMessageEncoderInfo ( 1592) that specifies a method for generating RFC 2822
message headers for an instance of TIdMessage ( 1521).

Descendant classes, like TIdMessageEncoderInfoMIME ( 1594), TIdMessageEncoderInfoUUE ( 1597), and


TIdMessageEncoderInfoXXE ( 1599) should override the method to provide support for generating message headers specific to
the given encoder type.

Internet Direct (Indy) Version 10.1.5 1593


TIdMessageEncoderInfoMIME Class Classes

See Also
TIdMessageEncoderInfoMIME ( 1594)

TIdMessageEncoderInfoUUE ( 1597)

TIdMessageEncoderInfoXXE ( 1599)

TIdMessageEncoderInfo Properties
The Properties of the TIdMessageEncoderInfo class are listed here.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Legend
Property
read only

TIdMessageEncoderInfo.MessageEncoderClass Property
Represents the class type used to create ( 1593) new instances for the registered encoder class.

Pascal
property MessageEncoderClass: TIdMessageEncoderClass;
Description
MessageEncoderClass is a read-only TIdMessageEncoderClass ( 3058) property that represents the class type used to create (
1593) new instances for the registered encoder class.

MessageEncoderClass is assigned a class type instance in the Create ( 1593) Constructor for a specific encoder class.

MessageCoderClass is used when TIdMessagePart ( 1614) descendants call their Encode method. A new instance of the
registerd encoder class is created, and used to perform the encoding operation.

See Also
TIdMessageEncoderInfo.Create ( 1593)

TIdMessageEncoderInfoMIME Class
Represents the registered encoder class and updates properties for an associated message.

File
IdMessageCoderMIME ( 4684)

Hierarchy

Pascal
TIdMessageEncoderInfoMIME = class(TIdMessageEncoderInfo);
Description
TIdMessageEncoderInfoMIME is a TIdMessageEncoderInfo ( 1592) descendant that implements the extensions necessary to
represent the registered encoder classes for MIME-encoded message parts.

TIdMessageEncoderInfoMIME also provides a mechanism to update properties in an associated TIdMessage ( 1521) instance

1594 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderInfoMIME Class

based on the content and type of the message part.

See Also
TIdMessageEncoderInfo ( 1592)

TIdMessage.MessageParts ( 1548)

IndySupport ( 15)

TIdMessageEncoderInfoMIME Members
The following tables list the members exposed by TIdMessageEncoderInfoMIME.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1595) Constructor for the object instance.
InitializeHeaders ( 1596) Updates message properties from headers in the message part.

Legend
Constructor
virtual
Property
read only

TIdMessageEncoderInfoMIME Methods
The Methods of the TIdMessageEncoderInfoMIME class are listed here.

Methods
Method Description
Create ( 1595) Constructor for the object instance.
InitializeHeaders ( 1596) Updates message properties from headers in the message part.

Legend
Constructor
virtual

TIdMessageEncoderInfoMIME.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the Constructor for the object instance.

Create calls the inherited Create method.

Create sets the MessageEncoderClass ( 1594) to an instance of TIdMessageEncoderMIME ( 1604), to represent the class used
to create new instances of the decoder from the TIdMessageEncoderList ( 1601) that represents registered encoder classes.

See Also
IdMessageCoderMIME.pas ( 4684)

TIdMessageEncoderList ( 1601)

Internet Direct (Indy) Version 10.1.5 1595


TIdMessageEncoderInfoQuotedPrintable Classes

TIdMessageEncoderInfoMIME.InitializeHeaders Method
Updates message properties from headers in the message part.

Pascal
procedure InitializeHeaders(
AMsg: TIdMessage
); override;
Parameters
Parameters Description
AMsg Message associated with the encoder instance.

Description
InitializeHeaders is an overridden Procedure in TIdMessageEncoderInfoMIME ( 1594) that updates properties in an associated
TIdMessage ( 1521) instance based on the contents of the message.

InitializeHeaders updates the TIdMessage.ContentType ( 1541) property to indicate the RFC message headers needed for the
message specified in AMsg.

See Also
TIdMessage.ContentType ( 1541)

IndySupport ( 15)

TIdMessageEncoderInfoQuotedPrintable Class
Represents information about the registered encoder class using Quoted Printable transfer encoding syntax.

File
IdMessageCoderQuotedPrintable ( 4686)

Hierarchy

Pascal
TIdMessageEncoderInfoQuotedPrintable = class(TIdMessageEncoderInfo);
Description
TIdMessageEncoderInfoQuotedPrintable is a TIdMessageEncoderInfo ( 1592) descendant that implements a class for
representing information about registered encoder classes using Quoted Printable transfer encoding syntax.

TIdMessageEncoderInfoQuotedPrintable reimplements the constructor for the class to set the class reference required to create (
1597) instances of the encoder.

See Also
TIdMessageEncoderInfo ( 1592)

TIdMessageEncoderInfoMIME ( 1594)

TIdMessageEncoderList ( 1601)

IndySupport ( 15)

TIdMessageEncoderInfoQuotedPrintable Members
The following tables list the members exposed by TIdMessageEncoderInfoQuotedPrintable.

1596 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderInfoUUE Class

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1597) Constructor for the object instance.
InitializeHeaders ( 1593) Specifies a method for generating RFC 2822 headers for a message.

Legend
Constructor
virtual
Property
read only

TIdMessageEncoderInfoQuotedPrintable Methods
The Methods of the TIdMessageEncoderInfoQuotedPrintable class are listed here.

Methods
Method Description
Create ( 1597) Constructor for the object instance.

Legend
Constructor
virtual

TIdMessageEncoderInfoQuotedPrintable.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the constructor for the object instance.

Create calls the inherited constructor to initialize the object instance.

Creates sets the class reference in MessageEncoderClass ( 1594) needed to create new instances of the encoder to
TIdMessageEncoderQuotedPrintable ( 1606).

See Also
TIdMessageEncoderInfo.Create ( 1593)

TIdMessageEncoderInfo.MessageEncoderClass ( 1594)

TIdMessageEncoderInfoUUE Class
Represents the registered encoder class for RFC messages using the UUEncoding scheme.

File
IdMessageCoderUUE ( 4687)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1597


TIdMessageEncoderInfoUUE Class Classes

Pascal
TIdMessageEncoderInfoUUE = class(TIdMessageEncoderInfo);
Description
TIdMessageEncoderInfoUUE is a TIdMessageEncoderInfo ( 1592) descendant that represents the registered encoder class for
RFC message parts using the UUEncoding scheme.

TIdMessageEncoderInfoUUE extends the ancestor class to include creation of the message encoder class instance needed when
creating new instance of an encoder.

See Also
TIdMessageEncoderInfo ( 1592)

IndySupport ( 15)

TIdMessageEncoderInfoUUE Members
The following tables list the members exposed by TIdMessageEncoderInfoUUE.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1598) Constructor for the object instance.
InitializeHeaders ( 1593) Specifies a method for generating RFC 2822 headers for a message.

Legend
Constructor
virtual
Property
read only

TIdMessageEncoderInfoUUE Methods
The Methods of the TIdMessageEncoderInfoUUE class are listed here.

Methods
Method Description
Create ( 1598) Constructor for the object instance.

Legend
Constructor
virtual

TIdMessageEncoderInfoUUE.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the overriden constructor for the object instance.

Create calls the inherited Create method. Create also assigns TIdMessageEncoderUUE ( 1607) to the MessageEncoderClass (
1594) class reference property.

1598 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderInfoXXE Class

See Also
TIdMessageEncoderUUE ( 1607)

TIdMessageEncoderInfoXXE Class
Represents information about the registered XXEncode encoder class.

File
IdMessageCoderXXE ( 4687)

Hierarchy

Pascal
TIdMessageEncoderInfoXXE = class(TIdMessageEncoderInfo);
Description
TIdMessageEncoderInfoXXE is a TIdMessageEncoderInfo ( 1592) descendant that represents information about the registered
XXEncode encoder class. TIdMessageEncoderInfoXXE extends the ancestor class to provide assignment of a
TIdMessageEncoderXXE ( 1609) class instance to the MessageEncoderClass ( 1594) in the constructor.

See Also
TIdMessageEncoderInfo ( 1592)

TIdMessageEncoderXXE ( 1609)

TIdMessageEncoderUUE ( 1607)

TIdMessageEncoderInfoXXE Members
The following tables list the members exposed by TIdMessageEncoderInfoXXE.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1600) Constructor for the object instance.
InitializeHeaders ( 1593) Specifies a method for generating RFC 2822 headers for a message.

Legend
Constructor
virtual
Property
read only

TIdMessageEncoderInfoXXE Methods
The Methods of the TIdMessageEncoderInfoXXE class are listed here.

Methods
Method Description
Create ( 1600) Constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1599


TIdMessageEncoderInfoYenc Class Classes

Legend
Constructor
virtual

TIdMessageEncoderInfoXXE.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the constructor for the object instance, and relies on the inherited Create method.

Create asssigns a TIdMessageEncoderXXE ( 1609) class instance to the MessageEncoderClass ( 1594) property, representing
the class type used for the registered decoder class.

See Also
TIdMessageEncoderXXE ( 1609)

TIdMessageEncoderInfoYenc Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
TIdMessageEncoderInfoYenc = class(TIdMessageEncoderInfo);
Description
TIdMessageEncoderInfoYenc TIdMessageEncoderInfo ( 1592) descendant

See Also
TIdMessageEncoderInfo ( 1592)

TIdMessageEncoderInfoYenc Members
The following tables list the members exposed by TIdMessageEncoderInfoYenc.

Properties
Property Description
MessageEncoderClass ( 1594) Represents the class type used to create ( 1593) new instances for the registered encoder class.

Methods
Method Description
Create ( 1601)
InitializeHeaders ( 1601)

Legend
Constructor
virtual
Property

1600 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderList Class

read only

TIdMessageEncoderInfoYenc Methods
The Methods of the TIdMessageEncoderInfoYenc class are listed here.

Methods
Method Description
Create ( 1601)
InitializeHeaders ( 1601)

Legend
Constructor
virtual

TIdMessageEncoderInfoYenc.Create Constructor
Pascal
constructor Create; override;
Description
Create overridden

TIdMessageEncoderInfoYenc.InitializeHeaders Method
Pascal
procedure InitializeHeaders(
AMsg: TIdMessage
); override;
Parameters
Parameters Description
AMsg

Description
InitializeHeaders overridden

TIdMessageEncoderList Class
Container for registered encoder classes, with methods to create ( 1603), access, and release registered encoder classes.

File
IdMessageCoder ( 4683)

Hierarchy

Pascal
TIdMessageEncoderList = class;
Description
TIdMessageEncoderList is a TObject descendant that is a container for registered encoder classes. TIdMessageEncoderList
provides methods to create ( 1603), access, and release registered encoder class instances.

The RegisterEncoder ( 1603) class method is used to register new encoder classes. RegisterEncoder ( 1603) is called in the

Internet Direct (Indy) Version 10.1.5 1601


TIdMessageEncoderList Class Classes

initialization section of Units that contain an encoder class, like IdMessageCoder.pas ( 4683), IdMessageCoderMIME.pas (
4684), IdMessageCoderUUE.pas ( 4687), and IdMessageCoderXXE.pas ( 4687).

The class method ByName ( 1602) is used to access an existing class instance in the container.

See Also
IdMessageCoder.pas ( 4683)

IdMessageCoderMIME.pas ( 4684)

IdMessageCoderUUE.pas ( 4687)

IdMessageCoderXXE.pas ( 4687)

TIdMessageEncoderList Members
The following tables list the members exposed by TIdMessageEncoderList.

Methods
Method Description
ByName ( 1602) Retrieves information about a registered encoder class using a specified name.
Create ( 1603) Constructor for the object instance.
Destroy ( 1603) Frees the object instance.
RegisterEncoder ( 1603) Registers and stores information about encoder class types.

Legend
Method
virtual

TIdMessageEncoderList Methods
The Methods of the TIdMessageEncoderList class are listed here.

Methods
Method Description
ByName ( 1602) Retrieves information about a registered encoder class using a specified name.
Create ( 1603) Constructor for the object instance.
Destroy ( 1603) Frees the object instance.
RegisterEncoder ( 1603) Registers and stores information about encoder class types.

Legend
Method
virtual

TIdMessageEncoderList.ByName Method
Retrieves information about a registered encoder class using a specified name.

Pascal
class function ByName(
const AName: string
): TIdMessageEncoderInfo;
Parameters
Parameters Description
AName Name of the registered encoder class to be retrieved.

Returns
TIdMessageEncoderInfo ( 1592) - Registerd encoder class that matxh the specified name.

1602 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderList Class

Description
ByName is a TIdMessageEncoderInfo ( 1592) class function in TIdMessageEncoderList ( 1601) that retrieves information about
a registered encoder class using the name specified in AName. If a registered encoder cannot be located with the specified name,
an EIdException ( 76) exception is raised with the constant message RSMessageEncoderNotFound the value in AName.

ByName is used by TIdMessage ( 1521) and TIdMessageParts ( 1623) when updating the value of the AttachmentEncoding
property.

See Also
IdMessageCoder.pas ( 4683)

EIdException ( 76)

RSMessageEncoderNotFound

TIdMessage.AttachmentEncoding ( 1536)

TIdMessageParts.AttachmentEncoding ( 1625)

TIdMessageEncoderList.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the Constructor for the object instance.

Create calls the inherited Create method. Create also initializes the internal list used to store registered message encoder class
instances.

See Also
TIdMessageEncoderList.Destroy ( 1603)

TIdMessageEncoderList.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the Destructor for the object instance.

Destroy frees each registered encoder class instance, and the internal list prior to calling the inherited Destroy method.

See Also
TIdMessageEncoderList.Create ( 1603)

TIdMessageEncoderList.RegisterEncoder Method
Registers and stores information about encoder class types.

Pascal
class procedure RegisterEncoder(
const AMessageEncoderName: string;
AMessageEncoderInfo: TIdMessageEncoderInfo
);

Internet Direct (Indy) Version 10.1.5 1603


TIdMessageEncoderMIME Class Classes

Parameters
Parameters Description
AMessageEncoderName Name to be associated with the registered encoder class.
AMessageEncoderInfo Information about the registered encoder class.

Description
RegisterEncoder is a class procedure in TIdMessageEncoderList ( 1601) that provides a mechanism for registering and storing
information about encoder class types.

RegisterEncoder checks to ensure that the list for registered encoder classed has be initialized to a valid TIdMessageEncoderList
( 1601) instance. RegisterEncoder adds the class information in AMessageEncoderInfo to the list, and associates the name in
AName with the registered class type.

RegisterEncoder is called from the initialization section of the Unit that contains the class type, like IdMessageCoder.pas ( 4683),
IdMessageCoderMIME.pas ( 4684), IdMessageCoderUUE.pas ( 4687), and IdMessageCoderXXE.pas ( 4687).

See Also
IdMessageCoder.pas ( 4683)

IdMessageCoderMIME.pas ( 4684)

IdMessageCoderUUE.pas ( 4687)

IdMessageCoderXXE.pas ( 4687)

TIdMessageEncoderInfo ( 1592)

TIdMessageEncoderMIME Class
Implements an encoder for RFC 2822-compliant MIME message parts.

File
IdMessageCoderMIME ( 4684)

Hierarchy

Pascal
TIdMessageEncoderMIME = class(TIdMessageEncoder);
Description
TIdMessageEncoderMIME is a TIdMessageEncoder ( 1588) descendant that implements an encoder for RFC 2822-compliant
MIME message parts that can be represented using MIME-encoded data.

TIdMessageEncoderMIME reimplements the Encode ( 1605) method to provide support for the Base64 encoding agorithm using
TIdEncoderMIME ( 664).

See Also
IdCoderMIME.pas ( 4595)

TIdMessageEncoder ( 1588)

TIdEncoderMIME ( 664)

TIdMessageEncoderMIME Members
The following tables list the members exposed by TIdMessageEncoderMIME.

1604 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderMIME Class

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
Encode ( 1605)
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Encode ( 1590)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageEncoderMIME Methods
The Methods of the TIdMessageEncoderMIME class are listed here.

Methods
Method Description
Encode ( 1605)

Legend
Method
virtual

TIdMessageEncoderMIME.Encode Method
Pascal
procedure Encode(
ASrc: TIdStream;
ADest: TIdStream
); override;
Parameters
Parameters Description
ASrc Type is TIdStream ( 3087).
ADest Type is TIdStream ( 3087).

Internet Direct (Indy) Version 10.1.5 1605


TIdMessageEncoderQuotedPrintable Class Classes

Description
TIdMessageEncoderMIME.Encode overridden method.

TIdMessageEncoderQuotedPrintable Class
Implements an encoder for RFC 2822-compliant message parts using Quoted Printable transfer encoding syntax.

File
IdMessageCoderQuotedPrintable ( 4686)

Hierarchy

Pascal
TIdMessageEncoderQuotedPrintable = class(TIdMessageEncoder);
Description
TIdMessageEncoderQuotedPrintable is a TIdMessageEncoder ( 1588) descendant that implements an encoder for RFC
2822-compliant message parts using Quoted Printable transfer encoding syntax.

TIdMessageEncoderQuotedPrintable extends the ancestor class by reimplementing the Encode ( 1607) method using a
TIdEncoderQuotedPrintable ( 665) instance to perform Quoted Printable encoding for contents.

Decoding for the Quoted Printable transfer encoding syntax is handled using TIdMessageDecoderMIME ( 1579).

See Also
TIdMessageEncoder ( 1588)

TIdMessageDecoderMIME ( 1579) IndySupport ( 15)

TIdMessageEncoderQuotedPrintable Members
The following tables list the members exposed by TIdMessageEncoderQuotedPrintable.

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
Encode ( 1607)
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Encode ( 1590)

1606 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderUUE Class

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageEncoderQuotedPrintable Methods
The Methods of the TIdMessageEncoderQuotedPrintable class are listed here.

Methods
Method Description
Encode ( 1607)

Legend
Method
virtual

TIdMessageEncoderQuotedPrintable.Encode Method
Pascal
procedure Encode(
ASrc: TIdStream;
ADest: TIdStream
); override;
Parameters
Parameters Description
ASrc Type is TIdStream ( 3087).
ADest Type is TIdStream ( 3087).

Description
TIdMessageEncoderQuotedPrintable.Encode overridden method.

TIdMessageEncoderUUE Class
Implements an encoder for RFC 2822-compliant message parts using the UUEncode algorithm.

File
IdMessageCoderUUE ( 4687)

Hierarchy

Pascal
TIdMessageEncoderUUE = class(TIdMessageEncoderUUEBase);
Description
TIdMessageEncoderUUE is a TIdMessageEncoderUUEBase ( 1608) descendant that implements an encoder for RFC

Internet Direct (Indy) Version 10.1.5 1607


TIdMessageEncoderUUEBase Class Classes

2822-compliant message parts using the UUEncode algorithm.

TIdMessageEncoderUUE extends the ancestor class to include use of the TIdEncoderUUE ( 667) encoder instead of the generic
TIdEncoder3to4 ( 657) encoder.

See Also
TIdMessageEncoderUUEBase ( 1608)

TIdEncoderUUE ( 667)

TIdEncoder3to4 ( 657)

IndySupport ( 15)

TIdMessageEncoderUUEBase Class
Implements the UUEncode algorithm for an RFC 2822-compliant message part.

File
IdMessageCoderUUE ( 4687)

Hierarchy

Pascal
TIdMessageEncoderUUEBase = class(TIdMessageEncoder);
Description
TIdMessageEncoderUUEBase is a TIdMessageEncoder ( 1588) descendant that is a base class implementing support for
encoding an RFC 2822-compliant message part using the UUEncode algorithm.

TIdMessageEncoderUUEBase extends the ancestor class by overriding the Encode ( 1609) method to allow creation of the entire
encoded packet using a TIdEncoder3to4 ( 657) object instance.

See Also
TIdMessageEncoder ( 1588)

TIdEncoder3to4 ( 657)

IndySupport ( 15)

TIdMessageEncoderUUEBase Members
The following tables list the members exposed by TIdMessageEncoderUUEBase.

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.

1608 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageEncoderXXE Class

Encode ( 1609)
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Encode ( 1590)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageEncoderUUEBase Methods
The Methods of the TIdMessageEncoderUUEBase class are listed here.

Methods
Method Description
Encode ( 1609)

Legend
Method
virtual

TIdMessageEncoderUUEBase.Encode Method
Pascal
procedure Encode(
ASrc: TIdStream;
ADest: TIdStream
); override;
Parameters
Parameters Description
ASrc Type is TIdStream ( 3087).
ADest Type is TIdStream ( 3087).

Description
TIdMessageEncoderUUEBase.Encode overridden method.

TIdMessageEncoderXXE Class
Implements an encoder for RFC 2822-compliant message parts using the XXEncode algorithm.

File
IdMessageCoderXXE ( 4687)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1609


TIdMessageEncoderYenc Class Classes

Pascal
TIdMessageEncoderXXE = class(TIdMessageEncoderUUEBase);
Description
TIdMessageEncoderXXE is a TIdMessageEncoderUUEBase ( 1608) descendant that implements support for creating
XXEncoded message parts.

TIdMessageEncoderXXE extends the ancestor class by overriding the constructor to assign an instance of TIdEncoderXXE ( 668)
to the EncoderClass property for the object instance.

See Also
TIdMessageEncoderUUEBase ( 1608)

TIdEncoderXXE ( 668)

TIdMessageEncoderYenc Class
File
IdMessageCoderYenc ( 4688)

Hierarchy

Pascal
TIdMessageEncoderYenc = class(TIdMessageEncoder);
Description
TIdMessageEncoderYenc TIdMessageEncoder ( 1588) descendant

See Also
TIdMessageEncoder ( 1588)

TIdMessageEncoderYenc Members
The following tables list the members exposed by TIdMessageEncoderYenc.

Properties
Property Description
Filename ( 1591) Identifies the file name that contains the contents of an RFC-822 message part.
PermissionCode ( 1591) Identifies the Unix user permissions required to acccess an RFC 2822-compliant message part.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
Encode ( 1611)
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Encode ( 1590)

1610 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageItem Class

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
abstract
Property
read only
Event

TIdMessageEncoderYenc Methods
The Methods of the TIdMessageEncoderYenc class are listed here.

Methods
Method Description
Encode ( 1611)

Legend
Method
virtual

TIdMessageEncoderYenc.Encode Method
Pascal
procedure Encode(
ASrc: TIdStream;
ADest: TIdStream
); override;
Parameters
Parameters Description
ASrc Type is TIdStream ( 3087).
ADest Type is TIdStream ( 3087).

Description
TIdMessageEncoderYenc.Encode overridden method.

TIdMessageItem Class
Represents a message item in a message collection.

File
IdMessageCollection ( 4688)

Hierarchy

Pascal
TIdMessageItem = class(TIdCollectionItem);
Description
TIdMessageItem is a TCollectionItem descendant that implements properties and methods needed to represent message items in a

Internet Direct (Indy) Version 10.1.5 1611


TIdMessageItem Class Classes

TIdMessageCollection ( 1561) container.

TIdMessageItem implements properties that represent the TIdMessage ( 1521) instance for the collection item, and flags that
indicate if the message is queued for delivery and the number of delivery attempts during transmission.

See Also
TIdMessageCollection ( 1561) TIdMessageCollection ( 1561)

TIdMessageItem Members
The following tables list the members exposed by TIdMessageItem.

Properties
Property Description
Attempt ( 1613) Indicates the number of attempts allowed when sending or updating a message item.
Queued ( 1614) Indicates that the message item is queued fro transmission.

Methods
Method Description
Create ( 1613)
Destroy ( 1613)

Legend
Data Member
Constructor
virtual
Property

TIdMessageItem Fields
The Fields of the TIdMessageItem class are listed here.

Legend
Data Member

TIdMessageItem.Msg Field
Represents the message in the collection item.

Pascal
Msg: TIdMessage;
Description
Msg is a public TIdMessage ( 1521) member that represents the TIdMessage ( 1521) instance for the collection item.

Msg is assigned in Create ( 1613), and freed in Destroy ( 1613).

Msg is the value accessed when reading or writing to the TIdMessageCollection.Messages ( 1563) property. When writing to Msg,
the previous instance is freed prior to assigned the new message instance to the property.

See Also
TIdMessage ( 1521)

TIdMessageCollection.Messages ( 1563)

TIdMessageItem Methods
The Methods of the TIdMessageItem class are listed here.

1612 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageItem Class

Methods
Method Description
Create ( 1613)
Destroy ( 1613)

Legend
Constructor
virtual

TIdMessageItem.Create Constructor
Pascal
constructor Create(
Collection: TIdCollection
); override;
Parameters
Parameters Description
Collection Type is TIdCollection ( 3011).

Description
TIdMessageItem.Create overridden constructor method.

TIdMessageItem.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden

TIdMessageItem Properties
The Properties of the TIdMessageItem class are listed here.

Properties
Property Description
Attempt ( 1613) Indicates the number of attempts allowed when sending or updating a message item.
Queued ( 1614) Indicates that the message item is queued fro transmission.

Legend
Property

TIdMessageItem.Attempt Property
Indicates the number of attempts allowed when sending or updating a message item.

Pascal
property Attempt: Integer;
Description
Attempt is an Integer property that indicates the number of attempts allowed when trying to send or update a message item in the
mailbox. Attempt is used when the message item is Queued ( 1614).

See Also
TIdMessageItem.Queued ( 1614)

Internet Direct (Indy) Version 10.1.5 1613


TIdMessagePart Class Classes

TIdMessageCollection ( 1561)

TIdMessage ( 1521)

TIdMessageItem.Queued Property
Indicates that the message item is queued fro transmission.

Pascal
property Queued: Boolean;
Description
Queued is a Boolean property that indicates if the message item in the collection has been queued for transmission to a server.

Set Attempt ( 1613) to indicate the number of retries allowed during transmission.

See Also
TIdMessageItem.Attempt ( 1613)

TIdMessageCollection ( 1561)

TIdMessage ( 1521)

TIdMessagePart Class
Implements the base class for MIME message parts.

File
IdMessageParts ( 4689)

Hierarchy

Pascal
TIdMessagePart = class(TIdCollectionItem);
Description
TIdMessagePart is a TCollectionItem descendant that encapsulates a MIME message part. TIdMessagePart is the ancestor class
for common MIME message parts like TIdText ( 2404) and TIdAttachment ( 227). TIdMessagePart is also the collection item
added to the TIdMessageParts ( 1623) collection.

TIdMessagePart provides methods and properties common to all MIME message parts, including properties that represent values
from Internet Message headers and the content for the message part.

Instances of TIdMessagePart are not normally created during normal usage. Use one the descendant classes, like TIdText (
2404) or TIdAttachment ( 227).

See Also
TIdText ( 2404)

TIdAttachment ( 227)

IndySupport ( 15)

TIdMessagePart Members
The following tables list the members exposed by TIdMessagePart.

1614 Internet Direct (Indy) Version 10.1.5


Classes TIdMessagePart Class

Properties
Property Description
Boundary ( 1618) Character sequence that delimits the message part.
BoundaryBegin ( 1618) Indicates that a boundary marker appears at the beginning of the message part.
BoundaryEnd ( 1618) Indicates that a boundary marker appears at the end of the message part.
CharSet ( 1619)
ContentDescription ( 1619) Represents descriptive information with a given message body.
ContentID ( 1619) Identifier for the message part.
ContentLocation ( 1619) Specifies a URI that is the resource location for the entity in the message.
ContentTransfer ( 1620) Identifies the encoding scheme for the message part.
ContentType ( 1620) Identifies the MIME media type for the message.
ExtraHeaders ( 1621) Represents message headers not used for with property storage.
Headers ( 1621) Represents message headers in native form.
IsEncoded ( 1622) Indicates that the body for the message part is MIME-encoded.
ParentPart ( 1622)

Methods
Method Description
Assign ( 1615)
Create ( 1616) Constructor for the collection item.
Destroy ( 1616) Frees the object instance.
GetCharSet ( 1617)
PartType ( 1617) Indicates the classification of the message part instance.
ResolveContentType ( 1617)

Events
Event Description
OnGetMessagePartStream ( 1622)

Legend
Method
virtual
Property
read only
Event

TIdMessagePart Methods
The Methods of the TIdMessagePart class are listed here.

Methods
Method Description
Assign ( 1615)
Create ( 1616) Constructor for the collection item.
Destroy ( 1616) Frees the object instance.
GetCharSet ( 1617)
PartType ( 1617) Indicates the classification of the message part instance.
ResolveContentType ( 1617)

Legend
Method
virtual

TIdMessagePart.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent

Internet Direct (Indy) Version 10.1.5 1615


TIdMessagePart Class Classes

); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
TIdMessagePart.Assign overridden method.

TIdMessagePart.Create Constructor
Constructor for the collection item.

Pascal
constructor Create(
Collection: TIdCollection
); override;
Parameters
Parameters Description
Collection Owner of the collection item.

Description
Create is the constructor for the collection item.

Create raises an EIdCanNotCreateMessagePart ( 65) exception if the ClassType for the message part is TIdMessagePart (
1614). Use a TIdMessagePart ( 1614) descendant to override this constructor with parameters to add items to a TIdMessageParts
( 1623) collection.

Create calls the inherited Create method to initialize the object instance, and allocates resources required for the Headers ( 1621)
and ExtraHeaders ( 1621) properties.

Create sets the default values for the following properties:

Property Default Value


IsEncoded ( 1622) False
ParentPart ( 1622) -1 (indicating a top-level message part)

Use Destroy ( 1616) to free the collection item.

Exceptions
Exceptions Description
EIdCanNotCreateMessagePart ( 65) With the message RSTIdMessagePartCreate.

TIdMessagePart.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing and releasing resources allocated to the Headers
( 1621) and ExtraHeaders ( 1621) properties.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdMessagePart.Create ( 1616)

1616 Internet Direct (Indy) Version 10.1.5


Classes TIdMessagePart Class

TIdMessagePart.Headers ( 1621)

TIdMessagePart.ExtraHeaders ( 1621)

TIdMessagePart.GetCharSet Method
Pascal
function GetCharSet(
AHeader: string
): String;
Parameters
Parameters Description
AHeader Type is string.

Returns
String

Description
GetCharSet returns String

TIdMessagePart.PartType Method
Indicates the classification of the message part instance.

Pascal
class function PartType: TIdMessagePartType; virtual;
Returns
TIdMessagePartType ( 2969) - Message part type for the current instance.

Description
PartType is a TIdMessagePartType ( 2969) class function used to determine the classification of the current message part as text
or an attachment.

PartType is used in CountParts to determine if the message part is a TIdText ( 2404) or TIdAttachement descendant, and aids in
determining the content type for the message part and message.

TIdMessagePart.ResolveContentType Method
Pascal
function ResolveContentType(
AContentType: string
): string;
Parameters
Parameters Description
AContentType Type is string.

Returns
string

Description
ResolveContentType returns string

TIdMessagePart Properties
The Properties of the TIdMessagePart class are listed here.

Internet Direct (Indy) Version 10.1.5 1617


TIdMessagePart Class Classes

Properties
Property Description
Boundary ( 1618) Character sequence that delimits the message part.
BoundaryBegin ( 1618) Indicates that a boundary marker appears at the beginning of the message part.
BoundaryEnd ( 1618) Indicates that a boundary marker appears at the end of the message part.
CharSet ( 1619)
ContentDescription ( 1619) Represents descriptive information with a given message body.
ContentID ( 1619) Identifier for the message part.
ContentLocation ( 1619) Specifies a URI that is the resource location for the entity in the message.
ContentTransfer ( 1620) Identifies the encoding scheme for the message part.
ContentType ( 1620) Identifies the MIME media type for the message.
ExtraHeaders ( 1621) Represents message headers not used for with property storage.
Headers ( 1621) Represents message headers in native form.
IsEncoded ( 1622) Indicates that the body for the message part is MIME-encoded.
ParentPart ( 1622)

Legend
Property
read only

TIdMessagePart.Boundary Property
Character sequence that delimits the message part.

Pascal
property Boundary: String;
Description
Boundary is a String property that contains the character sequence that delimits the message part in an Internet Message.
Boundary applies to message parts where the ContentType ( 1620) is "multipart".

Boundary marks the beginning of each message part in the file, and also follows the final message part in the message.

Boundary contains the character sequence that follows the mandatory boundary marker prefix "--".

TIdMessagePart.BoundaryBegin Property
Indicates that a boundary marker appears at the beginning of the message part.

Pascal
property BoundaryBegin: Boolean;
Description
BoundaryBegin is a Boolean property that indicates that a boundary marker appears at the beginning of the message part.
BoundaryBegin is used and updated when the message part is received by a message client.

TIdMessagePart.BoundaryEnd Property
Indicates that a boundary marker appears at the end of the message part.

Pascal
property BoundaryEnd: Boolean;
Description
BoundaryEnd is a Boolean property that indicates that a boundary marker appears at the end of the message part. BoundaryEnd is
used and updated when the message part is received by a message client.

1618 Internet Direct (Indy) Version 10.1.5


Classes TIdMessagePart Class

TIdMessagePart.CharSet Property
Pascal
property CharSet: string;
Description
CharSet is a Published string property

TIdMessagePart.ContentDescription Property
Represents descriptive information with a given message body.

Pascal
property ContentDescription: string;
Description
ContentDescription is a string property used to represent the "Content-Description" Header field in a message part.
ContentDescription provides the to associate some descriptive information with a given message body.

For example, ContentDescription may be useful to mark an "image" body as "a picture of the Space Shuttle Endeavor." Such text
may be placed in the optional ContentDescription property.

ContentDescription is presumed to be given in the US-ASCII character set, although the mechanism specified in RFC 2047 may be
used for non-US-ASCII Content-Description values.

TIdMessagePart.ContentID Property
Identifier for the message part.

Pascal
property ContentID: string;
Description
ContentID is a string property that represents the values used in a "Content-ID:" header field, as described in the Intenet Standards
documents:

RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies

RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types

ContentID acts a unique identifier the MIME entity.

Although ContentID is generally optional, its use is mandatory in messages with the MIME ContentType ( 1620)
'message/external-body'.

For messages with the ContentType ( 1620) 'multipart/alternative', each message part represents the same data (onlyin a different
format). ContentID should have a different Content-ID value in the case where the information content of the two message parts is
not identical.

When the information content is identical, the same ContentID should be used for each of the identical message parts.

Use ContentLocation ( 1619) to determine the URI for where the MIME entity can be accessed.

TIdMessagePart.ContentLocation Property
Specifies a URI that is the resource location for the entity in the message.

Pascal
property ContentLocation: string;

Internet Direct (Indy) Version 10.1.5 1619


TIdMessagePart Class Classes

Description
ContentLocation is a string property that specifies an absolute or a relative URI that is the resource location for the entity enclosed
in the message.

ContentLocation is the value used in the "Content-Location:" RFC message header for the message part.

Any URI or URL scheme may be used, but use of non-standardized URI or URL schemes might create ( 1616) problems for
recipients that cannot handle them correctly.

ContentLocation does not need to refer to a resource which is globally available for retrieval using this URI (after resolution of
relative URIs). However, URIs in ContentLocation should still be globally unique. ContentLocation may even contain a fictitious URI
which does not need to be globally unique.

ContentLocation allows URIs in a multipart/related document to reference subsidiary resources in other body parts of the same
multipart/related structure. While initially designed to support e-mail transfer of complete multi-resource HTML multimedia
documents, these conventions can also be employed for resources having other content types.

For additional information about "Content-Location" headers, refer to the Internet Standards document:

RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML).

TIdMessagePart.ContentTransfer Property
Identifies the encoding scheme for the message part.

Pascal
property ContentTransfer: string;
Description
ContentTransfer is a String property that identifies the encoding scheme for the message part. ContentTransfer contains the value
from the Internet Message header "Content-Transfer-Encoding:".

ContentTransfer contains a token that identifies the encoding transformations performed for the message part or the domain for the
result. ContentTransfer normally contains one of the following values:

"7bit"
"8bit"
"binary"
"quoted-printable"
"base64"

The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all indicate that NO encoding transformation has been performed.
The quoted-printable and base64 encodings transform their input into values using "7bit" representation.

The five values defined for the ContentTransfer imply nothing about the ContentType ( 1620) other than the algorithm by which it
was encoded or the transport system requirements when UU-encoded.

ContentTransfer is not case sensitive; "Base64", "BASE64" and "bAsE64" are all equivalent.

TIdMessagePart.ContentType Property
Identifies the MIME media type for the message.

Pascal
property ContentType: string;
Description
ContentType is a String property that specifies the MIME media type and subtype for the message part, as described in the Internet

1620 Internet Direct (Indy) Version 10.1.5


Classes TIdMessagePart Class

standards documents:

RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies

RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types

RFC 2047 - Multipurpose Internet Mail Extensions (MIME) Part Three: Message Header Extensions for Non-ASCII Text

ContentType describes the data contained in the message part to allow a user agent to pick an appropriate mechanism for
presenting the data. ContentType specifies the nature of the data in the body of an entity by giving media type and subtype
identifiers, and by providing auxiliary information that may be required for certain media types.

After the media type and subtype names, the remainder of the header field is simply a set of parameters, specified in an
attribute=value notation. The ordering of parameters is not significant.

Use ContentTransfer ( 1620) to identify the encoding scheme for the message part.

See Also
TIdMessagePart.ContentTransfer ( 1620)

TIdMimeTable ( 1636)

TIdMessagePart.ExtraHeaders Property
Represents message headers not used for with property storage.

Pascal
property ExtraHeaders: TIdHeaderList;
Description
ExtraHeaders is a TIdHeaderList ( 1024) property that represents message headers not used for with property storage.
ExtraHeaders do not have corresponding properties to represent their values in the object instance.

ExtraHeaders is used to store header values for the message that are not represented as properties of TIdMessage ( 1521).
ExtraHeaders is generally used to store values that might be added by a Mail User Agent, or for custom extension tokens beginning
with "x-".

Use the Methods and Properties in TIdHeaderList ( 1024) to maintain the custom message headers.

When a message part is sent using a protocol transport provider, like TIdSMTP ( 2017) or TIdNNTP ( 1692), values in
ExtraHeaders are merged with values in the Header property during transmission. The same action is performed when calling the
SaveToFile or SaveToStream methods.

See Also
TIdHeaderList ( 1024)

TIdMessage ( 1521)

TIdMessagePart.Headers Property
Represents message headers in native form.

Pascal
property Headers: TIdHeaderList;
Description
Headers is a read-only TIdHeaderList ( 1024) property used to represent the RFC message headers for the Internet Message in
NAME=VALUE form. Headers represents the header values as described in the Internet Standards documents:

RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies

RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types

RFC 2047 - Multipurpose Internet Mail Extensions (MIME) Part Three: Message Header Extensions for Non-ASCII Text

Internet Direct (Indy) Version 10.1.5 1621


TIdMessageParts Class Classes

Use properties and methods in the message part to maintain values stored in the Headers property.

Use ExtraHeaders ( 1621) for custom or experimental message headers not represented as properties in the message part.

See Also
TIdHeaderList ( 1024)

TIdMessage ( 1521)

TIdMessagePart.Headers

TIdMessagePart.ExtraHeaders ( 1621)

TIdMessagePart.IsEncoded Property
Indicates that the body for the message part is MIME-encoded.

Pascal
property IsEncoded: Boolean;
Description
IsEncoded is a read-only Boolean property that indicates the body of the message part is stored in MIME-encoded form. IsEncoded
normally reflects that the body contains a graphic image, a BASE64-, or a QUOTED-PRINTABLE-encoded value.

See Also
TIdMessage ( 1521)

TIdMessagePart.ParentPart Property
Pascal
property ParentPart: integer;
Description
ParentPart is a Published integer property

TIdMessagePart Events
The Events of the TIdMessagePart class are listed here.

Events
Event Description
OnGetMessagePartStream ( 1622)

Legend
Event

TIdMessagePart.OnGetMessagePartStream Event
Pascal
property OnGetMessagePartStream: TOnGetMessagePartStream;
Description
OnGetMessagePartStream is a TOnGetMessagePartStream ( 3107) event handler property.

1622 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageParts Class

TIdMessageParts Class
Collection for individual message parts in the message.

File
IdMessageParts ( 4689)

Hierarchy

Pascal
TIdMessageParts = class(TIdOwnedCollection);
Description
TIdMessageParts is a TOwnedCollection descendant and implements the collection which contains the individual message parts for
a MIME message.

TIdMessageParts provides properties and methods needed to access and maintain the TIdMessagePart ( 1614) collection items
in the container. TIdMessageParts also implements propeties and methods used to prepare the message parts in the collection for
transmission using message transport facilities.

TIdMessageParts is the type used to represent the TIdMessage.MessageParts ( 1548) property.

See Also
TIdMessagePart ( 1614)

TIdText ( 2404)

TIdAttachment ( 227)

TIdMessage.MessageParts ( 1548)

IndySupport ( 15)

TIdMessageParts Members
The following tables list the members exposed by TIdMessageParts.

Properties
Property Description
AttachmentCount ( 1625) Indicates the number of attachments in the message part collection.
AttachmentEncoding ( 1625) Identifies the default encoding mechanism used for a message part.
Items ( 1626) Represents the message parts in the collection.
MessageEncoderInfo ( 1626) Represents encoder information for the message parts collection.
OwnerMessage ( 1626)
RelatedPartCount ( 1627) Indicates the number of attachments in the message part collection.
TextPartCount ( 1627) Indicates the number of text message parts in the collection.

Methods
Method Description
Add ( 1624) Adds a message part to the collection.
CountParts ( 1624) Determines the number of specific message parts in the collection.
Create ( 1624)

Legend
Method
Property
read only

Internet Direct (Indy) Version 10.1.5 1623


TIdMessageParts Class Classes

TIdMessageParts Methods
The Methods of the TIdMessageParts class are listed here.

Methods
Method Description
Add ( 1624) Adds a message part to the collection.
CountParts ( 1624) Determines the number of specific message parts in the collection.
Create ( 1624)

Legend
Method

TIdMessageParts.Add Method
Adds a message part to the collection.

Pascal
function Add: TIdMessagePart;
Returns
TIdMessagePart ( 1614) - Message part added to the collection.

Description
Add is a TIdMessagePart ( 1614) function that is disabled for the collection.

Add always returns Nil as the return value. Add is disabled to prevent adding the ancestor class TIdMessagePart ( 1614) to the
collection.

Use TIdText.Create ( 2406) and TIdAttachment.Create ( 1624) to add the new collection item to the collection identified by the
Collection parameter.

TIdMessageParts.CountParts Method
Determines the number of specific message parts in the collection.

Pascal
procedure CountParts;
Description
CountParts is procedure that determines the number of specific message parts in the collection, and updates the TextPartCount (
1627), AttachmentCount ( 1625), and RelatedPartCount ( 1627) properties to indicate the calculated values.

CountParts is used during generation of headers for a mail message prior to transmission in TIdMessage.GenerateHeader (
1529). You can force an update to these values prior to transmission (or on receipt) by calling CountParts.

See Also
TIdMessageParts.AttachmentCount ( 1625)

TIdMessageParts.RelatedPartCount ( 1627)

TIdMessageParts.TextPartCount ( 1627)

TIdMessage.GenerateHeader ( 1529)

TIdMessageParts.Create Constructor
Pascal
constructor Create(

1624 Internet Direct (Indy) Version 10.1.5


Classes TIdMessageParts Class

AOwner: TIdPersistent
); reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
TIdMessageParts.Create reintroduced constructor method.

TIdMessageParts Properties
The Properties of the TIdMessageParts class are listed here.

Properties
Property Description
AttachmentCount ( 1625) Indicates the number of attachments in the message part collection.
AttachmentEncoding ( 1625) Identifies the default encoding mechanism used for a message part.
Items ( 1626) Represents the message parts in the collection.
MessageEncoderInfo ( 1626) Represents encoder information for the message parts collection.
OwnerMessage ( 1626)
RelatedPartCount ( 1627) Indicates the number of attachments in the message part collection.
TextPartCount ( 1627) Indicates the number of text message parts in the collection.

Legend
Property
read only

TIdMessageParts.AttachmentCount Property
Indicates the number of attachments in the message part collection.

Pascal
property AttachmentCount: integer;
Description
AttachmentCount is a read-only Integer property that identifies the number of attachments in the message parts collection.

AttachmentCount is updated in CountParts ( 1624), and indicates the number of TIdAttachment ( 227) items detected in the
collection using the TIdMessagePart.ClassType method.

AttachmentCount, RelatedPartCount ( 1627), and TextPartCount ( 1627) can be used when headers are generated for an
outgoing mail message. You can force an update to these values prior to transmission (or on receipt) by calling CountParts (
1624).

See Also
TIdMessageParts.RelatedPartCount ( 1627)

TIdMessageParts.TextPartCount ( 1627)

TIdMessageParts.CountParts ( 1624)

TIdMessageParts.AttachmentEncoding Property
Identifies the default encoding mechanism used for a message part.

Pascal
property AttachmentEncoding: string;

Internet Direct (Indy) Version 10.1.5 1625


TIdMessageParts Class Classes

Description
AttachmentEncoding is a String property that identifies the encoding mechanism used for attachment message parts in the
message.

Changing the value of AttachmentEncoding for the message part collection also updates the default encoding used for all message
parts in the collection, and updates MessageEncodeInfo for the encoder that handles the AttachmentEncoding.

Default value for AttachmentEncoding is 'MIME', as assigned in the Create ( 1624) constructor.

TIdMessageParts.Items Property
Represents the message parts in the collection.

Pascal
property Items [Index: Integer]: TIdMessagePart;
Parameters
Parameters Description
Index Position of the message part in the collection.

Returns
TIdMessagePart ( 1614) - Collection item at the specified position.

Description
Items is an indexed TIdMessagePart ( 1614) property used to access the individual message parts in the collection. Index values
must be in the range 0..Count-1.

When accessing the items in the collection, the return value is an abstract TIdMessagePart ( 1614) instance and must be cast to
the appropriate descendant class to access properties and methods in the descendant class.

TIdMessageParts.MessageEncoderInfo Property
Represents encoder information for the message parts collection.

Pascal
property MessageEncoderInfo: TObject;
Description
MessageEncoderInfo is a TObject property that represents encoder information for the message parts collection.

MessageEncoderInfo is updated to reflect the coder need to represent the AttachmentEncoding ( 1625). MessageEncoderInfo is
used in TIdMessage.GenerateHeader ( 1529) to initalize headers for a message based on the encoding schema.

MessageEncoderInfo is also used in TIdAttachment.Encode to instantiate an encoder for writing an attachment to a stream.

See Also
TIdMessageParts.AttachmentEncoding ( 1625)

TIdAttachment.Encode

TIdMessage.GenerateHeader ( 1529)

TIdMessageParts.OwnerMessage Property
Pascal
property OwnerMessage: TIdPersistent;
Description
OwnerMessage is a Public read-only TPersistent property

1626 Internet Direct (Indy) Version 10.1.5


Classes TIdMicrowareOS9FTPListItem Class

TIdMessageParts.RelatedPartCount Property
Indicates the number of attachments in the message part collection.

Pascal
property RelatedPartCount: integer;
Description
RelatedPartCount is a read-only Integer property that identifies the number of dependent attachments in the message parts
collection.

RelatedPartCount is updated in CountParts ( 1624), and indicates the number of TIdAttachment ( 227) items detected in the
collection using the TIdMessagePart.ClassType method that contain a value in TIdMessagePart.ContentID ( 1619). Attachments
Attachments without a Content-Id header value are included in AttachmentCount ( 1625).

AttachmentCount ( 1625), RelatedPartCount, and TextPartCount ( 1627) can be used when headers are generated for an
outgoing mail message. You can force an update to these values prior to transmission (or on receipt) by calling CountParts (
1624).

See Also
TIdMessageParts.AttachmentCount ( 1625)

TIdMessageParts.TextPartCount ( 1627)

TIdMessageParts.CountParts ( 1624)

TIdMessagePart.ContentID ( 1619)

TIdMessagePart.ClassType

TIdMessageParts.TextPartCount Property
Indicates the number of text message parts in the collection.

Pascal
property TextPartCount: integer;
Description
TextPartCount is a read-only Integer property that identifies the number of text parts in the message parts collection. TextPartCount
is updated in CountParts ( 1624), and indicates the number of TIdText ( 2404) items detected in the collection using the
TIdMessagePart.ClassType method.

AttachmentCount ( 1625), RelatedPartCount ( 1627), and TextPartCount can be used when headers are generated for an
outgoing mail message. You can force an update to these values prior to transmission (or on receipt) by calling CountParts (
1624).

See Also
TIdMessageParts.AttachmentCount ( 1625)

TIdMessageParts.RelatedPartCount ( 1627)

TIdMessageParts.CountParts ( 1624)

TIdMicrowareOS9FTPListItem Class
File
IdFTPListParseMicrowareOS9 ( 4638)

Internet Direct (Indy) Version 10.1.5 1627


TIdMicrowareOS9FTPListItem Class Classes

Hierarchy

Pascal
TIdMicrowareOS9FTPListItem = class(TIdOwnerFTPListItem);
Description
TIdMicrowareOS9FTPListItem is a TIdOwnerFTPListItem ( 1765) descendant.

See Also
TIdOwnerFTPListItem ( 1765)

TIdMicrowareOS9FTPListItem Members
The following tables list the members exposed by TIdMicrowareOS9FTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
OS9MiscPermissions ( 1629)
OS9OwnerPermissions ( 1629)
OS9PublicPermissions ( 1629)
OS9Sector ( 1629)
OwnerName ( 1766)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdMicrowareOS9FTPListItem Properties
The Properties of the TIdMicrowareOS9FTPListItem class are listed here.

Properties
Property Description
OS9MiscPermissions ( 1629)
OS9OwnerPermissions ( 1629)
OS9PublicPermissions ( 1629)
OS9Sector ( 1629)

1628 Internet Direct (Indy) Version 10.1.5


Classes TIdMIMEBoundary Class

Legend
Property

TIdMicrowareOS9FTPListItem.OS9MiscPermissions Property
Pascal
property OS9MiscPermissions: String;
Description
OS9MiscPermissions is a Public String property. Write access for the property is implemented using FOS9MiscPermissions.

TIdMicrowareOS9FTPListItem.OS9OwnerPermissions Property
Pascal
property OS9OwnerPermissions: String;
Description
OS9OwnerPermissions is a Public String property. Write access for the property is implemented using FOS9OwnerPermissions.

TIdMicrowareOS9FTPListItem.OS9PublicPermissions Property
Pascal
property OS9PublicPermissions: String;
Description
OS9PublicPermissions is a Public String property. Write access for the property is implemented using FOS9PublicPermissions.

TIdMicrowareOS9FTPListItem.OS9Sector Property
Pascal
property OS9Sector: Cardinal;
Description
OS9Sector is a Public Cardinal property. Write access for the property is implemented using FOS9Sector.

TIdMIMEBoundary Class
Represents MIME boundary markers from RFC message headers.

File
IdMessage ( 4682)

Hierarchy

Pascal
TIdMIMEBoundary = class(TObject);
Description
TIdMIMEBoundary is a TObject descendant that implements a class used to detect and handle MIME boundary markers in
message headers for an RFC 822-compliant message.

In essence, TIdMIMEBoundary is used as a Stack-based container for MIME boundary markers detected in a "Content-Type"

Internet Direct (Indy) Version 10.1.5 1629


TIdMIMEBoundary Class Classes

header. New boundary markers are added to the the top of the stack, using the Push ( 1633) method, when they are detected
during header processing.

Like any stack container, TIdMIMEBoundary also has mechanisms to Pop ( 1632) and Clear ( 1631) accumulated values in the
boundary marker list.

TIdMIMEBoundary also provides a class function to locate a boundary marker in a given string, FindBoundary ( 1632), without
requiring a realized instance of the class.

TIdMIMEBoundary is the type used to represent the MIMEBoundary property in TIdMessage ( 1521).

See Also
TIdMessage ( 1521)

TIdMessage.MIMEBoundary ( 1548)

IndySupport ( 15)

TIdMIMEBoundary Members
The following tables list the members exposed by TIdMIMEBoundary.

Properties
Property Description
Boundary ( 1633) Indicates the most recent MIME boundary marker in the list.
ParentPart ( 1634) Indicates the ordinal position of the message part that owns the content type at the top of the stack.

Methods
Method Description
Clear ( 1631) Removes boundary markers from the internal list.
Count ( 1631) Indicates the number of boundary markers stored on the stack.
Create ( 1631) Constructor for the class instance.
Destroy ( 1632) Frees the class instance.
FindBoundary ( 1632) Detects a boundary marker in a message header.
Pop ( 1632) Removes the boundary marker on the top of the stack.
Push ( 1633) Adds a new boundary marker to the top of the boundary marker stack.

Legend
Method
virtual
Property
read only

TIdMIMEBoundary Methods
The Methods of the TIdMIMEBoundary class are listed here.

Methods
Method Description
Clear ( 1631) Removes boundary markers from the internal list.
Count ( 1631) Indicates the number of boundary markers stored on the stack.
Create ( 1631) Constructor for the class instance.
Destroy ( 1632) Frees the class instance.
FindBoundary ( 1632) Detects a boundary marker in a message header.
Pop ( 1632) Removes the boundary marker on the top of the stack.
Push ( 1633) Adds a new boundary marker to the top of the boundary marker stack.

Legend
Method
virtual

1630 Internet Direct (Indy) Version 10.1.5


Classes TIdMIMEBoundary Class

TIdMIMEBoundary.Clear Method
Removes boundary markers from the internal list.

Pascal
procedure Clear;
Description
Clear is a procedure removes all boundary markers and parent message parts in the in internal list accumulated by the
TIdMIMEBoundary ( 1629) instance.

Clear is called when a TIdMessage ( 1521) instance uses the TIdMessage.Clear ( 1525) or TIdMessage.ClearHeader ( 1525)
methods.

See Also
TIdMessage.Clear ( 1525)

TIdMessage.ClearHeader ( 1525)

TIdMIMEBoundary.Count Method
Indicates the number of boundary markers stored on the stack.

Pascal
function Count: integer;
Returns
integer - Number of boundary markers stored on the stack.

Description
Count is an integer function used to determine the number of boundary markers stored on the stack.

Use Push ( 1633) to add a boundary marker and parent message part to the top of the stack.

Use Pop ( 1632) to remove a boundary marker and parent message part from the top of the stack.

TIdMIMEBoundary.Create Constructor
Constructor for the class instance.

Pascal
constructor Create;
Description
Create is the constructor for the class instance.

Create calls the inherited Create method, and initializes the internal lists used to accumulate boundary markers and parent
message parts during message header processing.

Use Destroy ( 1632) to free the boundary marker stack.

See Also
TIdMIMEBoundary.Destroy ( 1632)

TIdMIMEBoundary.Push ( 1633)

TIdMIMEBoundary.Pop ( 1632)

TIdMIMEBoundary.Clear ( 1631)

Internet Direct (Indy) Version 10.1.5 1631


TIdMIMEBoundary Class Classes

TIdMIMEBoundary.Destroy Destructor
Frees the class instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the class instance.

Destroy frees resources allocated to the internal list of boundary markers and parent message parts in Create ( 1631).

Destroy calls the inherited Destroy destructor proper to exiting from the method.

See Also
TIdMIMEBoundary.Clear ( 1631)

TIdMIMEBoundary.Create ( 1631)

TIdMIMEBoundary.FindBoundary Method
Detects a boundary marker in a message header.

Pascal
class function FindBoundary(
AContentType: string
): string;
Parameters
Parameters Description
AContentType Content type header to be checked for a boundary marker parameter.

Returns
String - Boundary ( 1633) marker detected or ''.

Description
FindBoundary is a String class function used to examine the "content-Type" header specified in AContentType, and detect the
presence of a boundary marker parameter.

If a boundary marker is present, it is removed from AContentType and used as the return value for the method. If the boundary
marker includes the '"' character (Decimal 34) at it's beginning and end, they are removed from the boundary marker. Leading and
trailing Space characters (CHAR32 ( 3169)) are also removed from the boundary marker.

If a boundary marker is not detected, the return value for the method will be an empty string ('').

During message header processing, FindBoundary is used to retrieve the boundary marker that will be added to the marker list
using Push ( 1633).

See Also
TIdMIMEBoundary.Push ( 1633)

TIdMIMEBoundary.Pop Method
Removes the boundary marker on the top of the stack.

Pascal
procedure Pop;
Description
Pop is a procedure used to remove the boundary marker and parent messge part identifier at the top of the internal marker list.

1632 Internet Direct (Indy) Version 10.1.5


Classes TIdMIMEBoundary Class

Calling Pop when no boundary marker values have been Pushed onto the list can result in an "index out of range" exception.

Use Clear ( 1631) to remove all boundary markers and parent message part identifiers in the internal list.

Use Push ( 1633) to add a new boundary marker and parent message part identifier to the internal list.

See Also
TIdMIMEBoundary.Push ( 1633)

TIdMIMEBoundary.Clear ( 1631)

TIdMIMEBoundary.Push Method
Adds a new boundary marker to the top of the boundary marker stack.

Pascal
procedure Push(
ABoundary: string;
AParentPart: integer
);
Parameters
Parameters Description
ABoundary Boundary ( 1633) marker to be added to the internal list.
AParentPart Parent message part identifier to add to the internal list.

Description
Push is a procedure used to add the boundary marker in ABoundary and the parent message part identifier in AParentPart to the
top of the stack.

AParentPart generally contains an integer value that represents the position of the message part in the MessageParts collection for
a message instance. AParentPart may contain -1 when there is no parent message part.

Use Pop ( 1632) to remove the boundary marker and the parent message part identifier from the internal lists.

See Also
TIdMIMEBoundary.Pop ( 1632)

TIdMIMEBoundary Properties
The Properties of the TIdMIMEBoundary class are listed here.

Properties
Property Description
Boundary ( 1633) Indicates the most recent MIME boundary marker in the list.
ParentPart ( 1634) Indicates the ordinal position of the message part that owns the content type at the top of the stack.

Legend
Property
read only

TIdMIMEBoundary.Boundary Property
Indicates the most recent MIME boundary marker in the list.

Pascal
property Boundary: string;
Description
Boundary is a read-only String property that identifies the most recent MIME boundary marker in the list (or the top of the boundary
amrker stack).

Internet Direct (Indy) Version 10.1.5 1633


TIdMIMEBoundaryStrings Class Classes

Boundary can be used to read the last boundary marker encountered during message header processing, or '' (an empty string)
when there are no boundary markers on the stack.

See Also
TIdMessageClient.SendMsg ( 1560)

TIdMessageDedoderMIME

TIdMIMEBoundary.ParentPart Property
Indicates the ordinal position of the message part that owns the content type at the top of the stack.

Pascal
property ParentPart: integer;
Description
ParentPart is a read-only integer property that indicates the ordinal position of the message part that is the owner of the content
identified in the boundary marker at the top of the stack.

ParentPart is used to support nested MIME parts where the boundary marker may be for a message part that makes up a
"multipart/alternative", "multipart/related", or "multipart/mixed" content type.

ParentPart returns the integer value that indicates the ordinal position of the message part, or -1 when there are no parent message
parts stored in the internal list.

TIdMIMEBoundaryStrings Class
Implements a class for generating and storing MIME boundary markers.

File
IdMessageCoderMIME ( 4684)

Hierarchy

Pascal
TIdMIMEBoundaryStrings = class;
Description
TIdMIMEBoundaryStrings is a TObject descendant that implements a class for generating and storing MIME boundary markers.

TIdMIMEBoundaryStrings is the type used for the IdMIMEBoundaryStrings ( 3128) variable.

See Also
TObject

TIdMIMEBoundaryStrings Members
The following tables list the members exposed by TIdMIMEBoundaryStrings.

Methods
Method Description
GenerateRandomChar ( 1635) Generates a random character for use in the Indy MIME boundary marker.
IndyMIMEBoundary ( 1635) Represents the default MIME boundary for Indy MIME encoders.

1634 Internet Direct (Indy) Version 10.1.5


Classes TIdMIMEBoundaryStrings Class

Legend
Method

TIdMIMEBoundaryStrings Methods
The Methods of the TIdMIMEBoundaryStrings class are listed here.

Methods
Method Description
GenerateRandomChar ( 1635) Generates a random character for use in the Indy MIME boundary marker.
IndyMIMEBoundary ( 1635) Represents the default MIME boundary for Indy MIME encoders.

Legend
Method

TIdMIMEBoundaryStrings.GenerateRandomChar Method
Generates a random character for use in the Indy MIME boundary marker.

Pascal
function GenerateRandomChar: Char;
Returns
Char - Random character to use in the MIME boundary marker.

Description
GenerateRandomChar is a Char function used to generate a single character used in the string representing a MIME boundary.

GenerateRandomChar returns random ASCII characters in the following categories and value ranges:

Category Lower limit Upper limit


digits Decimal 48 Decimal 57
uppercase letters Decimal 65 Decimal 90
lowercase letters Decimal 97 Decimal 122

GenerateRandomChar is used when generating the string that represents the Indy MIME boundary marker. The MIME boundary
marker is of an arbitrary length, and contains other characters as recommended in RFC 2045.

TIdMIMEBoundaryStrings.IndyMIMEBoundary Method
Represents the default MIME boundary for Indy MIME encoders.

Pascal
function IndyMIMEBoundary: string;
Returns
string - MIME boundary marker for the Indy MIME encoders.

Description
IndyMIMEBoundary is a string function used to represent the default MIME boundary for Indy MIME encoders.

IndyMIMEBoundary is automatically generated with an arbitrary length using values returned by GenerateRandomChar ( 1635)
and other characters as recommended in RFC 2045.

IndyMIMEBoundary is used in TIdMessageEncoderInfoMIME ( 1594) when the InitializeHeaders method is used to generate
MIME headers for a TIdMessage ( 1521) instance.

Internet Direct (Indy) Version 10.1.5 1635


TIdMimeTable Class Classes

See Also
TIdMessageEncoderInfoMIME ( 1594)

TIdMessageEncoderInfoMIME.InitializeHeaders ( 1596)

TIdMessage ( 1521)

TIdMimeTable Class
Provides access to MIME types for the local computer.

File
IdGlobalProtocols ( 4654)

Hierarchy

Pascal
TIdMimeTable = class(TObject);
Description
TIdMimeTable is a class used in Indy to provide access to the known MIME types and file name extensions from settings on the
local computer system. TIdMimeTable provides a degree of isolation from the issues related to platform-specific MIME type storage.

On the Windows platform, TIdMimeTable relies on an initial set of common MIME types supplemented by values harvested from the
Windows HKEY_CLASSES_ROOT Registry key. On the Linux platform, there is no universal counterpart to the Windows Registry
for MIME types. A text-based configuration file is normally present in most Linux distributions. But it's name and location in the file
system hierarchy is different for each family of distribution. Each Desktop/Window manager, and many applications, maintain their
own MIME type configuration files. Their names and locations are almost always radically different, too.

To accommodate developers on both platforms, TIdMimeTable provides methods that can be used to control the location, format,
and content of values used for MIME types. The OnBuildCache ( 1642) event handler can be used to override loading of the
cached MIME types registered on the local computer. In addition, LoadFromStrings ( 1640) and SaveToStrings ( 1641) can be
used to override the values loaded and stored for TIdMimeTable.

GetFileMIMEType ( 1640) can be used to retrieve the MIME type for a specified file name based on the file extension.
GetDefaultFileExt ( 1639) can be used to retrieve the file extension associated with the specified MIME type. Use AddMimeType
( 1637) to add a file extension and MIME type to TIdMimeTable.

TIdMimeTable is designed primarily for use by client applications. But, TIdMimeTable is also used in TIdCustomHTTPServer (
434) to determine the file names and extensions that can be provided for an HTTP request with "Accept" header(s) for specific
MIME types.

See Also
TIdMimeTable.OnBuildCache ( 1642)

LoadTypesFromOS ( 1641)

TIdMimeTable.LoadFromStrings ( 1640)

TIdMimeTable.SaveToStrings ( 1641)

TIdMimeTable.GetFileMIMEType ( 1640)

TIdMimeTable.GetDefaultFileExt ( 1639)

TIdMimeTable.AddMimeType ( 1637)

TIdCustomHTTPServer.MIMETable ( 440)

IndySupport ( 15)

1636 Internet Direct (Indy) Version 10.1.5


Classes TIdMimeTable Class

TIdMimeTable Members
The following tables list the members exposed by TIdMimeTable.

Properties
Property Description
LoadTypesFromOS ( 1641) Indicates MIME types defined in the operating sysyem should be used when populating the MIME table.
OnBuildCache ( 1642) Event handler used to load MIME type mappings from a non-standard source.

Methods
Method Description
AddMimeType ( 1637) Adds a file extension to MIME type and subtype mapping.
BuildCache ( 1638) Populates MIME types and file extensions.
Create ( 1639) Constructor for the object instance.
Destroy ( 1639) Destructor for the object instance.
GetDefaultFileExt ( 1639)
GetFileMIMEType ( 1640)
LoadFromStrings ( 1640) Loads the MIME Type mapping table from the specified string list.
SaveToStrings ( 1641) Stores MIME Type mapping values to a TIdStrings ( 3089) variable.

Legend
Method
virtual
Property

TIdMimeTable Methods
The Methods of the TIdMimeTable class are listed here.

Methods
Method Description
AddMimeType ( 1637) Adds a file extension to MIME type and subtype mapping.
BuildCache ( 1638) Populates MIME types and file extensions.
Create ( 1639) Constructor for the object instance.
Destroy ( 1639) Destructor for the object instance.
GetDefaultFileExt ( 1639)
GetFileMIMEType ( 1640)
LoadFromStrings ( 1640) Loads the MIME Type mapping table from the specified string list.
SaveToStrings ( 1641) Stores MIME Type mapping values to a TIdStrings ( 3089) variable.

Legend
Method
virtual

TIdMimeTable.AddMimeType Method
Adds a file extension to MIME type and subtype mapping.

Pascal
procedure AddMimeType(
const Ext: string;
const MIMEType: string
);
Parameters
Parameters Description
Ext File extensions for the MIME type and subtype.
MIMEType IANA ( 4762) MIME type and subtype for the mapping.

Internet Direct (Indy) Version 10.1.5 1637


TIdMimeTable Class Classes

Description
AddMimeType is a procedure that allows adding the new file name extension specified in Ext and the MIME type specified in
MIMEType to the mappings in the TIdMimeTable ( 1636) instance. AddMimeType will raise an EIdException ( 76) exception if
the file extension in Ext already exists in the MIME type mapping.

Ext is the case-insensitive file extension including the '.' character. If the period character is not included in Ext, it will be inserted
prior to inclusion in the list of file extensions. If Ext is an empty string (''), an EIdException ( 76) will be raised with the message
RSMIMEExtensionEmpty.

MIMEType is the case-insensitive IANA ( 4762) registered MIME type and subtype to be associated with the file extension in Ext.
If MIMEType contains an empty string (''), and EIdException ( 76) will be raised with the message RSMIMEMIMETypeEmpty.

Use GetFileMIMEType ( 1640) to get a MIME type for a specified file name and extension. Use GetDefaultFileExt ( 1639) to find
the initial file extension found for a given MIME type and subtype. The MIME type mapping table can be loaded with custom values
using LoadFromStrings ( 1640).

See Also
EIdException ( 76)

GetFileMIMEType ( 1640)

GetDefaultFileExt ( 1639)

LoadFromStrings ( 1640)

TIdMimeTable.BuildCache Method
Populates MIME types and file extensions.

Pascal
procedure BuildCache; virtual;
Description
BuildCache is a procedure used to control populating the MIME type/subtype and file name extension mappings used in the
TIdMimeTable ( 1636) instance. BuildCache allows the MIME type mapping to be loaded using the default values for the
development platform, or populated in the OnBuildCache ( 1642) event handler. When a procedure has been assigned to the
OnBuildCache ( 1642) event handler, it is entirely responsible for loading the file extensions and MIME type/subtypes used in the
class instance.

When OnBuildCache ( 1642) is unassigned, the default behavior is to loaded the MIME type and file extension mappings specific
to the development platform. This includes loading a common set of MIME type mapping values used for both Windows and Linux
development platforms.

On the Windows platform, TIdMimeTable ( 1636) supplements these values by harvesting content types from the Windows
HKEY_CLASSES_ROOT Registry key.

On the Linux platform, there is no universal counterpart to the Windows Registry for MIME types. A text-based configuration file is
normally present in most Linux distributions. But it's name and location in the file system hierarchy is different for each family of
distributions. Each Desktop/Window manager, and many applications, maintain their own MIME type configuration files. Their
names and locations are almost always radically different, too. On the Linux platform, no additional MIME types are loaded other
than the known values used for both development platforms.

No action is performed, however, when existing values are found in the MIME type mappings.

Use LoadFromStrings ( 1640) to load custom MIME type mappings from a TStringList.

See Also
LoadFromStrings ( 1640)

OnBuildCache ( 1642)

1638 Internet Direct (Indy) Version 10.1.5


Classes TIdMimeTable Class

TIdMimeTable.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
const AutoFill: Boolean = True
); virtual; reintroduce;
Parameters
Parameters Description
AutoFill Automatically load MIME types and file extensions.

Description
Create is the constructor for the object instance, and initializes the TStringList objects used to store MIME types and File extensions.

When Autofill is True, Create calls the BuildCache ( 1638) method to populate the MIME type entries from system settings on the
local computer, or using the OnBuildCache ( 1642) event handler. When Autofill is False, use LoadFromStrings ( 1640) to
populate the MIME type mapping table.

See Also
BuildCache ( 1638)

OnBuildCache ( 1642)

Destroy ( 1639)

LoadFromStrings ( 1640)

TIdMimeTable.Destroy Destructor
Destructor for the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance, and is responsible for freeing and releasing the TStringList instances used to store
File Extensions and MIME types used by the class. Destroy calls the inherited Destroy method prior to exiting.

See Also
Create ( 1639)

TIdMimeTable.GetDefaultFileExt Method
Pascal
function GetDefaultFileExt(
const MIMEType: string
): string;
Parameters
Parameters Description
MIMEType The MIME type and subtype to examine.

Returns
String - The file extension for the MIME type, or ''.

Description
GetDefaultFileExt is a String function used to retrieve the file extension for the case-insensitive registered MIME type specified in
MIMEType. GetDefaultFileExt will call BuildCache ( 1638) if the value in MIMEType is not already present in the MIME type

Internet Direct (Indy) Version 10.1.5 1639


TIdMimeTable Class Classes

mapping table.

The return value for GetDefaultFileExt will contain the file extension, including the '.' character, associate dwith the MIME type in
MIMEType. The return value for the method can be an empty string ('') when the value in MIMEType cannot be found in the MIME
type mapping after checking the cached values.

Use AddMimeType ( 1637) to add a new file extension to MIME type mapping to the table.

Use GetFileMIMEType ( 1640) to retrieve the MIME type for a specified file name and file extension.

See Also
BuildCache ( 1638)

AddMimeType ( 1637)

TIdMimeTable.GetFileMIMEType Method
Pascal
function GetFileMIMEType(
const AFileName: string
): string;
Parameters
Parameters Description
fileName The file name to be examined.

Returns
String - The registered MIME type for the file name.

Description
GetFileMIMEType is a String function used to retrieve the registered MIME type for the file name specified in Filename.
GetFileMIMEType examines the currently cached MIME types, but calls BuildCache ( 1638) is no registered MIME type exists in
the cache for the specified file. If no MIME type is found after reloading the cache, the value "application/octet-stream" is used as
the MIME type for the file.

TIdMimeTable.LoadFromStrings Method
Loads the MIME Type mapping table from the specified string list.

Pascal
procedure LoadFromStrings(
const AStrings: TIdStrings;
const MimeSeparator: Char = '='
);
Parameters
Parameters Description
AStrings Values to be loaded into the MIME type mapping table.
MimeSeparator Character used to delimit file extention and MIME type values in AStrings.

Description
LoadFromStrings is a procedure used to parse file extension and MIME type and subtype values in AStrings in the MIME mapping
table. MimeSeparator is the character used to delimit file extention and MIME type and subtype values in AStrings.

LoadFromStrings clears any existing file extension and MIME type mappings prior to loading each line in AStrings.
LoadFromStrings converts file extensions to their lowercase representation prior to addition to the file extenstion list.
LoadFromStrings calls AddMimeType ( 1637) if the file extension does not already exist in the MIME type mapping table.

See Also
AddMimeType ( 1637)

1640 Internet Direct (Indy) Version 10.1.5


Classes TIdMimeTable Class

TIdMimeTable.SaveToStrings Method
Stores MIME Type mapping values to a TIdStrings ( 3089) variable.

Pascal
procedure SaveToStrings(
const AStrings: TIdStrings;
const MimeSeparator: Char = '='
);
Parameters
Parameters Description
AStrings Destination for MIME Type mapping values.
MimeSeparator Delimiter for extension and MIME type values.

Description
SaveToStrings is a procedure used to store values in the MIME type mapping to table to the TIdStrings ( 3089) specified in
AStrings. MimeSeparator is the charcter to use as a delimiter between the file extension and the MIME Type and Subtype in lines
added to AStrings. SaveToStrings clears any existing values in AStrings prior to storing the MIME Type mappings, with one file
extension, delimiter character, and MIME Type value per line.

TIdMimeTable Properties
The Properties of the TIdMimeTable class are listed here.

Properties
Property Description
LoadTypesFromOS ( 1641) Indicates MIME types defined in the operating sysyem should be used when populating the MIME table.
OnBuildCache ( 1642) Event handler used to load MIME type mappings from a non-standard source.

Legend
Property

TIdMimeTable.LoadTypesFromOS Property
Indicates MIME types defined in the operating sysyem should be used when populating the MIME table.

Pascal
property LoadTypesFromOS: Boolean;
Description
LoadTypesFromOS is a Boolean property that indicates if MIME types defined in the operating sysyem should be used when
populating the MIME types used in TIdMIMETable ( 1636).

The default value for LoadTypesFromOS is True as assigned in the constructor for the object instance.

LoadTypesFromOS is examined when building the cached MIME types in the BuildCache ( 1638) method and the OnBuildCache
( 1642) event handler handler has not been assigned.

Use OnBuildCache ( 1642) to control populating MIME type entries in the table when thje default values from the operating
system are not desired.

Use LoadFromStrings ( 1640) to load the MIME type mapping table from a specified string list.

Use AddMimeType ( 1637) to manually create ( 1639) aMIME type mapping for the table.

See Also
OnBuildCache ( 1642)

BuildCache ( 1638)

Internet Direct (Indy) Version 10.1.5 1641


TIdMinimalFTPListItem Class Classes

LoadFromStrings ( 1640)

AddMimeType ( 1637)

TIdMimeTable.OnBuildCache Property
Event handler used to load MIME type mappings from a non-standard source.

Pascal
property OnBuildCache: TIdNotifyEvent;
Description
OnBuildCache is a TNotifyEvent property that represents the event handler signalled when the MIME type mapping table needs to
be loaded from an external or non-standard source.

When a procedure has been assigned to the OnBuildCache event handler, it is entirely responsible for loading the file extensions
and MIME type/subtypes used in the class instance. When OnBuildCache is unassigned, the default behavior is to loaded the
MIME type and file extension mappings specific to the development platform.

OnBuildCache is triggered in the BuildCache ( 1638) method.

See Also
BuildCache ( 1638)

TIdMinimalFTPListItem Class
Implements a common ancestor for minimalistic FTP directory listing formats.

File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdMinimalFTPListItem = class(TIdFTPListItem);
Description
TIdMinimalFTPListItem is a TIdFTPListItem ( 851) descendant that implements a common ancestor for minimalistic FTP directory
listing formats. Minimalized FTP directory listing formats do not include many features or aspects common to modern FTP listing
formats. Chiefly these include the Size ( 857) and Modified values from the inherited TIdFTPListItem ( 851) class.

TIdMinimalFTPListItem is essentially an abstract class, but it does implement an overridden constructor that assigns the default
values for the SizeAvail ( 857) and ModifiedAvail ( 856) properties.

Applications do not normally create ( 1643) instances of TIdMinimalFTPListItem; use one the descendant classes like:

• TIdCiscoIOSFTPListItem ( 317)
• TIdNCSAforMACOSFTPListItem ( 1678)
• TIdSterCommEntUxRootFTPListItem ( 2253)
• TIdTSXPlusFTPListItem ( 2497)
• TIdVSERootDirFTPListItem ( 2611)
See Also
TIdFTPListItem ( 851)

1642 Internet Direct (Indy) Version 10.1.5


Classes TIdMinimalFTPListItem Class

TIdCiscoIOSFTPListItem ( 317)

TIdNCSAforMACOSFTPListItem ( 1678)

TIdSterCommEntUxRootFTPListItem ( 2253)

TIdTSXPlusFTPListItem ( 2497)

TIdVSERootDirFTPListItem ( 2611)

TIdMinimalFTPListItem Members
The following tables list the members exposed by TIdMinimalFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1643) Overridden constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Method
virtual
Property

TIdMinimalFTPListItem Methods
The Methods of the TIdMinimalFTPListItem class are listed here.

Methods
Method Description
Create ( 1643) Overridden constructor for the collection item.

Legend
Constructor
virtual

TIdMinimalFTPListItem.Create Constructor
Overridden constructor for the collection item.

Pascal
constructor Create(
AOwner: TIdCollection
); override;

Internet Direct (Indy) Version 10.1.5 1643


TIdMLSTFTPListItem Class Classes

Parameters
Parameters Description
AOwner Collection that owns the collection item.

Description
Create is the overridden constructor for the collection item. Create calls the inherited constructor using AOwner as a argument.

Create assigns the default values for properties in the collection item, including:

• SizeAvail ( 857)
• ModifiedAvail ( 856)
See Also
SizeAvail ( 857)

ModifiedAvail ( 856)

TIdMLSTFTPListItem Class
Implements storage for files or directories in an FTP MLST ( 4354) or MLSD file and/or directory listing.

File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdMLSTFTPListItem = class(TIdCreationDateFTPListItem);
Description
TIdMLSTFTPListItem is a TIdCreationDateFTPListItem ( 402) descendant that implements storage for files or directories included
in listings returned for the FTP MLST ( 4354) or MLSD commands. MLST ( 4354) and MLSD are described in the Internet Draft
document:

Extensions to FTP

TIdMLSTFTPListItem implements additional properties that conform to the NVFS (Network Virtual File Store) as described in
Section 7 - Listings for Machine Processing (MLST ( 4354) and MLSD). TIdMLSTFTPListItem properties represent the
standardized file and directory information returned by the Server-FTP process.

The MLST ( 4354) and MLSD commands extend the FTP protocol to allow that transmission of 8-bit data over the control
connection. Note this is not specifying character sets which are 8-bit, but specifying that FTP implementations are to specifically
allow the transmission and reception of 8-bit bytes, with all bits significant, over the control connection. That is, all 256 possible
octet values are permitted. The MLSx command allows both UTF-8/Unicode and "raw" forms as arguments, and in responses both
to the MLST ( 4354) and MLSD commands, and all other FTP commands which take pathnames as arguments.

The facts part of the specification would contain a series of "file facts" about the file or directory named on the same line. Typical
information to be presented would include file size, last modification time, creation time, a unique identifier, and a file/directory flag.

Use properties in TIdMLSTFTPListItem to access the property values for facts in the response or the raw fact lines for the file or
directory in the collection, including:

Property Name Index in the Facts ( 1648) Property


Size ( 857) "Size ( 857)"

1644 Internet Direct (Indy) Version 10.1.5


Classes TIdMLSTFTPListItem Class

ModifiedDate ( 856) "Modify"


CreationDate ( 403) "Create ( 1646)"
UniqueID ( 1654) "Unique"
MLISTPermissions ( 1653) "Perm"

The Facts ( 1648) property in TIdMLSTFTPListItem can contain additional facts not represented using properties in the class,
including:

Fact Names not implemented as properties


"Lang"
"Media-Type"
"CharSet"

Please note that the format is intended for machine processing, not viewing by a human being, and as such the format is very rigid.
Server implementaions must not vary the format, by altering any of the following:

• inserting extra spaces for readability


• replacing spaces by tabs
• including header or title lines
• inserting blank lines
There is no requirement that the same set of facts be provided for each file, or that the facts presented occur in the same order for
each file.

See Also
TIdCreationDateFTPListItem ( 402)

TIdMLSTFTPListItem Members
The following tables list the members exposed by TIdMLSTFTPListItem.

Properties
Property Description
Attributes ( 1647) Represents the Win32 Extended Attributes set for the file or directory on the remote FTP server.
AttributesAvail ( 1647) Indicates if Attributes ( 1647) are available for the collection item.
CreationDate ( 403) Represents the date and time that the file or directory was created on the FTP server remote file system.
CreationDateGMT ( 1648) Represents the creation date and time for the file or directory entry.
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
Facts ( 1648) Represents keyword-value pairs from an FTP MLST ( 4354) or MLSD response.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LastAccessDate ( 1652) Date and time an entry was last accessed on the remote file system.
LastAccessDateGMT ( 1653) Date and time an entry was last accessed on the remote file system.
LocalFileName ( 855) Suggested file name to used for the local file system.
MLISTPermissions ( 1653) Represents permissions assigned for the file or directory on the remote file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
ModifiedDateGMT ( 1654) Date and time an entry was last modified on the remote file system.
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.
UniqueID ( 1654) Uniquely identifies a file or a directory on the remote file system.

Internet Direct (Indy) Version 10.1.5 1645


TIdMLSTFTPListItem Class Classes

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1646) Constructor for the collection item.
Destroy ( 1646) Frees the collection item.

Legend
Method
virtual
Property
read only

TIdMLSTFTPListItem Methods
The Methods of the TIdMLSTFTPListItem class are listed here.

Methods
Method Description
Create ( 1646) Constructor for the collection item.
Destroy ( 1646) Frees the collection item.

Legend
Constructor
virtual

TIdMLSTFTPListItem.Create Constructor
Constructor for the collection item.

Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Collection that owns the collection item.

Description
Create is the overridden constructor for the collection item. Create calls the inherited constructor using AOwner as an argument.

Create allocates the TIdWin32ea ( 2622) object instance used to represent the Attributes ( 1647) property, and sets the default
value for the AttibutesAvail property to False.

Use Free to ensure that Destroy ( 1646) is called to free resources allocated for the collection item.

See Also
Destroy ( 1646)

Attributes ( 1647)

AttributesAvail ( 1647)

TIdWin32ea ( 2622)

TIdMLSTFTPListItem.Destroy Destructor
Frees the collection item.

1646 Internet Direct (Indy) Version 10.1.5


Classes TIdMLSTFTPListItem Class

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the collection item. Destroy frees resources allocated for member variables in the collection
item. Destroy calls the inherited destructor prior to exiting from the method.

See Also
Create ( 1646)

Attributes ( 1647)

TIdMLSTFTPListItem Properties
The Properties of the TIdMLSTFTPListItem class are listed here.

Properties
Property Description
Attributes ( 1647) Represents the Win32 Extended Attributes set for the file or directory on the remote FTP server.
AttributesAvail ( 1647) Indicates if Attributes ( 1647) are available for the collection item.
CreationDateGMT ( 1648) Represents the creation date and time for the file or directory entry.
Facts ( 1648) Represents keyword-value pairs from an FTP MLST ( 4354) or MLSD response.
LastAccessDate ( 1652) Date and time an entry was last accessed on the remote file system.
LastAccessDateGMT ( 1653) Date and time an entry was last accessed on the remote file system.
MLISTPermissions ( 1653) Represents permissions assigned for the file or directory on the remote file system.
ModifiedDateGMT ( 1654) Date and time an entry was last modified on the remote file system.
UniqueID ( 1654) Uniquely identifies a file or a directory on the remote file system.

Legend
Property
read only

TIdMLSTFTPListItem.Attributes Property
Represents the Win32 Extended Attributes set for the file or directory on the remote FTP server.

Pascal
property Attributes: TIdWin32ea;
Description
Attributes is a TIdWin32ea ( 2622) property that represents the Win32 Extended Attributes set for the file or directory on the
remote FTP server file system. Use properties and methods in the Attributes property to access values represented for the object
instance.

Use AttributesAvail ( 1647) to determine if Extended Attributes are included in the listing format for the file system on the remote
FTP server.

See Also
TIdWin32ea ( 2622)

AttributesAvail ( 1647)

TIdMLSTFTPListItem.AttributesAvail Property
Indicates if Attributes ( 1647) are available for the collection item.

Pascal
property AttributesAvail: Boolean;

Internet Direct (Indy) Version 10.1.5 1647


TIdMLSTFTPListItem Class Classes

Description
AttributesAvail is a Boolean property that indicates if the Attributes ( 1647) property has been populated for the collection item.
AttributesAvail us updated when file facts are detected and parsed from a file or directory listing returned from the remote FTP
server.

Use the Attributes ( 1647) property to access the individual file attribute flag for the file or directory entry.

See Also
Attributes ( 1647)

TIdWin32ea ( 2622)

TIdMLSTFTPListItem.CreationDateGMT Property
Represents the creation date and time for the file or directory entry.

Pascal
property CreationDateGMT: TIdDateTime;
Description
CreationDateGMT is a TIdDateTime ( 4733) property used to represent the optional date and time of creation for the file or
directory entry expressed in the GMT timezone.

Use CreationDate ( 403) to access the date and time of creation expressed in the local timezone for the client.

Values are assigned to the CreationDate ( 403) and CreationDateGMT properties in the listing entry when the directory listing
parser encounters the "create ( 1646)" fact in the Facts ( 1648) for the collection item.

When CreationDateGMT is omitted for the file or directory entry, the property contains an empty date value (0.0).

Use ModifiedDate ( 856) and ModifiedDateGMT ( 1654) to access the last modification timestamp for the directory entry.

Use LastAccessDateGMT ( 1653) and LastAccessDate ( 1652) to access the date and time the entry was last accessed.

See Also
ModifiedDateGMT ( 1654)

ModifiedDate ( 856)

LastAccessDateGMT ( 1653)

LastAccessDate ( 1652)

Facts ( 1648)

TIdMLSTFTPListItem.Facts Property
Represents keyword-value pairs from an FTP MLST ( 4354) or MLSD response.

Pascal
property Facts [const Name: string]: string;
Description
Facts is an indexed read-only string property that represents keyword-value pairs returned in file or directory listings for the FTP
MLST ( 4354) or MLSD commands. The indexer for the property is a string that represents the keyword desired, and the the
property returns the fact value for the specified keyword.

The following keywords are allowed as indexer values for the Facts property:

Keyword Meaning
size Size ( 857) in octets.

1648 Internet Direct (Indy) Version 10.1.5


Classes TIdMLSTFTPListItem Class

modify Last modification time.


create ( 1646) Creation time.
type Entry type.
unique Unique id of file/directory.
perm File permissions, whether read, write, execute is allowed for the login id.
lang Language of the file name per IANA ( 4762)[12] registry.
media-type MIME media-type of file contents per IANA ( 4762) registry.
charset Character set per IANA ( 4762) registry (if not UTF-8)

Fact name keywords are not case sensitive; using the value 'Size ( 857)', 'size', 'SIZE', and 'SiZe' will return same fact.

Additional operating system specific keywords could be specified by using the IANA ( 4762) operating system name as a prefix
(examples only):

Keyword Meaning
OS/2.ea OS/2 extended attributes
MACOS.rf MacIntosh resource forks
UNIX.mode Unix file modes (permissions)

FTP server implementations may define keywords for experimental, or private use. All such keywords begin with the two character
sequence "x.". As type names are case independent, "x." and "X." are equivalent. For example:

Keyword Meaning
x.ver Version information
x.desc File description
x.type File type

Fact keyword-value pairs are not guaranteed to be present for all files and directories returned in a listing response. Some facts are
not applicable for certain resource types, or may not be provided by the FTP server implementation.

The type Fact


The type fact indicates is the directory listing collection item represents a file or a directory. If it is a directory, is it the current
directory, a regular directory, or a parent directory? The MLST ( 4354) specification makes this unambiguous using the type fact.

The type fact specifies information about the object listed in the MLST ( 4354)/MLSD response, and may contain one of the
following values:

Value Meaning
file A file entry for a file containing data that is not host- or system-specific.
cdir The path name for the current listed directory (Returned only in MLSD responses). In a sense, it can be viewed
as representing the title of the listing, in a machine friendly format.
pdir The path name for a parent directory (Returned only in MLSD responses).
dir A name of a directory or sub-directory. It generally cannot be transferred from machine to machine, but can be
used as a target for the MLSD command.
OS.name=type An OS or file system dependent file type. Name is any IANA ( 4762) registered operating system name, like
UNIX ( 4539). the type portion provides system dependent information as to the type of the file listed.

Internet Direct (Indy) Version 10.1.5 1649


TIdMLSTFTPListItem Class Classes

The unique Fact


The unique fact is used to present a unique identifier for a file or directory in the NVFS (Network Virtual File System) accessed via a
server-FTP process. The value of this fact should be the same for any number of pathnames that refer to the same underlying file.
The fact should have different values for names which reference distinct files. The mapping between files, and unique fact tokens
should be maintained, and remain consistent, for at least the lifetime of the control connection from user-PI to server-PI.

This fact would normally be used by Server-FTPs whose host system allows things such as symbolic links so that the same file may
be represented in more than one directory on the server. The only conclusion that should be drawn is that if two different names
each have the same value for the unique fact, they refer to the same underlying object. The value of the unique fact (the token)
should be considered an opaque string for comparison purposes, and is a case dependent value. The tokens "A" and "a" do not
represent the same underlying object.

The modify Fact


The modify fact is used to determine the last time the content of the file (or directory) indicated was modified. Any change of
substance to the file should cause this value to alter. That is, if a change is made to a file such that the results of a RETR command
would differ, then the value of the modify fact should alter. User-PIs should not assume that a different modify fact value indicates
that the file contents are necessarily different than when last retrieved. Some systems may alter the value of the modify fact for
other reasons, though this is discouraged wherever possible. Also a file may alter, and then be returned to its previous content,
which would often be indicated as two incremental alterations to the value of the modify fact.

For directories, this value should alter whenever a change occurs to the directory such that different file names would (or might) be
included in MLSD output of that directory.

The create Fact


The create ( 1646) fact indicates when a file, or directory, was first created. The exact content of the create ( 1646) fact is not
specified and may vary from server to server. About all that can be said about the value returned is that it can never indicate a later
time than the modify fact.

The perm Fact


The perm fact is used to indicate access rights the current FTP user has for the object listed. Of the permission indicators currently
defined, many are meaningful only when used with a particular type of object. The indicators are case independent, "d" and "D" are
the same indicator. The perm value is always an unordered sequence of alphabetic characters, including:

Value Meaning
"a" Applies to file object types, and indicates that the APPE (append) command may be applied to the file named.
"c" Applies to directory object types (dir, cdir, pdir), and indicates that may be created in the directory named using the STOR,
STOU, APPE, and RNTO commands.
"d" Applies to all object types, and indicates that the named object may be deleted using the DELE or RMD commands (as
appropriate).
"e" Applies to directory object types (dir, cdir, pdir), and indicates that the path for the directory named can be entered using
navigational commands like CWD and CDUP.
"f" Applies to objects that may be renamed, and indicates if can be renamed using the RNFR and RNTO commands.
"l" Applies to directory object types, and indicates that the listing commands LIST, NLST ( 4358), and MLSD may be applied
to the directory named.
"m" Applies to directory object types, and indicates that the new sub-directories can be made using the MKD command for the
directory named.

1650 Internet Direct (Indy) Version 10.1.5


Classes TIdMLSTFTPListItem Class

"p" Applies to directory object types, and indicates that objects in the directory may be purged by the file system on the remote
FTP server. Please note that it does not indicate that the RMD command may be used to remove the directory named
itself; the "d" permission indicator indicates that.
"r" Applies to file objects types, and for some systems may apply to other types of objects, and indicates that the object
named can be retrieved using the RETR command.
"w" Applies to file objects types, and for some systems may apply to other types of objects, and indicates that the object
named can be written using the STOR command.

Please note that a permission indicator can never imply that the appropriate command is guaranteed to work; just that it might.
Other system specific limitations, such as limitations on available space for storing files, may cause an operation to fail, where the
permission flags may have indicated that it was likely to succeed. The permissions are a guide only.

Please note that te permissions are described here as they apply to FTP commands. They may not map easily into particular
permissions available on the server's operating system. Servers are expected to synthesize these permission bits from the
permission information available from operating system. For example, to correctly determine whether the "D" permission bit should
be set on a directory for a server running on the UNIX ( 4539)(TM) operating system, the server should check that the directory
named is empty, and that the user has write permission on both the directory under consideration, and its parent directory.

Some systems may have more specific permissions than those listed here, such systems should map those to the flags defined as
best they are able. Other systems may have only more broad access controls. They will generally have just a few possible
permutations of permission flags, however they should attempt to correctly represent what is permitted.

The lang Fact


The lang fact describes the natural language of the file or directory name for use in displaying the listing to the end user. Values
used in the lang fact should be taken from the language registry of the IANA ( 4762).

Server-FTP implementations must not guess language values. Language values must be determined in an unambiguous way such
as file system tagging of language or by user configuration. Note that the lang fact provides no information at all about the content
of a file, only about the encoding of its name.

The size Fact


The size fact applies to non-directory file types and should always reflect the approximate size of the file. This should be as
accurate as the server can make it, without going to extraordinary lengths, such as reading the entire file. The size is expressed in
units of octets of data in the file.

Given limitations in some systems, Client-FTP implementations must understand this size may not be precise and may change
between the time of a MLST ( 4354) and RETR operation.

Clients that need highly accurate size information for some particular reason should use the SIZE command. The most common
need for this accuracy is likely to be in conjunction with the REST command. The size fact, on the other hand, should be used for
purposes such as indicating to a human user the approximate size of the file to be transferred, and perhaps to give an idea of
expected transfer completion time.

The media-type Fact


The media-type fact represents the IANA ( 4762) media type of the file named, and applies only to non-directory types. The list of
values used must follow the guidelines set by the IANA ( 4762) registry.

Server-FTP implementations must not guess media type values. Media type values must be determined in an unambiguous way
such as file system tagging of media-type or by user configuration. This fact gives information about the content of the file named.
Both the primary media type, and any appropriate subtype should be given, separated by a slash "/" as is traditional.

Internet Direct (Indy) Version 10.1.5 1651


TIdMLSTFTPListItem Class Classes

The charset Fact


The charset fact provides the IANA ( 4762) character set name, or alias, for the encoded pathnames in a MLST ( 4354) or MLSD
response. The default character set is UTF-8 unless specified otherwise. FTP implementations should use UTF-8 if possible to
encourage maximum inter-operability. The value of this fact applies to the pathname only, and provides no information about the
contents of the file.

Required facts
Servers are not required to support any particular set of the available facts. However, servers should, if conceivably possible,
support at least the type, perm, size, unique, and modify facts.

System Dependent and Local Facts


By using an system dependent fact, or a local fact, a server may communicate to the user information about the file named which is
peculiar to the underlying file system.

System Dependent Facts


System dependent fact names are labeled by prefixing a label identifying the specific information returned by the name of the
appropriate operating system from the IANA ( 4762) maintained list of operating system names.

The value of an OS dependent fact may be whatever is appropriate to convey the information available. In order to allow reliable
inter-operation between users of system dependent facts, the IANA ( 4762) will maintain a registry of system dependent fact
names, their syntax, and the interpretation to be given to their values.

Local Facts
Server implementations may also make available other facts of their own choosing. As the method of interpretation of such
information will generally not be widely understood, servers should be aware that clients will typically ignore any local facts
provided. As there is no registration of locally defined facts, it is entirely possible that different servers will use the same local fact
name to provide vastly different information. Hence users should be hesitant about making any use of any information in a locally
defined fact without some other specific assurance that the particular fact is one that they do comprehend.

Local fact names all begin with the sequence "X.". The rest of the name is a "token". The value of a local fact can be anything at all,
provided it can be encoded as a token.

TIdMLSTFTPListItem.LastAccessDate Property
Date and time an entry was last accessed on the remote file system.

Pascal
property LastAccessDate: TIdDateTime;
Description
LastAccessDate is a TIdDateTime ( 4733) property that represents the date and time an entry was last accessed on the remote
file system.

Use LastAccessGMT to access the date and time value expressed in the GMT timezone.

Values in LastAccess and LastAccessGMT are assigned when the directory listing parser encounters the "windows.lastaccesstime"
fact in a listing response. If "windows.lastaccesstime" is not present in the Facts ( 1648) for the collection item, the property
contains an empty date value (0.0).

Use ModifiedDate ( 856) and ModifiedDateGMT ( 1654) to access the date and time an entry was last modified on the remote
file system.

1652 Internet Direct (Indy) Version 10.1.5


Classes TIdMLSTFTPListItem Class

Use CreationDate ( 403) and CreationDateGMT ( 1648) to access the date and time an entry was created on the remote file
system.

See Also
LastAccessGMT

ModifiedDate ( 856)

ModifiedDateGMT ( 1654)

CreationDate ( 403)

CreationDateGMT ( 1648)

TIdMLSTFTPListItem.LastAccessDateGMT Property
Date and time an entry was last accessed on the remote file system.

Pascal
property LastAccessDateGMT: TIdDateTime;
Description
LastAccessDateGMT is a TIdDateTime ( 4733) property that represents the date and time expressed in the GMT timezone that an
entry was last accessed on the remote file system.

Use LastAccess to access the date and time value expressed in the local timezone for the client.

Values in LastAccess and LastAccessGMT are assigned when the directory listing parser encounters the "windows.lastaccesstime"
fact in a listing response. If "windows.lastaccesstime" is not present in the Facts ( 1648) for the collection item, the property
contains an empty date value (0.0).

Use ModifiedDate ( 856) and ModifiedDateGMT ( 1654) to access the date and time an entry was last modified on the remote
file system.

Use CreationDate ( 403) and CreationDateGMT ( 1648) to access the date and time an entry was created on the remote file
system.

See Also
LastAccessGMT

ModifiedDate ( 856)

ModifiedDateGMT ( 1654)

CreationDate ( 403)

CreationDateGMT ( 1648)

TIdMLSTFTPListItem.MLISTPermissions Property
Represents permissions assigned for the file or directory on the remote file system.

Pascal
property MLISTPermissions: string;
Description
MLISTPermissions is a string property that represents permissions assigned for the file or directory on the remote file system.
MLISTPermissions contains any values found when the directory listing parser handles the "perm" keyword in the Facts ( 1648)
for the collection item.

For Unix-based remote file systems, MLISTPermissions may also contain values derived from the "UNIX.Mode" fact for the entry, or
information derived from the ItemType ( 855) property.

The MListPermissions property will normally contain an empty string ('') when the "perm" fact is not used for the file or directory,

Internet Direct (Indy) Version 10.1.5 1653


TIdMPiXFTPListItem Class Classes

See Also
ItemType ( 855)

Facts ( 1648)

TIdMLSTFTPListItem.ModifiedDateGMT Property
Date and time an entry was last modified on the remote file system.

Pascal
property ModifiedDateGMT;
Description
ModifiedDateGMT is a TIdDateTime ( 4733) property that represents the date and time expressed in the GMT timezone that an
entry was last modified on the remote file system.

Use ModifiedDate ( 856) to access the date and time value expressed in the local timezone for the client.

Values in ModifiedDate ( 856) and ModifiedDateGMT are assigned when the directory listing parser encounters the "modify" fact
in a listing response. If the "modify" fact is not present in the Facts ( 1648) for the collection item, the property contains an empty
date value (0.0) and the ModifiedAvail ( 856) property is set to False.

Use LastAccess and LastAccessGMT to determine the date and time a file was last accesses on the remote file system.

Use CreationDate ( 403) and CreationDateGMT ( 1648) to access the date and time an entry was created on the remote file
system.

See Also
LastAccessGMT

LastAccess

ModifiedDate ( 856)

ModifiedAvail ( 856)

CreationDate ( 403)

CreationDateGMT ( 1648)

Facts ( 1648)

TIdFTPLPMList ( 883)

TIdMLSTFTPListItem.UniqueID Property
Uniquely identifies a file or a directory on the remote file system.

Pascal
property UniqueID: string;
Description
UniqueID is a string property that uniquely identifies a file or a directory on the remote file system for the FTP server. UniqueID is
useful for file systems that allows symbolic links where multiple links could actually resolve to a single file.

The value in UniqueID is assigned when a directory listing parser encounters the "unique" fact in a directory listing response. When
the "unique" fact is not present in the Facts ( 1648) for the collection item, the value of UniqueID is an empty string ('').

See Also
ItemType ( 855)

Facts ( 1648)

1654 Internet Direct (Indy) Version 10.1.5


Classes TIdMPiXFTPListItem Class

TIdMPiXFTPListItem Class
File
IdFTPListParseMPEiX ( 4639)

Hierarchy

Pascal
TIdMPiXFTPListItem = class(TIdRecFTPListItem);
Description
TIdMPiXFTPListItem is a TIdRecFTPListItem ( 1817) descendant.

See Also
TIdRecFTPListItem ( 1817)

TIdMPiXFTPListItem Members
The following tables list the members exposed by TIdMPiXFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
Limit ( 1656)
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
NumberRecs ( 1656)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
RecFormat ( 1657)
RecLength ( 1657)
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1656)
Destroy ( 854) Frees the collection item.

Legend
Method
virtual
Property

TIdMPiXFTPListItem Methods
The Methods of the TIdMPiXFTPListItem class are listed here.

Internet Direct (Indy) Version 10.1.5 1655


TIdMPiXFTPListItem Class Classes

Methods
Method Description
Create ( 1656)

Legend
Constructor
virtual

TIdMPiXFTPListItem.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is a overridden constructor for the object instance.

TIdMPiXFTPListItem Properties
The Properties of the TIdMPiXFTPListItem class are listed here.

Properties
Property Description
Limit ( 1656)
NumberRecs ( 1656)
RecFormat ( 1657)
RecLength ( 1657)

Legend
Property

TIdMPiXFTPListItem.Limit Property
Pascal
property Limit: Cardinal;
Description
Limit is a Public Cardinal property. Write access for the property is implemented using FLimit.

TIdMPiXFTPListItem.NumberRecs Property
Pascal
property NumberRecs;
Description
NumberRecs is a Public property.

1656 Internet Direct (Indy) Version 10.1.5


Classes TIdMultiPartFormDataStream Class

TIdMPiXFTPListItem.RecFormat Property
Pascal
property RecFormat;
Description
RecFormat is a Public property.

TIdMPiXFTPListItem.RecLength Property
Pascal
property RecLength;
Description
RecLength is a Public property.

TIdMultiPartFormDataStream Class
Implements support for MIME-like multipart form responses.

File
IdMultipartFormData ( 4691)

Hierarchy

Pascal
TIdMultiPartFormDataStream = class(TIdBaseStream);
Description
TIdMultiPartFormDataStream is a TIdBaseStream ( 270) descendant that implements support for encapsulation of MIME-like
"multipart" types in the content of an HTTP message body, as described in the Internet Standards documents:

RFC 1867 - Form-based File Upload in HTML

RFC 2388 - Returning Values from Forms: multipart/form-data

TIdMultiPartFormDataStream is oriented towards handling HTTP messages specifically defined to carry HTML FORM data suitable
for processing via the POST request method. TIdMultiPartFormDataStream includes support for uniformly representing both field
and file upload requests, and a MIME compatible representation for field and file upload responses.

Multipart form content for the stream can include values for the HTML INPUT elements with the following type attributes:

CHECKBOX
HIDDEN
IMAGE
PASSWORD
RADIO
RESET
SUBMIT
TEXT

Internet Direct (Indy) Version 10.1.5 1657


TIdMultiPartFormDataStream Class Classes

FILE

TIdMultiPartFormDataStream uses the MIME media type "multipart/form-data" to specify the content-type for values in the HTTP
message sent from a client to a server. Please note that the content-type "multipart/mixed" may be used when multiple files are
included the multipart response.

TIdMultiPartFormDataStream adheres to the rules for multipart MIME data streams as outlined in the Internet Standards document:

RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types

In forms, data items have both a unique name and a value. Data items are represented in TIdMultiPartFormDataStream as a series
of message parts with a content-disposition header value of "form-data", as described in the Internet Standards document:

RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field

The content-disposition header contains an (additional) parameter of "name", where the value of that parameter is the original field
name in the form. For example, a part might contain a header:
Content-Disposition: form-data; name="user"
Form field names originally in non-ASCII character sets may be encoded within the value of the "name" parameter using the
standard method, as described in the Internet Standards document:

RFC 2047 - MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text

As with all multipart MIME types, each part in the data stream has an optional "Content-Type" header, which defaults to the value
"text/plain". If the contents of a file are returned using the form, then the file input is identified as the appropriate media type, if
known, or the value "application/octet-stream". If multiple files are to be returned as the result of a single form entry, they should be
represented as a "multipart/mixed" part embedded within the "multipart/form-data".

Each part in the data stream may be encoded and the "content-transfer-encoding" header supplied when the value of that part does
not conform to the default encoding.

Use the AddFormField ( 1660), AddFile ( 1659), and AddObject ( 1661) methods to create ( 1662) data items and the
corresponding values for the form data stream.

TIdMultiPartFormDataStream is used in the overloaded TIdHTTP.Post method when sending a "multipart/form-data" request to an
HTTP server.

See Also
TIdCustomHTTP.Post ( 412)

TIdBaseStream ( 270)

TIdMultiPartFormDataStream Members
The following tables list the members exposed by TIdMultiPartFormDataStream.

Properties
Property Description
Boundary ( 1663)
RequestContentType ( 1663) MIME content type to use for a request with multipart form data.

Methods
Method Description
AddFile ( 1659) Adds a form field representing file data.
AddFormField ( 1660)
AddObject ( 1661) Adds a form field representing data with a specific content type.
Create ( 1662) Constructor for the object instance.
Destroy ( 1662) Frees the object instance.
Read ( 271)
Seek ( 272)
Write ( 274)

1658 Internet Direct (Indy) Version 10.1.5


Classes TIdMultiPartFormDataStream Class

Legend
Method
virtual
Property
read only

TIdMultiPartFormDataStream Methods
The Methods of the TIdMultiPartFormDataStream class are listed here.

Methods
Method Description
AddFile ( 1659) Adds a form field representing file data.
AddFormField ( 1660)
AddObject ( 1661) Adds a form field representing data with a specific content type.
Create ( 1662) Constructor for the object instance.
Destroy ( 1662) Frees the object instance.

Legend
Method
virtual

TIdMultiPartFormDataStream.AddFile Method
Adds a form field representing file data.

Pascal
procedure AddFile(
const AFieldName: string;
const AFileName: string;
const AContentType: string
);
Parameters
Parameters Description
AFieldName Name to be used to reference the field content.
AFileName File to use as the content of the field.
AContentType MIME content type represented by the data in the file.

Description
AddFile is a procedure used to add a content field representing a file to be uploaded as part of the multipart data stream. AddFile
creates a TIdFormDataField ( 705) instance in the internal collection of fields for the multipart data stream. AddFile creates a
TFileStream used to read ( 271) the contents of the file, and AFieldName, AFileName, AContentType, and the file stream to the
content field.

AddFile updates the Size property to include the size of any exisiting content fields and the size of the newly added content field
(including headers).

Example
(Delphi) Adding an upload file to a multipart data stream.
AValues := TIdStringList.Create;

AValues.Values['usr'] := '"John Doe"';


AValues.Values['grp'] := 'public';
AValues.Values['fil'] := 'c:imageslogo.gif';

PostStream:= TIdMultiPartFormDataStream.Create;
ResponseStream := TIdStringStream.Create('');

try

Internet Direct (Indy) Version 10.1.5 1659


TIdMultiPartFormDataStream Class Classes

PostStream.AddFormField('usr', AValues.Values['usr']);
PostStream.AddFormField('grp', AValues.Values['grp']);

PostStream.AddFile('fil', AValues.Values['fil'],
GetMIMETypeFromFile(AValues.Values['fil']));

IdHTTP1.Request.ContentType := PostStream.RequestContentType;
IdHTTP1.Post(sURL, PostStream, ResponseStream);
finally
Memo1.Text := ResponseStream.DataString;
ResponseStream.Free;
PostStream.Free;
AValues.Free;
end;
See Also
TIdMultiPartFormDataStream.AddFormField ( 1660)

TIdMultiPartFormDataStream.AddObject ( 1661)

TIdMultiPartFormDataStream.Size

TIdMultiPartFormDataStream.AddFormField Method
Pascal
procedure AddFormField(
const AFieldName: string;
const AFieldValue: string
);
Parameters
Parameters Description
AFieldName Name of the content field.
AFieldValue Value of the content field.

Description
AddFormField is a procedure used to add a named content field with a given value to the multipart data stream. AFieldName
contains the name to assign to the content field. AFieldValue contains the value for the content field.

AddFormField create ( 1662) a TIdFormDataField ( 705) instance in the internal collection used for form fields. Te values
indicated in AFieldName and AFieldValue are assigned to the FieldName and FieldValue properties.

AddFile ( 1659) updates the Size property to include the size of any exisiting content fields and the size of the newly added
content field (including headers).

Example
(Delphi) Adding an upload file to a multipart data stream.
AValues := TIdStringList.Create;

AValues.Values['usr'] := '"John Doe" ';


AValues.Values['grp'] := 'public';
AValues.Values['fil'] := 'c:imageslogo.gif';

PostStream:= TIdMultiPartFormDataStream.Create;
ResponseStream := TIdStringStream.Create('');

try
PostStream.AddFormField('usr', AValues.Values['usr']);
PostStream.AddFormField('grp', AValues.Values['grp']);

PostStream.AddFile('fil', AValues.Values['fil'],
GetMIMETypeFromFile(AValues.Values['fil']));

IdHTTP1.Request.ContentType := PostStream.RequestContentType;
IdHTTP1.Post(sURL, PostStream, ResponseStream);
finally
Memo1.Text := ResponseStream.DataString;

1660 Internet Direct (Indy) Version 10.1.5


Classes TIdMultiPartFormDataStream Class

ResponseStream.Free;
PostStream.Free;
AValues.Free;
end;
See Also
TIdMultiPartFormDataStream.AddFile ( 1659)

TIdMultiPartFormDataStream.AddObject ( 1661)

TIdMultiPartFormDataStream.Size

TIdMultiPartFormDataStream.AddObject Method
Adds a form field representing data with a specific content type.

Pascal
procedure AddObject(
const AFieldName: string;
const AContentType: string;
AFileData: TObject;
const AFileName: string = ''
);
Parameters
Parameters Description
AFieldName Name to be used to reference the field content.
AContentType MIME content type represented by the data in the file.
AFileData Object with the content for the form field.
AFileName File associated with the field data.

Description
AddObject is a procedure used to add a form field to the multipart data stream where the content is stored in AFileData. AddObject
creates a TIdFormDataField ( 705) instance in the internal collection of fields for the multipart data stream. AddObject assigns the
values in AFieldName, AFileName,AContentType, and AFileData to the form field.

AddObject updates the Size property to include the size of any exisiting content fields and the size of the newly added content field
(including headers).

Example
(Delphi) Adding an upload file to a multipart data stream.
AValues := TIdStringList.Create;

AValues.Values['usr'] := '"John Doe" ';


AValues.Values['grp'] := 'public';
AValues.Values['fil'] := 'c:imageslogo.gif';

PostStream:= TIdMultiPartFormDataStream.Create;
ResponseStream := TIdStringStream.Create('');

try
PostStream.AddFormField('usr', AValues.Values['usr']);
PostStream.AddFormField('grp', AValues.Values['grp']);

PostStream.AddFile('fil', AValues.Values['fil'],
GetMIMETypeFromFile(AValues.Values['fil']));

IdHTTP1.Request.ContentType := PostStream.RequestContentType;
IdHTTP1.Post(sURL, PostStream, ResponseStream);
finally
Memo1.Text := ResponseStream.DataString;
ResponseStream.Free;
PostStream.Free;
AValues.Free;
end;

Internet Direct (Indy) Version 10.1.5 1661


TIdMultiPartFormDataStream Class Classes

See Also
AddFile ( 1659)

AddFormField ( 1660)

Size

TIdMultiPartFormDataStream.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the constructor for the object instance, and calls the inherited constructor. Create sets the default values for properties
that include:

Size 0
Boundary ( 1663) A unique generated value
RequestContentType ( 1663) Uses the constant sContentType and the value in
Boundary ( 1663).

Create also initializes the TIdFormDataFields ( 710) collection used internally to maintain content fields for the stream.

See Also
TIdMultiPartFormDataStream.Destroy ( 1662)

TIdMultiPartFormDataStream.Size

TIdMultiPartFormDataStream.Boundary ( 1663)

TIdFormDataFields ( 710)

TIdMultiPartFormDataStream.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees and releases resources allocated to the TIdFormDataFields ( 710)
collection used internally to maintain content fields for the stream. Destroy calls the inherited destructor prior to exiting from the
method.

See Also
TIdMultiPartFormDataStream.Create ( 1662)

TIdMultiPartFormDataStream. TIdFormDataFields ( 710)

TIdMultiPartFormDataStream Properties
The Properties of the TIdMultiPartFormDataStream class are listed here.

1662 Internet Direct (Indy) Version 10.1.5


Classes TIdMusicFTPListItem Class

Properties
Property Description
Boundary ( 1663)
RequestContentType ( 1663) MIME content type to use for a request with multipart form data.

Legend
Property
read only

TIdMultiPartFormDataStream.Boundary Property
Pascal
property Boundary: string;
Description
Boundary is a Public read ( 271)-only string property

TIdMultiPartFormDataStream.RequestContentType Property
MIME content type to use for a request with multipart form data.

Pascal
property RequestContentType: string;
Description
RequestContentType is a read ( 271)-only string property that represents the MIME content type header and boundary marker as
used in an HTTP request. The value for RequestContentType is assigned in the Create ( 1662) constructor, and consists of the
string constant sContentType and the generated value for Boundary ( 1663).

See Also
TIdMultiPartFormDataStream.Boundary ( 1663)

IdMultiPartFormDataStream. Create ( 1662)

TIdMusicFTPListItem Class
File
IdFTPListParseMusic ( 4639)

Hierarchy

Pascal
TIdMusicFTPListItem = class(TIdRecFTPListItem);
Description
TIdMusicFTPListItem is a TIdRecFTPListItem ( 1817) descendant.

See Also
TIdRecFTPListItem ( 1817)

TIdMusicFTPListItem Members
The following tables list the members exposed by TIdMusicFTPListItem.

Internet Direct (Indy) Version 10.1.5 1663


TIdMusicFTPListItem Class Classes

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
NumberRecs ( 1664)
OwnerName ( 1664)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
RecFormat ( 1665)
RecLength ( 1665)
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdMusicFTPListItem Properties
The Properties of the TIdMusicFTPListItem class are listed here.

Properties
Property Description
NumberRecs ( 1664)
OwnerName ( 1664)
RecFormat ( 1665)
RecLength ( 1665)

Legend
Property

TIdMusicFTPListItem.NumberRecs Property
Pascal
property NumberRecs;
Description
NumberRecs is a Public property.

TIdMusicFTPListItem.OwnerName Property
Pascal
property OwnerName: String;
Description
OwnerName is a Public String property. Write access for the property is implemented using FOwnerName.

1664 Internet Direct (Indy) Version 10.1.5


Classes TIdMUTF7 Class

TIdMusicFTPListItem.RecFormat Property
Pascal
property RecFormat;
Description
RecFormat is a Public property.

TIdMusicFTPListItem.RecLength Property
Pascal
property RecLength;
Description
RecLength is a Public property.

TIdMUTF7 Class
File
IdIMAP4 ( 4666)

Hierarchy

Pascal
TIdMUTF7 = class(TObject);
Description
TIdMUTF7 is a TObject descendant.

See Also
TObject

TIdMUTF7 Members
The following tables list the members exposed by TIdMUTF7.

Methods
Method Description
Append ( 1666)
Decode ( 1666)
Encode ( 1666)
Valid ( 1667)

Legend
Method

TIdMUTF7 Methods
The Methods of the TIdMUTF7 class are listed here.

Internet Direct (Indy) Version 10.1.5 1665


TIdMUTF7 Class Classes

Methods
Method Description
Append ( 1666)
Decode ( 1666)
Encode ( 1666)
Valid ( 1667)

Legend
Method

TIdMUTF7.Append Method
Pascal
function Append(
const aMUTF7String: string;
const aAnsiStr: string
): string;
Parameters
Parameters Description
aMUTF7String Scope is const. Type is string.
aAnsiStr Scope is const. Type is string.

Returns
string

Description
Append is a method.

Append returns a string value.

TIdMUTF7.Decode Method
Pascal
function Decode(
aString: string
): string;
Parameters
Parameters Description
aString Type is string.

Returns
string

Description
Decode is a method.

Decode returns a string value.

TIdMUTF7.Encode Method
Pascal
function Encode(
aString: string
): string;

1666 Internet Direct (Indy) Version 10.1.5


Classes TIdMVSFTPListItem Class

Parameters
Parameters Description
aString Type is string.

Returns
string

Description
Encode is a method.

Encode returns a string value.

TIdMUTF7.Valid Method
Pascal
function Valid(
aMUTF7String: string
): boolean;
Parameters
Parameters Description
aMUTF7String Type is string.

Returns
boolean

Description
Valid is a method.

Valid returns a boolean value.

TIdMVSFTPListItem Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdMVSFTPListItem = class(TIdRecFTPListItem);
Description
TIdMVSFTPListItem is a TIdRecFTPListItem ( 1817) descendant.

See Also
TIdRecFTPListItem ( 1817)

TIdMVSFTPListItem Members
The following tables list the members exposed by TIdMVSFTPListItem.

Properties
Property Description
BlockSize ( 1669)

Internet Direct (Indy) Version 10.1.5 1667


TIdMVSFTPListItem Class Classes

Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
Migrated ( 1669)
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
NumberExtents ( 1669)
NumberRecs ( 1669)
NumberTracks ( 1670)
Org ( 1670)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
RecFormat ( 1670)
RecLength ( 1670)
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.
Units ( 1670)
Volume ( 1670)

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1668)
Destroy ( 854) Frees the collection item.

Legend
Method
virtual
Property

TIdMVSFTPListItem Methods
The Methods of the TIdMVSFTPListItem class are listed here.

Methods
Method Description
Create ( 1668)

Legend
Constructor
virtual

TIdMVSFTPListItem.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is a overridden constructor for the object instance.

1668 Internet Direct (Indy) Version 10.1.5


Classes TIdMVSFTPListItem Class

TIdMVSFTPListItem Properties
The Properties of the TIdMVSFTPListItem class are listed here.

Properties
Property Description
BlockSize ( 1669)
Migrated ( 1669)
NumberExtents ( 1669)
NumberRecs ( 1669)
NumberTracks ( 1670)
Org ( 1670)
RecFormat ( 1670)
RecLength ( 1670)
Units ( 1670)
Volume ( 1670)

Legend
Property

TIdMVSFTPListItem.BlockSize Property
Pascal
property BlockSize: Integer;
Description
BlockSize is a Public Integer property. Write access for the property is implemented using FBlockSize.

TIdMVSFTPListItem.Migrated Property
Pascal
property Migrated: Boolean;
Description
Migrated is a Public Boolean property. Write access for the property is implemented using FMigrated.

TIdMVSFTPListItem.NumberExtents Property
Pascal
property NumberExtents: Integer;
Description
NumberExtents is a Public Integer property. Write access for the property is implemented using FMVSNumberExtents.

TIdMVSFTPListItem.NumberRecs Property
Pascal
property NumberRecs;
Description
NumberRecs is a Public property.

Internet Direct (Indy) Version 10.1.5 1669


TIdMVSJESFTPListItem Class Classes

TIdMVSFTPListItem.NumberTracks Property
Pascal
property NumberTracks: Integer;
Description
NumberTracks is a Public Integer property. Write access for the property is implemented using FMVSNumberTracks.

TIdMVSFTPListItem.Org Property
Pascal
property Org: String;
Description
Org is a Public String property. Write access for the property is implemented using FOrg.

TIdMVSFTPListItem.RecFormat Property
Pascal
property RecFormat;
Description
RecFormat is a Public property.

TIdMVSFTPListItem.RecLength Property
Pascal
property RecLength;
Description
RecLength is a Public property.

TIdMVSFTPListItem.Units Property
Pascal
property Units: String;
Description
Units is a Public String property. Write access for the property is implemented using FUnit.

TIdMVSFTPListItem.Volume Property
Pascal
property Volume: String;
Description
Volume is a Public String property. Write access for the property is implemented using FVolume.

1670 Internet Direct (Indy) Version 10.1.5


Classes TIdMVSJESFTPListItem Class

TIdMVSJESFTPListItem Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

Pascal
TIdMVSJESFTPListItem = class(TIdOwnerFTPListItem);
Description
TIdMVSJESFTPListItem is a TIdOwnerFTPListItem ( 1765) descendant.

See Also
TIdOwnerFTPListItem ( 1765)

TIdMVSJESFTPListItem Members
The following tables list the members exposed by TIdMVSJESFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
JobSpoolFiles ( 1672)
JobStatus ( 1672)
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
OwnerName ( 1766)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1672)
Destroy ( 854) Frees the collection item.

Legend
Method
virtual
Property

TIdMVSJESFTPListItem Methods
The Methods of the TIdMVSJESFTPListItem class are listed here.

Methods
Method Description
Create ( 1672)

Internet Direct (Indy) Version 10.1.5 1671


TIdMVSJESIntF2FTPListItem Class Classes

Legend
Constructor
virtual

TIdMVSJESFTPListItem.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is a overridden constructor for the object instance.

TIdMVSJESFTPListItem Properties
The Properties of the TIdMVSJESFTPListItem class are listed here.

Properties
Property Description
JobSpoolFiles ( 1672)
JobStatus ( 1672)

Legend
Property

TIdMVSJESFTPListItem.JobSpoolFiles Property
Pascal
property JobSpoolFiles: Integer;
Description
JobSpoolFiles is a Public Integer property. Write access for the property is implemented using FMVSJobSpoolFiles.

TIdMVSJESFTPListItem.JobStatus Property
Pascal
property JobStatus: TIdJESJobStatus;
Description
JobStatus is a Public TIdJESJobStatus ( 2963) property. Write access for the property is implemented using FMVSJobStatus.

TIdMVSJESIntF2FTPListItem Class
File
IdFTPListParseMVS ( 4639)

Hierarchy

1672 Internet Direct (Indy) Version 10.1.5


Classes TIdMVSJESIntF2FTPListItem Class

Pascal
TIdMVSJESIntF2FTPListItem = class(TIdOwnerFTPListItem);
Description
TIdMVSJESIntF2FTPListItem is a TIdOwnerFTPListItem ( 1765) descendant.

See Also
TIdOwnerFTPListItem ( 1765)

TIdMVSJESIntF2FTPListItem Members
The following tables list the members exposed by TIdMVSJESIntF2FTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
Details ( 1674)
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
JobSpoolFiles ( 1674)
JobStatus ( 1675)
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
OwnerName ( 1766)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 1674)
Destroy ( 1674)

Legend
Method
virtual
Property

TIdMVSJESIntF2FTPListItem Methods
The Methods of the TIdMVSJESIntF2FTPListItem class are listed here.

Methods
Method Description
Create ( 1674)
Destroy ( 1674)

Legend
Constructor
virtual

Internet Direct (Indy) Version 10.1.5 1673


TIdMVSJESIntF2FTPListItem Class Classes

TIdMVSJESIntF2FTPListItem.Create Constructor
Pascal
constructor Create(
AOwner: TIdCollection
); override;
Parameters
Parameters Description
AOwner Type is TIdCollection ( 3011).

Description
Create is a overridden constructor for the object instance.

TIdMVSJESIntF2FTPListItem.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdMVSJESIntF2FTPListItem Properties
The Properties of the TIdMVSJESIntF2FTPListItem class are listed here.

Properties
Property Description
Details ( 1674)
JobSpoolFiles ( 1674)
JobStatus ( 1675)

Legend
Property

TIdMVSJESIntF2FTPListItem.Details Property
Pascal
property Details: TIdStrings;
Description
Details is a Public TIdStrings ( 3089) property. Write access for the property is implemented using SetDetails.

TIdMVSJESIntF2FTPListItem.JobSpoolFiles Property
Pascal
property JobSpoolFiles: Integer;
Description
JobSpoolFiles is a Public Integer property. Write access for the property is implemented using FJobSpoolFiles.

1674 Internet Direct (Indy) Version 10.1.5


Classes TIdMWayTreeNode Class

TIdMVSJESIntF2FTPListItem.JobStatus Property
Pascal
property JobStatus: TIdJESJobStatus;
Description
JobStatus is a Public TIdJESJobStatus ( 2963) property. Write access for the property is implemented using FJobStatus.

TIdMWayTreeNode Class
File
IdDNSServer ( 4621)

Hierarchy

Pascal
TIdMWayTreeNode = class(TObject);
Description
TIdMWayTreeNode is a TObject descendant.

See Also
TObject

TIdMWayTreeNode Members
The following tables list the members exposed by TIdMWayTreeNode.

Properties
Property Description
Children ( 1677)
FundmentalClass ( 1677)

Methods
Method Description
AddChild ( 1676)
Create ( 1676)
Destroy ( 1676)
InsertChild ( 1676)
RemoveChild ( 1677)

Legend
Method
virtual
Property

TIdMWayTreeNode Methods
The Methods of the TIdMWayTreeNode class are listed here.

Internet Direct (Indy) Version 10.1.5 1675


TIdMWayTreeNode Class Classes

Methods
Method Description
AddChild ( 1676)
Create ( 1676)
Destroy ( 1676)
InsertChild ( 1676)
RemoveChild ( 1677)

Legend
Method
virtual

TIdMWayTreeNode.AddChild Method
Pascal
function AddChild: TIdMWayTreeNode;
Returns
TIdMWayTreeNode ( 1675)

Description
AddChild is a method.

AddChild returns a TIdMWayTreeNode ( 1675) value.

TIdMWayTreeNode.Create Constructor
Pascal
constructor Create(
NodeClass: TIdMWayTreeNodeClass
); virtual;
Parameters
Parameters Description
NodeClass Type is TIdMWayTreeNodeClass ( 3060).

Description
Create is a virtual constructor for the object instance.

TIdMWayTreeNode.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdMWayTreeNode.InsertChild Method
Pascal
function InsertChild(
Index: integer
): TIdMWayTreeNode;
Parameters
Parameters Description
Index Type is integer.

1676 Internet Direct (Indy) Version 10.1.5


Classes TIdNativeComponentHelper Class Helper

Returns
TIdMWayTreeNode ( 1675)

Description
InsertChild is a method.

InsertChild returns a TIdMWayTreeNode ( 1675) value.

TIdMWayTreeNode.RemoveChild Method
Pascal
procedure RemoveChild(
Index: integer
);
Parameters
Parameters Description
Index Type is integer.

Description
RemoveChild is a method.

TIdMWayTreeNode Properties
The Properties of the TIdMWayTreeNode class are listed here.

Properties
Property Description
Children ( 1677)
FundmentalClass ( 1677)

Legend
Property

TIdMWayTreeNode.Children Property
Pascal
property Children [Index : integer]: TIdMWayTreeNode;
Description
Children is a Public TIdMWayTreeNode ( 1675) property. Write access for the property is implemented using SetTreeNode.

TIdMWayTreeNode.FundmentalClass Property
Pascal
property FundmentalClass: TIdMWayTreeNodeClass;
Description
FundmentalClass is a Public TIdMWayTreeNodeClass ( 3060) property. Write access for the property is implemented using
SetFundmentalClass.

Internet Direct (Indy) Version 10.1.5 1677


TIdNetscapeCookie Class Classes

TIdNativeComponentHelper Class Helper


File
IdObjs ( 4694)

Hierarchy

Pascal
TIdNativeComponentHelper = class helper(TComponentHelper) for TIdNativeComponent;
Description
TIdNativeComponentHelper

TIdNCSAforDOSFTPListItem Class
File
IdFTPListParseNCSAForDOS ( 4640)

Hierarchy

Pascal
TIdNCSAforDOSFTPListItem = class(TIdFTPListItem);
Description
TIdNCSAforDOSFTPListItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

TIdNCSAforMACOSFTPListItem Class
File
IdFTPListParseNCSAForMACOS ( 4640)

Hierarchy

Pascal
TIdNCSAforMACOSFTPListItem = class(TIdMinimalFTPListItem);
Description
TIdNCSAforMACOSFTPListItem is a TIdMinimalFTPListItem ( 1642) descendant.

See Also
TIdMinimalFTPListItem ( 1642)

1678 Internet Direct (Indy) Version 10.1.5


Classes TIdNetscapeCookie Class

TIdNetscapeCookie Class
Implements a persistent state mechanism for HTTP connections using Cookies.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdNetscapeCookie = class(TIdCollectionItem);
Description
TIdNetscapeCookie is a TIdCollectionItem ( 3011) descendant that implements a persistent state mechanism used to store and
retrieve about HTTP client connections using Cookies, as described in the reference document:

Netscape Persistent Client State - HTTP Cookies

TIdNetscapeCookie provides methods and properties to allow introduction of one or more Cookie values and associated Cookie
attributes to the client as part of an HTTP response, including the common Cookie headers Name, Value ( 1684), Domain (
1683), Path ( 1684), and Secure ( 1684).

TIdNetscapeCookie also implements the Expires ( 1683) header to let the client know when it is safe to purge Cookie data.

TIdNetscapeCookie can also be used to represent Cookie values returned from a client to an HTTP Server.

TIdNetscapeCookie is used as the ancestor for descendant classes that implement alternate Cookie representations, including
TIdCookie2109 and TIdCookie2965.

See Also
TIdCookieRFC2109 ( 388)

TIdCookieRFC2965 ( 391)

IndySupport ( 15)

TIdNetscapeCookie Members
The following tables list the members exposed by TIdNetscapeCookie.

Properties
Property Description
ClientCookie ( 1682) Represents the Cookie name and value.
CookieName ( 1682) Represents the identity for a Cookie header.
CookieText ( 1683) Represents the textual representation for a Cookie including attribute parameters.
Domain ( 1683) Indicates the host system where a Cookie is valid.
Expires ( 1683) Indicates the life time of the Cookie.
Path ( 1684) Specifies the subset of URLs valid for the Cookie.
Secure ( 1684) Indicates the Cookie requires a secure communications channel.
ServerCookie ( 1684) Represents the Cookie contents in a Server response.
Value ( 1684) Represents persistent state data associated with a Cookie name.

Methods
Method Description
Assign ( 1680) Copies property values to the current object instance.
Create ( 1680) Constructor for the object instance.
Destroy ( 1681) Frees the collection item.

Internet Direct (Indy) Version 10.1.5 1679


TIdNetscapeCookie Class Classes

IsValidCookie ( 1681) Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Legend
Method
virtual
Property
read only

TIdNetscapeCookie Methods
The Methods of the TIdNetscapeCookie class are listed here.

Methods
Method Description
Assign ( 1680) Copies property values to the current object instance.
Create ( 1680) Constructor for the object instance.
Destroy ( 1681) Frees the collection item.
IsValidCookie ( 1681) Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Legend
Method
virtual

TIdNetscapeCookie.Assign Method
Copies property values to the current object instance.

Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Persistent class containing values to be copied.

Description
Assign is a procedure used to copy and assign values from a TIdPersistent ( 3073) descendant in Source to the current object
instance.

When Source is a TIdCookieRFC2109 ( 388) class instance, Assign updates CookieText ( 1683) and the internal Cookie version
using the property values in Source.

See Also
TIdCookieRFC2109 ( 388)

TIdNetscapeCookie.Create Constructor
Constructor for the object instance.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Collection that owns the collection item.

1680 Internet Direct (Indy) Version 10.1.5


Classes TIdNetscapeCookie Class

Description
Create is the constructor for the object instance, and calls the inherited Create method using the Cookie collection specified in
ACollection as the owner of the Cookie.

Create sets the internal version for the Cookie to cvNetscape prior to exiting from the method.

See Also
TIdNetscapeCookie.Destroy ( 1681)

TIdNetscapeCookie.Destroy Destructor
Frees the collection item.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance, and ensures that all Cookie values for the curent Domain ( 1683) are removed
from the in the TIdCookies ( 394) Collection.

Destroy calls the inherited Destroy prior to exiting the method.

See Also
TIdCookies ( 394)

TIdNetscapeCookie.IsValidCookie Method
Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Pascal
function IsValidCookie(
AServerHost: String
): Boolean; virtual;
Parameters
Parameters Description
AServerHost Host server receiving the request.

Returns
Boolean - True when the host server matches Domain ( 1683).

Description
IsValidCookie is a Boolean function that indicates if the Domain ( 1683) for the Cookie matches the host server that received the
request and state information.

AServerHost is the server that received the request containing the persistent state information in the Cookie.

The return value is True when AServerHost contains an IP address or host name that matches the Domain ( 1683) for the Cookie.

Use Path ( 1684) to determine the subset of URLs where the Cookie is valid.

See Also
TIdNetscapeCookie.Domain ( 1683)

TIdNetscapeCookie.Path ( 1684)

TIdNetscapeCookie Properties
The Properties of the TIdNetscapeCookie class are listed here.

Internet Direct (Indy) Version 10.1.5 1681


TIdNetscapeCookie Class Classes

Properties
Property Description
ClientCookie ( 1682) Represents the Cookie name and value.
CookieName ( 1682) Represents the identity for a Cookie header.
CookieText ( 1683) Represents the textual representation for a Cookie including attribute parameters.
Domain ( 1683) Indicates the host system where a Cookie is valid.
Expires ( 1683) Indicates the life time of the Cookie.
Path ( 1684) Specifies the subset of URLs valid for the Cookie.
Secure ( 1684) Indicates the Cookie requires a secure communications channel.
ServerCookie ( 1684) Represents the Cookie contents in a Server response.
Value ( 1684) Represents persistent state data associated with a Cookie name.

Legend
Property
read only

TIdNetscapeCookie.ClientCookie Property
Represents the Cookie name and value.

Pascal
property ClientCookie: String;
Returns
String - Name and value for the Cookie.

Description
ClientCookie is a read-only String property that represents the CookieName ( 1682) and Value ( 1684) for the Cookie.
ClientCookie returns the property values in the form NAME=VALUE.

Use ServerCookie ( 1684) or CookieText ( 1683) to access the Cookie including attributes values like Domain ( 1683), Path (
1684), Secure ( 1684), and Expires ( 1683).

See Also
TIdNetscapeCookie.ServerCookie ( 1684)

TIdNetscapeCookie.CookieText ( 1683)

TIdNetscapeCookie.CookieName Property
Represents the identity for a Cookie header.

Pascal
property CookieName: String;
Description
CookieName is a String property that contains the identity portion of the name/value attribute pair that represents the Client or
Server Cookie. CookieName is used to access the textual content of the Cookie in a TIdCookies ( 394) collection.

CookieNames that begin with '$' are reserved for specifiying attributes to associate with an adjacent cookie, and must not be used
by applications.

See Also
TIdNetscapeCookie.Value ( 1684)

TIdCookies ( 394)

1682 Internet Direct (Indy) Version 10.1.5


Classes TIdNetscapeCookie Class

TIdNetscapeCookie.CookieText Property
Represents the textual representation for a Cookie including attribute parameters.

Pascal
property CookieText: String;
Description
CookieText is a String property that represents the name and value attribute pair, as well as optional parameters that make up the
textual representation of the Cookie. CookieText can contain the in the CookieName ( 1682) and Value ( 1684) properties, as
well as property values from Expires ( 1683), Path ( 1684), Domain ( 1683), and the Secure ( 1684) flag.

Use ServerCookie ( 1684) to access the Set-Cookie variant of the Cookie for use in an HTTP response.

Use ClientCookie ( 1682) to access the values as received on an HTTP Client.

See Also
TIdNetscapeCookie.ClientCookie ( 1682)

TIdNetscapeCookie.ServerCookie ( 1684)

TIdCookies ( 394)

TIdNetscapeCookie.Domain Property
Indicates the host system where a Cookie is valid.

Pascal
property Domain: String;
Description
Domain is a String property that represents the optional Cookie attribute that specifies the host system where the Cookie is valid.
Domain can contain an explicit value, beginning with a '.', or the value of the host that receives the request.

Domain is used in IsValidCookie ( 1681) to determine if a specific Cookie can be used for the server host in an HTTP request.

Use Path ( 1684) to determine the subset of URLs where a Cookie is valid.

See Also
TIdNetscapeCookie.IsValidCookie ( 1681)

TIdNetscapeCookie.ServerCookie ( 1684)

TIdNetscapeCookie.Path ( 1684)

TIdNetscapeCookie.Expires Property
Indicates the life time of the Cookie.

Pascal
property Expires: String;
Description
Expires is a String property that represents the optional Cookie attribute that defines the valid life time of a Cookie. Once the
expiration date has been reached, the cookie will no longer be stored or given out.

Expires is expressed in a format based on RFC 822, RFC 850, RFC 1036, RFC 1123, and RC 2822 with the variations that the only
legal time zone is GMT and the separators between the elements of the date must be dashes. For example:

Wed, 04-Jul-2001 01:00:01 GMT


When Expires is omitted, the Cookie will expire when the HTTP session ends.

Internet Direct (Indy) Version 10.1.5 1683


TIdNetscapeCookie Class Classes

There is a bug in Netscape Navigator version 1.1 and earlier. Only Cookies whose Path ( 1684) attribute is set explicitly to "/" will
be properly saved between sessions if they have an Expires attribute value.

See Also
TIdNetscapeCookie.Path ( 1684)

TIdNetscapeCookie.Path Property
Specifies the subset of URLs valid for the Cookie.

Pascal
property Path: String;
Description
Path is a String property that specifies the subset of URLs in a Domain ( 1683) for which the Cookie is valid.

If the Domain ( 1683) for a Cookie matches the server host, then the request path specified in a URL is compared with the Path
attribute, and is considered valid when Path is a subset of the request URL.

See Also
TIdNetscapeCookie.Domain ( 1683)

TIdNetscapeCookie.IsValidCookie ( 1681)

TIdNetscapeCookie.Secure Property
Indicates the Cookie requires a secure communications channel.

Pascal
property Secure: Boolean;
Description
Secure is a Boolean property that indicates the Cookie can be transmitted only on a secure communications channel. Currently this
means that secure cookies will only be sent to HTTPS (HTTP over SSL) servers.

If secure is not specified, a cookie is considered safe to be sent in the clear over unsecured channels.

TIdNetscapeCookie.ServerCookie Property
Represents the Cookie contents in a Server response.

Pascal
property ServerCookie: String;
Description
ServerCookie is a read-only String property that contains the textual representation of the Cookie name value pair and optional
attributes, like CookieText ( 1683).

Use ClientCookie ( 1682) to provide information about a persistent session as part of an HTTP client request.

Use CookieText ( 1683) to access Cookie properties when updates can be performed.

ServerCookie is used to provide persistent state information from an HTTP Server to an HTTP client.

See Also
TIdNetscapeCookie.ClientCookie ( 1682)

TIdNetscapeCookie.Value Property
Represents persistent state data associated with a Cookie name.

1684 Internet Direct (Indy) Version 10.1.5


Classes TIdNetworkCalculator Class

Pascal
property Value: String;
Description
Value is a String property that represents the persistent state data associated with the identity in CookieName ( 1682).

Value is used to construct CookieText ( 1683), with optional attribute values, that represents the complete Cookie.

See Also
TIdNetscapeCookie.CookieText ( 1683)

TIdNetscapeCookie.CookieName ( 1682)

TIdNetworkCalculator Class
Implements an IP address calculator.

File
IdNetworkCalculator ( 4691)

Hierarchy

Pascal
TIdNetworkCalculator = class(TIdBaseComponent);
Description
TIdNetworkCalculator is a TIdBaseComponent ( 266) descendant that implements a component used to calculate the validity of a
network address, or calculate a list of valid network addresses.

The IP address used by TIdNetworkCalculator is based on the network address scheme, as described in the Internet Standards
document:

RFC 1365 - An IP Address Extension Proposal

Assign values to the properties NetworkClass ( 1690), NetworkAddress ( 1689), and NetworkMask ( 1691) to allow the
component to validate the IP address desired. You can also use IsAddressInNetwork ( 1687) to determine if a specific network
address is valid based on the NetworkMask ( 1691) settings. Use ListIP ( 1689) to view a list of IP addresses accessible over a
network having the given network address and network mask.

See Also
TIdBaseComponent ( 266) IndySupport ( 15)

TIdNetworkCalculator Members
The following tables list the members exposed by TIdNetworkCalculator.

Properties
Property Description
IsAddressRoutable ( 1689) Indicates if the network address is a routable public IP address.
ListIP ( 1689) Represents the list of valid IP addresses for the network.
NetworkAddress ( 1689) Specifies a local address on a network.
NetworkClass ( 1690) Specifies the network class for the current network address.
NetworkClassAsString ( 1690) Returns the text representation of the network class.
NetworkMask ( 1691) Specifies the network address mask for the current network settings.
NetworkMaskLength ( 1691) Specifies the number of available network addresses for the current network.
OnChange ( 1691) Specifies the event handler for changes to network address properties.

Internet Direct (Indy) Version 10.1.5 1685


TIdNetworkCalculator Class Classes

OnGenIPList ( 1692) Specifies the event handler for updates to ListIP ( 1689).
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Create ( 267) Constructor for the object instance.
Destroy ( 1686) Frees the class instance.
EndIP ( 1686) Indicates the last available IP address for the network.
FillIPList ( 1687) Generates a list of valid IP address for the network.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAddressInNetwork ( 1687) Indicates if an IP address is valid for the network settings.
NumIP ( 1688) Identifies the number of IP addresses available on the network.
StartIP ( 1688) Determines the first available IP address for the network.
CType ( 267)
Create ( 1274)

Legend
Constructor
virtual
Property
read only

TIdNetworkCalculator Methods
The Methods of the TIdNetworkCalculator class are listed here.

Methods
Method Description
Destroy ( 1686) Frees the class instance.
EndIP ( 1686) Indicates the last available IP address for the network.
FillIPList ( 1687) Generates a list of valid IP address for the network.
IsAddressInNetwork ( 1687) Indicates if an IP address is valid for the network settings.
NumIP ( 1688) Identifies the number of IP addresses available on the network.
StartIP ( 1688) Determines the first available IP address for the network.

Legend
Destructor
virtual

TIdNetworkCalculator.Destroy Destructor
Frees the class instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the class instance.

Destroy will clear items stored in the ListIP ( 1689) property. Destroy will release resources allocated to the NetworkAddress (
1689), NetworkMask ( 1691), and ListIP ( 1689) properties. Destroy calls the inherited Destroy method prior to exiting.

See Also
NetworkAddress ( 1689) NetworkMask ( 1691) ListIP ( 1689)

TIdNetworkCalculator.EndIP Method
Indicates the last available IP address for the network.

1686 Internet Direct (Indy) Version 10.1.5


Classes TIdNetworkCalculator Class

Pascal
function EndIP: String;
Returns
String - IP address in "dotted-decimal" format, like 129.71.2.4.

Description
EndIP is a String function used to determine the last available IP address for the network.

EndIP uses the value in NetworkAddress ( 1689) and NetworkMask ( 1691) to perform calculations for available network
addresses. The binary length of NetworkMask ( 1691) is used to determine the maximum number of IP addresses to use as
indicated by NumIP ( 1688).

See Also
NumIP ( 1688) StartIP ( 1688) NetworkAddress ( 1689) NetworkMask ( 1691)

TIdNetworkCalculator.FillIPList Method
Generates a list of valid IP address for the network.

Pascal
procedure FillIPList;
Description
FillIPList is a procedure used to generate a list of valid IP addresses for the network. The list of valid addresses is stored in ListIP
( 1689). IP addresses are create ( 267) in "dotted-decimal" form, like 129.71.2.4.

FillIPList is used when reading values from the ListIP ( 1689) property. FillIPList populates the address list when it does not
contain any entries, or in the OnNetAddressChange and OnNetMaskChange event handlers.

FillIPList uses the values in NetworkAddress ( 1689) and NetworkMask ( 1691) to perform calculations for available network
addresses. The binary length of NetworkMask ( 1691) is used to determine the maximum number of IP addresses on the network
in NumIP ( 1688).

FillIPList will not create ( 267) a list of IP addresses in the IDE, or when the component state is csDesigning ( 3178), if the length
of the list from NumIP ( 1688) will exceed 1024 entries. This is done to prevent a long loop where the IDE would appear to be
locked.

See Also
ListIP ( 1689) NetworkAddress ( 1689) NetworkMask ( 1691) NumIP ( 1688) OnNetAddressChange OnNetMaskChange

TIdNetworkCalculator.IsAddressInNetwork Method
Indicates if an IP address is valid for the network settings.

Pascal
function IsAddressInNetwork(
Address: String
): Boolean;
Parameters
Parameters Description
Address IP address to be checked in "dotted-decimal" form, like 129.71.2.4.

Returns
Boolean - True when valid.

Description
IsAddressInNetwork is a Boolean function used to determine if a specific IP address is valid, based on the current network settings.

Internet Direct (Indy) Version 10.1.5 1687


TIdNetworkCalculator Class Classes

NetworkAddress ( 1689) and NetworkMask ( 1691) are used to determine the current network visibility.

See Also
NetworkAddress ( 1689) NetworkMask ( 1691)

TIdNetworkCalculator.NumIP Method
Identifies the number of IP addresses available on the network.

Pascal
function NumIP: integer;
Returns
Integer - Number of IP addresses available.

Description
NumIP is an Integer function that identifies the number of IP addresses available on the network, based on the current
NetworkMask ( 1691). NumIP uses NetworkMaskLength ( 1691) to calculate the number of IP addresses available.

NumIP is used by FillIPList ( 1687) to determine the number of list entries, and by EndIP ( 1686) to determine the last available
IP address on the network.

See Also
FillIPList ( 1687) EndIP ( 1686) StartIP ( 1688) NetworkMask ( 1691) NetworkMaskLength ( 1691)

TIdNetworkCalculator.StartIP Method
Determines the first available IP address for the network.

Pascal
function StartIP: String;
Returns
String - IP address in "dotted-decimal" format, like 129.71.2.4.

Description
StartIP is a String function used to determine the first available IP address for the network. StartIP uses the values in
NetworkAddress ( 1689) and NetworkMask ( 1691) to perform calculations for available network addresses.

TIdNetworkCalculator Properties
The Properties of the TIdNetworkCalculator class are listed here.

Properties
Property Description
IsAddressRoutable ( 1689) Indicates if the network address is a routable public IP address.
ListIP ( 1689) Represents the list of valid IP addresses for the network.
NetworkAddress ( 1689) Specifies a local address on a network.
NetworkClass ( 1690) Specifies the network class for the current network address.
NetworkClassAsString ( 1690) Returns the text representation of the network class.
NetworkMask ( 1691) Specifies the network address mask for the current network settings.
NetworkMaskLength ( 1691) Specifies the number of available network addresses for the current network.
OnChange ( 1691) Specifies the event handler for changes to network address properties.
OnGenIPList ( 1692) Specifies the event handler for updates to ListIP ( 1689).

Legend
Property
read only

1688 Internet Direct (Indy) Version 10.1.5


Classes TIdNetworkCalculator Class

TIdNetworkCalculator.IsAddressRoutable Property
Indicates if the network address is a routable public IP address.

Pascal
property IsAddressRoutable: Boolean;
Returns
Boolean - True when the network address is a public IP address.

Description
IsAddressRoutable is a read-only Boolean property that indicates if the value in NetworkAddress ( 1689) represents an internet
address that can be passed to the public internet.

IsAddressRoutable compares the Byte values in NetworkAddress ( 1689) to ensure that the address does not reside in the IANA
( 4762)-assigned Private Address Space, including the following IP Address blocks:

---------- ---------------

10.0.0.0 10.255.255.255
172.16.0.0 172.31.255.255
192.168.0.0 192.168.255.255

The Private Address Space allows an organization to decide the use of IP addresses without any coordination with IANA ( 4762)
or an Internet registry. Addresses within the Private Address Space will only be unique within the enterprise, or the set of
enterprises which choose to cooperate over this space so they may communicate with each other in their own private internet. As a
result, these network address cannot be routed to the public internet.

See Also
NetworkAddress ( 1689)

TIdNetworkCalculator.ListIP Property
Represents the list of valid IP addresses for the network.

Pascal
property ListIP: TIdStrings;
Description
ListIP is a read-only TStrings property that represents the list of valid IP addresses for the current network settings. IP addresses in
the list are in "dotted-decimal" form, like 129.71.2.4.

ListIP is automatically populated when values are read from the property and the list does not contain any entries, or by the
OnNetAddressChange and OnNetMaskChange event handlers. FillIPLIst is used to populate the strings in ListIP.

ListIP will not contain IP addresses in the IDE, or when the component state is csDesigning ( 3178), if the length of the list from
NumIP ( 1688) will exceed 1024 entries. This is done to prevent a long loop where the IDE would appear to be locked.

See Also
OnNetAddressChange OnNetMaskChange NumIP ( 1688)

TIdNetworkCalculator.NetworkAddress Property
Specifies a local address on a network.

Internet Direct (Indy) Version 10.1.5 1689


TIdNetworkCalculator Class Classes

Pascal
property NetworkAddress: TIpProperty;
Description
NetworkAddress is a TIPProperty property that identifies the local address for a computer on the network. NetworkAddress allows
the local address to be retrieved and assigned using a variety of representations of the IP address, as permitted by TIPProperty.

NetworkAddress is used in conjunction with NetworkMask ( 1691) to determine the NetworkClass ( 1690) for the complete
network address. The OnNetAddressChange event handler is triggered when the value in NetworkAddress is modified.

See Also
TIpProperty ( 2639) NetworkClass ( 1690) OnNetAddressChange OnChange ( 1691)

TIdNetworkCalculator.NetworkClass Property
Specifies the network class for the current network address.

Pascal
property NetworkClass: TNetworkClass;
Description
NetworkClass is a read-only TNetworkClass ( 2985) property that identifies the network class for the settings in NetworkAddress
( 1689) and NetworkMask ( 1691).

NetworkClass is automatically updated in the OnNetAddressChange event handler when the value of NetworkAddress ( 1689)
has been altered.

Values for NetworkClass correspond to the enumerated values in TNetworkClass ( 2985), and include the following:

Value Network Address Class


ID_NET_CLASS_A Class A
ID_NET_CLASS_B Class B
ID_NET_CLASS_C Class C
ID_NET_CLASS_D Class D
ID_NET_CLASS_E Class E

See Also
TNetworkClass ( 2985) OnNetAddressChange NetworkAddress ( 1689)

TIdNetworkCalculator.NetworkClassAsString Property
Returns the text representation of the network class.

Pascal
property NetworkClassAsString: String;
Returns
String - Text representation of the network class.

Description
NetworkClassAsString is a read-only String property that returns the character representation for the value in NetworkClass (
1690). Values in NetworkClass ( 1690) correspond to the enumerated values in TNetworkClass ( 2985), and include the
following:

1690 Internet Direct (Indy) Version 10.1.5


Classes TIdNetworkCalculator Class

Value Meaning

-------------- ---------

ID_NET_CLASS_A Class 'A'


ID_NET_CLASS_B Class 'B'
ID_NET_CLASS_C Class 'C'
ID_NET_CLASS_D Class 'D'
ID_NET_CLASS_E Class 'E'

See Also
TNetworkClass ( 2985)

TIdNetworkCalculator.NetworkMask Property
Specifies the network address mask for the current network settings.

Pascal
property NetworkMask: TIpProperty;
Description
NetworkMask is a TIpProperty ( 2639) that identifies the network address mask for computers on the network.

NetworkMask is used in determining valid IP address for local computers on the network and the network number used for routing
and gateway applications.

NetworkMask is used in conjunction with NetworkAddress ( 1689) to determine the NetworkClass ( 1690) for the complete
network address. NetworkMaskLength ( 1691) identifies the number of available network address based on NetworkMask.

The OnNetMaskChange event handler is triggered when the value in NetworkMask is modified.

See Also
TIpProperty ( 2639)

TIdNetworkCalculator.NetworkMaskLength Property
Specifies the number of available network addresses for the current network.

Pascal
property NetworkMaskLength: cardinal;
Description
NetworkMaskLength is a Cardinal property that identifies the number of available network addresses for the network based on the
value of NetworkMask ( 1691). The default value for NetworkMaskLength is ID_NC_MASK_LENGTH ( 3577), as assigned
during initialization of the component.

NetworkMaskLength is automatically recalculated in the OnNetMaskChange event handler following a change in the value of
NetworkMask ( 1691).

See Also
NetworkMask ( 1691) ID_NC_MASK_LENGTH ( 3577) OnNetMaskChange

TIdNetworkCalculator.OnChange Property
Specifies the event handler for changes to network address properties.

Internet Direct (Indy) Version 10.1.5 1691


TIdNNTP Class Classes

Pascal
property OnChange: TIdNotifyEvent;
Description
OnChange is a TNotifyEvent property that specifies the event handler for changes to network address properties. OnChange is
triggered from both the OnNetAddressChange and OnNetMaskChange event handlers following a change to the values of either
property.

Use OnChange to notify the application of changes in the TIdNetworkCalculator ( 1685) network address properties. Assign an
OnChange event handler to respond to the event notification.

See Also
OnNetAddressChange OnNetMaskChange

TIdNetworkCalculator.OnGenIPList Property
Specifies the event handler for updates to ListIP ( 1689).

Pascal
property OnGenIPList: TIdNotifyEvent;
Description
OnGenIPList is a TNotifyEvent property that specifies the event handler for changes to IP address in ListIP ( 1689).

TIdNNTP Class
Implements an NNTP client.

File
IdNNTP ( 4692)

Hierarchy

Pascal
TIdNNTP = class(TIdMessageClient);
Description
TIdNNTP is a TIdMessageClient ( 1555) descendant that implements a client or newsreader based on the Network News Transfer
Protocol (NNTP), as described in the Internet Standards documents:

RFC 977 - Network News Transfer Protocol

RFC 2980 - Common NNTP Extensions

NNTP is used for distributing messages publicly to central locations on a network.

For additional information related to using the NNTP protocol, please refer to the following resources:

Read This Before You Write a Newsreader

RFC 1036 - Standard for interchange of USENET messages

FAQ: Overview database / NOV General Information

FAQ about the TIN newsreader

[news.software.readers] trn newsreader FAQ Basic

[news.software.readers] trn newsreader FAQ Advanced

1692 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

RFC 1731 - IMAP4 Authentication Mechanisms

RFC 1305 - Network Time Protocol (Version 3), Specification, Implementation and Analysis

See Also
TIdMessageClient ( 1555) IndySupport ( 15)

TIdNNTP Members
The following tables list the members exposed by TIdNNTP.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 690)
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ForceAuth ( 1731)
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 1732) IP address or host name for the NNTP server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
Mode ( 1732) Indicates the NNTP command mode for the client connection.
ModeResult ( 1732) Result from the NNTP MODE command.
MsgCount ( 1733) Estimated number of articles in the newsgroup.
MsgHigh ( 1733) Indicates the highest available article in a newsgroup.
MsgLineFold ( 1561) Identifies the line folding character sequence for the message client.
MsgLineLength ( 1561) Maximum line length.
MsgLow ( 1734) Indicates the lowest available article number in a newsgroup.
NewsAgent ( 1734) Identifies the newsreader that posts an article.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnNewGroupsList ( 1734) Event handler signalled on receipt of values in the new newsgroup list.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 1735) Represents the user authorization for connecting to the NNTP server.
Permission ( 1735) Represents posting permissions granted to the NNTP client.
Port ( 1735) Port number for the connection to an NNTP server.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
Username ( 1736) Represents the user identity for connecting to the NNTP server.
UseTLS ( 1736) Indicates Transport-Level Security is used on the NNTP connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Check ( 1695)
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
Connect ( 1695) Opens a connection to the NNTP server.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.

Internet Direct (Indy) Version 10.1.5 1693


TIdNNTP Class Classes

Connected ( 2353) Indicates if the peer connection has been opened.


Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 1696) Frees the object instance.
DisconnectNotifyPeer ( 1697) Informs a server that the client wishes to close the connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetOverviewFMT ( 1718) Retrieves the overview format from the server.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IHAVE ( 1719) Notifies the NNTP server of messages available for upload from the client.
IsExtCmdSupported ( 1719) Indicates if an NNTP extension command is supported for the server.
Next ( 1720) Selects the next article in a newsgroup.
ParseNewsGroup ( 1720)
ParseXHDRLine ( 1721) Parses an XHDR ( 1727) response line for message and header information.
ParseXOVER ( 1721) Parses an XOVER ( 1729) response line into variables.
Previous ( 1724) Moves to the previous article in a newsgroup.
SelectArticle ( 1724) Sets the current article pointer in the newsgroup.
SelectGroup ( 1725) Selects the active newsgroup on the NNTP server.
SendAuth ( 1725)
SendCmd ( 1725) Executes NNTP commands verbs.
SendMsg ( 1560) Sends message headers and body content on the client connection.
TakeThis ( 1726) Performs non-negotiated article transmissions.
CType ( 267)
Create ( 1274)
ProcessMessage ( 1558)
GetArticle ( 1697)
GetBody ( 1703)
GetHeader ( 1708)
GetNewGroupsList ( 1713)
GetNewNewsList ( 1715)
GetNewsgroupList ( 1717)
Post ( 1722)
XHDR ( 1726)
XOVER ( 1729)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnNewNewsList ( 1736) Event handler signalled on receipt of values in the new articles list.
OnNewsgroupList ( 1737) Event handler signalled on receipt of values in the newsgroup list.
OnStatus ( 359) Represents the current connection status event handler.
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 1737) Event handler triggered when using TLS (Transport Layer Security) and TLS support is not available.
OnXHDREntry ( 1738) Event handler signalled during processing of XHDR ( 1727) response lines.
OnXOVER ( 1738) Event handler signalled during processing of XOVER ( 1729) responses.

Legend
Method
virtual
Property
read only

1694 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Event

TIdNNTP Methods
The Methods of the TIdNNTP class are listed here.

Methods
Method Description
Check ( 1695)
Connect ( 1695) Opens a connection to the NNTP server.
Destroy ( 1696) Frees the object instance.
DisconnectNotifyPeer ( 1697) Informs a server that the client wishes to close the connection.
GetArticle ( 1697)
GetBody ( 1703)
GetHeader ( 1708)
GetNewGroupsList ( 1713)
GetNewNewsList ( 1715)
GetNewsgroupList ( 1717)
GetOverviewFMT ( 1718) Retrieves the overview format from the server.
IHAVE ( 1719) Notifies the NNTP server of messages available for upload from the client.
IsExtCmdSupported ( 1719) Indicates if an NNTP extension command is supported for the server.
Next ( 1720) Selects the next article in a newsgroup.
ParseNewsGroup ( 1720)
ParseXHDRLine ( 1721) Parses an XHDR ( 1727) response line for message and header information.
ParseXOVER ( 1721) Parses an XOVER ( 1729) response line into variables.
Post ( 1722)
Previous ( 1724) Moves to the previous article in a newsgroup.
SelectArticle ( 1724) Sets the current article pointer in the newsgroup.
SelectGroup ( 1725) Selects the active newsgroup on the NNTP server.
SendAuth ( 1725)
SendCmd ( 1725) Executes NNTP commands verbs.
TakeThis ( 1726) Performs non-negotiated article transmissions.
XHDR ( 1726)
XOVER ( 1729)

Legend
Method
virtual

TIdNNTP.Check Method
Pascal
procedure Check(
AMsgIDs: TIdStringList;
var AResponses: TIdStringList
);
Parameters
Parameters Description
AMsgIDs Type is TIdStringList ( 3088).
AResponses Scope is var. Type is TIdStringList ( 3088).

Description
Check is a method.

TIdNNTP.Connect Method
Opens a connection to the NNTP server.

Internet Direct (Indy) Version 10.1.5 1695


TIdNNTP Class Classes

Pascal
procedure Connect; override;
Parameters
Parameters Description
ATimeout Milliseconds to wait for a connection to the server. The default value is IdTimeoutDefault ( 4331).

Description
Connect is an overridden procedure in TIdNNTP ( 1692) used to open a connection to the NNTP server using values in the Host
( 1732) and Port ( 1735) properties. Connect calls the inherited Connect method using the value in ATimeout to establish the
connection, and calls GetResponse ( 2357) to determine the NNTP protocol response included as part of the server greeting.

Connect sets the value in Permission ( 1735) based on the numeric response code in LastCmdResult ( 2367) using the
following: values and associated Permissions:

Value Meaning
200 crCanPost (Posting allowed)
201 crNoPost (Posting not allowed)
400 crTempUnavailable (Temporarily unavailable)
502 none (Connection refused)

Connect will raise an EIdNNTPConnectionRefused ( 119) exception when the numeric response code in LastCmdResult ( 2367)
is 502, indicating that the connection request was explicitly refused by the NNTP server.

If an Exception ( 4733) is encountered, Connect will call the Disconnect ( 2355) method and re-raise the exception.

Connect will also attempt to set the mode for the NNTP client connection using the NNTP MODE command and the TModeType
value in the Mode ( 1732) property. Connect stores the result of the Mode ( 1732) request in the ModeResult ( 1732) property.

When Mode ( 1732) contains mtStream, ModeResult ( 1732) receives the value mrCanStream if the LastCmdResult ( 2367)
contains the numeric value 203. Any other numeric response code causes ModeResult ( 1732) to contain mrNoStream.

When Mode ( 1732) contains mtReader, ModeResult ( 1732) receives the value mrCanPost if the LastCmdResult ( 2367)
contains the numeric value 200. Any other numeric response code causes ModeResult ( 1732) to contain mrNoPost.

See Also
TModeType

TIdNNTPPermission ( 2971)

EIdNNTPConnectionRefused ( 119)

Permission ( 1735)

Mode ( 1732)

ModeResult ( 1732)

Disconnect ( 2355)

TIdNNTP.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

1696 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Destroy calls the inherited destructor prior to exiting from the method.

See Also
Create ( 267) TIdMessageClient.Destroy ( 1557)

TIdNNTP.DisconnectNotifyPeer Method
Informs a server that the client wishes to close the connection.

Pascal
procedure DisconnectNotifyPeer; override;
Description
DisconnectNotifyPeer is an overridden method in TIdNNTP ( 1692) used to inform a NNTP server that the client will be closing the
NNTP connection.

DisconnectNotifyPeer sends the NNTP QUIT command to indicate that the client connection will be closed.

Use Connect ( 1695) to establish a connection to the NNTP server using Host ( 1732) and Port ( 1735) for the socket
connection.

See Also
Connect ( 1695)

TIdNNTP.GetArticle Method
Overload List

Method Description
TIdNNTP.GetArticle (Integer, Retrieves a complete NNTP article.
TIdMessage) ( 1697)
TIdNNTP.GetArticle (Integer,
TIdStream) ( 1698)
TIdNNTP.GetArticle (Integer,
TIdStrings) ( 1699)
TIdNNTP.GetArticle (string, Retrieves a complete NNTP article.
TIdMessage) ( 1701)
TIdNNTP.GetArticle (string, TIdStream)
( 1702)
TIdNNTP.GetArticle (string, TIdStrings)
( 1702)
TIdNNTP.GetArticle (TIdMessage) ( Retrieves a complete NNTP article.
1699)
TIdNNTP.GetArticle (TIdStream) (
1700)
TIdNNTP.GetArticle (TIdStrings) (
1700)

TIdNNTP.GetArticle Method (Integer, TIdMessage)


Retrieves a complete NNTP article.

Pascal
function GetArticle(
AMsgNo: Integer;
AMsg: TIdMessage
): Boolean; overload;

Internet Direct (Indy) Version 10.1.5 1697


TIdNNTP Class Classes

Parameters
Parameters Description
AMsgNo Index number for the article.
AMsg TIdMessage ( 1521) where the complete article should be stored.

Returns
Boolean - True if the article is successfully retrieved.

Description
GetArticle is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve a complete NNTP article including the headers
and body.

GetArticle calls SendCmd ( 1725) to issue the NNTP ARTICLE command used to perform article retrieval using the message
number in AMsgNo to store the NNTP article in the message instance specified in AMsg. AMsg is cleared prior to retrieval of the
NNTP article.

The NNTP current article pointer is set to the indicated article.

GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument.

The return value for GetArticle is True when the numeric response from SendCmd ( 1725) is 220. GetArticle will return False if
any of the following responses are received:

Code Message
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup prior to calling GetArticle.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article. Use GetBody ( 1703) to retrieve the body text for a
specific NNTP article.

See Also
TIdMessage ( 1521)

GetArticle

SelectGroup ( 1725)

SelectArticle ( 1724)

GetNewNewsList ( 1715)

GetHeader ( 1708)

GetBody ( 1703)

TIdNNTP.GetArticle Method (Integer, TIdStream)


Pascal
function GetArticle(
AMsgNo: Integer;
AMsg: TIdStream
): Boolean; overload;

1698 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

TIdNNTP.GetArticle Method (Integer, TIdStrings)


Pascal
function GetArticle(
AMsgNo: Integer;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

TIdNNTP.GetArticle Method (TIdMessage)


Retrieves a complete NNTP article.

Pascal
function GetArticle(
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsg TIdMessage ( 1521) where the complete article should be stored.

Returns
Boolean - True if the article is successfully retrieved.

Description
GetArticle is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve a complete NNTP article including the headers
and body.

GetArticle calls SendCmd ( 1725) to issue the NNTP ARTICLE command using the NNTP current article pointer for message

Internet Direct (Indy) Version 10.1.5 1699


TIdNNTP Class Classes

retrieval.

GetArticle stores the contents of the message for the current article pointer in the message instance specified in AMsg. The
message instance in AMsg is cleared prior to load the contents of the article.

GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument.

The return value for GetArticle is True when the numeric response from SendCmd ( 1725) is 220. GetArticle will return False if
any of the following responses are received:

Code Message
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup prior to calling GetArticle.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article.

Use GetBody ( 1703) to retrieve the body text for a specific NNTP article.

See Also
TIdMessage ( 1521) TIdNNTP.GetArticle TIdNNTP.SelectGroup ( 1725) TIdNNTP.SelectArticle ( 1724)
TIdNNTP.GetNewNewsList ( 1715) TIdNNTP.GetHeader ( 1708) TIdNNTP.GetBody ( 1703)

TIdNNTP.GetArticle Method (TIdStream)


Pascal
function GetArticle(
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

TIdNNTP.GetArticle Method (TIdStrings)


Pascal
function GetArticle(
AMsg: TIdStrings
): Boolean; overload;

1700 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

TIdNNTP.GetArticle Method (string, TIdMessage)


Retrieves a complete NNTP article.

Pascal
function GetArticle(
AMsgID: string;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgID Message Identifier for the article.
AMsg TIdMessage ( 1521) where the complete article should be stored.

Returns
Boolean - True if the article is successfully retrieved.

Description
GetArticle is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve a complete NNTP article including the headers
and body.

GetArticle calls SendCmd ( 1725) to issue the NNTP ARTICLE command used to retrieve an NNTP article using the message
identifier string specified in AMsgID. The NNTP current article pointer is NOT set to the article indicated in AMsgID.

GetArticle clears the contents of AMsg prior to retrieving the NNTP article. GetArticle calls ReceiveHeader and ReceiveBody using
AMsg as an argument.

The return value for GetArticle is True when the numeric response from SendCmd ( 1725) is 220. GetArticle will return False if
any of the following responses are received:

Code Message
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup prior to calling GetArticle.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article. Use GetBody ( 1703) to retrieve the body text for a

Internet Direct (Indy) Version 10.1.5 1701


TIdNNTP Class Classes

specific NNTP article.

See Also
TIdMessage ( 1521) TIdNNTP.GetArticle TIdNNTP.SelectGroup ( 1725) TIdNNTP.SelectArticle ( 1724)
TIdNNTP.GetNewNewsList ( 1715) TIdNNTP.GetHeader ( 1708) TIdNNTP.GetBody ( 1703)

TIdNNTP.GetArticle Method (string, TIdStream)


Pascal
function GetArticle(
AMsgID: string;
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

TIdNNTP.GetArticle Method (string, TIdStrings)


Pascal
function GetArticle(
AMsgID: string;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetArticle is a overloaded method.

GetArticle returns a Boolean value.

See Also
TIdNNTP.GetArticle

1702 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

TIdNNTP.GetBody Method
Overload List

Method Description
TIdNNTP.GetBody (Integer, Retrieves the body for an NNTP article.
TIdMessage) ( 1703)
TIdNNTP.GetBody (Integer, TIdStream)
( 1704)
TIdNNTP.GetBody (Integer, TIdStrings)
( 1704)
TIdNNTP.GetBody (string, TIdMessage) Retrieves the body for an NNTP article.
( 1706)
TIdNNTP.GetBody (string, TIdStream)
( 1707)
TIdNNTP.GetBody (string, TIdStrings)
( 1708)
TIdNNTP.GetBody (TIdMessage) ( Retrieves the body for an NNTP article.
1705)
TIdNNTP.GetBody (TIdStream) (
1706)
TIdNNTP.GetBody (TIdStrings) ( 1706)

TIdNNTP.GetBody Method (Integer, TIdMessage)


Retrieves the body for an NNTP article.

Pascal
function GetBody(
AMsgNo: Integer;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Index number for the article.
AMsg TIdMessage ( 1521) where the article should be stored.

Returns
Boolean - True on success, False on protocol or server error.

Description
GetBody is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve the message body for a NNTP article.

AMsgNo is the relative article index number for the NNTP article.

AMsg is the TIdMessage ( 1521) instance where the body of the NNTP article will be stored.

When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article.

GetBody calls SendCmd ( 1725) using the NNTP BODY command to retrieve body lines. When a TIdMessage ( 1521) instance
is used as the destination, GetBody clears the contents of the message using TIdMessage.Clear ( 1525) and calls ReceiveBody
using AMsg as an argument.

The return value for GetBody is True when the numeric response from SendCmd ( 1725) is 222. GetBody will return False if any
of the following responses are received:

Internet Direct (Indy) Version 10.1.5 1703


TIdNNTP Class Classes

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before calling GetBody.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article.

Use GetArticle ( 1697) to retrieve the entire contents of a specific NNTP article.

See Also
TIdMessage ( 1521) SelectArticle ( 1724) SelectGroup ( 1725) GetNewNewsList ( 1715) GetHeader ( 1708) GetHeader (
1708) GetArticle ( 1697) GetBody

TIdNNTP.GetBody Method (Integer, TIdStream)


Pascal
function GetBody(
AMsgNo: Integer;
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

TIdNNTP.GetBody Method (Integer, TIdStrings)


Pascal
function GetBody(
AMsgNo: Integer;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

1704 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

TIdNNTP.GetBody Method (TIdMessage)


Retrieves the body for an NNTP article.

Pascal
function GetBody(
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsg TIdMessage ( 1521) where the article should be stored.

Returns
Boolean - True on success, False on protocol or server error.

Description
GetBody is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve the message body for a NNTP article. GetBody
calls SendCmd ( 1725) using the NNTP BODY command to retrieve body lines.

The overloaded functions provide for retrieving the body for the article using a numeric message number, a message identifier
string, or the NNTP current article pointer.

When a TIdMessage ( 1521) instance is used as the destination, GetBody clears the contents of the message using
TIdMessage.Clear ( 1525) and calls ReceiveBody using AMsg as an argument.

The return value for GetBody is True when the numeric response from SendCmd ( 1725) is 222. GetBody will return False if any
of the following responses are received:

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before calling GetBody.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup prior to calling GetBody.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article.

Use GetArticle ( 1697) to retrieve the entire contents of a specific NNTP article.

See Also
TIdMessage ( 1521) TIdNNTP.SelectArticle ( 1724) TIdNNTP.SelectGroup ( 1725) TIdNNTP.GetNewNewsList ( 1715)
TIdNNTP.GetHeader ( 1708) TIdNNTP.GetHeader ( 1708) TIdNNTP.GetArticle ( 1697) TIdNNTP.GetBody

Internet Direct (Indy) Version 10.1.5 1705


TIdNNTP Class Classes

TIdNNTP.GetBody Method (TIdStream)


Pascal
function GetBody(
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

TIdNNTP.GetBody Method (TIdStrings)


Pascal
function GetBody(
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

TIdNNTP.GetBody Method (string, TIdMessage)


Retrieves the body for an NNTP article.

Pascal
function GetBody(
AMsgID: string;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgID Message Identifier for the article.
AMsg TIdMessage ( 1521) where the article should be stored.

Returns
Boolean - True on success, False on protocol or server error.

1706 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Description
GetBody is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve the message body for a NNTP article. GetBody
calls SendCmd ( 1725) using the NNTP BODY command to retrieve body lines.

AMsgID is the Message Identifier for the NNTP article.

AMsg is a TIdMessage ( 1521) instance where the body for the NNTP article should be stored.

When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.

When a TIdMessage ( 1521) instance is used as the destination, GetBody clears the contents of the message using
TIdMessage.Clear ( 1525) and calls ReceiveBody using AMsg as an argument.

The return value for GetBody is True when the numeric response from SendCmd ( 1725) is 222. GetBody will return False if any
of the following responses are received:

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before calling GetBody.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetHeader ( 1708) to retrieve the headers for a specific NNTP article.

Use GetArticle ( 1697) to retrieve the entire contents of a specific NNTP article.

See Also
TIdMessage ( 1521) SelectArticle ( 1724) SelectGroup ( 1725) GetNewNewsList ( 1715) GetHeader ( 1708) GetHeader (
1708) GetArticle ( 1697) GetBody

TIdNNTP.GetBody Method (string, TIdStream)


Pascal
function GetBody(
AMsgID: string;
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

Internet Direct (Indy) Version 10.1.5 1707


TIdNNTP Class Classes

TIdNNTP.GetBody Method (string, TIdStrings)


Pascal
function GetBody(
AMsgID: string;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetBody is a overloaded method.

GetBody returns a Boolean value.

See Also
TIdNNTP.GetBody

TIdNNTP.GetHeader Method
Overload List

Method Description
TIdNNTP.GetHeader (Integer, Retrieves the headers for an NNTP article.
TIdMessage) ( 1708)
TIdNNTP.GetHeader (Integer,
TIdStream) ( 1709)
TIdNNTP.GetHeader (Integer,
TIdStrings) ( 1710)
TIdNNTP.GetHeader (string, Retrieves the headers for an NNTP article.
TIdMessage) ( 1712)
TIdNNTP.GetHeader (string,
TIdStream) ( 1713)
TIdNNTP.GetHeader (string,
TIdStrings) ( 1713)
TIdNNTP.GetHeader (TIdMessage) ( Retrieves the headers for an NNTP article.
1710)
TIdNNTP.GetHeader (TIdStream) (
1711)
TIdNNTP.GetHeader (TIdStrings) (
1711)

TIdNNTP.GetHeader Method (Integer, TIdMessage)


Retrieves the headers for an NNTP article.

Pascal
function GetHeader(
AMsgNo: Integer;
AMsg: TIdMessage
): Boolean; overload;

1708 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
AMsgNo Index number for the article.
AMsg TIdMessage ( 1521) where the article headers should be stored.

Returns
Boolean - True on success, False on protocol or server error.

Description
GetHeader is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve message headers for an NNTP article.
GetHeader calls SendCmd ( 1725) using the NNTP HEAD command to retrieve message headers.

AMsgNo is the realtive Index number for the NNTP article.

AMsg is a TIdMessage ( 1521) instance where the headers for the NNTP article should be stored.

When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article.

When a TIdMessage ( 1521) instance is used as the destination, GetHeader clears the contents of the message using
TIdMessage.Clear ( 1525) and calls ReceiveHeader using AMsg as an argument.

The return value for GetHeader is True when the numeric response from SendCmd ( 1725) is 221. GetBody ( 1703) will return
False if any of the following responses are received:

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before prior to calling GetHeader.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetBody ( 1703) to retrieve the body lines for a specific NNTP article. Use GetArticle ( 1697) to retrieve the entire contents
of a specific NNTP article.

Use XHDR ( 1727) to get specific header values for one or more NNTP articles.

Use XOVER ( 1729) to get information from the overview database for one or more NNTP articles.

See Also
TIdMessage ( 1521) SelectGroup ( 1725) SelectArticle ( 1724) GetNewNewsList ( 1715) GetHeader GetBody ( 1703)
GetArticle ( 1697) XOVER ( 1729)

TIdNNTP.GetHeader Method (Integer, TIdStream)


Pascal
function GetHeader(
AMsgNo: Integer;
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStream ( 3087).

Internet Direct (Indy) Version 10.1.5 1709


TIdNNTP Class Classes

Returns
Boolean

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetHeader Method (Integer, TIdStrings)


Pascal
function GetHeader(
AMsgNo: Integer;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgNo Type is Integer.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetHeader Method (TIdMessage)


Retrieves the headers for an NNTP article.

Pascal
function GetHeader(
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsg TIdMessage ( 1521) where the article headers should be stored.

Returns
Boolean - True on success, False on protocol or server error.

Description
GetHeader is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve message headers for an NNTP article.
GetHeader calls SendCmd ( 1725) using the NNTP HEAD command to retrieve message headers.

AMsg is the TIdMessage ( 1521) instance where the headers for the NNTP article should be stored. The NNTP current article
pointer must be set proper to calling GetHeader.

When a TIdMessage ( 1521) instance is used as the destination, GetHeader clears the contents of the message using
TIdMessage.Clear ( 1525) and calls ReceiveHeader using AMsg as an argument.

The return value for GetHeader is True when the numeric response from SendCmd ( 1725) is 221. GetBody ( 1703) will return

1710 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

False if any of the following responses are received:

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before prior to calling GetHeader.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetBody ( 1703) to retrieve the body lines for a specific NNTP article. Use GetArticle ( 1697) to retrieve the entire contents
of a specific NNTP article.

Use XHDR ( 1727) to get specific header values for one or more NNTP articles.

Use XOVER ( 1729) to get information from the overview database for one or more NNTP articles.

See Also
TIdMessage ( 1521) SelectGroup ( 1725) SelectArticle ( 1724) GetNewNewsList ( 1715) GetBody ( 1703) GetArticle (
1697) XOVER ( 1729)

TIdNNTP.GetHeader Method (TIdStream)


Pascal
function GetHeader(
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetHeader Method (TIdStrings)


Pascal
function GetHeader(
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Internet Direct (Indy) Version 10.1.5 1711


TIdNNTP Class Classes

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetHeader Method (string, TIdMessage)


Retrieves the headers for an NNTP article.

Pascal
function GetHeader(
AMsgID: string;
AMsg: TIdMessage
): Boolean; overload;
Parameters
Parameters Description
AMsgID Message Identifier for the article.
AMsg TIdMessage ( 1521) where the article headers should be stored.

Returns
Boolean - True on success, False on protocol or server error.

Description
GetHeader is an overloaded Boolean function in TIdNNTP ( 1692) used to retrieve message headers for an NNTP article.
GetHeader calls SendCmd ( 1725) using the NNTP HEAD command to retrieve message headers.

AMsgID is the Message Identifier for the NNTP article.

AMsg is a TIdMessage ( 1521) instance where the headers for the NNTP article should be stored.

When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.

When a TIdMessage ( 1521) instance is used as the destination, GetHeader clears the contents of the message using
TIdMessage.Clear ( 1525) and calls ReceiveHeader using AMsg as an argument.

The return value for GetHeader is True when the numeric response from SendCmd ( 1725) is 221. GetBody ( 1703) will return
False if any of the following responses are received:

Code Meaning
412 no newsgroup has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found

Use SelectGroup ( 1725) to select the active newsgroup before prior to calling GetHeader.

Use SelectArticle ( 1724) to set the current article pointer for the active newsgroup.

Use GetNewNewsList ( 1715) to get a list of articles added since a specified date and time.

Use GetBody ( 1703) to retrieve the body lines for a specific NNTP article. Use GetArticle ( 1697) to retrieve the entire contents
of a specific NNTP article.

Use XHDR ( 1727) to get specific header values for one or more NNTP articles.

Use XOVER ( 1729) to get information from the overview database for one or more NNTP articles.

1712 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

See Also
TIdMessage ( 1521) SelectGroup ( 1725) SelectArticle ( 1724) GetNewNewsList ( 1715) GetHeader GetBody ( 1703)
GetArticle ( 1697) XOVER ( 1729)

TIdNNTP.GetHeader Method (string, TIdStream)


Pascal
function GetHeader(
AMsgID: string;
AMsg: TIdStream
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStream ( 3087).

Returns
Boolean

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetHeader Method (string, TIdStrings)


Pascal
function GetHeader(
AMsgID: string;
AMsg: TIdStrings
): Boolean; overload;
Parameters
Parameters Description
AMsgID Type is string.
AMsg Type is TIdStrings ( 3089).

Returns
Boolean

Description
GetHeader is a overloaded method.

GetHeader returns a Boolean value.

See Also
TIdNNTP.GetHeader

TIdNNTP.GetNewGroupsList Method
Overload List

Method Description
TIdNNTP.GetNewGroupsList Retrieves a list of new newsgroups from an NNTP server.
(TDateTime, boolean, string) ( 1714)

Internet Direct (Indy) Version 10.1.5 1713


TIdNNTP Class Classes

TIdNNTP.GetNewGroupsList
(TDateTime, boolean, string, TIdStrings)
( 1714)

TIdNNTP.GetNewGroupsList Method (TDateTime, boolean, string)


Retrieves a list of new newsgroups from an NNTP server.

Pascal
procedure GetNewGroupsList(
ADate: TDateTime;
AGMT: boolean;
ADistributions: string
); overload;
Parameters
Parameters Description
ADate Previous ( 1724) data and time the newsgroup list was retrieved.
AGMT Time is expressed in GMT.
ADistributions Optional list of distribution patterns.

Description
GetNewGroupsList is an overloaded procedure in TIdNNTP ( 1692) that requests a list of newsgroups from the NNTP server
which were added after a specific date and time. GetNewGroupsList is normally used to update a stored list of newsgroups on an
NNTP client.

ADate represents the date and time that the newsgroup list on the NNTP client was last updated, and is used to determine which
groups in list have been added since that update.

When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When
AGMT is False, the value in ADate represents a value for the local time-zone.

ADistributions is an optional string containing a comma-delimited list of newsgroup prefixes to be used as a filter when retrieving the
list of news newsgroups.

For example, the following would limit newsgroup retrieval to the public Delphi and C++ Builder hierarchy:

'borland.public.delphi,borland.public.cppbuilder'
Applications must assign a TEventNewsgroupList event handler to the property to allow responding to the notification.
GetNewGroupsList can raise an EIdNNTPNoOnNewGroupsList ( 120) exception when the OnNewGroupsList ( 1734) has not
been assigned for the NNTP client.

GetNewGroupsList processes response lines from the NNTP server to extract the newsgroup name, message number range, and
posting status values passed to the OnNewGroupsList ( 1734) event handler. OnNewGroupsList ( 1734) is triggered once for
each newsgroup received and parsed in the server response.

Use GetNewsgroupList ( 1717) to retrieve a list of all valid newsgroups on the NNTP server.

See Also
SendCmd ( 1725) OnNewGroupsList ( 1734) GetNewGroupsList TEventNewsgroupList EIdNNTPNoOnNewGroupsList ( 120)

TIdNNTP.GetNewGroupsList Method (TDateTime, boolean, string, TIdStrings)


Pascal
procedure GetNewGroupsList(
ADate: TDateTime;
AGMT: boolean;
ADistributions: string;
AList: TIdStrings
); overload;

1714 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
ADate Type is TDateTime.
AGMT Type is boolean.
ADistributions Type is string.
AList Type is TIdStrings ( 3089).

Description
GetNewGroupsList is a overloaded method.

See Also
TIdNNTP.GetNewGroupsList

TIdNNTP.GetNewNewsList Method
Overload List

Method Description
TIdNNTP.GetNewNewsList (string, Retrieves a list of message identifiers for new articles.
TDateTime, boolean, string) ( 1715)
TIdNNTP.GetNewNewsList (string,
TDateTime, boolean, string, TIdStrings) (
1716)

TIdNNTP.GetNewNewsList Method (string, TDateTime, boolean, string)


Retrieves a list of message identifiers for new articles.

Pascal
procedure GetNewNewsList(
ANewsgroups: string;
ADate: TDateTime;
AGMT: boolean;
ADistributions: string
); overload;
Parameters
Parameters Description
ANewsgroups Name of the newsgroup to be examined.
ADate Previous ( 1724) data and time the newsgroup list was retrieved.
AGMT Time is expressed in GMT.
ADistributions Optional list of distribution patterns.

Description
GetNewNewsList is an overloaded procedure in TIdNNTP ( 1692) used to retrieve a list of message identifiers posted or received
in a specified newsgroup since a given date and time.

ANewsgroups can contain a value that identifies the name or search patterns used in locating newsgroups to be included in the list
of new message identifiers. ANewsgroups can contain the '*' (asterisk) indicating that the search will match any newsgroup name
matching fixed portions of the search value. Multiple newsgroup names or search patterns may be specified as a comma-delimited
list.

For instance, 'net.micro*' will match 'net.micro.wombat', 'net.micro.apple', etc. In addition, 'net.*.unix' would match newsgroups with
names like 'net.wombat.unix' and 'net.whocares.unix'.

If only an asterisk character is given in ANewsgroups, all newsgroups will be searched for new message identifiers. If no asterisk
appears in a given newsgroup name, only the specified newsgroup will be searched for new articles.

ANewsgroups may also contain an exclamation point ('!') character used to negate a match, and omit newsgroups matching the
specified names or search patterns. For example, a newsgroups specification of 'net.*,mod.*,!mod.map.*' would specify that all

Internet Direct (Indy) Version 10.1.5 1715


TIdNNTP Class Classes

groups starting with 'net.' or 'mod.' except newsgroups starting with 'mod.map.' would be matched. If used, the exclamation point
must appear as the first character of the given newsgroup name or pattern.

ADate represents the date and time to be used in determining which message identifiers are included in the list of new articles.

When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When
AGMT is False, the value in ADate represents a value for the local time-zone.

ADistributions is an optional string containing a comma-delimited list of newsgroups or prefixes to be used as a filter when retrieving
the list new articles. Only those articles which have at least one newsgroup belonging to the list of distributions will be returned in
the list of new articles.

GetNewNewsList relies on the OnNewNewsList ( 1736) event handler to signal receipt of response lines from the NNTP server.
Applications must assign a procedure to the OnNewNewsList ( 1736) event handler to allow responsing to the event notification.
GetNewNewsList will raise an EIdNNTPNoOnNewNewsList ( 121) exception if the OnNewNewsList ( 1736) event handler
property is unassigned.

GetNewNewsList sends the NNTP NEWNEWS command using the arguments supplied in ANewsgroups, ADate, AGMT, and
ADistributions. GetNewNewsList reads the response lines from the NNTP server, where each line contains a single message
identifer for an NNTP article and the final line consisting of one period ('.') that terminates the list. GetNewNewsList may return only
the list terminator character sequence when there are no new articles for the specified criteria.

OnNewNewsList ( 1736) is signalled for each response line from the NNTP server containing a message identifier, or until
OnNewNewsList ( 1736) indicates that additional message identifiers cannot be processed.

Use GetNewGroupsList ( 1714) to process newsgroups added to the server since a specified date and time.

Implementors are cautioned to adhere to the 512 character limit for the length of NNTP commands.

Exceptions
Exceptions Description
EIdNNTPNoOnNewNewsList ( 121) With the message RSNNTPNoOnNewNewsList.

See Also
SendCmd ( 1725) GetNewNewsList OnNewNewsList ( 1736) TEventNewNewsList EIdNNTPNoOnNewNewsList ( 121)

TIdNNTP.GetNewNewsList Method (string, TDateTime, boolean, string, TIdStrings)


Pascal
procedure GetNewNewsList(
ANewsgroups: string;
ADate: TDateTime;
AGMT: boolean;
ADistributions: string;
AList: TIdStrings
); overload;
Parameters
Parameters Description
ANewsgroups Type is string.
ADate Type is TDateTime.
AGMT Type is boolean.
ADistributions Type is string.
AList Type is TIdStrings ( 3089).

Description
GetNewNewsList is a overloaded method.

See Also
TIdNNTP.GetNewNewsList

1716 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

TIdNNTP.GetNewsgroupList Method
Overload List

Method Description
TIdNNTP.GetNewsgroupList () ( 1717) Requests a list of newsgroups found on the NNTP server.
TIdNNTP.GetNewsgroupList Requests a list of newsgroups found on the NNTP server.
(TIdStream) ( 1717)
TIdNNTP.GetNewsgroupList
(TIdStrings) ( 1718)

TIdNNTP.GetNewsgroupList Method ()
Requests a list of newsgroups found on the NNTP server.

Pascal
procedure GetNewsgroupList; overload;
Description
GetNewsgroupList is an overloaded procedure in TIdNNTP ( 1692) that retrieves a list of valid newsgroups on the NNTP server.
GetNewsgroupList sends the NNTP LIST command to retrieve newsgroup information returned in the NNTP server response.

The overloaded GetNewsgroupList procedures provide for handling NNTP server response lines using the OnNewsgroupList (
1737) event handler.

When GetNewsgroupList is called with no parameters, the OnNewsgroupList ( 1737) event handler is used to process receipt of
individual response lines containing newsgroup information.

Newsgroup information returned in an NNTP server response may consist of multiple lines of text, where each line is in the form:

groupname last first p


Tokens in the response line have the following meanings:

Token Meaning
groupname newsgroup name.
last number of the last known article currently in the newsgroup.
first number of the first article currently in the newsgroup.
p posting status for the newsgroup. ('y'=allowed, 'n'=prohibited)

Applications must assign a TEventNewsgroupList event handler to the OnNewsgroupList ( 1737) property to allow responding to
the notification. An EIdNNTPNoOnNewsgroupList ( 121) will be raised if the event handler is unassigned.

Exceptions
Exceptions Description
EIdNNTPNoOnNewsgroupList ( 121) With the message RSNNTPNoOnNewsgroupList.

See Also
OnNewsgroupList ( 1737) TEventNewsgroupList EIdNNTPNoOnNewsgroupList ( 121)

TIdNNTP.GetNewsgroupList Method (TIdStream)


Requests a list of newsgroups found on the NNTP server.

Pascal
procedure GetNewsgroupList(
AStream: TIdStream

Internet Direct (Indy) Version 10.1.5 1717


TIdNNTP Class Classes

); overload;
Parameters
Parameters Description
AStream Destination for the newsgroup list.

Description
GetNewsgroupList is an overloaded procedure in TIdNNTP ( 1692) that retrieves a list of valid newsgroups on the NNTP server.
GetNewsgroupList sends the NNTP LIST command to retrieve newsgroup information returned in the NNTP server response.

The overloaded GetNewsgroupList procedures provide for storing server response lines in the AStream argument. Newsgroup
information is stored in AStream using the Capture method in IOHandler ( 2364) for the NNTP client.

Newsgroup information returned in an NNTP server response may consist of multiple lines of text in the form:

groupname last first p


Tokens in the response line have the following meanings:

Token Meaning
groupname newsgroup name.
last number of the last known article currently in the newsgroup.
first number of the first article currently in the newsgroup.
p posting status for the newsgroup. ('y'=allowed, 'n'=prohibited)

See Also
OnNewsgroupList ( 1737)

TEventNewsgroupList

EIdNNTPNoOnNewsgroupList ( 121)

TIdNNTP.GetNewsgroupList Method (TIdStrings)


Pascal
procedure GetNewsgroupList(
AList: TIdStrings
); overload;
Parameters
Parameters Description
AList Type is TIdStrings ( 3089).

Description
GetNewsgroupList is a overloaded method.

See Also
TIdNNTP.GetNewsgroupList

TIdNNTP.GetOverviewFMT Method
Retrieves the overview format from the server.

Pascal
procedure GetOverviewFMT(
AResponse: TIdStringList
);

1718 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
AResponse Stores the Overview database format.

Description
GetOverviewFMT is a procedure that retrieves information from an NNTP server that describes the headers used in the overview
database for each newsgroup. GetOverviewFMT implements the NNTP service extension for the LIST OVERVIEW.FMT command.

The OVERVIEW.FMT file is maintained by some news transport systems to indicate the order in which header information is stored
in the overview databases for each newsgroup.

GetOverviewFMT captures the news article header fields in the order specified in the overview database, and stores the server
responses in AResponse. If the NNTP server does not implement the LIST OVERVIEW.FMT, the server will return a numeric
response code of 503 in the LastCmdResult ( 2367) property.

GetOverviewFMT calls the Capture method in the IOHandler ( 2364) for the NNTP client to store the overview database format in
AResponse.

See Also
SendCmd ( 1725)

TIdNNTP.IHAVE Method
Notifies the NNTP server of messages available for upload from the client.

Pascal
procedure IHAVE(
AMsg: TIdStringList
);
Parameters
Parameters Description
AMsg Message to be sent to the NNTP server.

Description
IHAVE is a procedure used to inform an NNTP server that the client has an NNTP article available for upload. AMsg contains text
lines representing the contents of the NNTP article including message headers.

IHAVE calls SendCmd ( 1725) using the NNTP IHAVE command and the 'Message-Id' header extracted from AMsg. If the server
desires a copy of that article, it will return a numeric response code 335 instructing the client to send the contents of AMsg by
writing the RFC contents of the message. If the server does not want the article, a numeric response indicating that the article is not
wanted will be returned (435, 436, 437).

IHAVE is intended for use in transferring already-posted articles between NNTP hosts. IHAVE is not normally used or permitted in
NNTP client applications. IHAVE allows the NNTP message transport to perform negotiated article transmissions for articles
already posted to the local NNTP host.

Some NNTP server implementations may not be able to decide immediately that an article is inappropriate for posting or
forwarding, and may acknowledge the successful transfer of an article that may be subsequently discarded.

See Also
TIdMessage ( 1521) SendCmd ( 1725) Post ( 1722) TakeThis ( 1726)

TIdNNTP.IsExtCmdSupported Method
Indicates if an NNTP extension command is supported for the server.

Pascal
function IsExtCmdSupported(
AExtension: String

Internet Direct (Indy) Version 10.1.5 1719


TIdNNTP Class Classes

): Boolean;
Parameters
Parameters Description
AExtension Command to checked for in the NNTP extensions.

Returns
Boolean - True when the command is included in the capabilities for the server.

Description
IsExtCmdSupported is a Boolean function used to determine when the NNTP extension command in AExtension is included in the
server capabilities for the connection.

IsExtCmdSupported returns True when the command in AExtension has been included in the Capabilities ( 690) property.
AExtension is converted to uppercase when performing comparisions to values in Capabilities ( 690).

Capabilities ( 690) is updated when after a new connection is established to the server in Connect ( 1695), and the server
implements the NNTP LIST EXTENSIONS command.

See Also
Connect ( 1695) TIdMessageClient.Capabilities ( 690)

TIdNNTP.Next Method
Selects the next article in a newsgroup.

Pascal
function Next: Boolean;
Returns
Boolean - True when the current article pointer is updated. False on error.

Description
Next is a Boolean function that moves the NNTP current article pointer to the next article in the selected newsgroup. Next sends the
NNTP NEXT command, and examines the numeric server response for the values 223 and 421.

The return value for the method is True when the numeric response from the server is 223.

Use SelectGroup ( 1725) to activate a newsgroup before calling Next.

Use Previous ( 1724) to move the current article pointer to the previous ( 1724) article in a newsgroup.

See Also
SelectGroup ( 1725) Previous ( 1724)

TIdNNTP.ParseNewsGroup Method
Pascal
procedure ParseNewsGroup(
ALine: String;
out ANewsGroup: string;
out AHi: Integer;
out ALo: Integer;
out AStatus: String
);
Parameters
Parameters Description
ALine Type is String.
ANewsGroup Scope is out. Type is string.
AHi Scope is out. Type is Integer.
ALo Scope is out. Type is Integer.

1720 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

AStatus Scope is out. Type is String.

Description
ParseNewsGroup is a method.

TIdNNTP.ParseXHDRLine Method
Parses an XHDR ( 1727) response line for message and header information.

Pascal
procedure ParseXHDRLine(
ALine: String;
out AMsg: String;
out AHeaderData: String
);
Parameters
Parameters Description
ALine Data from the XHDR ( 1727) response.
AMsg Message number or identifier from the XHDR ( 1727) response.
AHeaderData Value for the requested header in the XHDR ( 1727) response.

Description
ParseXHDRLine is a procedure used to parse the XHDR ( 1727) response line in ALine into the message and header arguments
specified in AMsg and AHeaderData.

ALine contains the article number or message identifer from an NNTP article, a space, and then the contents of the header (without
the header name or the colon and space that follow it) or metadata item.

ParseXHDRLine separates the message information and the header data into the AMsg and AHeaderData arguments. AMsg can
contain the value '0' when a message identifier is used to access an NNTP article instead of a message number (or range).

ParseXHDRLine is used in XHDR ( 1727) to determine the values supplied to the OnXHDREntry ( 1738) event handler.

TIdNNTP.ParseXOVER Method
Parses an XOVER ( 1729) response line into variables.

Pascal
procedure ParseXOVER(
Aline: String;
var AArticleIndex: Integer;
var ASubject: String;
var AFrom: String;
var ADate: TDateTime;
var AMsgId: String;
var AReferences: String;
var AByteCount: Integer;
var ALineCount: Integer;
var AExtraData: String
);
Parameters
Parameters Description
Aline Response line to be parsed.
AArticleIndex NNTP article number for the message.
ASubject Subject header for the article.
AFrom author of the article.
ADate posting date for the article.
AMsgId NNTP message identifier for the article.
AReferences list of message identifers for the threading hierarchy for the article.
AByteCount size of the article in bytes.
ALineCount number of lines in the body of the article.

Internet Direct (Indy) Version 10.1.5 1721


TIdNNTP Class Classes

AExtraData
• fields from LIST OVERVIEW.FMT.

Description
ParseXOVER is a procedure used to parse a line in an NNTP XOVER ( 1729) response, as supplied in XOver ( 1729), into
variables. ParseXOVER will separate the information from the article OVERVIEW database in ALine into the corresponding variable
parameters.

AArticleIndex is the NNTP article number for the message.

ASubject is the subject header for the article.

AFrom is the author of the article.

ADate is the posting date for the article. Note: ADate is converted from GMT to a representation in the the local timezone during
parsing.

AMsgId is the NNTP message identifier for the article.

AReferences is a list of message identifers that indicate the threading hierarchy for the article.

AByteCount is the size of the article in bytes.

ALineCount is the number of lines in the body of the article.

AExtraData contains optional fields as indicated by the NNTP LIST OVERVIEW.FMT command.

ParseXOver can be used in the OnNewNewsList ( 1736) event handler when the NNTP client needs to examine individual
elements returned in an XOver ( 1729) response line.

See Also
XOVER ( 1729) OnNewNewsList ( 1736)

TIdNNTP.Post Method
Overload List

Method Description
TIdNNTP.Post (TIdMessage) ( 1722) Transmits a new article to the NNTP server.
TIdNNTP.Post (TIdStream) ( 1723) Transmits a new article to the NNTP server.

TIdNNTP.Post Method (TIdMessage)


Transmits a new article to the NNTP server.

Pascal
procedure Post(
AMsg: TIdMessage
); overload;
Parameters
Parameters Description
AMsg Message instance to be sent to the NNTP server.

Description
Post is an overloaded procedure in TIdNNTP ( 1692) that allows the NNTP client to send a new article to the NNTP server. The
overloaded methods can use either the TIdMessage ( 1521) in AMsg or the contents in the stream identified by AStream as the
origin of the message content.

Post sends message content presented in the format specified by RFC 1036, including required header and body lines for the
message, using the conventions required for the NNTP protocol.

Post calls SendCmd ( 1725) using the NNTP POST command to request a posting transaction on the the NNTP server. When the
numeric response code from the server is 440, posting is prohibited on the server or newsgroup. When the server response is 340,

1722 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

posting is allowed on the newsgroup. When posting is allowed, Post will send message data using the AMsg or AStream argument
provided to the method.

When AMsg is used as the source for message data, Post will ensure that the TIdMessage.ExtraHeaders ( 1544) property
contains the value of Newsagent in the 'X-Newsreader' message header. The TIdMessage ( 1521) in AMsg is sent to the server
using SendMsg ( 1560), followed by the terminating CRLF.CRLF required to signal the end of message data and transmission.

Numeric response code 240 in LastCmdResult ( 2367) indicates that the article was successfully posted to the NNTP server.

Example
(Delphi) Posting a newsgroup message using TIdMessage.
IdMessage1.Subject := sSubject;
IdMessage1.Body.Text := sBody;

if IdNNTP1.Connected then IdNNTP1.Post(IdMessage1);


(Delphi) Posting a newsgroup message using an Indy Stream.
// AStream: TIdStreamVCL... content created manually
AStream.Position := 0;
if IdNNTP1.Connected then IdNNTP1.Post(AStream);
See Also
TIdMessage ( 1521) TIdMessage.ExtraHeaders ( 1544) SendCmd ( 1725) NewsAgent ( 1734) IHAVE ( 1719)

TIdNNTP.Post Method (TIdStream)


Transmits a new article to the NNTP server.

Pascal
procedure Post(
AStream: TIdStream
); overload;
Parameters
Parameters Description
AStream Stream containing the message to be sent to the NNTP server.

Description
Post is an overloaded procedure in TIdNNTP ( 1692) that allows the NNTP client to send a new article to the NNTP server. The
overloaded methods can use either the TIdMessage ( 1521) in AMsg or the contents in the stream identified by AStream as the
origin of the message content.

Post sends message content presented in the format specified by RFC 1036, including required header and body lines for the
message, using the conventions required for the NNTP protocol.

Post calls SendCmd ( 1725) using the NNTP POST command to request a posting transaction on the the NNTP server. When the
numeric response code from the server is 440, posting is prohibited on the server or newsgroup. When the server response is 340,
posting is allowed on the newsgroup. When posting is allowed, Post will send message data using the AMsg or AStream argument
provided to the method.

When AStream is used as the source for message data, Post will send the content of the stream to the server using WriteStream.
The terminating CRLF.CRLF required to signal the end of message data and transmission is sent folowing message data. Note:
When using a stream to post a message, it is assumed that the stream contains all required message headers and message body
for the NNTP article.

Numeric response code 240 in LastCmdResult ( 2367) indicates that the article was successfully posted to the NNTP server.

Example
(Delphi) Posting a newsgroup message using TIdMessage.
IdMessage1.Subject := sSubject;
IdMessage1.Body.Text := sBody;

if IdNNTP1.Connected then IdNNTP1.Post(IdMessage1);

Internet Direct (Indy) Version 10.1.5 1723


TIdNNTP Class Classes

(Delphi) Posting a newsgroup message using an Indy Stream.


// AStream: TIdStreamVCL... content created manually
AStream.Position := 0;
if IdNNTP1.Connected then IdNNTP1.Post(AStream);
See Also
TIdMessage ( 1521) TIdMessage.ExtraHeaders ( 1544) SendCmd ( 1725) NewsAgent ( 1734) IHAVE ( 1719)

TIdNNTP.Previous Method
Moves to the previous article in a newsgroup.

Pascal
function Previous: Boolean;
Returns
Boolean - True when the current article pointer is successfully moved.

Description
Previous is a Boolean function used to move the NNTP current article pointer to the previous article in a newsgroup. Previous send
the NNTP LAST command to reposition the current article pointer, and examines the numeric server response for the values 223
and 422.

The return value for the method is True when the numeric server response contains the value 223.

Use SelectGroup ( 1725) to activate a newsgroup before using the Previous method.

Use Next ( 1720) to move the current article pointer to the next ( 1720) article in the Newsgroup.

See Also
Next ( 1720) SelectGroup ( 1725) SelectArticle ( 1724)

TIdNNTP.SelectArticle Method
Sets the current article pointer in the newsgroup.

Pascal
function SelectArticle(
AMsgNo: Integer
): Boolean;
Parameters
Parameters Description
AMsgNo Message number to be selected in the current article pointer.

Returns
Boolean - True when the current article pointer has been updated.

Description
SelectArticle is a Boolean function that sets the current article pointer to the message number specified in AMsgNo. SelectArticle
calls SendCmd ( 1725) using the NNTP STAT command to select the requested article by the specified message number.

SelectArticle returns True when the response code from the NNTP server is 223. SelectArticle returns False when the response
code from the NNTP server is 423. Any other value will result in an exception being raised for the invalid protocol response code.

Use SelectGroup ( 1725) to activate a specific newsgroup prior to using SelectArticle.

See Also
SendCmd ( 1725) SelectGroup ( 1725)

1724 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

TIdNNTP.SelectGroup Method
Selects the active newsgroup on the NNTP server.

Pascal
procedure SelectGroup(
AGroup: string
);
Parameters
Parameters Description
AGroup Group to make the active newsgroup.

Description
SelectGroup is a procedure used to make the newsgroup specified in AGroup the active newsgroup for the client connection to the
NNTP server. SelectGroup calls SendCmd ( 1725) using the NNTP GROUP command to activate the newsgroup requested in
AGroup. SelectGroup expects the numeric response code 211 to indicate successful selection of the newsgroup.

SelectGroup parses the values in the textual response from the NNTP server to determine the values for the MsgCount ( 1733),
MsgLow ( 1734), and MsgHigh ( 1733) properties.

Use SelectGroup after successful connection to an NNTP server and prior to retrieving articles from the NNTP server.

See Also
SendCmd ( 1725) MsgCount ( 1733) MsgLow ( 1734) MsgHigh ( 1733)

TIdNNTP.SendAuth Method
Pascal
procedure SendAuth;
Description
SendAuth is a method procedure

TIdNNTP.SendCmd Method
Executes NNTP commands verbs.

Pascal
function SendCmd(
AOut: string;
const AResponse: array of SmallInt
): SmallInt; override;
Parameters
Parameters Description
AOut NNTP command to be executed.
AResponse Array of anticipated numeric response codes. An empty array ([]) indicates that no response code is expected.

Returns
SmallInt - Response code returned from either the NNTP send command.

Description
SendCmd is an overriden SmallInt function in TIdNNTP ( 1692). SendCmd calls the inherited SendCmd method using an empty
array indicating no expected response codes.

SendCmd extends the ancestor method by implementing User and Password ( 1735) authentication using the NNTP AUTHINFO
service extension when the response code returned by TIdTCPConnection.SendCmd ( 2360) is either 450 or 480, as described in
the Internet Standards document:

Internet Direct (Indy) Version 10.1.5 1725


TIdNNTP Class Classes

RFC 2980 - Common NNTP Extensions

When either of these responses is encountered, SendCmd sends additional NNTP AUTHINFO commands to the server to perform
client authentication using the values in Username ( 1736) and Password ( 1735).

SendCmd performs default error handling by calling CheckResponse ( 2352). An EIdResponseError ( 142) exception will be
raised when a valid response is expected and the result, from either the inherited SendCmd or from the authentication of User and
Password ( 1735) information, does not match the expected response code(s).

See Also
EIdResponseError ( 142)

TIdNNTP.TakeThis Method
Performs non-negotiated article transmissions.

Pascal
function TakeThis(
AMsgID: string;
AMsg: TIdStream
): string;
Parameters
Parameters Description
AMsgID ASCII contents of the message(s) to send.
AMsg Stream containing the NNTP news article content.

Returns
String - Textual response from the NNTP server.

Description
TakeThis is a string function used to perform non-negotiated NNTP article transmission for a stream containing the headers and
body of a news article. TakeThis is similar to IHAVE ( 1719), except that no server response is expected after article transmission.

AMsgID contains the message identifer for the news article to be transmitted.

AMsg is a stream containing the entire contents of the news article including message headers and body.

TakeThis calls SendCmd ( 1725) using the value in AMsgID to begin streaming article transmission. TakeThis writes the message
contents in AMsg to the server using the Write method in the IOHandler ( 2364) followed by the terminating CRLF.CRLF character
sequence.

See Also
SendCmd ( 1725) IHAVE ( 1719)

TIdNNTP.XHDR Method
Overload List

Method Description
TIdNNTP.XHDR (string, string) ( 1727) NNTP extension to retrieve article headers using selection criteria.
Approved Lines Xref
The range of articles to be searched is specifies by the AParm argument. AParm
must be in the following forms:
TIdNNTP.XHDR (string, string, NNTP extension to retrieve article headers using selection criteria.
TIdStrings) ( 1728) Approved Lines Xref
The range of articles to be searched is specifies by the AParm argument. AParm
must be in the following forms:

1726 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

TIdNNTP.XHDR Method (string, string)


NNTP extension to retrieve article headers using selection criteria.

Approved Lines Xref

The range of articles to be searched is specifies by the AParm argument. AParm must be in the following forms:

an article number
an article number followed by a dash to indicate all following articles
an article number followed by a dash and another article number

For example, if the following values of AParm would result in the corresponding action:

23 retrieve article number 23.


1-23 retrieve all available articles number in the range 1 through 23.
23- retrieve all articles numbered 23 and higher.

XHDR relies on the OnXHDREntry ( 1738) event handler to signal receipt of an XHDR response the NNTP server. An
EIdNNTPNoOnXHDREntry ( 122) is raised if the OnXHDREntry ( 1738) event handler is unassigned during a call to XHDR.

You must have previously executed the SelectGroup ( 1725) command in order for this command to return a meaningful response.

Article numbers are transitory. This means that you may specify a range of article numbers, such as 1-5, and you may receive only
articles 1,3 and 4. This does not mean you have done anything wrong. The missing articles may have been expired (removed from
the server), or for some other reason not under your control have become unavailable.

Pascal
procedure XHDR(
AHeader: string;
AParam: string
); overload;
Parameters
Parameters Description
AHeader Header to be searched.
AParm Range of articles to search.

Description
XHDR is a method that retrieves specific article headers specified in AHeader from an article index or a range of articles as
specified in AParam. XHDR is an extension to the NNTP protocol.

XHDR calls SendCmd ( 1725) using the arguments in AHeader and AParam.

AHeader can contain any of the following values for an RFC 1036-compliant server:

From
Date
Newsgroups
Subject
Message-ID
Path

The following headers may or may not work depending on the server configuration. Also, it should be noted that servers can and

Internet Direct (Indy) Version 10.1.5 1727


TIdNNTP Class Classes

many do have local header definitions. If you know what these header designations are you can of course pass them in the
AHeader argument.

Reply-To
Sender
Followup-To
Expires
References
Control
Distribution
Organization
Keywords

See Also
SendCmd ( 1725)

TIdNNTP.XHDR Method (string, string, TIdStrings)


NNTP extension to retrieve article headers using selection criteria.

Approved Lines Xref

The range of articles to be searched is specifies by the AParm argument. AParm must be in the following forms:

an article number
an article number followed by a dash to indicate all following articles
an article number followed by a dash and another article number

For example, if the following values of AParm would result in the corresponding action:

23 retrieve article number 23.


1-23 retrieve all available articles number in the range 1 through 23.
23- retrieve all articles numbered 23 and higher.

Article numbers are transitory. This means that you may specify a range of article numbers, such as 1-5, and you may receive only
articles 1,3 and 4. This does not mean you have done anything wrong. The missing articles may have been expired (removed from
the server), or for some other reason not under your control have become unavailable.

Pascal
procedure XHDR(
AHeader: string;
AParam: string;
AResponse: TIdStrings
); overload;
Parameters
Parameters Description
AHeader Header to be searched.
AResponse Server response.
AParm Range of articles to search.

1728 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Description
XHDR is a method that retrieves specific article headers specified in AHeader from an article index or a range of articles as
specified in AParam. XHDR is an extension to the NNTP protocol.

XHDR calls SendCmd ( 1725) using the arguments in AHeader and AParam.

XHDR calls Capture to store the server response lines in AResponse. You must have previously executed the SelectGroup (
1725) command in order for this command to return a meaningful response.

AHeader can contain any of the following values for an RFC 1036-compliant server:

From
Date
Newsgroups
Subject
Message-ID
Path

The following headers may or may not work depending on the server configuration. Also, it should be noted that servers can and
many do have local header definitions. If you know what these header designations are you can of course pass them in the
AHeader argument.

Reply-To
Sender
Followup-To
Expires
References
Control
Distribution
Organization
Keywords

See Also
SendCmd ( 1725)

TIdNNTP.XOVER Method
Overload List

Method Description
TIdNNTP.XOVER (string) ( 1729) Retrieve information from an article overview database.
TIdNNTP.XOVER (string, TIdStream) Retrieve information from an article overview database.
( 1730)
TIdNNTP.XOVER (string, TIdStrings) ( Retrieve information from an article overview database.
1730)

TIdNNTP.XOVER Method (string)


Retrieve information from an article overview database.

Internet Direct (Indy) Version 10.1.5 1729


TIdNNTP Class Classes

Pascal
procedure XOVER(
AParam: string
); overload;
Parameters
Parameters Description
AParm Article(s) to send.

Description
XOVER is a procedure that retrieves information from an article overview database maintained on most news-servers and places
the results in AResponse.

AParm can be an article index such as "1", an article index followed by a dash to indicate the index and all articles following it such
as "1-", or a range of articles such as "1-10".

You can parse the results using the ParseXOVER ( 1721) method. You sometimes can parse for additional information by getting
the format of the overview database with the GetOverviewFMT ( 1718) method.

You have to use SelectGroup ( 1725) to select the newsgroup before using this method.

See Also
SendCmd ( 1725) SelectGroup ( 1725)

TIdNNTP.XOVER Method (string, TIdStream)


Retrieve information from an article overview database.

Pascal
procedure XOVER(
AParam: string;
AResponse: TIdStream
); overload;
Parameters
Parameters Description
AResponse Textual responses for each article.
AParm Article(s) to send.

Description
XOVER is a procedure that retrieves information from an article overview database maintained on most news-servers and places
the results in AResponse.

AParm can be an article index such as "1", an article index followed by a dash to indicate the index and all articles following it such
as "1-", or a range of articles such as "1-10".

You can parse the results using the ParseXOVER ( 1721) method. You sometimes can parse for additional information by getting
the format of the overview database with the GetOverviewFMT ( 1718) method.

You have to use SelectGroup ( 1725) to select the newsgroup before using this method.

See Also
SendCmd ( 1725)

SelectGroup ( 1725)

TIdNNTP.XOVER Method (string, TIdStrings)


Retrieve information from an article overview database.

Pascal
procedure XOVER(
AParam: string;

1730 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

AResponse: TIdStrings
); overload;
Parameters
Parameters Description
AResponse Textual responses for each article.
AParm Article(s) to send.

Description
XOVER is a procedure that retrieves information from an article overview database maintained on most news-servers and places
the results in AResponse.

AParm can be an article index such as "1", an article index followed by a dash to indicate the index and all articles following it such
as "1-", or a range of articles such as "1-10".

You can parse the results using the ParseXOVER ( 1721) method. You sometimes can parse for additional information by getting
the format of the overview database with the GetOverviewFMT ( 1718) method.

You have to use SelectGroup ( 1725) to select the newsgroup before using this method.

See Also
SendCmd ( 1725)

SelectGroup ( 1725)

TIdNNTP Properties
The Properties of the TIdNNTP class are listed here.

Properties
Property Description
ForceAuth ( 1731)
Host ( 1732) IP address or host name for the NNTP server.
Mode ( 1732) Indicates the NNTP command mode for the client connection.
ModeResult ( 1732) Result from the NNTP MODE command.
MsgCount ( 1733) Estimated number of articles in the newsgroup.
MsgHigh ( 1733) Indicates the highest available article in a newsgroup.
MsgLow ( 1734) Indicates the lowest available article number in a newsgroup.
NewsAgent ( 1734) Identifies the newsreader that posts an article.
OnNewGroupsList ( 1734) Event handler signalled on receipt of values in the new newsgroup list.
Password ( 1735) Represents the user authorization for connecting to the NNTP server.
Permission ( 1735) Represents posting permissions granted to the NNTP client.
Port ( 1735) Port number for the connection to an NNTP server.
Username ( 1736) Represents the user identity for connecting to the NNTP server.
UseTLS ( 1736) Indicates Transport-Level Security is used on the NNTP connection.

Legend
Property
read only

TIdNNTP.ForceAuth Property
Pascal
property ForceAuth: boolean;
Description
ForceAuth is a Published boolean property default value is false

Internet Direct (Indy) Version 10.1.5 1731


TIdNNTP Class Classes

TIdNNTP.Host Property
IP address or host name for the NNTP server.

Pascal
property Host;
Description
Host is a String property that identifies the IP address or host name for the NNTP server used for the NNTP client connection.

Set values in the Host, Port ( 1735), Username ( 1736), and Password ( 1735) properties prior to calling Connect ( 1695).

See Also
Port ( 1735)

TIdNNTP.Mode Property
Indicates the NNTP command mode for the client connection.

Pascal
property Mode: TIdModeType;
Description
Mode is a TModeType property that indicates the desired NNTP command mode for the client connection. Mode is used in the
Connect ( 1695) method to set desired command mode, and results in an update to ModeResult ( 1732) indicated the server
response to the request.

When Mode contains the the value mtReader, the client connection is an NNTP newsreader that will use conversational NNTP
protocol exchanges. mtReader cause the NNTP MODE READER command to be issued after establishing the connection to the
server in Connect ( 1695).

When Mode contains the the value mtStream, the client connection wishes to suspend the conversational nature of NNTP, and
send a stream of NNTP commands. mtStream is used with TakeThis ( 1726), where articles are sent to an NNTP server in
streaming mode. mtStream causes the NNTP MODE STREAM command to be issued after the connection to the server is opened
in Connect ( 1695).

mtReader is the default value for Mode, as assigned in the Create ( 267) constructor.

See Also
TModeType

TModeSetResult

ModeResult ( 1732)

TakeThis ( 1726)

Connect ( 1695)

Create ( 267)

TIdNNTP.ModeResult Property
Result from the NNTP MODE command.

Pascal
property ModeResult: TIdModeSetResult;
Description
ModeResult is a TModeSetResult property that that respresents the result of an NNTP MODE command. ModeResult is updated in
the Connect ( 1695) method to show if the requested Mode ( 1732) was successful or permitted on the NNTP server.

1732 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

When Mode ( 1732) contains the value mtStream, ModeResult will contain one the values:

Value Meaning
mrNoStream Streaming not allowed or implemented.
mrCanStream Streaming permitted.

When Mode ( 1732) contains the value mtReader, ModeResult will contain one the values:

Value Meaning
mrNoPost Posting not allowed.
mrCanPost Posting permitted.

See Also
TModeSetResult

TModeType

Connect ( 1695)

ModeResult

TIdNNTP.MsgCount Property
Estimated number of articles in the newsgroup.

Pascal
property MsgCount: Integer;
Description
MsgCount is a read-only Integer property that represents the estimated number of articles in a newsgroup. MsgCount is updated
when a newsgroup is activated using SelectGroup ( 1725).

Use MsgHigh ( 1733) and MsgLow ( 1734) to access the message number ranges for the currently selected newsgroup.

See Also
MsgHigh ( 1733) MsgLow ( 1734) SelectGroup ( 1725)

TIdNNTP.MsgHigh Property
Indicates the highest available article in a newsgroup.

Pascal
property MsgHigh: Integer;
Description
MsgHigh is a read-only Integer property that represents the highest available article index in a newsgroup. MsgHigh is updated
when a newsgroup is activated using SelectGroup ( 1725).

Use MsgLow ( 1734) to access the lower message number range for the currently selected newsgroup. Use MsgCount ( 1733)
to get total number of messages in the currently selected newsgroup.

See Also
MsgCount ( 1733) MsgLow ( 1734) SelectGroup ( 1725)

Internet Direct (Indy) Version 10.1.5 1733


TIdNNTP Class Classes

TIdNNTP.MsgLow Property
Indicates the lowest available article number in a newsgroup.

Pascal
property MsgLow: Integer;
Description
MsgLow is a read-only Integer property that represents the lowest available article index in a newsgroup. MsgLow is updated when
a newsgroup is activated using SelectGroup ( 1725).

Use MsgHigh ( 1733) and MsgLow to access the message number ranges for the currently selected newsgroup.

See Also
MsgCount ( 1733) MsgHigh ( 1733) SelectGroup ( 1725)

TIdNNTP.NewsAgent Property
Identifies the newsreader that posts an article.

Pascal
property NewsAgent: string;
Description
NewsAgent is a String property that specifies the name of the program, or newsreader, creating the NNTP news article. NewsAgent
is written to the 'X-Newsreader' header found in TIdMessage.ExtraHeaders ( 1544) when Post ( 1722) is used to transmit the
news article.

See Also
Post ( 1722) TIdMessage.ExtraHeaders ( 1544)

TIdNNTP.OnNewGroupsList Property
Event handler signalled on receipt of values in the new newsgroup list.

Pascal
property OnNewGroupsList: TIdEvenTIdNewsGroupList;
Parameters
Parameters Description
ANewsgroup Name of the newsgroup.
ALow Lowest index number for an available article.
AHigh Highest index number for an available article.
AType Posting status of the newsgroup.
ACanContinue True to continue newsgroup list retrieval. False to stop retrieval.

Description
OnNewGroupsList is a TEventNewsGroupList property that represents the event handler triggered when new newsgroups are
retrieved using the GetNewGroupsList ( 1714) method.

OnNewGroupsList is used when GetNewGroupsList ( 1714) is called without a TStrings destination for the new newsgroup listing.
OnNewGroupsList will be triggered once for each NNTP server response line retrieved and processed in GetNewGroupsList (
1714).

Applications must assigned a procedure to the event handler when TStrings is not used to store the newsgroup listing. If the event
handler is unassigned, a EIdNNTPNoOnNewGroupsList ( 120) exception will be raised. The event handler can be used to update
the stored newsgroup list on the NNTP client using values in the event handler arguments.

Setting ACanContinue to False stops processing newsgroups retrieved in the server response.

1734 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

See Also
GetNewGroupsList ( 1714) TEventNewsgroupList EIdNNTPNoOnNewGroupsList ( 120)

TIdNNTP.Password Property
Represents the user authorization for connecting to the NNTP server.

Pascal
property Password;
Description
Password is a String property that represents the user credentials for connecting to the NNTP server. Set Username ( 1736) to
establish the identity used when autheticating the NNTP client connection.

Username ( 1736) and Password are used when SendCmd ( 1725) encounters the NNTP response codes 450 and 480 when
executing NNTP protocol commands. Values in Username ( 1736) and Password are sent to the server using the NNTP service
extension AUTHINFO.

See Also
Username ( 1736) SendCmd ( 1725)

TIdNNTP.Permission Property
Represents posting permissions granted to the NNTP client.

Pascal
property Permission: TIdNNTPPermission;
Description
Permission is a read-only TIdNNTPPermission ( 2971) property that represents the posting permission granted to the NNTP
client. Permission can contain one of the following values representing an associated NNTP server responses:

Value Meaning
crCanPost 200 server ready (posting allowed)
crNoPost 201 server ready (no posting allowed)
crAuthRequired Not used at this time.
crTempUnavailable 400 service discontinued

Permission is updated when Connect ( 1695) is used to open a connection and read the welcome message sent by the NNTP
server.

See Also
Connect ( 1695) TIdNNTPPermission ( 2971)

TIdNNTP.Port Property
Port number for the connection to an NNTP server.

Pascal
property Port;
Description
Port is an Integer property that identifies the port number used in the connection to an NNTP server. Port is redefined in TIdNNTP
( 1692) to specify the default value for the property as required by the NNTP protocol (IdPORT_NNTP ( 4133)), and assigned in

Internet Direct (Indy) Version 10.1.5 1735


TIdNNTP Class Classes

the Create ( 267) method.

See Also
IdPORT_NNTP ( 4133) Create ( 267)

TIdNNTP.Username Property
Represents the user identity for connecting to the NNTP server.

Pascal
property Username;
Description
Username is a String property that represents the user identity for connecting to the NNTP server.

Use Password ( 1735) to set the credentials used in authorization for the NNTP client connection.

Username and Password ( 1735) are used when SendCmd ( 1725) encounters the NNTP response codes 450 and 480 during
execution of NNTP protocol commands. Values in Username and Password ( 1735) are sent to the server using the NNTP service
extension AUTHINFO.

See Also
Password ( 1735) SendCmd ( 1725)

TIdNNTP.UseTLS Property
Indicates Transport-Level Security is used on the NNTP connection.

Pascal
property UseTLS;
Description
UseTLS is a published property used to indicate when and if Transport-Level Security is used on the connection to the NNTP server.

UseTLS is used in StartTLS, and determines the passthrough option used for the IOHandler ( 2364) when TLS is not required,
unsupported, implied, or explicitly requested for the connection.

TIdNNTP Events
The Events of the TIdNNTP class are listed here.

Events
Event Description
OnNewNewsList ( 1736) Event handler signalled on receipt of values in the new articles list.
OnNewsgroupList ( 1737) Event handler signalled on receipt of values in the newsgroup list.
OnTLSNotAvailable ( 1737) Event handler triggered when using TLS (Transport Layer Security) and TLS support is not available.
OnXHDREntry ( 1738) Event handler signalled during processing of XHDR ( 1727) response lines.
OnXOVER ( 1738) Event handler signalled during processing of XOVER ( 1729) responses.

Legend
Event

TIdNNTP.OnNewNewsList Event
Event handler signalled on receipt of values in the new articles list.

Pascal
property OnNewNewsList: TIdEventNewNewsList;

1736 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTP Class

Parameters
Parameters Description
AMsgID Message identifier for the article.
ACanContinue False to stop new article retrieval.

Description
OnNewNewsList is a TEventNewNewsList property that represents the event handler signalled on receipt of values in the new
articles list from GetNewNewsList ( 1715).

OnNewNewsList is used when GetNewNewsList ( 1715) is called without a TStrings argument used as the destination of the new
article listing. OnNewNewsList will be triggered once for each article received in a response line from the NNTP server in
GetNewNewsList ( 1715).

Applications must assigned a procedure to the event handler when TStrings is not used to store the new article listing. If the event
handler is unassigned, an EIdNNTPNoOnNewNewsList ( 121) exception will be raised. The event handler can be used to update
display or storage aspects of the NNTP client when new articles message identifiers are received.

Setting ACanContinue to False stops retrieval of the new article list.

See Also
GetNewNewsList ( 1715) TEventNewNewsList EIdNNTPNoOnNewNewsList ( 121)

TIdNNTP.OnNewsgroupList Event
Event handler signalled on receipt of values in the newsgroup list.

Pascal
property OnNewsgroupList: TIdEvenTIdNewsgroupList;
Parameters
Parameters Description
ANewsgroup Name of the newsgroup.
ALow Lowest index number for an available article.
AHigh Highest index number for an available article.
AType Posting status of the newsgroup.
ACanContinue False to stop newsgroup list retrieval.

Description
OnNewsgroupList is a TEventNewsGroupList property that represents the event handler triggered when values in the newsgroup
list are retrieved using the GetNewsgroupList ( 1717) method. OnNewsgroupList is used when GetNewsgroupList ( 1717) is
called without a TStrings destination for the newsgroup listing.

OnNewsgroupList will be triggered once for each newsgroup response line retrieved and processed in GetNewsgroupList ( 1717).

Applications must assigned a procedure to the event handler when TStrings is not used to store the newsgroup listing. If the event
handler is unassigned, a EIdNNTPNoOnNewsgroupList ( 121) exception will be raised.

The event handler can be used to update the stored newsgroup list on the NNTP client using values in the event handler
arguments. Setting ACanContinue to False stops the newsgroup retrieval.

See Also
GetNewsgroupList ( 1717) TEventNewsgroupList EIdNNTPNoOnNewsgroupList ( 121)

TIdNNTP.OnTLSNotAvailable Event
Event handler triggered when using TLS (Transport Layer Security) and TLS support is not available.

Pascal
property OnTLSNotAvailable: TIdOnTLSNegotiationFailure;

Internet Direct (Indy) Version 10.1.5 1737


TIdNNTP Class Classes

Description
OnTLSNotAvailable is a published TIdOnTLSNegotiationFailure ( 3072) property in TIdNNTP ( 1692) that represents the event
handler triggered when using TLS (Transport Layer Security) and TLS support is not available.

OnTLSNotAvailable is triggered after the connection is established in Connect ( 1695), and when UseTLS ( 1736) indicates
optional TLS suppport is implied.

The event handler accepts a Boolean argument that indicates if the client connection can continue after execution of the event
handler.

TIdNNTP.OnXHDREntry Event
Event handler signalled during processing of XHDR ( 1727) response lines.

Pascal
property OnXHDREntry: TIdEventXHDREntry;
Description
OnXHDREntry is a TEventXHDREntryEvent property that represents the event handler signalled when processing header values
returned in the XHDR ( 1727) method. OnXHDREntry allows the NNTP client to implement storage or indexing for the requested
values using the method appropriate to the client implementation.

Applications must assign a procedure to the event handler to allow responding to the event notification. An
EIdNNTPNoOnXHDREntry ( 122) will be raised if the OnXHDREntry is unassigned during a call to the XHDR ( 1727) method.

Arguments passed to the event handler procedure represent the header name, header value, message number, and the
continuation flag for the processing loop.

The required parameter is the name of a header line (e.g. "subject") in a news group article, as described in the Internet Standards
document:

RFC 1036 - Standard for Interchange of USENET Messages

Other parameters are optional, and can contain empty string values.

The optional range argument may be any of the following:

• an article number
• an article number followed by a dash to indicate all following articles
• an article number followed by a dash and another article number
The optional message-id argument indicates a specific article. The range and message-id arguments are mutually exclusive. If no
argument is specified, then information from the current article is displayed.

Set the ACanContinue argument to False in the event handler procedure to abort processing of header values from the XHDR (
1727) method.

See Also
XHDR ( 1727) EIdNNTPNoOnXHDREntry ( 122) TEventXHDREntryEvent

TIdNNTP.OnXOVER Event
Event handler signalled during processing of XOVER ( 1729) responses.

Pascal
property OnXOVER: TIdEventXOVER;
Description
OnXOVER is a TEventXOVEREvent property that represents the event handler signalled during processing of response lines in the
XOVER ( 1729) method.

1738 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTPContext Class

OnXOVER allows the NNTP client to implement storage or indexing for information from the NNTP OVERVIEW database for NNTP
articles matches the specified criteria.

Applications must assign a procedure to the event handler property to allow responding to the event notification. An
EIdNNTPNoOnXOVER ( 122) exception will be raised if the OnXOVER event handler is unassigned during a call to XOVER (
1729).

Parameters to the procedure represent standard XOVER ( 1729) values and extra data parsed from the server reponse line.

OnXOVER is signalled once for each response line received in the XOVER ( 1729) method.

See Also
XOVER ( 1729) TEventXOVEREvent EIdNNTPNoOnXOVER ( 122)

TIdNNTPContext Class
File
IdNNTPServer ( 4693)

Hierarchy

Pascal
TIdNNTPContext = class(TIdContext);
Description
TIdNNTPContext TIdContext ( 376) descendant

See Also
TIdContext ( 376)

TIdNNTPContext Members
The following tables list the members exposed by TIdNNTPContext.

Properties
Property Description
Authenticated ( 1741)
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
CurrentArticle ( 1741)
CurrentGroup ( 1741)
Data ( 2332) A user-specified object with values used during execution of the task.
ModeReader ( 1741)
Password ( 1741)
UserName ( 1741)
UsingTLS ( 1742)
Yarn ( 2333) Represents the thread or fiber for executing the task.

Methods
Method Description
Binding ( 378)
Create ( 1740)
Destroy ( 378) Frees the object instance.
Destroy ( 2331) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.

Internet Direct (Indy) Version 10.1.5 1739


TIdNNTPContext Class Classes

DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Method
virtual
Property
read only
Event

TIdNNTPContext Methods
The Methods of the TIdNNTPContext class are listed here.

Methods
Method Description
Create ( 1740)

Legend
Constructor
virtual

TIdNNTPContext.Create Constructor
Pascal
constructor Create(
AConnection: TIdTCPConnection;
AYarn: TIdYarn;
AList: TIdThreadList = nil
); override;
Parameters
Parameters Description
AConnection Type is TIdTCPConnection ( 2349).
AYarn Type is TIdYarn ( 2632).
AList Type is TIdThreadList ( 3093). Default value is nil.

Description
TIdNNTPContext.Create overridden constructor method.

TIdNNTPContext Properties
The Properties of the TIdNNTPContext class are listed here.

Properties
Property Description
Authenticated ( 1741)
CurrentArticle ( 1741)
CurrentGroup ( 1741)
ModeReader ( 1741)
Password ( 1741)

1740 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTPContext Class

UserName ( 1741)
UsingTLS ( 1742)

Legend
Property
read only

TIdNNTPContext.Authenticated Property
Pascal
property Authenticated: Boolean;
Description
Authenticated is a Public read-only Boolean property

TIdNNTPContext.CurrentArticle Property
Pascal
property CurrentArticle: Integer;
Description
CurrentArticle is a Public read-only Integer property

TIdNNTPContext.CurrentGroup Property
Pascal
property CurrentGroup: string;
Description
CurrentGroup is a Public read-only string property

TIdNNTPContext.ModeReader Property
Pascal
property ModeReader: Boolean;
Description
ModeReader is a Public read-only Boolean property

TIdNNTPContext.Password Property
Pascal
property Password: string;
Description
Password is a Public read-only string property

TIdNNTPContext.UserName Property
Pascal
property UserName: string;
Description
UserName is a Public read-only string property

Internet Direct (Indy) Version 10.1.5 1741


TIdNNTPServer Class Classes

TIdNNTPContext.UsingTLS Property
Pascal
property UsingTLS: boolean;
Description
UsingTLS is a Public read-only boolean property

TIdNNTPServer Class
File
IdNNTPServer ( 4693)

Hierarchy

Pascal
TIdNNTPServer = class(TIdExplicitTLSServer);
Description
TIdNNTPServer TIdExplicitTLSServer ( 691) descendant

See Also
TIdExplicitTLSServer ( 691)

TIdNNTPServer Members
The following tables list the members exposed by TIdNNTPServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1745)
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
Help ( 1745)
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
ImplicitTLS ( 1745)
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
OverviewFormat ( 1745)
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.

1742 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTPServer Class

ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.


Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1744)
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
NNTPDateTimeToDateTime ( 1744)
NNTPTimeToTime ( 1744)
CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnArticleByNo ( 1746)
OnAuth ( 1746)
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnBodyByNo ( 1746)
OnCheckListGroup ( 1746)
OnCheckMsgNo ( 1747)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnHeadByNo ( 1747)
OnIHaveCheck ( 1747)
OnIHavePost ( 1747)
OnListenException ( 470) Event handler for an exception in a listener thread.
OnListGroup ( 1747)
OnListGroups ( 1747)
OnListNewGroups ( 1747)
OnNewNews ( 1748)
OnNextArticle ( 1748)
OnPost ( 1748)
OnPrevArticle ( 1748)
OnSelectGroup ( 1748)
OnStatMsgNo ( 1748)
OnStatus ( 359) Represents the current connection status event handler.
OnXHdr ( 1749)
OnXOver ( 1749)

Legend
Method
virtual
Property
read only
Event

Internet Direct (Indy) Version 10.1.5 1743


TIdNNTPServer Class Classes

TIdNNTPServer Methods
The Methods of the TIdNNTPServer class are listed here.

Methods
Method Description
Destroy ( 1744)
NNTPDateTimeToDateTime ( 1744)
NNTPTimeToTime ( 1744)

Legend
Destructor
virtual

TIdNNTPServer.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden

TIdNNTPServer.NNTPDateTimeToDateTime Method
Pascal
class function NNTPDateTimeToDateTime(
const ATimeStamp: string
): TDateTime;
Parameters
Parameters Description
ATimeStamp Type is string.

Returns
TDateTime

Description
NNTPDateTimeToDateTime class method returns TDateTime

TIdNNTPServer.NNTPTimeToTime Method
Pascal
class function NNTPTimeToTime(
const ATimeStamp: String
): TDateTime;
Parameters
Parameters Description
ATimeStamp Type is String.

Returns
TDateTime

Description
NNTPTimeToTime class method returns TDateTime

1744 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTPServer Class

TIdNNTPServer Properties
The Properties of the TIdNNTPServer class are listed here.

Properties
Property Description
DefaultPort ( 1745)
Help ( 1745)
ImplicitTLS ( 1745)
OverviewFormat ( 1745)

Legend
Property

TIdNNTPServer.DefaultPort Property
Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property default value is IdPORT_NNTP ( 4133)

TIdNNTPServer.Help Property
Pascal
property Help: TIdStrings;
Description
Help is a Published TStrings property

TIdNNTPServer.ImplicitTLS Property
Pascal
property ImplicitTLS: Boolean;
Description
ImplicitTLS is a Published Boolean property default value is DEF_NNTP_IMPLICIT_TLS ( 3191)

TIdNNTPServer.OverviewFormat Property
Pascal
property OverviewFormat: TIdStrings;
Description
OverviewFormat is a Published TStrings property

TIdNNTPServer Events
The Events of the TIdNNTPServer class are listed here.

Events
Event Description
OnArticleByNo ( 1746)

Internet Direct (Indy) Version 10.1.5 1745


TIdNNTPServer Class Classes

OnAuth ( 1746)
OnBodyByNo ( 1746)
OnCheckListGroup ( 1746)
OnCheckMsgNo ( 1747)
OnHeadByNo ( 1747)
OnIHaveCheck ( 1747)
OnIHavePost ( 1747)
OnListGroup ( 1747)
OnListGroups ( 1747)
OnListNewGroups ( 1747)
OnNewNews ( 1748)
OnNextArticle ( 1748)
OnPost ( 1748)
OnPrevArticle ( 1748)
OnSelectGroup ( 1748)
OnStatMsgNo ( 1748)
OnXHdr ( 1749)
OnXOver ( 1749)

Legend
Event

TIdNNTPServer.OnArticleByNo Event
Pascal
property OnArticleByNo: TIdNNTPOnArticleByNo;
Description
OnArticleByNo is a Published TIdNNTPOnArticleByNo ( 3063) event handler property

TIdNNTPServer.OnAuth Event
Pascal
property OnAuth: TIdNNTPOnAuth;
Description
OnAuth is a Published TIdNNTPOnAuth ( 3063) event handler property

TIdNNTPServer.OnBodyByNo Event
Pascal
property OnBodyByNo: TIdNNTPOnArticleByNo;
Description
OnBodyByNo is a Published TIdNNTPOnArticleByNo ( 3063) event handler property

TIdNNTPServer.OnCheckListGroup Event
Pascal
property OnCheckListGroup: TIdNNTPOnCheckListGroup;
Description
OnCheckListGroup is a Published TIdNNTPOnCheckListGroup ( 3063) event handler property

1746 Internet Direct (Indy) Version 10.1.5


Classes TIdNNTPServer Class

TIdNNTPServer.OnCheckMsgNo Event
Pascal
property OnCheckMsgNo: TIdNNTPOnCheckMsgNo;
Description
OnCheckMsgNo is a Published TIdNNTPOnCheckMsgNo ( 3063) event handler property

TIdNNTPServer.OnHeadByNo Event
Pascal
property OnHeadByNo: TIdNNTPOnArticleByNo;
Description
OnHeadByNo is a Published TIdNNTPOnArticleByNo ( 3063) event handler property

TIdNNTPServer.OnIHaveCheck Event
Pascal
property OnIHaveCheck: TIdNNTPOnIHaveCheck;
Description
OnIHaveCheck is a Published TIdNNTPOnIHaveCheck ( 3064) event handler property

TIdNNTPServer.OnIHavePost Event
Pascal
property OnIHavePost: TIdNNTPOnPost;
Description
OnIHavePost is a Published TIdNNTPOnPost ( 3065) event handler property

TIdNNTPServer.OnListGroup Event
Pascal
property OnListGroup: TIdServerThreadEvent;
Description
OnListGroup is a Published TIdServerThreadEvent ( 3080) property

TIdNNTPServer.OnListGroups Event
Pascal
property OnListGroups: TIdServerThreadEvent;
Description
OnListGroups is a Published TIdServerThreadEvent ( 3080) property

TIdNNTPServer.OnListNewGroups Event
Pascal
property OnListNewGroups: TIdNNTPOnNewGroupsList;

Internet Direct (Indy) Version 10.1.5 1747


TIdNNTPServer Class Classes

Description
OnListNewGroups is a Published TIdNNTPOnNewGroupsList ( 3064) event handler property

TIdNNTPServer.OnNewNews Event
Pascal
property OnNewNews: TIdNNTPOnNewNews;
Description
OnNewNews is a Published TIdNNTPOnNewNews ( 3064) event handler property

TIdNNTPServer.OnNextArticle Event
Pascal
property OnNextArticle: TIdNNTPOnMovePointer;
Description
OnNextArticle is a Published TIdNNTPOnMovePointer ( 3064) event handler property

TIdNNTPServer.OnPost Event
Pascal
property OnPost: TIdNNTPOnPost;
Description
OnPost is a Published TIdNNTPOnPost ( 3065) event handler property

TIdNNTPServer.OnPrevArticle Event
Pascal
property OnPrevArticle: TIdNNTPOnMovePointer;
Description
OnPrevArticle is a Published TIdNNTPOnMovePointer ( 3064) event handler property

TIdNNTPServer.OnSelectGroup Event
Pascal
property OnSelectGroup: TIdNNTPOnSelectGroup;
Description
OnSelectGroup is a Published TIdNNTPOnSelectGroup ( 3065) event handler property

TIdNNTPServer.OnStatMsgNo Event
Pascal
property OnStatMsgNo: TIdNNTPOnMovePointer;
Description
OnStatMsgNo is a Published TIdNNTPOnMovePointer ( 3064) event handler property

1748 Internet Direct (Indy) Version 10.1.5


Classes TIdNotify Class

TIdNNTPServer.OnXHdr Event
Pascal
property OnXHdr: TIdNNTPOnXHdr;
Description
OnXHdr is a Published TIdNNTPOnXHdr ( 3065) event handler property

TIdNNTPServer.OnXOver Event
Pascal
property OnXOver: TIdNNTPOnXOver;
Description
OnXOver is a Published TIdNNTPOnXOver ( 3065) event handler property

TIdNotify Class
Implements the ancestor for Indy notification classes.

File
IdSync ( 4733)

Hierarchy

Pascal
TIdNotify = class(TObject);
Description
TIdNotify is a TObject descendant that implements an ancestor class for posting notification messages using methods in the main
thread of execution, or in threads.

TIdNotify specifies an abstract virtual DoNotify procedure that must be implemented in descendant classes.

DoNotify method to allow the Notify ( 1750) method to execute it's notification mechanism.

See Also
TIdNotifyMethod ( 1752)

TIdNotify.Notify ( 1750)

TIdNotify.DoNotify

TIdNotify Members
The following tables list the members exposed by TIdNotify.

Properties
Property Description
MainThreadUsesNotify ( 1752) Indicates that the main application thread performs notification messages.

Methods
Method Description
Create ( 1750) Constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1749


TIdNotify Class Classes

FreeThread ( 1750)
Notify ( 1750) Implements posting of notifications for threaded and non-thread descendant classes.
NotifyMethod ( 1751)
WaitFor ( 1751) Pauses until the notification object has completed execution.

Legend
Constructor
virtual
Property

TIdNotify Methods
The Methods of the TIdNotify class are listed here.

Methods
Method Description
Create ( 1750) Constructor for the object instance.
FreeThread ( 1750)
Notify ( 1750) Implements posting of notifications for threaded and non-thread descendant classes.
NotifyMethod ( 1751)
WaitFor ( 1751) Pauses until the notification object has completed execution.

Legend
Constructor
virtual

TIdNotify.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; virtual;
Description
Create is the constructor for the object instance. Create is declared as a virtual method in TIdNotify ( 1749) to allow descendant
classes to reimplement the constuctor to initialize its notification mechanism.

Create calls the inherited Create method prior to exiting from the constructor.

See Also
TIdNotifyMethod.Create ( 1753)

TIdNotify.FreeThread Method
Pascal
class procedure FreeThread;
Description
FreeThread class method

TIdNotify.Notify Method
Implements posting of notifications for threaded and non-thread descendant classes.

Pascal
procedure Notify;

1750 Internet Direct (Indy) Version 10.1.5


Classes TIdNotify Class

Description
Notify is a procedure that implements posting of the notification message using the mechanism required for threaded and
non-thread descendant classes.

Notify use MainThreadUsesNotify ( 1752) to determine if the main application thread can perform the method that implements the
notification message, or if the global notification thread in GNotifyThread is used to perform the operation.

When the application's main thread is active and MainThreadUsesNotify ( 1752) is False, the thread of execution for the
application is used, and the notification message is freed.

Under all other circumstances, the notification message is performed using the global threaded notification mechanism in
GNotifyThread.

See Also
TIdNotify.DoNotify

TIdNotify.NotifyMethod ( 1751)

TIdNotify.MainThreadUsesNotify ( 1752)

GNotifyThread

TIdNotify.NotifyMethod Method
Pascal
class procedure NotifyMethod(
AMethod: TIdThreadMethod
);
Parameters
Parameters Description
AMethod Type is TIdThreadMethod ( 3093).

Description
NotifyMethod is a class method.

TIdNotify.WaitFor Method
Pauses until the notification object has completed execution.

Pascal
procedure WaitFor;
Description
WaitFor is a procedure that forces the TIdNotify ( 1749) instance to wait until the threaded notification list has a chance to execute
the object instance.

WaitFor examines the notification list in the global variable GNotifyThread. If the current object instance is present in the notification
list, the method waits for 10ms (milliseconds) and rechecks for the current object until is has been completed and freed.

WaitFor is used when the notification thread is executing, and during finalization for the Indy library.

See Also
GNotifyThread

TIdNotify Properties
The Properties of the TIdNotify class are listed here.

Internet Direct (Indy) Version 10.1.5 1751


TIdNotifyMethod Class Classes

Properties
Property Description
MainThreadUsesNotify ( 1752) Indicates that the main application thread performs notification messages.

Legend
Property

TIdNotify.MainThreadUsesNotify Property
Indicates that the main application thread performs notification messages.

Pascal
property MainThreadUsesNotify: Boolean;
Description
MainThreadUsesNotify is a Boolean property that indicates if the main application thread can perform the notification message, or if
TIdNotify ( 1749) is allowed to perform the operation.

MainThreadUsesNotify is used in Notify ( 1750) to determine if the main application thread can perform the method that
implements the notification message, or if the global notification thread in GNotifyThread is used to perform the operation.

When the Main thread is active and MainThreadUsesNotify is False, the thread of execution for the application is used, and the
notification message is freed.

See Also
InMainThread ( 2841)

GNotifyThread

TIdNotify.Notify ( 1750)

TIdNotifyMethod Class
Implements a class for posting notification messages using thread methods.

File
IdSync ( 4733)

Hierarchy

Pascal
TIdNotifyMethod = class(TIdNotify);
Description
TIdNotifyMethod is a TIdNotify ( 1749) descendant that implements a class for posting notification messages using thread
methods.

See Also
TIdNotify ( 1749)

TIdNotifyMethod Members
The following tables list the members exposed by TIdNotifyMethod.

1752 Internet Direct (Indy) Version 10.1.5


Classes TIdNovellBaseFTPListItem Class

Properties
Property Description
MainThreadUsesNotify ( 1752) Indicates that the main application thread performs notification messages.

Methods
Method Description
Create ( 1753)
FreeThread ( 1750)
Notify ( 1750) Implements posting of notifications for threaded and non-thread descendant classes.
NotifyMethod ( 1751)
WaitFor ( 1751) Pauses until the notification object has completed execution.

Legend
Constructor
virtual
Property

TIdNotifyMethod Methods
The Methods of the TIdNotifyMethod class are listed here.

Methods
Method Description
Create ( 1753)

Legend
Constructor
virtual

TIdNotifyMethod.Create Constructor
Pascal
constructor Create(
AMethod: TIdThreadMethod
); virtual; reintroduce;
Parameters
Parameters Description
AMethod Type is TIdThreadMethod ( 3093).

Description
Create is a reintroduced,virtual constructor for the object instance.

TIdNovellBaseFTPListItem Class
File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdNovellBaseFTPListItem = class(TIdOwnerFTPListItem);

Internet Direct (Indy) Version 10.1.5 1753


TIdNovellNetwareFTPListItem Class Classes

Description
TIdNovellBaseFTPListItem is a TIdOwnerFTPListItem ( 1765) descendant.

See Also
TIdOwnerFTPListItem ( 1765)

TIdNovellBaseFTPListItem Members
The following tables list the members exposed by TIdNovellBaseFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
NovellPermissions ( 1754)
OwnerName ( 1766)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdNovellBaseFTPListItem Properties
The Properties of the TIdNovellBaseFTPListItem class are listed here.

Properties
Property Description
NovellPermissions ( 1754)

Legend
Property

TIdNovellBaseFTPListItem.NovellPermissions Property
Pascal
property NovellPermissions: string;
Description
NovellPermissions is a Public string property. Write access for the property is implemented using FNovellPermissions.

1754 Internet Direct (Indy) Version 10.1.5


Classes TIdNovellPSU_NFSFTPListItem Class

TIdNovellNetwareFTPListItem Class
File
IdFTPListParseNovellNetware ( 4640)

Hierarchy

Pascal
TIdNovellNetwareFTPListItem = class(TIdNovellBaseFTPListItem);
Description
TIdNovellNetwareFTPListItem is a TIdNovellBaseFTPListItem ( 1753) descendant.

See Also
TIdNovellBaseFTPListItem ( 1753)

TIdNovellPSU_DOSFTPListItem Class
File
IdFTPListParseNovellNetwarePSU ( 4640)

Hierarchy

Pascal
TIdNovellPSU_DOSFTPListItem = class(TIdNovellBaseFTPListItem);
Description
TIdNovellPSU_DOSFTPListItem is a TIdNovellBaseFTPListItem ( 1753) descendant.

See Also
TIdNovellBaseFTPListItem ( 1753)

TIdNovellPSU_NFSFTPListItem Class
File
IdFTPListParseNovellNetwarePSU ( 4640)

Hierarchy

Pascal
TIdNovellPSU_NFSFTPListItem = class(TIdUnixBaseFTPListItem);
Description
TIdNovellPSU_NFSFTPListItem is a TIdUnixBaseFTPListItem ( 2540) descendant.

Internet Direct (Indy) Version 10.1.5 1755


TIdNTLMAuthentication Class Classes

See Also
TIdUnixBaseFTPListItem ( 2540)

TIdNTLMAuthentication Class
File
IdAuthenticationNTLM ( 4588)

Hierarchy

Pascal
TIdNTLMAuthentication = class(TIdAuthentication);
Description
descends from TIdAuthentication ( 253)

See Also
TIdAuthentication ( 253)

TIdNTLMAuthentication Members
The following tables list the members exposed by TIdNTLMAuthentication.

Properties
Property Description
AuthParams ( 256) Represents authentication ( 254) parameters to be used for the process.
CurrentStep ( 257) Identifies the current task number during authentication ( 254) processing.
Params ( 257) Contains authentication ( 254) parameters for the mechanism.
Password ( 257) Represents the authorization credentials for the authentication ( 254) process.
Steps ( 257) Number of tasks required for the authentication ( 254) process.
Username ( 258) Represents the authorization identity for the authentication ( 254) process.

Methods
Method Description
Authentication ( 1757)
Create ( 1757)
Destroy ( 255) Frees the object instance.
KeepAlive ( 1757)
Next ( 255) Identifies the next action in the authentication ( 254) process.
Reset ( 1757)

Legend
Method
virtual
Property
read only

TIdNTLMAuthentication Methods
The Methods of the TIdNTLMAuthentication class are listed here.

1756 Internet Direct (Indy) Version 10.1.5


Classes TIdObjectList Class

Methods
Method Description
Authentication ( 1757)
Create ( 1757)
KeepAlive ( 1757)
Reset ( 1757)

Legend
Method
virtual

TIdNTLMAuthentication.Authentication Method
Pascal
function Authentication: String; override;
Returns
String

Description
overridden returns String type

TIdNTLMAuthentication.Create Constructor
Pascal
constructor Create; override;
Description
overridden

TIdNTLMAuthentication.KeepAlive Method
Pascal
function KeepAlive: Boolean; override;
Returns
Boolean

Description
overridden returns Boolean type

TIdNTLMAuthentication.Reset Method
Pascal
procedure Reset; override;
Description
overridden

TIdObjectList Class
File
IdContainers ( 4605)

Internet Direct (Indy) Version 10.1.5 1757


TIdObjectList Class Classes

Hierarchy

Pascal
TIdObjectList = class(TIdList);
Description
TIdObjectList is a TIdList ( 3055) descendant.

See Also
TIdList ( 3055)

TIdObjectList Members
The following tables list the members exposed by TIdObjectList.

Properties
Property Description
Items ( 1762)
OwnsObjects ( 1762)

Methods
Method Description
Add ( 1759)
Assign ( 1759)
BubbleSort ( 1759)
FindInstanceOf ( 1760)
IndexOf ( 1760)
Insert ( 1761)
Remove ( 1761)
Create ( 1759)

Legend
Method
Property

TIdObjectList Methods
The Methods of the TIdObjectList class are listed here.

Methods
Method Description
Add ( 1759)
Assign ( 1759)
BubbleSort ( 1759)
Create ( 1759)
FindInstanceOf ( 1760)
IndexOf ( 1760)
Insert ( 1761)
Remove ( 1761)

Legend
Method

1758 Internet Direct (Indy) Version 10.1.5


Classes TIdObjectList Class

TIdObjectList.Add Method
Pascal
function Add(
AObject: TObject
): Integer;
Parameters
Parameters Description
AObject Type is TObject.

Returns
Integer

Description
Add is a method.

Add returns a Integer value.

TIdObjectList.Assign Method
Pascal
procedure Assign(
Source: TIdObjectList
);
Parameters
Parameters Description
Source Type is TIdObjectList ( 1757).

Description
Assign is a method.

TIdObjectList.BubbleSort Method
Pascal
procedure BubbleSort(
ACompare: TIdSortCompare
);
Parameters
Parameters Description
ACompare Type is TIdSortCompare ( 3085).

Description
BubbleSort is a method.

TIdObjectList.Create Constructor
Overload List

Method Description
TIdObjectList.Create () ( 1760)
TIdObjectList.Create (Boolean) ( 1760)

Internet Direct (Indy) Version 10.1.5 1759


TIdObjectList Class Classes

TIdObjectList.Create Constructor ()
Pascal
constructor Create; overload;
Description
Create is a overloaded constructor for the object instance.

See Also
TIdObjectList.Create

TIdObjectList.Create Constructor (Boolean)


Pascal
constructor Create(
AOwnsObjects: Boolean
); overload;
Parameters
Parameters Description
AOwnsObjects Type is Boolean.

Description
Create is the overloaded constructor for the object instance.

See Also
TIdObjectList.Create

TIdObjectList.FindInstanceOf Method
Pascal
function FindInstanceOf(
AClassRef: TClass;
AMatchExact: Boolean = True;
AStartPos: Integer = 0
): Integer;
Parameters
Parameters Description
AClassRef Type is TClass.
AMatchExact Type is Boolean. Default value is True.
AStartPos Type is Integer. Default value is 0.

Returns
Integer

Description
FindInstanceOf is a method.

FindInstanceOf returns a Integer value.

TIdObjectList.IndexOf Method
Pascal
function IndexOf(
AObject: TObject
): Integer;

1760 Internet Direct (Indy) Version 10.1.5


Classes TIdObjectList Class

Parameters
Parameters Description
AObject Type is TObject.

Returns
Integer

Description
IndexOf is a method.

IndexOf returns a Integer value.

TIdObjectList.Insert Method
Pascal
procedure Insert(
AIndex: Integer;
AObject: TObject
);
Parameters
Parameters Description
AIndex Type is Integer.
AObject Type is TObject.

Description
Insert is a method.

TIdObjectList.Remove Method
Pascal
function Remove(
AObject: TObject
): Integer;
Parameters
Parameters Description
AObject Type is TObject.

Returns
Integer

Description
Remove is a method.

Remove returns a Integer value.

TIdObjectList Properties
The Properties of the TIdObjectList class are listed here.

Properties
Property Description
Items ( 1762)
OwnsObjects ( 1762)

Legend
Property

Internet Direct (Indy) Version 10.1.5 1761


TIdOTPCalculator Class Classes

TIdObjectList.Items Property
Pascal
property Items [AIndex: Integer]: TObject;
Description
Items is a Public TObject property. Write access for the property is implemented using SetItem.

Items is the default property for the object instance.

TIdObjectList.OwnsObjects Property
Pascal
property OwnsObjects: Boolean;
Description
OwnsObjects is a Public Boolean property. Write access for the property is implemented using FOwnsObjects.

TIdOS2FTPListItem Class
File
IdFTPListParseOS2 ( 4641)

Hierarchy

Pascal
TIdOS2FTPListItem = class(TIdDOSBaseFTPListItem);
Description
TIdOS2FTPListItem is a TIdDOSBaseFTPListItem ( 627) descendant.

See Also
TIdDOSBaseFTPListItem ( 627)

TIdOTPCalculator Class
File
IdOTPCalculator ( 4696)

Hierarchy

Pascal
TIdOTPCalculator = class;
Description
TIdOTPCalculator is a TObject descendant.

See Also
TObject

1762 Internet Direct (Indy) Version 10.1.5


Classes TIdOTPCalculator Class

TIdOTPCalculator Members
The following tables list the members exposed by TIdOTPCalculator.

Methods
Method Description
GenerateKeyMD4 ( 1763)
GenerateKeyMD5 ( 1763)
GenerateKeySHA1 ( 1764)
ToHex ( 1764)
ToSixWordFormat ( 1765)

Legend
Method

TIdOTPCalculator Methods
The Methods of the TIdOTPCalculator class are listed here.

Methods
Method Description
GenerateKeyMD4 ( 1763)
GenerateKeyMD5 ( 1763)
GenerateKeySHA1 ( 1764)
ToHex ( 1764)
ToSixWordFormat ( 1765)

Legend
Method

TIdOTPCalculator.GenerateKeyMD4 Method
Pascal
class function GenerateKeyMD4(
const ASeed: string;
const APassword: string;
const ACount: integer
): int64;
Parameters
Parameters Description
ASeed Scope is const. Type is string.
APassword Scope is const. Type is string.
ACount Scope is const. Type is integer.

Returns
int64

Description
GenerateKeyMD4 is a class method.

GenerateKeyMD4 returns a int64 value.

TIdOTPCalculator.GenerateKeyMD5 Method
Pascal
class function GenerateKeyMD5(

Internet Direct (Indy) Version 10.1.5 1763


TIdOTPCalculator Class Classes

const ASeed: string;


const APassword: string;
const ACount: integer
): int64;
Parameters
Parameters Description
ASeed Scope is const. Type is string.
APassword Scope is const. Type is string.
ACount Scope is const. Type is integer.

Returns
int64

Description
GenerateKeyMD5 is a class method.

GenerateKeyMD5 returns a int64 value.

TIdOTPCalculator.GenerateKeySHA1 Method
Pascal
class function GenerateKeySHA1(
const ASeed: string;
const APassword: string;
const ACount: integer
): int64;
Parameters
Parameters Description
ASeed Scope is const. Type is string.
APassword Scope is const. Type is string.
ACount Scope is const. Type is integer.

Returns
int64

Description
GenerateKeySHA1 is a class method.

GenerateKeySHA1 returns a int64 value.

TIdOTPCalculator.ToHex Method
Pascal
class function ToHex(
const AKey: int64
): string;
Parameters
Parameters Description
AKey Scope is const. Type is int64.

Returns
string

Description
ToHex is a class method.

ToHex returns a string value.

1764 Internet Direct (Indy) Version 10.1.5


Classes TIdOwnerFTPListItem Class

TIdOTPCalculator.ToSixWordFormat Method
Pascal
class function ToSixWordFormat(
const AKey: int64
): string;
Parameters
Parameters Description
AKey Scope is const. Type is int64.

Returns
string

Description
ToSixWordFormat is a class method.

ToSixWordFormat returns a string value.

TIdOwnerFTPListItem Class
File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdOwnerFTPListItem = class(TIdFTPListItem);
Description
TIdOwnerFTPListItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

TIdOwnerFTPListItem Members
The following tables list the members exposed by TIdOwnerFTPListItem.

Properties
Property Description
Data ( 855) Data from a directory listing response used to populate properties in the collection item.
FileName ( 855) Name for a file as assigned on the remote FTP server.
ItemType ( 855) Indicates the type of item represented by the collection entry.
LocalFileName ( 855) Suggested file name to used for the local file system.
ModifiedAvail ( 856) Indicates if last modification date and time values are available for the collection item.
ModifiedDate ( 856) Last modification date and time for the resource on the remote FTP server.
OwnerName ( 1766)
PermissionDisplay ( 856) User-displayable representation of permissions for the collection item.
Size ( 857) Indicates the allocated size for the file resource on the remote FTP server.
SizeAvail ( 857) Indicates if file size information is available in the Size ( 857) property for the collection item.

Internet Direct (Indy) Version 10.1.5 1765


TIdPacketInfo Class Classes

Methods
Method Description
Assign ( 853) Copies property values from another structured directory listing entry.
Create ( 853) Constructor for the collection item.
Destroy ( 854) Frees the collection item.

Legend
Property
Method
virtual

TIdOwnerFTPListItem Properties
The Properties of the TIdOwnerFTPListItem class are listed here.

Properties
Property Description
OwnerName ( 1766)

Legend
Property

TIdOwnerFTPListItem.OwnerName Property
Pascal
property OwnerName: String;
Description
OwnerName is a Public String property. Write access for the property is implemented using FOwnerName.

TIdPacketInfo Class
Represents information about the source and destination for packets transmitted using the protocol stack.

File
IdStack ( 4727)

Hierarchy

Pascal
TIdPacketInfo = class;
Description
TIdPacketInfo is a TObject descendant used to store information about the hop count, source, and destination for packets read and
written using the API methods for the protocol stack.

TIdPacketInfo stores values that identify the IP address, port number, and network interface used for both the host sending the
packet (source) and the remote endpoint (destination). when sending packets, the values in the SourceIP ( 1769), SourcePort (
1770), and SourceIF ( 1769) properties all refer to the local computer system. When receiving packet transmissions, the values in
the SourceIP ( 1769), SourcePort ( 1770), and SourceIF ( 1769) properties all refer to the remote endpoint for the transmission.

In addition, TIdPacketInfo captures the TTL ( 1770) (Time-to-live) value that indicates the number of hops required to complete
the packet transmission.

1766 Internet Direct (Indy) Version 10.1.5


Classes TIdPacketInfo Class

TIdPacketInfo instances are used as an argument in the ReceiveMsg, ReceiveFrom, and SendTo methods in TIdStack ( 2156)
and descendant classes.

See Also
TIdStack.SendTo ( 2178)

TIdStack.ReceiveFrom ( 2175)

TIdStack.ReceiveMsg ( 2176)

TIdPacketInfo Members
The following tables list the members exposed by TIdPacketInfo.

Properties
Property Description
DestIF ( 1767) Network interface for the destination endpoint of the packet transmission.
DestIP ( 1768) IP address for for the destination endpoint of the packet transmission.
DestPort ( 1768) Port number for the destination endpoint of the packet transmission.
SourceIF ( 1769) Network interface for the originating endpoint of the packet transmission.
SourceIP ( 1769) IP address for for the originating endpoint of the packet transmission.
SourcePort ( 1770) Port number for the originating endpoint of the packet transmission.
TTL ( 1770) Rpresents the Time-To-Live (or hop count) for the packet transmission.

Legend
Property

TIdPacketInfo Properties
The Properties of the TIdPacketInfo class are listed here.

Properties
Property Description
DestIF ( 1767) Network interface for the destination endpoint of the packet transmission.
DestIP ( 1768) IP address for for the destination endpoint of the packet transmission.
DestPort ( 1768) Port number for the destination endpoint of the packet transmission.
SourceIF ( 1769) Network interface for the originating endpoint of the packet transmission.
SourceIP ( 1769) IP address for for the originating endpoint of the packet transmission.
SourcePort ( 1770) Port number for the originating endpoint of the packet transmission.
TTL ( 1770) Rpresents the Time-To-Live (or hop count) for the packet transmission.

Legend
Property

TIdPacketInfo.DestIF Property
Network interface for the destination endpoint of the packet transmission.

Pascal
property DestIF: Cardinal;
Description
DestIF is a Cardinal property that represents the network interface on the destination endpoint used to read or write the contents of
a packet transmission.

DestIP ( 1768) and DestPort ( 1768) are used to represent the IP address and port number on the destination endpoint used for
the packet transmission.

Use SourceIF ( 1769), SourceIP ( 1769), and SourcePort ( 1770) to access the interface, IP address, and port number

Internet Direct (Indy) Version 10.1.5 1767


TIdPacketInfo Class Classes

information for the originating endpoint for the packet transmission.

See Also
DestIP ( 1768)

DestPort ( 1768)

SourceIF ( 1769)

SourceIP ( 1769)

SourcePort ( 1770)

TIdPacketInfo.DestIP Property
IP address for for the destination endpoint of the packet transmission.

Pascal
property DestIP: String;
Description
DestIP is a String property that represents the IP address on the destination endpoint used to read or write the contents of a packet
transmission.

DestIF ( 1767), DestIP, and DestPort ( 1768) are used to represent the network interface, IP address, and port number on the
destination endpoint used for the packet transmission.

Use SourceIF ( 1769), SourceIP ( 1769), and SourcePort ( 1770) to access the interface, IP address, and port number
information for the originating endpoint for the packet transmission.

See Also
DestIF ( 1767)

DestIP

DestPort ( 1768)

SourceIF ( 1769)

SourceIP ( 1769)

SourcePort ( 1770)

TIdPacketInfo.DestPort Property
Port number for the destination endpoint of the packet transmission.

Pascal
property DestPort: Integer;
Description
DestPort is an Integer property that represents the port number on the destination endpoint used to read or write the contents of a
packet transmission.

Use DestIF ( 1767) and DestIP ( 1768) to access the network interface and IP address on the destination endpoint used for the
packet transmission.

Use SourceIF ( 1769), SourceIP ( 1769), and SourcePort ( 1770) to access the interface, IP address, and port number
information for the originating endpoint for the packet transmission.

See Also
DestIF ( 1767)

DestIP ( 1768)

1768 Internet Direct (Indy) Version 10.1.5


Classes TIdPacketInfo Class

DestPort

SourceIF ( 1769)

SourceIP ( 1769)

SourcePort ( 1770)

TIdPacketInfo.SourceIF Property
Network interface for the originating endpoint of the packet transmission.

Pascal
property SourceIF: Cardinal;
Description
SourceIF is a Cardinal property that represents the network interface on the originating endpoint used to read or write the contents
of a packet transmission.

Use SourceIP ( 1769), and SourcePort ( 1770) to access the IP address, and port number information for the originating
endpoint for the packet transmission.

Use DestIF ( 1767), DestIP ( 1768), and DestPort ( 1768) to access the network interface, IP address, and port number on the
destination endpoint used for the packet transmission.

See Also
DestIF ( 1767)

DestIP ( 1768)

DestPort ( 1768)

SourceIF

SourceIP ( 1769)

SourcePort ( 1770)

TIdPacketInfo.SourceIP Property
IP address for for the originating endpoint of the packet transmission.

Pascal
property SourceIP: String;
Description
SourceIP is a String property that represents the IP address on the originating endpoint used to read or write the contents of a
packet transmission.

Use SourceIF ( 1769) and SourcePort ( 1770) to access the network interface and port number information for the originating
endpoint for the packet transmission.

Use DestIF ( 1767), DestIP ( 1768), and DestPort ( 1768) to access the network interface, IP address, and port number on the
destination endpoint used for the packet transmission.

See Also
DestIF ( 1767)

DestIP ( 1768)

DestPort ( 1768)

SourceIF ( 1769)

SourceIP

Internet Direct (Indy) Version 10.1.5 1769


TIdPCNFSDFTPListItem Class Classes

SourcePort ( 1770)

TIdPacketInfo.SourcePort Property
Port number for the originating endpoint of the packet transmission.

Pascal
property SourcePort: Integer;
Description
SourcePort is an Integer property that represents the port number on the originating endpoint used to read or write the contents of a
packet transmission.

Use SourceIF ( 1769) and SourceIP ( 1769) to access the network interface and IP address for the originating endpoint for the
packet transmission.

Use DestIF ( 1767), DestIP ( 1768), and DestPort ( 1768) to access the network interface, IP address, and port number on the
destination endpoint used for the packet transmission.

See Also
DestIF ( 1767)

DestIP ( 1768)

DestPort ( 1768)

SourceIF ( 1769)

SourceIP ( 1769)

SourcePort

TIdPacketInfo.TTL Property
Rpresents the Time-To-Live (or hop count) for the packet transmission.

Pascal
property TTL: Byte;
Description
TTL is a Byte property that represents the Time-To-Live value (or hop count) for the packet transmission.

The Time To Live value exists in the header for each packet sent in an IP transmission. The value in TTL is normally specified by
the originating endpoint for the transmission. As a packet crosses each router, the router decrements this value by 1. If the packet
traverses enough routers for the value to reach 0, routers will no longer forward this packet.

TIdPCNFSDFTPListItem Class
File
IdFTPListParsePCNFSD ( 4641)

Hierarchy

Pascal
TIdPCNFSDFTPListItem = class(TIdFTPListItem);
Description
TIdPCNFSDFTPListItem is a TIdFTPListItem ( 851) descendant.

1770 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

See Also
TIdFTPListItem ( 851)

TIdPersistentHelper Class Helper


File
IdObjs ( 4694)

Hierarchy

Pascal
TIdPersistentHelper = class helper(TIdNetPersistentHelper) for TIdPersistent;
Description
TIdPersistent ( 3073)

TIdPersistentHelper Members
The following tables list the members exposed by TIdPersistentHelper.

Methods
Method Description
Create ( 1771)

Legend
Constructor
virtual

TIdPersistentHelper Methods
The Methods of the TIdPersistentHelper class are listed here.

Methods
Method Description
Create ( 1771)

Legend
Constructor
virtual

TIdPersistentHelper.Create Constructor
Pascal
constructor Create; override;
Description
TIdPersistent ( 3073)

Internet Direct (Indy) Version 10.1.5 1771


TIdPOP3 Class Classes

TIdPOP3 Class
Implements a POP3 client.

File
IdPOP3 ( 4696)

Hierarchy

Pascal
TIdPOP3 = class(TIdMessageClient);
Description
TIdPOP3 is a TIdMessageClient ( 1555) descendant that provides a client implementation of the Post Office Protocol version 3
(POP3), as described in the Internet Standards documents:

RFC 1939 - Post Office Protocol Version 3

RFC 1734 - POP3 AUTHentication command

RFC 1957 - Some Observations on Implementations of the Post Office Protocol (POP3)

RFC 2595 - Using TLS with IMAP, POP3 and ACAP

TIdPOP3 also implements support for Simple Authentication and Security Layer (SASL), as described in the Internet Standards
document:

RFC 2222 - Simple Authentication and Security Layer (SASL)

TIdPOP3 is used to retrieve ( 1778) E-Mail messages on a mail server and return the messages to the user's computer. TIdPOP3
provides methods and properties that allow a client account to connect ( 1775) to a POP3 server, and to retreive various
information about the size and contents of a mail box or email message.

TIdPOP3 is not intended to provide extensive manipulation operations of mail on the server; normally, mail is downloaded and then
deleted. Use TIdIMAP4 ( 1150) and TIdIMAP4Server ( 1253) when a more advanced (and complex) mail protocol is required.

See Also
TIdIMAP4 ( 1150)

IndySupport ( 15)

TIdPOP3 Members
The following tables list the members exposed by TIdPOP3.

Properties
Property Description
AuthType ( 1782) Authentication type required for the POP3 client.
AutoLogin ( 1783) Indicates if POP3 session authentication is performed as soon as the connection is established.
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
Capabilities ( 690)
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
HasAPOP ( 1783)

1772 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

HasCAPA ( 1783) Indicates the POP3 CAPA ( 1774) command is supported on the server.
Host ( 1784) IP address or host name for the POP3 server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
MsgLineFold ( 1561) Identifies the line folding character sequence for the message client.
MsgLineLength ( 1561) Maximum line length.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 1784) Credentials for authentication the POP3 account.
Port ( 1784) Port number for the connection to the POP3 server.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
SASLMechanisms ( 1785) Simple Authentication and Security Layer mechanisms available for the POP3 client connection.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
SupportsTLS ( 690)
Username ( 1785) Identitity for the POP3 account.
UseTLS ( 1785) Indicates the transport-level security for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CAPA ( 1774) Indicates the POP3 CAPA command is supported for the POP3 client connection.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
CheckMessages ( 1775) Determines the number of messages stored in the mailbox for the POP3 account.
Connect ( 1775) Opens a POP3 client connection.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Delete ( 1775) Marks a message for deletion on the POP3 server.
Destroy ( 1776) Frees the object instance.
DisconnectNotifyPeer ( 1776) Closes the client connection to the POP3 server.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
KeepAlive ( 1777) Prevents a connection timeout.
Login ( 1777) Perform authentication for the POP3 account.
Reset ( 1778) Reset messages marked for deletion.
Retrieve ( 1778) Retrieves a message from the POP3 mailbox by its message number.
RetrieveHeader ( 1779) Retrieves headers for a message.
RetrieveMailBoxSize ( 1779) Gets the mailbox size on the POP3 server.
RetrieveMsgSize ( 1780) Gets the size of a message in the mailbox.
SendMsg ( 1560) Sends message headers and body content on the client connection.
CType ( 267)
Create ( 1274)
ProcessMessage ( 1558)
RetrieveRaw ( 1780)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)

Internet Direct (Indy) Version 10.1.5 1773


TIdPOP3 Class Classes

SendCmd ( 2360)
Top ( 1781)
UIDL ( 1781)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.
OnTLSHandShakeFailed ( 690)
OnTLSNegCmdFailed ( 690)
OnTLSNotAvailable ( 691)

Legend
Method
virtual
Property
read only
Event

TIdPOP3 Methods
The Methods of the TIdPOP3 class are listed here.

Methods
Method Description
CAPA ( 1774) Indicates the POP3 CAPA command is supported for the POP3 client connection.
CheckMessages ( 1775) Determines the number of messages stored in the mailbox for the POP3 account.
Connect ( 1775) Opens a POP3 client connection.
Delete ( 1775) Marks a message for deletion on the POP3 server.
Destroy ( 1776) Frees the object instance.
DisconnectNotifyPeer ( 1776) Closes the client connection to the POP3 server.
KeepAlive ( 1777) Prevents a connection timeout.
Login ( 1777) Perform authentication for the POP3 account.
Reset ( 1778) Reset messages marked for deletion.
Retrieve ( 1778) Retrieves a message from the POP3 mailbox by its message number.
RetrieveHeader ( 1779) Retrieves headers for a message.
RetrieveMailBoxSize ( 1779) Gets the mailbox size on the POP3 server.
RetrieveMsgSize ( 1780) Gets the size of a message in the mailbox.
RetrieveRaw ( 1780)
Top ( 1781)
UIDL ( 1781)

Legend
Method
virtual

TIdPOP3.CAPA Method
Indicates the POP3 CAPA command is supported for the POP3 client connection.

Pascal
function CAPA: Boolean;
Returns
Boolean - True when the POP3 SMTP CAPA command is supported for the connection.

Description
CAPA is a Boolean function used to determine if the POP3 CAPA command is supported for the client connection to the POP3

1774 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

server. CAPA is used to capture the Capabilities ( 690) returned in the SMTP response.

CAPA returns True when the command is supported by the destination POP3 server for the connection. HasCAPA ( 1783) is also
set to True when the CAPA command is supported.

CAPA is used in Connect ( 1775) after the connection to the POP3 server identified in Host ( 1784) and Port ( 1784) has been
established, and the value in GreetingBanner has been read from the server response.

See Also
TIdPOP3.HasCAPA ( 1783) TIdPOP3.Connect ( 1775) TIdPOP3.GreetingBanner

TIdPOP3.CheckMessages Method
Determines the number of messages stored in the mailbox for the POP3 account.

Pascal
function CheckMessages: LongInt;
Returns
longint - Number of messages in the mailbox for the POP3 client connection.

Description
CheckMessages is a longint function used to determine the number of messages stored on the POP3 server for the POP3 account.

CheckMessages sends the POP3 STAT command to request the statistics for the mailbox, and converts the value in the POP3
response to its numeric form.

An exception may be raised if the server for the POP3 client connection does not support the STAT command.

The connection to the POP3 server must already be established and authenticated using Connect ( 1775) or Login ( 1777) prior
to calling CheckMessages.

TIdPOP3.Connect Method
Opens a POP3 client connection.

Pascal
procedure Connect; override;
Description
Connect is a procedure used to establish a connection to the POP3 server using the values specified in the Host ( 1784) and Port
( 1784) properties.

Connect resets the HasCAPA ( 1783) property to False.

When UseTLS ( 1785) indicates transport-level security is desired, Connect adjusts the passthrough property of the IOHandler (
2364) to match the value in UseTLS ( 1785).

Connect calls the inherited Connect method, and waits for a valid connection for the required number of milliseconds.

Connects sets the value in GreetingBanner using the POP3 response from the server, and calls CAPA ( 1774) to determine if
Capabilities ( 690) are supported on the server implementation.

When AutoLogin ( 1783) contains True, Connect calls Login ( 1777) to perform account authentication. Use Login ( 1777) top
( 1781) perform the account authentication manually.

Use Disconnect ( 2355) to commit message deletions in the mailbox, and close the POP3 client connection.

TIdPOP3.Delete Method
Marks a message for deletion on the POP3 server.

Internet Direct (Indy) Version 10.1.5 1775


TIdPOP3 Class Classes

Pascal
function Delete(
const MsgNum: Integer
): Boolean;
Parameters
Parameters Description
MsgNum Message number to be removed.

Returns
Boolean - True when the result is wsOK.

Description
Delete is a Boolean function that marks a message on the POP3 server for deletion using the message number specified in
MsgNum. If a non-existent message number is used, an exception is raised.

Delete uses SendCmd ( 2360) to execute the POP DELE command that marks the indicated message number for deletion.
Messages marked for deletion on the POP3 server will be physically removed when Disconnect ( 2355) is called. Use Reset (
1778) to clear all message deletion marks anytime prior to calling Disconnect ( 2355).

Delete returns True when the result for the operation, as indicated by LastCmdResult ( 2367), contains the value ST_OK ( 4386).

See Also
TIdPOP3.Disconnect ( 2355) TIdPOP3.Reset ( 1778)

TIdPOP3.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy calls the inherited destructor prior to exiting from the method.

TIdPOP3.DisconnectNotifyPeer Method
Closes the client connection to the POP3 server.

Pascal
procedure DisconnectNotifyPeer; override;
Description
DisconnectNotifyPeer is an overridden method in TIdPOP3 ( 1772) used to close the client connection to the POP3 server opened
in Connect ( 1775).

DisconnectNotifyPeer implements the POP3 QUIT command to signal that the client session and connection will be closed. All
messages marked for deletion on the POP3 server will be physically removed from the server mailbox when DisconnectNotifyPeer
is called.

Use Reset ( 1778) to remove all message deletion marks created using the Delete ( 1775) method (and leave the messages in
the POP3 mailbox) prior to calling DisconnectNotifyPeer or Disconnect ( 2355).

Use Disconnect ( 2355) to closed the client connection and leave messages marked for deletion intact on the POP3 server.

DisconnectNotifyPeer calls the inherited DisconnectNotifyPeer method prior to exiting.

See Also
Reset ( 1778) Disconnect ( 2355) Login ( 1777)

1776 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

TIdPOP3.KeepAlive Method
Prevents a connection timeout.

Pascal
procedure KeepAlive;
Description
KeepAlive is a procedure used to ensure that the POP3 protocol session remains open and valid.

KeepAlive sends the POP3 NOOP command to avoid a session timeout for the POP3 client. TIdPOP3 ( 1772) can use KeepAlive
when performing time consuming operations, such as maintaining mail folders and messages on local file system, after the POP3
session has be started in Connect ( 1775).

See Also
TIdPOP3.Connect ( 1775)

TIdPOP3.Delete ( 1775)

TIdPOP3.Login Method
Perform authentication for the POP3 account.

Pascal
procedure Login; virtual;
Description
Login is a procedure used to perform authentication for the POP3 account.

When transport-level security is used for the connection, Login uses UseTLS ( 1785) to perform the POP3 STLS command for the
negotiated transport-level security.

Login uses the value in AuthType ( 1782) to determine the mechanism used in authenticating the POP3 client to the server
identified in Host ( 1784) and Port ( 1784).

When AuthType ( 1782) is atAPOP, the POP3 APOP command is used for authentication. The value in GreetingBanner is used to
construct the 128-bit MD5 hash value (in hexadecimal form) for the authentication request. An EIdDoesNotSupportAPOP ( 74)
exception is raised if the APOP authentication mechanism is not supported on the POP3 server.

When AuthType ( 1782) is atUserPass, the POP3 USER and PASS commands are used with the Username ( 1785) and
Password ( 1784) properties to perform authentication for the POP3 client connection.

When AuthType ( 1782) is atSASL, the SASLMechanisms.LoginSASL method is used to perform authentication for the
Capabilities ( 690) supported on the connection to the server. An EIdSASLMechNeeded ( 143) exception is raised is
SASLMechanisms ( 1785) is unassigned or no longer contains a valid SASL authentication mechanism.

If an exception occurs while performing the Login method, Disconnect ( 2355) is called and the exception is re-raised prior to exit.

Login is called form the Connect ( 1775) method when the AutoLogin ( 1783) property contains True. This is the default behavior
for the POP3 component. Set AutoLogin ( 1783) to False to perform Login sometime after establishing the POP3 client connection.

Exceptions
Exceptions Description
EIdDoesNotSupportAPOP ( 74) With the message RSPOP3ServerDoNotSupportAPOP.
EIdSASLMechNeeded ( 143) With the message RSASLRequired.

See Also
TIdPOP3.Connect ( 1775)

TIdPOP3.Login

TIdPOP3.CAPA ( 1774)

Internet Direct (Indy) Version 10.1.5 1777


TIdPOP3 Class Classes

TIdPOP3.AuthType ( 1782)

TIdPOP3.SASLMechanisms ( 1785)

TIdPOP3.Reset Method
Reset messages marked for deletion.

Pascal
function Reset: Boolean;
Returns
Boolean - True on success, False on error.

Description
Reset is a Boolean function that clears the deletion flag for any messages that have been marked for deletion.

Reset performs the POP3 RSET command to remove the deletion flag for messages in the mailbox on the POP3 server.

The return value for Reset will be True when the numeric result in LastCmdResult ( 2367) contains ST_OK ( 4386). If an error
occurs, the return value will be False.

Message marked for deletion are physically removed when calling Disconnect ( 2355). Use Reset prior to calling Disconnect (
2355) to clear the deletion flags.

Some POP3 servers do not support the POP3 RSET command.

See Also
TIdPOP3.Disconnect ( 2355)

TIdPOP3.Retrieve Method
Retrieves a message from the POP3 mailbox by its message number.

Pascal
function Retrieve(
const MsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
MsgNum Message number to retrieve from the server.
AMsg Message instance where the retrieved values will be stored.

Returns
Boolean - True on success.

Description
Retrieve is a Boolean function that retrieves the message with the message number specified in MsgNo, and stores the result in the
TIdMessage ( 1521) instance specified by AMsg. The message in AMsg is cleared prior top ( 1781) reading values the mailbox
for the POP3 account.

Retrieve executes the POP3 RETR command for the specified message number, and checks for the ST_OK ( 4386) response
from the server prior to processing the contents of the message.

Retrieve reads both the message headers and the message body (and optional attachments) into AMsg.

Retrieve sets the return value for the method to True if no exception is raised during the method and the server response contains
ST_OK ( 4386).

See Also
TIdMessage ( 1521) RetrieveHeader ( 1779) RetrieveMailBoxSize ( 1779) RetrieveMsgSize ( 1780) RetrieveRaw ( 1780)

1778 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

TIdPOP3.RetrieveHeader Method
Retrieves headers for a message.

Pascal
function RetrieveHeader(
const MsgNum: Integer;
AMsg: TIdMessage
): Boolean;
Parameters
Parameters Description
MsgNum Message number to be retrieved.
AMsg Message instance where headers will be stored.

Returns
Boolean - True on success.

Description
RetrieveHeader is a Boolean function that retrieves the headers for the message number specified in MsgNum, and stores the
header values in the TIdMessage ( 1521) instance specified in AMsg.

RetrieveHeader uses SendCmd ( 2360) to send the POP3 TOP command for the specified message number. The POP3 TOP
command is an optional POP3 feature, and may not be implemented on all POP3 servers. An EIdReplyPOP3Error ( 138) will be
raised if the POP3 server response does not contain the numeric values expected for the multi-line response.

RetrieveHeader captures the multi-line response containing the message headers in the TIdMessage ( 1521) instance specified in
AMsg.

The return value for the method is set to True on successful completion of both the POP3 TOP command and capture of the
message headers in AMsg.

Example
(Delphi) Retrieving messsage headers from a POP3 mailbox.
// IdPOP3: TIdPOP3;
// IdMessage: TIdMessage;

try
IdPOP3.RetrieveHeader(1, IdMessage);
except
on E: EIdReplyPOP3Error do ShowMessage(E.Message);
end;
See Also
ReceiveHeader SendCmd ( 2360) EIdReplyPOP3Error ( 138) TIdMessage ( 1521)

TIdPOP3.RetrieveMailBoxSize Method
Gets the mailbox size on the POP3 server.

Pascal
function RetrieveMailBoxSize: integer;
Returns
Integer - Mailbox size in bytes, or -1 on error.

Description
RetrieveMailBoxSize is an Integer function that retrieves the total size of the mailbox on the POP server.

RetrieveMailBoxSize uses the POP3 LIST command to accumulate the total mailbox size from the values returned for individual
messages.

Internet Direct (Indy) Version 10.1.5 1779


TIdPOP3 Class Classes

The return value is expressed in bytes and may contain 0 (zero) when the mailbox is empty, or -1 when an exception is raised.

Use RetrieveMsgSize ( 1780) to get the number of bytes required to store a specific message number in the mailbox for the POP3
account.

TIdPOP3.RetrieveMsgSize Method
Gets the size of a message in the mailbox.

Pascal
function RetrieveMsgSize(
const MsgNum: Integer
): Integer;
Parameters
Parameters Description
MsgNum Message number to examine.

Returns
Integer - Number of bytes in the message.

Description
RetrieveMsgSize is an Integer function that retrieves the size of the message specified in MsgNum in the POP3 mailbox.

The return value for RetrieveMsgSize is expressed in bytes, and may contain -1 if an error occurs wile trying to access the mailbox
or the specified message number on the POP3 server.

RetrieveMsgSize executes the POP3 LIST command with the message number identified in MsgNum. RetrieveMsgSize will extract
the numeric message size from the text returned in the LastCmdResult ( 2367) property, or -1 when a server or a protocol error is
encountered.

TIdPOP3.RetrieveRaw Method
Overload List

Method Description
TIdPOP3.RetrieveRaw (Integer,
TIdStream) ( 1780)
TIdPOP3.RetrieveRaw (Integer,
TIdStrings) ( 1781)

TIdPOP3.RetrieveRaw Method (Integer, TIdStream)


Pascal
function RetrieveRaw(
const aMsgNo: Integer;
const aDest: TIdStream
): boolean; overload;
Parameters
Parameters Description
aMsgNo Scope is const. Type is Integer.
aDest Scope is const. Type is TIdStream ( 3087).

Returns
boolean

Description
RetrieveRaw is a overloaded method.

1780 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

RetrieveRaw returns a boolean value.

See Also
TIdPOP3.RetrieveRaw

TIdPOP3.RetrieveRaw Method (Integer, TIdStrings)


Pascal
function RetrieveRaw(
const aMsgNo: Integer;
const aDest: TIdStrings
): boolean; overload;
Parameters
Parameters Description
aMsgNo Scope is const. Type is Integer.
aDest Scope is const. Type is TIdStrings ( 3089).

Returns
boolean

Description
RetrieveRaw is a overloaded method.

RetrieveRaw returns a boolean value.

See Also
TIdPOP3.RetrieveRaw

TIdPOP3.Top Method
Pascal
function Top(
const AMsgNum: Integer;
const ADest: TIdStrings;
const AMaxLines: Integer = 0
): boolean;
Parameters
Parameters Description
AMsgNum Scope is const. Type is Integer.
ADest Scope is const. Type is TIdStrings ( 3089).
AMaxLines Scope is const. Type is Integer. Default value is 0.

Returns
boolean

Description
Top is a method.

Top returns a boolean value.

TIdPOP3.UIDL Method
Pascal
function UIDL(
const ADest: TIdStrings;
const AMsgNum: Integer = -1
): Boolean;

Internet Direct (Indy) Version 10.1.5 1781


TIdPOP3 Class Classes

Parameters
Parameters Description
ADest Scope is const. Type is TIdStrings ( 3089).
AMsgNum Scope is const. Type is Integer. Default value is -1.

Returns
Boolean

Description
UIDL is a method.

UIDL returns a Boolean value.

TIdPOP3 Properties
The Properties of the TIdPOP3 class are listed here.

Properties
Property Description
AuthType ( 1782) Authentication type required for the POP3 client.
AutoLogin ( 1783) Indicates if POP3 session authentication is performed as soon as the connection is established.
HasAPOP ( 1783)
HasCAPA ( 1783) Indicates the POP3 CAPA ( 1774) command is supported on the server.
Host ( 1784) IP address or host name for the POP3 server.
Password ( 1784) Credentials for authentication the POP3 account.
Port ( 1784) Port number for the connection to the POP3 server.
SASLMechanisms ( 1785) Simple Authentication and Security Layer mechanisms available for the POP3 client connection.
Username ( 1785) Identitity for the POP3 account.
UseTLS ( 1785) Indicates the transport-level security for the connection.

Legend
Property
read only

TIdPOP3.AuthType Property
Authentication type required for the POP3 client.

Pascal
property AuthType: TIdPOP3AuthenticationType;
Description
AuthType is a TIdPOP3AuthenticationType ( 2972) property that specifies the authentication type to use when authenticating the
POP3 client to the server identified in Host ( 1784) and Port ( 1784).

AuthType can contain one of the following values and associated meanings:

Value Meaning
atUserPass Authenticate using a username and password for the client.
atAPOP Alternate authentication using a 128-bit MD5 hash value.
atSASL Authenticate using SASL mechanisms.

AuthType is used in Login ( 1777) to determine the authentication protocol used to perform the operation.

When AuthType is atAPOP, the POP3 APOP command is used for authentication. The value in GreetingBanner is used to
construct the 128-bit MD5 hash value (in hexadecimal form) for the authentication request.

1782 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

When AuthType is atUserPass, the POP3 USER and PASS commands are used with the Username ( 1785) and Password (
1784) properties to perform authentication for the POP3 client connection.

When AuthType is atSASL, the SASLMechanisms.LoginSASL method is used to perform authentication for the Capabilities ( 690)
supported on the connection to the server.

The default value for AuthType is DEF_ATYPE ( 3181), as assigned in the Create ( 267) constructor.

Set values for the Host ( 1784), Port ( 1784), and AuthType properties prior to calling Connect ( 1775) or Login ( 1777).

See Also
TIdPOP3.Create ( 267)

TIdPOP3.Connect ( 1775)

TIdPOP3.Login ( 1777)

TIdPOP3.CAPA ( 1774)

TIdPOP3.SASLMechanisms ( 1785)

TIdPOP3AuthenticationType ( 2972)

TIdPOP3.AutoLogin Property
Indicates if POP3 session authentication is performed as soon as the connection is established.

Pascal
property AutoLogin: Boolean;
Description
AutoLogin is a Boolean property that indicates if authentication for the POP3 session should be performed as soon as the
connection is established.

AutoLogin is used in Connect ( 1775) to determine if the Logion method is called following opening the connection with optional
transport-level security.

The default value for AutoLogin is True, as assigned during initialization of the component.

See Also
Connect ( 1775)

TIdPOP3.HasAPOP Property
Pascal
property HasAPOP: boolean;
Description
HasAPOP is a Public read-only boolean property.

TIdPOP3.HasCAPA Property
Indicates the POP3 CAPA ( 1774) command is supported on the server.

Pascal
property HasCAPA: boolean;
Description
HasCAPA is a read-only boolean property that indicates if the POP3 CAPA ( 1774) command is supported in the server
implementation for the POP3 client connection.

HasCAPA is updated in the CAPA ( 1774) method to indicate if the the POP3 CAPA ( 1774) command returns the value ST_OK

Internet Direct (Indy) Version 10.1.5 1783


TIdPOP3 Class Classes

( 4386).

See Also
TIdPOP3.CAPA ( 1774)

TIdPOP3.Connect ( 1775)

TIdPOP3.Host Property
IP address or host name for the POP3 server.

Pascal
property Host;
Description
Host is a published String property that represents the IP address or host name for the POP3 server.

Set Port ( 1784) to indicate the port number for the client connection to the server.

Host and Port ( 1784) are used when the POP3 client connection is established in Connect ( 1775).

TIdPOP3.Password Property
Credentials for authentication the POP3 account.

Pascal
property Password;
Description
Password is a published String property that represents the credentials used when authenticating the POP3 account for the client
connection.

Use Username ( 1785) to sets the identity for the POP3 account.

Username ( 1785) and Password are used in Login ( 1777) when authentication is performed using the mechanism indicated in
AuthType ( 1782).

See Also
TIdPOP3.Username ( 1785)

TIdPOP3.Login ( 1777)

TIdPOP3.Port Property
Port number for the connection to the POP3 server.

Pascal
property Port;
Description
Port is a published TIdPort ( 3076) property that repesents the port number to use for the POP3 connection to the server identified
in Host ( 1784).

Set values in Host ( 1784) and Port proper to opening a connection using Connect ( 1775).

The default value for Port is IdPORT_POP3 ( 4165), as assigned in the Create ( 267) constructor.

See Also
TIdPOP3.Host ( 1784)

TIdPOP3.Connect ( 1775)

IdPORT_POP3 ( 4165)

1784 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3 Class

TIdPOP3.SASLMechanisms Property
Simple Authentication and Security Layer mechanisms available for the POP3 client connection.

Pascal
property SASLMechanisms: TIdSASLEntries;
Description
SASLMechanisms is a TIdSASLList property that represents a container for the Simple Authentication and Security Layer
mechanisms available for the POP3 client connection.

SASLMechanisms is used in the Login ( 1777) method to perform authentication based on the value in AuthType ( 1782).

See Also
TIdSASLList

TIdPOP3.Username Property
Identitity for the POP3 account.

Pascal
property Username;
Description
Username is a String property that represents the account identity used for the POP3 account.

Username and Password ( 1784) are used in Login ( 1777) to provide account authentication on the connection to the POP3
server.

Set values in Username and Password ( 1784) prior to calling Connect ( 1775) or Login ( 1777).

Example
(Delphi) Connecting to a POP3 server.
// IdPOP3: TIdPOP3;

IdPOP3.Host := 'mailhost.myisp.net';
IdPOP3.Username := 'johndoe';
IdPOP3.Password := 'topsecreteyesonly';
IdPOP3.APOP := True;
IdPOP3.AutoLogin := True;

try
IdPOP3.Connect(30000);
except
// handle timeout or authentication error
on E: EIdException do HandleConnectError(E);
end;
See Also
Password ( 1784) Login ( 1777) AutoLogin ( 1783) Connect ( 1775)

TIdPOP3.UseTLS Property
Indicates the transport-level security for the connection.

Pascal
property UseTLS;
Description
UseTLS is a published property that indicates if transport-level security is required when establishing the connection to the POP3
server.

Internet Direct (Indy) Version 10.1.5 1785


TIdPOP3Server Class Classes

UseTLS is used in Connect ( 1775), and determines the passthrough option used for the IOHandler ( 2364) when TLS is not
required, unsupported, implied, or explicitly requested for the connection.

See Also
TIdPOP3.Connect ( 1775)

TIdPOP3Server Class
Implements a multi-threaded POP3 server.

File
IdPOP3Server ( 4697)

Hierarchy

Pascal
TIdPOP3Server = class(TIdExplicitTLSServer);
Description
TIdPOP3Server is a TIdExplicitTLSServer ( 691) descendant that implements a multi-threaded server using the Post Office
Protocol version 3 (POP3), as described in the Internet Standards documents:

RFC 1939 - Post Office Protocol Version 3

RFC 1734 - POP3 AUTHentication command

RFC 1957 - Some Observations on Implementations of the Post Office Protocol (POP3)

RFC 2595 - Using TLS with IMAP, POP3 and ACAP

TIdPOP3 ( 1772) also implements support for Simple Authentication and Security Layer (SASL), as described in the Internet
Standards document:

RFC 2222 - Simple Authentication and Security Layer (SASL)

TIdPOP3Server provides the capabilities needed to allow simultaneous client connections to access a POP3 maildrop and retrieve
undelivered mail messages on the server.

TIdPOP3Server is not intended to provide extensive manipulation operations of mail on the server; normally, mail is downloaded
and then deleted. Use TIdIMAP4 ( 1150) and TIdIMAP4Server ( 1253) when a more advanced (and complex) mail protocol is
required.

TIdPOP3Server provides a dual implementation capability, mirroring the options available in TIdTCPServer ( 2375), using the
TIdTCPServer.OnExecute ( 2379) event handler or through the use of the TIdCommandHandlers ( 350) collection.

USER
PASS
LIST
RETR
DELE
QUIT
APOP
STAT
NOOP

1786 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3Server Class

RSET
TOP
UIDL

Use CommandHandlers ( 330) and CommandHandlerEnabled to provide finer control over the implementation of the commands
and event handlers for threaded client connections to the POP3 server.

TIdPOP3Server provides methods that allow a command handler to trigger event handlers that implement the specifics of
accessing the mailstore and file system for the server. TIdPOP3Server also utilizes TIdPOP3ServerThread to handle threaded
client connections to the server, and allow tracking of identity, authentication, and state for the client connections to the server.

See Also
TIdCommandHandler ( 341) TIdCommandHandlers ( 350) TIdPOP3ServerThread TIdExplicitTLSServer ( 691) TIdIMAP4 (
1150) TIdIMAP4Server ( 1253)

TIdPOP3Server Members
The following tables list the members exposed by TIdPOP3Server.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
CommandHandlers ( 330) Command handlers used in the server implementation.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1788) Default port number used to listen for client connections.
ExceptionReply ( 331) Response code and text used for exceptions occurring in the server.
Greeting ( 331) "Welcome" message sent to new connections accepted in listener thread(s).
HelpReply ( 332) Response sent when the HELP command is issued for a client connection.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnectionReply ( 332) Response used when the maximum number of client connections is exceeded.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
OnExecute ( 2379) Event handler used to execute the task for a client connection.
ReplyTexts ( 333) Represents protocol responses used in the server implementation.
ReplyUnknownCommand ( 333) Represents the response message used for an unkown command.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
UseTLS ( 1789) Indicates if Transport Layer Security (TLS) is used when establishing client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 330) Frees the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.

Internet Direct (Indy) Version 10.1.5 1787


TIdPOP3Server Class Classes

GetVersion ( 269) Version ( 269) number for Indy component suite.


CType ( 267)
Create ( 1274)

Events
Event Description
OnAfterCommandHandler ( 334) Represents the event handler signalled after CommandHandler usgage.
OnAPOP ( 1789) Implements alternative authentication for POP3 client connections.
OnBeforeCommandHandler ( 335) Represents the event handler signalled after CommandHandler usgage.
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCheckUser ( 1790)
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDelete ( 1790)
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnList ( 1790)
OnListenException ( 470) Event handler for an exception in a listener thread.
OnQuit ( 1790)
OnReset ( 1790)
OnRetrieve ( 1791)
OnStat ( 1791)
OnStatus ( 359) Represents the current connection status event handler.
OnTop ( 1791)
OnUIDL ( 1791) Event handler for the POP3 UIDL command.

Legend
Property
read only
Event
Method
virtual

TIdPOP3Server Properties
The Properties of the TIdPOP3Server class are listed here.

Properties
Property Description
DefaultPort ( 1788) Default port number used to listen for client connections.
UseTLS ( 1789) Indicates if Transport Layer Security (TLS) is used when establishing client connections.

Legend
Property

TIdPOP3Server.DefaultPort Property
Default port number used to listen for client connections.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a Published property in TIdPOP3Server ( 1786) that indicates the default port number used in listeneing threads
that accept new client connections to the server.

DefaultPort is assigned to the Bindings ( 461) used for the server.

Change the value in DefaultPort prior to creating Bindings ( 461) (using the IDE) or setting the server's Active ( 458) property to
True. Changing the value in DefaultPort after the server has created listener threads and their Bindings ( 461) has no effect.

1788 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3Server Class

The initial value for DefaultPort is IdPORT_POP3 ( 4165), as assigned during initialization of the component.

See Also
TIdTCPServer.Bindings ( 461) Active ( 458)

TIdPOP3Server.UseTLS Property
Indicates if Transport Layer Security (TLS) is used when establishing client connections.

Pascal
property UseTLS;
Description
UseTLS is a Published TIdUseTLS ( 2982) property that indicates if Transport Layer Security (TLS) should be used when
establishing the connection for client Contexts ( 462) in the server.

TIdPOP3Server Events
The Events of the TIdPOP3Server class are listed here.

Events
Event Description
OnAPOP ( 1789) Implements alternative authentication for POP3 client connections.
OnCheckUser ( 1790)
OnDelete ( 1790)
OnList ( 1790)
OnQuit ( 1790)
OnReset ( 1790)
OnRetrieve ( 1791)
OnStat ( 1791)
OnTop ( 1791)
OnUIDL ( 1791) Event handler for the POP3 UIDL command.

Legend
Event

TIdPOP3Server.OnAPOP Event
Implements alternative authentication for POP3 client connections.

Pascal
property OnAPOP: TIdPOP3ServerAPOPCommandEvent;
Description
OnAPOP is a TIdPOP3ServerAPOPCommandEvent ( 3074) property that represents the event handler signalled when a threaded
client connection performs the POP3 APOP command verb. OnAPOP allows the server to implement an alternate method of
authentication which does not involve sending a password as clear text over the network.

OnAPOP is triggered by the command event handler that implements the SMTP APOP command using values read from the client
context for the connection.

AMailboxID is the POP3 account name (or mailbox) accessed by the client connection.

ADigest is the 16-octet hexadecimal MD5 Message Digest calculated by applying the MD5 algorithm specified in RFC 1321 to a
string consisting of the timestamp (including angle-brackets) followed by the shared APOP secret for the client connection.

Assign a procedure to the event handler to allow responding to the event notification. If the mailbox identifier and message digest
are correct, the event handler is responsible for write a positive POP3 response to the client connection, and setting the
TIdPOP3ServerThread.State to the correct value.

Internet Direct (Indy) Version 10.1.5 1789


TIdPOP3Server Class Classes

OnAPOP is not triggered when TIdPOP3ServerThread contains a value other than Auth in State for the client context. In addition,
the event handler is also skipped when an invalid number of APOP arguments are available from the client connection.

Negative POP3 responses are written by the command event handler that triggers OnAPOP when TIdPOP3ServerThread.State
does not contain the value Auth on entry, and the value Trans on exit.

See Also
TIdPOP3ServerAPOPCommandEvent ( 3074) TIdPOP3ServerThread.State TIdCommandHandlers ( 350) TIdCommandHandler
( 341) TIdCommand ( 335)

TIdPOP3Server.OnCheckUser Event
Pascal
property OnCheckUser: TIdPOP3ServerLogin;
Description
OnCheckUser is a Published TIdPOP3ServerLogin ( 3074) event handler property. Write access for the property is implemented
using fCommandLogin.

TIdPOP3Server.OnDelete Event
Pascal
property OnDelete: TIdPOP3ServerMessageNumberEvent;
Description
OnDelete is a Published TIdPOP3ServerMessageNumberEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandDele.

TIdPOP3Server.OnList Event
Pascal
property OnList: TIdPOP3ServerMessageNumberEvent;
Description
OnList is a Published TIdPOP3ServerMessageNumberEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandList.

TIdPOP3Server.OnQuit Event
Pascal
property OnQuit: TIdPOP3ServerNoParamEvent;
Description
OnQuit is a Published TIdPOP3ServerNoParamEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandQuit.

TIdPOP3Server.OnReset Event
Pascal
property OnReset: TIdPOP3ServerNoParamEvent;
Description
OnReset is a Published TIdPOP3ServerNoParamEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandRset.

1790 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3Server Class

TIdPOP3Server.OnRetrieve Event
Pascal
property OnRetrieve: TIdPOP3ServerMessageNumberEvent;
Description
OnRetrieve is a Published TIdPOP3ServerMessageNumberEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandRetr.

TIdPOP3Server.OnStat Event
Pascal
property OnStat: TIdPOP3ServerStatEvent;
Description
OnStat is a Published TIdPOP3ServerStatEvent ( 3075) event handler property. Write access for the property is implemented
using fCommandStat.

TIdPOP3Server.OnTop Event
Pascal
property OnTop: TIdPOP3ServerTOPCommandEvent;
Description
OnTop is a Published TIdPOP3ServerTOPCommandEvent ( 3075) event handler property. Write access for the property is
implemented using fCommandTop.

TIdPOP3Server.OnUIDL Event
Event handler for the POP3 UIDL command.

Pascal
property OnUIDL: TIdPOP3ServerMessageNumberEvent;
Description
OnUIDL is a TIdPOP3ServerMessageNumberEvent ( 3075) property that represents the event handler signalled when a threaded
client connection performs the POP3 UIDL command verb.

OnUIDL allows the server to implement the optional POP3 command, and performs processing required to generate the unique
identifier listing for one or more messages in the mail store for the client connection.

OnUIDL is responsible for generating the initial Positive POP3 response, followed by one or more lines containing information for
the specified message(s). If no message number is specified, the response will contain multiple unique identifier lines.

To simplify POP3 client parsing, all POP3 servers are required to use a cokmon format for unique-id listings. A unique-id listing
consists of the message-number of the message, followed by a single space and the unique-id of the message. No information
follows the unique-id in the unique-id listing.

The unique-id of a message is an arbitrary server-determined string, consisting of one to 70 characters in the range 0x21 to 0x7E,
which uniquely identifies a message within a maildrop and which persists across sessions. This persistence is required even if a
session ends without entering the UPDATE state. The server should never reuse an unique-id in a given maildrop, for as long as
the entity using the unique-id exists.

Messages marked for deletion are not included in a UIDL listing.

It is recommended to implement support for the UIDL command. It is generally preferable for server implementations to store
arbitrarily assigned unique-ids in the maildrop, but it is permitted for unique-ids to be calculated as a hash of the message. Clients
should be able to handle a situation where two identical copies of a message in a maildrop have the same unique-id.

Internet Direct (Indy) Version 10.1.5 1791


TIdPOP3ServerContext Class Classes

OnUIDL is triggered by the command event handler that implements the TIdCommand ( 335) support for the POP3 UIDL
command for the client connection. OnUIDL is not triggered for a client connection where TIdPOP3ServerThread.State contains a
value other than Trans, or the event handler has not been assigned.

OnUIDL is responsible for writing the positive POP3 response to the client connection; Negative POP3 responses are written by the
UIDL command handler when TIdPOP3ServerThread.State contains a value other than Trans or the OnTOP event handler has not
been assigned.

See Also
TIdPOP3ServerMessageNumberEvent ( 3075) TIdPOP3ServerThread.State TIdCommandHandlers ( 350)
TIdCommandHandler ( 341) TIdCommand ( 335)

TIdPOP3ServerContext Class
Thread class used for client connections in a POP3 server implementation.

File
IdPOP3Server ( 4697)

Hierarchy

Pascal
TIdPOP3ServerContext = class(TIdContext);
Description
TIdPOP3ServerContext is a TIdContext ( 376) descendant that represents the executable task created for POP3 client
connections in a TIdPOP3Server ( 1786) server implementation.

TIdPOP3ServerContext exposes properties that represents the identity and authentication credentials for the client connection, as
well as the TIdPOP3ServerState for the connection.

TIdPOP3ServerContext is the class type assigned to the TIdPOP3Server.ContextClass property during initialization of the
TIdPOP3Server ( 1786) component.

See Also
TIdContext ( 376) TIdPOP3Server ( 1786)

TIdPOP3ServerContext Members
The following tables list the members exposed by TIdPOP3ServerContext.

Properties
Property Description
APOP3Challenge ( 1793)
Authenticated ( 1793)
BeforeRunDone ( 2332)
Connection ( 379) Represents the peer connection for a client session on the TCP server.
Data ( 2332) A user-specified object with values used during execution of the task.
Password ( 1794) Authentication credentials for the POP3 client session.
Username ( 1794) Identity for the client connection.
UsingTLS ( 1794) Indicates if the client connection is using TLS (Transport Layer Security).
Yarn ( 2333) Represents the thread or fiber for executing the task.

1792 Internet Direct (Indy) Version 10.1.5


Classes TIdPOP3ServerContext Class

Methods
Method Description
Binding ( 378)
Create ( 378)
Create ( 2330) Constructor for the object instance.
Destroy ( 378) Frees the object instance.
Destroy ( 2331) Frees the object instance.
DoAfterRun ( 2331) Triggers execution of the event handler for the task.
DoBeforeRun ( 2331) Triggers execution of the event handler for the task.
DoRun ( 2332) Triggers execution of the event handler for the task.
RemoveFromList ( 379) Removes the session context from the list of session contexts in a TCP server.

Events
Event Description
OnAfterRun ( 380) Event handler signalled after execution of the client connection context.
OnBeforeRun ( 380) Event handler signalled before execution of the client connection context.
OnRun ( 381) Event handler signalled to execute the task for the client session context.

Legend
Property
read only
Method
virtual
Event

TIdPOP3ServerContext Properties
The Properties of the TIdPOP3ServerContext class are listed here.

Properties
Property Description
APOP3Challenge ( 1793)
Authenticated ( 1793)
Password ( 1794) Authentication credentials for the POP3 client session.
Username ( 1794) Identity for the client connection.
UsingTLS ( 1794) Indicates if the client connection is using TLS (Transport Layer Security).

Legend
Property
read only

TIdPOP3ServerContext.APOP3Challenge Property
Pascal
property APOP3Challenge: string;
Description
APOP3Challenge is a Public String property

TIdPOP3ServerContext.Authenticated Property
Pascal
property Authenticated: boolean;
Description
Authenticated is a Public read-only boolean property.

Internet Direct (Indy) Version 10.1.5 1793


TIdProxyConnectionInfo Class Classes

TIdPOP3ServerContext.Password Property
Authentication credentials for the POP3 client session.

Pascal
property Password: string;
Description
Password is a String property that represents the authentication credentials for the POP3 client session on the POP3 server.

Password is updated when the command handler for the POP3 PASS command reads the value from the client connection.

Username ( 1794) and Password are used in the TIdPOP3Server.CheckUser method to verify the identity and authentication for
the client connection, and set the POP3 state.

See Also
TIdPOP3Server.CheckUser

Username ( 1794) State

TIdPOP3ServerContext.Username Property
Identity for the client connection.

Pascal
property Username: string;
Description
Username is a String property that represents the identification credentials for the client connection to the POP3 server.

Username is updated when the command handler for the POP3 USER command reads the value from the client connection.

Username and Password ( 1794) are used in the TIdPOP3Server.CheckUser method to verify the identity and authentication for
the client connection, and set the initial POP3 session state.

See Also
TIdPOP3Server.CheckUser Password ( 1794) State

TIdPOP3ServerContext.UsingTLS Property
Indicates if the client connection is using TLS (Transport Layer Security).

Pascal
property UsingTLS: boolean;
Description
UsingTLS is a read-only Boolean property that indicates if the connection for the client context is using TLS (Transport Layer
Security).

UsingTLS returns True when the IOHandler for the client context is derived from TIdSSLIOHandlerSocketBase ( 2134). Encrypted
secure IOHandlers are created for POP3 server connections when TIdPOP3Server.UseTLS ( 1789) contains a value that
indicates TLS is optional (using the POP3 STARTTLS command) or required.

UsingTLS in used in the command handler that implements support for the POP3 STARTTLS command.

See Also
TIdSSLIOHandlerSocketBase ( 2134) TIdPOP3Server.UseTLS ( 1789)

1794 Internet Direct (Indy) Version 10.1.5


Classes TIdProxyConnectionInfo Class

TIdProxyConnectionInfo Class
Represents headers in a HTTP request using a Proxy connection.

File
IdHTTPHeaderInfo ( 4663)

Hierarchy

Pascal
TIdProxyConnectionInfo = class(TIdPersistent);
Description
TIdProxyConnectionInfo is a TPersistent descendant that represents headers used in a HTTP request that require a Proxy
connection.

TIdProxyConnectionInfo contains properties that represent the headers used to establish the proxy connection, and to authenticate
the client connection using the authorization scheme(s) supported on the Proxy server.

TIdProxyConnectionInfo is the type used to represent the TIdRequestHeaderInfo.ProxyParams property.

See Also
TIdRequestHeaderInfo.ProxyParams

TIdProxyConnectionInfo Members
The following tables list the members exposed by TIdProxyConnectionInfo.

Properties
Property Description
Authentication ( 1798) Used to calculate HTTP Authentication credentials for a Proxy connection.
BasicAuthentication ( 1798) Indicates that HTTP Basic Access authentication should be used.
ProxyPassword ( 1798) Represents the password for the proxy authorization credentials.
ProxyPort ( 1799) Port number for the conneciton to a proxy server.
ProxyServer ( 1799) IP address or host name for the conneciton to a proxy server.
ProxyUsername ( 1799) Represents the user name for the proxy authorization credentials.

Methods
Method Description
Clear ( 1796) Resets the header properties for the proxy connection.
Create ( 1796) Constructor for the object instance.
Destroy ( 1797) Frees the object instance.
SetHeaders ( 1797) Loads header names and values from object properties.

Legend
Method
virtual
Property

TIdProxyConnectionInfo Methods
The Methods of the TIdProxyConnectionInfo class are listed here.

Internet Direct (Indy) Version 10.1.5 1795


TIdProxyConnectionInfo Class Classes

Methods
Method Description
Clear ( 1796) Resets the header properties for the proxy connection.
Create ( 1796) Constructor for the object instance.
Destroy ( 1797) Frees the object instance.
SetHeaders ( 1797) Loads header names and values from object properties.

Legend
Method
virtual

TIdProxyConnectionInfo.Clear Method
Resets the header properties for the proxy connection.

Pascal
procedure Clear;
Description
Clear is a procedure used to reset properties to their blank values for the proxied connection.

Clear sets the following properties to their corresponding values:

Property Value
ProxyServer ( 1799) '' (empty string)
ProxyUsername ( 1799) '' (empty string)
ProxyPassword ( 1798) '' (empty string)
ProxyPort ( 1799) 0 (zero)

Clear is used in the Create ( 1796) constructor to initialize properties for a proxied connection.

See Also
TIdProxyConnectionInfo.ProxyServer ( 1799)

TIdProxyConnectionInfo.ProxyUsername ( 1799)

TIdProxyConnectionInfo.ProxyPassword ( 1798)

TIdProxyConnectionInfo.ProxyPort ( 1799)

TIdProxyConnectionInfo.Create ( 1796)

TIdProxyConnectionInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create;
Description
Create is the constructor for the object instance. Create calls the inherited Create method, and calls Clear ( 1796) prior to exiting
from the method.

Use Destroy ( 1797) to free the object instance.

See Also
TIdProxyConnectionInfo.Destroy ( 1797)

1796 Internet Direct (Indy) Version 10.1.5


Classes TIdProxyConnectionInfo Class

TIdProxyConnectionInfo.Clear ( 1796)

TIdProxyConnectionInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy will free the object allocated to the Authentication ( 1798) property when an instance has been assigned. Destroy calls the
inherited Destroy method prior to exiting the method.

See Also
TIdProxyConnectionInfo.Create ( 1796)

TIdProxyConnectionInfo.SetHeaders Method
Loads header names and values from object properties.

Pascal
procedure SetHeaders(
Headers: TIdHeaderList
);
Parameters
Parameters Description
Headers Destination for the header names and values.

Description
SetHeaders is a procedure used to populate the TIdHeaderList ( 1024) specified in Headers with the names and values needed to
represent the properties for a proxied connection.

SetHeaders creates a 'Proxy-Authorization:' header using the value from the Authentication ( 1798) property, when assigned.

When Authentication ( 1798) is not assigned and BasicAuthentication ( 1798) is True, SetHeaders creates a
TIdBasicAuthentication ( 275) object instance that is used in Authentication ( 1798) to create ( 1796) the 'Proxy-Authorization:'
header values.

See Also
TIdProxyConnectionInfo.Authentication ( 1798)

TIdBasicAuthentication ( 275)

TIdHeaderList ( 1024)

TIdProxyConnectionInfo Properties
The Properties of the TIdProxyConnectionInfo class are listed here.

Properties
Property Description
Authentication ( 1798) Used to calculate HTTP Authentication credentials for a Proxy connection.
BasicAuthentication ( 1798) Indicates that HTTP Basic Access authentication should be used.
ProxyPassword ( 1798) Represents the password for the proxy authorization credentials.
ProxyPort ( 1799) Port number for the conneciton to a proxy server.
ProxyServer ( 1799) IP address or host name for the conneciton to a proxy server.
ProxyUsername ( 1799) Represents the user name for the proxy authorization credentials.

Internet Direct (Indy) Version 10.1.5 1797


TIdProxyConnectionInfo Class Classes

Legend
Property

TIdProxyConnectionInfo.Authentication Property
Used to calculate HTTP Authentication credentials for a Proxy connection.

Pascal
property Authentication: TIdAuthentication;
Description
Authentication is a TIdAuthentication ( 253) property that contains an object used to perform HTTP Access Authentication for a
proxied connection.

Authentication will normally contain an instance of a TIdAuthentication ( 253) descendant like TIdBasicAuthentication ( 275) or
TIdDigestAuthentication ( 573) that implements a specific authentication scheme.

Applications can assign the Authentication class to be used for the proxied connection.

If Authentication has not been assigned, and BasicAuthentication ( 1798) is True, a TIdBasicAuthentication ( 275) object
instance will be automatically created in SetHeaders ( 1797).

When assigned, Authentication is freed in the Destroy ( 1797) method.

See Also
TIdBasicAuthentication ( 275)

TIdDigestAuthentication ( 573)

TIdProxyConnectionInfo.BasicAuthentication ( 1798)

TIdProxyConnectionInfo.SetHeaders ( 1797)

TIdProxyConnectionInfo.BasicAuthentication Property
Indicates that HTTP Basic Access authentication should be used.

Pascal
property BasicAuthentication: boolean;
Description
BasicAuthentication is a Boolean property that indicates if the HTTP Basic Access authentication algorithm should be used to
calculate authorization credentials for the proxied HTTP connection.

Set BasicAuthentication to True to allow a TIdBasicAuthentication ( 275) instance to be created and assigned to Authentication (
1798) in SetHeaders ( 1797).

See Also
TIdProxyConnectionInfo.Authentication ( 1798)

TIdProxyConnectionInfo.SetHeaders ( 1797)

TIdBasicAuthentication ( 275)

TIdProxyConnectionInfo.ProxyPassword Property
Represents the password for the proxy authorization credentials.

Pascal
property ProxyPassword: string;

1798 Internet Direct (Indy) Version 10.1.5


Classes TIdProxyConnectionInfo Class

Description
ProxyPassword is a String property that identifies the password, used in conjunction with ProxyUsername ( 1799), to construct
authorization credentials for the proxy connection.

ProxyPassword is supplied as the value for Password in the Authentication ( 1798) object instance in SetHeaders ( 1797).

See Also
ProxyUsername ( 1799)

Authentication ( 1798)

TIdAuthentication ( 253)

TIdProxyConnectionInfo.ProxyPort Property
Port number for the conneciton to a proxy server.

Pascal
property ProxyPort: Integer;
Description
ProxyPort is an Integer property that represents the port number used to connect to a Proxy server.

ProxyServer ( 1799) and ProxyPort specify the address where a proxied connection can be opened, and perform authentication.

Changing the value in ProxyPort will result in the freeing and releasing of the object instance in Authentication ( 1798) prior to
assigning the new value for the ProxyPort property.

See Also
TIdProxyConnectionInfo.ProxyServer ( 1799)

TIdProxyConnectionInfo.Authentication ( 1798)

TIdAuthentication ( 253)

TIdProxyConnectionInfo.ProxyServer Property
IP address or host name for the conneciton to a proxy server.

Pascal
property ProxyServer: string;
Description
ProxyServer is a String property that represents the IP address or host name used to connect to a Proxy server.

ProxyServer and ProxyPort ( 1799) specify the address where a proxied connection can be opened, and perform authentication.

Changing the value in ProxyServer will result in the freeing and releasing of the object instance in Authentication ( 1798) prior to
assigning the new value for the ProxyServer property.

See Also
TIdProxyConnectionInfo.ProxyPort ( 1799)

TIdProxyConnectionInfo.Authentication ( 1798)

TIdAuthentication ( 253)

TIdProxyConnectionInfo.ProxyUsername Property
Represents the user name for the proxy authorization credentials.

Internet Direct (Indy) Version 10.1.5 1799


TIdQOTD Class Classes

Pascal
property ProxyUsername: string;
Description
ProxyUsername is a String property that contains the identity, used in conjunction with ProxyPassword ( 1798), to construct
authorization credentials for the proxy connection.

ProxyUsername is supplied as the value for Username in the Authentication ( 1798) object instance in SetHeaders ( 1797).

See Also
TIdProxyConnectionInfo.ProxyPassword ( 1798)

TIdProxyConnectionInfo.Authentication ( 1798)

TIdAuthentication ( 253)

TIdQOTD Class
Implements a Quote ( 1802) of the Day Protocol client.

File
IdQotd ( 4698)

Hierarchy

Pascal
TIdQOTD = class(TIdTCPClientCustom);
Description
TIdQOTD implements a Quote ( 1802) of the Day Protocol (QUOTD) client, as described in the Internet Standards document:

RFC 865 - Quote of the Day Protocol

QUOTD is a simple protocol for retrieving a short quote from a server.

See Also
IndySupport ( 15)

TIdTCPClientCustom ( 2340)

TIdQOTD Members
The following tables list the members exposed by TIdQOTD.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 1802) IP address or host name for the QOTD host.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.

1800 Internet Direct (Indy) Version 10.1.5


Classes TIdQOTD Class

OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 1802) Port number used for the connection to a QOTD host.
Quote ( 1802) Connects and retrieves a quote from the QOTD server.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdQOTD Properties
The Properties of the TIdQOTD class are listed here.

Properties
Property Description
Host ( 1802) IP address or host name for the QOTD host.
Port ( 1802) Port number used for the connection to a QOTD host.

Internet Direct (Indy) Version 10.1.5 1801


TIdQOTDServer Class Classes

Quote ( 1802) Connects and retrieves a quote from the QOTD server.

Legend
Property
read only

TIdQOTD.Host Property
IP address or host name for the QOTD host.

Pascal
property Host;
Description
Host is a String property that represents the IP address or host name for the QOTD host.

See Also
TIdQOTD.Port ( 1802)

IndySupport ( 15)

TIdQOTD.Port Property
Port number used for the connection to a QOTD host.

Pascal
property Port;
Description
Port is an Integer property that represents the port number used in a connection to a QOTD host. Port is redefined in TIdQOTD (
1800) to specify the default value for the property as required by the QOTD protocol (IdPORT_QOTD ( 4180)).

See Also
IdPORT_QOTD ( 4180)

IndySupport ( 15)

TIdQOTD.Quote Property
Connects and retrieves a quote from the QOTD server.

Pascal
property Quote: String;
Description
Quote is a read-only String property that connects to the Quote of the Day server and retrieves a quote.

Be sure to set the Host ( 1802) property to the Quote of the Day server before calling Quote.

See Also
TIdQOTD.Host ( 1802)

TIdQOTD.Port ( 1802)

TIdQOTDServer Class
Defines an implementation framework for a Quote of the Day Protocol server.

1802 Internet Direct (Indy) Version 10.1.5


Classes TIdQOTDServer Class

File
IdQotdServer ( 4698)

Hierarchy

Pascal
TIdQOTDServer = class(TIdCustomTCPServer);
Description
TIdQOTDServer is a TIdTCPServer ( 2375) descendant that implements the Quote of the Day Protocol or QUOTD server as
described in the Internet Standards document:

RFC 865 - Quote of the Day Protocol

QUOTD is a simple protocol for retrieving a short quote from a server.

See Also
TIdTCPServer ( 2375) IndySupport ( 15)

TIdQOTDServer Members
The following tables list the members exposed by TIdQOTDServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1804) Default port number for the server.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)

Internet Direct (Indy) Version 10.1.5 1803


TIdQOTDServer Class Classes

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommandQOTD ( 1805) Specifies an event handler for QOTD commands.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdQOTDServer Properties
The Properties of the TIdQOTDServer class are listed here.

Properties
Property Description
DefaultPort ( 1804) Default port number for the server.

Legend
Property

TIdQOTDServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is a published property in TIdQOTDServer ( 1802) that identifies the default port number for the server, as described
in the Quote of the Day Protocol specification.

The default value for DefaultPort is IdPORT_QOTD ( 4180).

See Also
IdPORT_QOTD ( 4180)

TIdQOTDServer Events
The Events of the TIdQOTDServer class are listed here.

Events
Event Description
OnCommandQOTD ( 1805) Specifies an event handler for QOTD commands.

Legend
Event

1804 Internet Direct (Indy) Version 10.1.5


Classes TIdQOTDUDP Class

TIdQOTDServer.OnCommandQOTD Event
Specifies an event handler for QOTD commands.

Pascal
property OnCommandQOTD: TIdQOTDGetEvent;
Description
OnCommandQOTD is a TIdQOTDGetEvent ( 3076) event handler that allows the QOTD server to respond to a request from a
QOTD client connection.

OnCommandQOTD receives an argument that specifies the context for execution of the client connection.

TIdQOTDUDP Class
Implements a Quote ( 1807) of the Day Protocol client.

File
IdQOTDUDP ( 4698)

Hierarchy

Pascal
TIdQOTDUDP = class(TIdUDPClient);
Description
TIdQOTDUDP is a TIdUDPClient ( 2509) descendant that implements a UDP-based Quote ( 1807) of the Day Protocol
(QUOTD) client, as described in the Internet Standards document:

RFC 865 - Quote of the Day Protocol

QUOTD is a simple protocol for retrieving a short quote from a server.

See Also
TIdUDPClient ( 2509) IndySupport ( 15)

TIdQOTDUDP Members
The following tables list the members exposed by TIdQOTDUDP.

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
Host ( 2520) Identifies the address of the remote computer system.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
IPVersion ( 2521) Identifies the IP address family supported for the UDP protocol client.
OnConnected ( 2521) Event handler signalled when establishing the UDP client session.
OnDisconnected ( 2521) Event handler signalled when closing the UDP client session.
Port ( 1806) Port number used for the transmission to a QOTD host.
Quote ( 1807) Retrieves a quote from the QOTD server.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ReceiveTimeout ( 2522) Indicates the timeout while waiting for a readable socket handle.

Internet Direct (Indy) Version 10.1.5 1805


TIdQOTDUDP Class Classes

TransparentProxy ( 2522) Implements a transparent proxy connection for the UDP client.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
CloseProxy ( 2511) Closes the socket handle for a proxied connection for the client.
Connect ( 2512) Initializes the client for sending and receiving datagrams.
Connected ( 2512) Indicates if the socket handle for the UDP client has been allocated.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2513) Frees the object instance.
Disconnect ( 2513) Closes the socket handle and transparent proxy for the client.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
OpenProxy ( 2514) Ensures the optional transparent proxy is enabled for the client.
Send ( 2505) Transmits a datagram to a specified host and port number.
Send ( 2517) Transmits a datagram to the host and port number for the client.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)
ReceiveBuffer ( 2514)
SendBuffer ( 2518)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdQOTDUDP Properties
The Properties of the TIdQOTDUDP class are listed here.

Properties
Property Description
Port ( 1806) Port number used for the transmission to a QOTD host.
Quote ( 1807) Retrieves a quote from the QOTD server.

Legend
Property
read only

TIdQOTDUDP.Port Property
Port number used for the transmission to a QOTD host.

1806 Internet Direct (Indy) Version 10.1.5


Classes TIdQotdUDPServer Class

Pascal
property Port;
Description
Port is an Integer property that represents the port number used in a transmission to a QOTD host. Port is redefined in
TIdQOTDUDP ( 1805) to specify the default value for the property as required by the QOTD protocol (IdPORT_QOTD ( 4180)).

See Also
IdPORT_QOTD ( 4180) IndySupport ( 15)

TIdQOTDUDP.Quote Property
Retrieves a quote from the QOTD server.

Pascal
property Quote: String;
Description
Quote is a read-only String property that retrieves a quote from a Quote of the Day server.

Be sure to set the Port ( 1806) property for the Quote of the Day server before calling Quote.

See Also
Port ( 1806)

TIdQotdUDPServer Class
Implements a UDP-nased Quote of the Day Protocol server.

File
IdQOTDUDPServer ( 4699)

Hierarchy

Pascal
TIdQotdUDPServer = class(TIdUDPServer);
Description
TIdQotdUDPServer is a TIdUDPServer ( 2530) descendant that implements the Quote of the Day Protocol or QUOTD server, as
described in the Internet Standards document:

RFC 865 - Quote of the Day Protocol

QUOTD is a simple protocol for retrieving a short quote from a server.

See Also
TIdUDPServer ( 2530) IndySupport ( 15)

TIdQotdUDPServer Members
The following tables list the members exposed by TIdQotdUDPServer.

Internet Direct (Indy) Version 10.1.5 1807


TIdQotdUDPServer Class Classes

Properties
Property Description
Active ( 2507) Indicates that the socket binding has been allocated for the UDP client.
Binding ( 2508) Socket handle for the read or write transaction.
Bindings ( 2532) Socket handles allocated by the server.
BroadcastEnabled ( 2508) Indicates that the socket binding can perform broadcast ( 2500) transmissions.
BufferSize ( 2508) Specifies the largest UDP packet size.
DefaultPort ( 1809) Default port number for the server.
IPVersion ( 2509) Identifies the IP address family supported for the UDP protocol client.
ReceiveTimeout ( 2509) Indicates the timeout while waiting for a readable socket handle.
ThreadedEvent ( 2533) Indicates the method used to perform the UDP read events.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Broadcast ( 2500) Send ( 2505) data to all computers on the network.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 2501) Frees the object instance.
Destroy ( 2532) Destructor for the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Send ( 2505) Transmits a datagram to a specified host and port number.
CType ( 267)
Create ( 1274)
ReceiveBuffer ( 2501)
ReceiveString ( 2504)
SendBuffer ( 2506)

Events
Event Description
OnCommandQOTD ( 1809) Specifies an event handler for QOTD commands.
OnStatus ( 359) Represents the current connection status event handler.
OnUDPException ( 2534) Event handler for exceptions raised in the listener thread for the UDP server.
OnUDPRead ( 2534) Event handler for UDP read events.

Legend
Property
read only
Event
Method
virtual

TIdQotdUDPServer Properties
The Properties of the TIdQotdUDPServer class are listed here.

Properties
Property Description
DefaultPort ( 1809) Default port number for the server.

Legend
Property

1808 Internet Direct (Indy) Version 10.1.5


Classes TIdRawBase Class

TIdQotdUDPServer.DefaultPort Property
Default port number for the server.

Pascal
property DefaultPort: integer;
Description
DefaultPort is a published property in TIdQOTDUDPServer ( 1807) that identifies the default port number for the server, as
described in the Quote of the Day Protocol specification.

The default value for DefaultPort is IdPORT_QOTD ( 4180).

See Also
IdPORT_QOTD ( 4180)

TIdQotdUDPServer Events
The Events of the TIdQotdUDPServer class are listed here.

Events
Event Description
OnCommandQOTD ( 1809) Specifies an event handler for QOTD commands.

Legend
Event

TIdQotdUDPServer.OnCommandQOTD Event
Specifies an event handler for QOTD commands.

Pascal
property OnCommandQOTD: TIdQotdUDPGetEvent;
Description
OnCommandQOTD is a TIdQOTDUDPGetEvent event handler that allows the QOTD server to respond to a request from a QOTD
client connection.

OnCommandQOTD receives an argument that specifies the context for execution of the client connection.

TIdRawBase Class
Ancestor class for Raw socket clients.

File
IdRawBase ( 4699)

Hierarchy

Pascal
TIdRawBase = class(TIdComponent);
Description
TIdRawBase is a TIdComponent ( 355) descendant that implements the ancestor for components which use raw socket formats.

Internet Direct (Indy) Version 10.1.5 1809


TIdRawBase Class Classes

TIdRawBase allows the programmer to code for protocols that are not supported by the standard stack.

Depending on the underlying operating system and on the security privilege of the user, it might also allow the programmer to build
the IP header (currently, this is only supported by Windows 2000).

Microsoft Windows Socket 2 Update

For Windows98, no updates are required because that included Winsock 2.

For WindowsNT, you need administrative rights and Service Pack 3.

See Also
TIdComponent ( 355)

TIdRawClient ( 1814)

IndySupport ( 15)

TIdRawBase Members
The following tables list the members exposed by TIdRawBase.

Properties
Property Description
Binding ( 1813) Represents the socket handle for the connection.
Host ( 1814) Specifies the endpoint for the socket connection.
ReceiveTimeout ( 1814) Identifies the timeout for receive operations.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 1811) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReceiveBuffer ( 1811)
CType ( 267)
Create ( 1274)
Send ( 1811)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdRawBase Methods
The Methods of the TIdRawBase class are listed here.

1810 Internet Direct (Indy) Version 10.1.5


Classes TIdRawBase Class

Methods
Method Description
Destroy ( 1811) Frees the object instance.
ReceiveBuffer ( 1811)
Send ( 1811)

Legend
Destructor
virtual

TIdRawBase.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy clears, frees, and releases the Binding ( 1813) for the socket connection
and the internal Indy read buffer.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdRawBase.Binding ( 1813)

TIdRawBase.ReceiveBuffer Method
Pascal
function ReceiveBuffer(
var VBuffer: TIdBytes;
ATimeOut: integer = -1
): integer;
Parameters
Parameters Description
VBuffer Scope is var. Type is TIdBytes ( 3007).
ATimeOut Type is integer. Default value is -1.

Returns
integer

Description
TIdRawBase.ReceiveBuffer method.

TIdRawBase.Send Method
Overload List

Method Description
TIdRawBase.Send (string) ( 1812) Transmits data to remote computer system.
TIdRawBase.Send (string, Integer, Transmits data to remote computer system.
string) ( 1812)
TIdRawBase.Send (string, integer,
TIdBytes) ( 1813)
TIdRawBase.Send (TIdBytes) (
1812)

Internet Direct (Indy) Version 10.1.5 1811


TIdRawBase Class Classes

TIdRawBase.Send Method (TIdBytes)


Pascal
procedure Send(
const AData: TIdBytes
); virtual; overload;
Parameters
Parameters Description
AData Scope is const. Type is TIdBytes ( 3007).

Description
TIdRawBase.Send overloaded virtual method.

See Also
TIdRawBase.Send

TIdRawBase.Send Method (string)


Transmits data to remote computer system.

Pascal
procedure Send(
const AData: string
); virtual; overload;
Parameters
Parameters Description
AData Value to be sent over the connection.

Description
Send is an overloaded procedure that allows the socket connection to transmit the specified data or buffer to the host address and
port number for the connection.

Send uses the values in the Host ( 1814) and Port properties to identify the endpoint for the data sent on the connection.

See Also
TIdRawBase.Send

TIdRawBase.Send Method (string, Integer, string)


Transmits data to remote computer system.

Pascal
procedure Send(
const AHost: string;
const APort: Integer;
const AData: string
); virtual; overload;
Parameters
Parameters Description
AHost Destination address for the send operation.
APort Destination port number for the send operation.
AData Buffer containing values to be sent over the connection.

Description
Send is an overloaded procedure that allows the socket connection to transmit the specified data or buffer to the host address and
port number for the connection.

Send uses the global protocol stack instance in GStack ( 3126) to resolve the host address in AHost prior to transmitting data on
the socket connection to the endpoint identified in the AHost and APort arguments.

1812 Internet Direct (Indy) Version 10.1.5


Classes TIdRawBase Class

See Also
TIdRawBase.Send

TIdRawBase.Send Method (string, integer, TIdBytes)


Pascal
procedure Send(
const AHost: string;
const APort: integer;
const ABuffer: TIdBytes
); virtual; overload;
Parameters
Parameters Description
AHost Scope is const. Type is string.
APort Scope is const. Type is integer.
ABuffer Scope is const. Type is TIdBytes ( 3007).

Description
TIdRawBase.Send overloaded virtual method.

See Also
TIdRawBase.Send

TIdRawBase Properties
The Properties of the TIdRawBase class are listed here.

Properties
Property Description
Binding ( 1813) Represents the socket handle for the connection.
Host ( 1814) Specifies the endpoint for the socket connection.
ReceiveTimeout ( 1814) Identifies the timeout for receive operations.

Legend
Property
read only

TIdRawBase.Binding Property
Represents the socket handle for the connection.

Pascal
property Binding: TIdSocketHandle;
Description
Binding is a read-only TIdSocketHandle ( 2071) property that represents the socket handle binding for the connection.

When accessed, the handle for the Binding may be allocated (when unassigned) to ensure that the connection uses raw sockets for
the Protocol selected. Socket options for the Binding are updated to use the correct protocol family and linger options with the
specified value in TTL (Time-To-Live).

See Also
TIdRawBase.TTL

GStack ( 3126)

Internet Direct (Indy) Version 10.1.5 1813


TIdRawClient Class Classes

TIdRawBase.Host Property
Specifies the endpoint for the socket connection.

Pascal
property Host: string;
Description
Host is a String property that specifies the IP address or host name that is the endpoint for the socket connection.

Use Port to indicate the port number used for the socket connection.

See Also
TIdRawBase.Port

TIdRawBase.ReceiveTimeout Property
Identifies the timeout for receive operations.

Pascal
property ReceiveTimeout: integer;
Description
ReceiveTimeout is an Integer property that indicate the number of milliseconds that receive operations must wait for the socket to
become readable.

The default value for ReceiveTimeout is GFReceiveTimeout, as established in Create ( 267). When ReceiveTimeout is 0, no
timeout will occur while waiting for the socket to become readable.

See Also
TIdRawBase.ReceiveBuffer ( 1811)

TIdRawClient Class
Specifies a client that uses Raw sockets.

File
IdRawClient ( 4700)

Hierarchy

Pascal
TIdRawClient = class(TIdRawBase);
Description
TIdRawClient is a TIdRawBase ( 1809) descendant that specifies a client capable of using Raw socket connections. This allows
the programmer to code for protocols that are not supported by the standard stack (ICMP, IGMP or any custom protocol).

TIdRawClient does not provide an implementation; implementation will be provided in descendant classes tailored to a specific
protocol, like TIdIcmpClient ( 1123).

Depending on the underlying operating system and on the security privilege of the user, it might also allow the programmer to build
the IP header (currently, this is only supported by Windows 2000).

Microsoft Windows Socket 2 Update

For Windows98, no updates are required because that included Winsock 2.

1814 Internet Direct (Indy) Version 10.1.5


Classes TIdRawClient Class

For WindowsNT, you need administrative rights and Service Pack 3.

See Also
TIdRawBase ( 1809)

IndySupport ( 15)

TIdRawClient Members
The following tables list the members exposed by TIdRawClient.

Properties
Property Description
Binding ( 1813) Represents the socket handle for the connection.
Host ( 1816) Specifies the endpoint for the socket connection.
IPVersion ( 1816)
Port ( 1816) Identifies the port number for the socket connection.
Protocol ( 1816) Identifies the protocol option for the socket connection.
ProtocolIPv6 ( 1817)
ReceiveTimeout ( 1817) Identifies the timeout for receive operations.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 1811) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
ReceiveBuffer ( 1811)
CType ( 267)
Create ( 1274)
Send ( 1811)

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Method
virtual
Event

TIdRawClient Properties
The Properties of the TIdRawClient class are listed here.

Properties
Property Description
Host ( 1816) Specifies the endpoint for the socket connection.
IPVersion ( 1816)
Port ( 1816) Identifies the port number for the socket connection.
Protocol ( 1816) Identifies the protocol option for the socket connection.

Internet Direct (Indy) Version 10.1.5 1815


TIdRawClient Class Classes

ProtocolIPv6 ( 1817)
ReceiveTimeout ( 1817) Identifies the timeout for receive operations.

Legend
Property

TIdRawClient.Host Property
Specifies the endpoint for the socket connection.

Pascal
property Host: string;
Description
Host is a published String property that specifies the IP address or host name that is the endpoint for the socket connection.

Use Port ( 1816) to indicate the port number used for the socket connection.

See Also
TIdRawClient.Port ( 1816) TIdRawBase.Host ( 1814)

TIdRawClient.IPVersion Property
Pascal
property IPVersion;
Description
Published TIdIPVersion ( 2962) property

TIdRawClient.Port Property
Identifies the port number for the socket connection.

Pascal
property Port;
Description
Port is apublished Integer property that identifies the port number for the socket connection.

Use Host ( 1816) to specify the IP adress or host name for the socket connection.

See Also
TIdRawClient.Host ( 1816)

TIdRawBase.Port

TIdRawClient.Protocol Property
Identifies the protocol option for the socket connection.

Pascal
property Protocol;
Description
Protocol is a published Integer property that identifies the protocol used for the socket connection.

Use Host ( 1816) and Port ( 1816) to specify the host name and port number used for the socket connection.

See Also
TIdRawClient.Host ( 1816)

1816 Internet Direct (Indy) Version 10.1.5


Classes TIdRemoteCMDClient Class

TIdRawClient.Port ( 1816)

TIdRawBase.Protocol

TIdRawClient.ProtocolIPv6 Property
Pascal
property ProtocolIPv6;
Description
TIdRawClient.ProtocolIPv6 Published property.

TIdRawClient.ReceiveTimeout Property
Identifies the timeout for receive operations.

Pascal
property ReceiveTimeout: integer;
Description
ReceiveTimeout is a published Integer property that indicate the number of milliseconds that receive operations must wait for the
socket to become readable.

See Also
TIdRawClient.Host ( 1816)

TIdRawClient.Port ( 1816)

TIdRawClient.Protocol ( 1816)

TIdRawBase.ReceiveTimeout ( 1814)

TIdRecFTPListItem Class
File
IdFTPListTypes ( 4646)

Hierarchy

Pascal
TIdRecFTPListItem = class(TIdFTPListItem);
Description
TIdRecFTPListItem is a TIdFTPListItem ( 851) descendant.

See Also
TIdFTPListItem ( 851)

TIdRemoteCMDClient Class
TIdRemoteCMDClient is an ancestor to TIdRexec ( 1870) and TIdRSH ( 1914).

Internet Direct (Indy) Version 10.1.5 1817


TIdRemoteCMDClient Class Classes

File
IdRemoteCMDClient ( 4704)

Hierarchy

Pascal
TIdRemoteCMDClient = class(TIdTCPClientCustom);
Description
TIdRemoteCMDClient is a TIdTCPClientCustom ( 2340) descendant, and the ancestor for TIdRexec ( 1870) and TIdRSH (
1914), that implements methods and properties shared by those components.

The behaviors shared include:

• Use of a StdError port (TIdRemoteCMDClient.UseStdError ( 1821))

• Server error handling (TIdRemoteCMDClient.ErrorReply ( 1821), TIdRemoteCMDClient.ErrorMessage ( 1821))


Command requests involve the same code except that the two parameters for authentication are different.

Both protocols are used for executing commands on a remote server.

See Also
TIdTCPClientCustom ( 2340)

TIdRexec ( 1870)

TIdRSH ( 1914)

TIdRemoteCMDClient.UseStdError ( 1821)

TIdRemoteCMDClient.ErrorReply ( 1821)

TIdRemoteCMDClient.ErrorMessage ( 1821)

TIdRemoteCMDClient Members
The following tables list the members exposed by TIdRemoteCMDClient.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ErrorMessage ( 1821) Error message returned from the Rexec or RSH Deamon.
ErrorReply ( 1821) Indicates if the RSH or Rexec Deamons returned an error.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.

1818 Internet Direct (Indy) Version 10.1.5


Classes TIdRemoteCMDClient Class

OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
UseStdError ( 1821) This property indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the server.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 1820) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
Execute ( 1820) This is an abstract method that is overridden in descendant classes.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdRemoteCMDClient Methods
The Methods of the TIdRemoteCMDClient class are listed here.

Methods
Method Description
Destroy ( 1820) Frees the object instance.
Execute ( 1820) This is an abstract method that is overridden in descendant classes.

Legend
Destructor
virtual

Internet Direct (Indy) Version 10.1.5 1819


TIdRemoteCMDClient Class Classes

TIdRemoteCMDClient.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy calls the inherited Destroy method prior to exiting.

TIdRemoteCMDClient.Execute Method
This is an abstract method that is overridden in descendant classes.

Pascal
function Execute(
ACommand: String
): String; virtual;
Parameters
Parameters Description
ACommand The command to execute on the remote system.

Returns
String - Results for the command executed in the remote daemon.

Description
Execute is a virtual method that is overridden in descendant classes.

TIdRexec ( 1870) and TIdRSH ( 1914) override this function to call internal protected methods using the command for the
remote daemon. Execute is implmented in this manner because RSH uses the user's local User ID and the user's User ID on the
remote host as part of it's authentication. Rexec requires the user's User ID on the remote machine and the password for
authentication.

The return value for the method contains the results from execution of the command, or an empty string if an error occurs.

In TIdRemoteCMDClient ( 1817), Execute always returns a blank string.

See Also
TIdRemoteCMDClient.ErrorMessage ( 1821)

TIdRemoteCMDClient.UseStdError ( 1821)

TIdRSH.ClientUserName ( 1917)

TIdRSH.HostUserName ( 1917)

TIdRemoteCMDClient Properties
The Properties of the TIdRemoteCMDClient class are listed here.

Properties
Property Description
ErrorMessage ( 1821) Error message returned from the Rexec or RSH Deamon.
ErrorReply ( 1821) Indicates if the RSH or Rexec Deamons returned an error.
UseStdError ( 1821) This property indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the server.

Legend
Property
read only

1820 Internet Direct (Indy) Version 10.1.5


Classes TIdRemoteCMDClient Class

TIdRemoteCMDClient.ErrorMessage Property
Error message returned from the Rexec or RSH Deamon.

Pascal
property ErrorMessage: String;
Description
ErrorMessage is a read-only String property containing any error message returned from the Rexec or RSH Daemon.
ErrorMessage will contain a non-blank value when TIdRexec.Execute ( 1872) or TIRSH.Execute ( 1820) fail, and
TIdRemoteCMDClient.ErrorReply ( 1821) is True.

See Also
TIdRexec.Execute ( 1872)

TIdRSH.Execute ( 1916)

TIdRemoteCMDClient.ErrorReply ( 1821)

TIdRemoteCMDClient.ErrorReply Property
Indicates if the RSH or Rexec Deamons returned an error.

Pascal
property ErrorReply: Boolean;
Description
ErrorReply is a read-only Boolean property that indicates if the RSH or Rexec Daemon returned an error. The error message can
be obtained with the TIdRemoteCMDClient.ErrorMessage ( 1821) property.

See Also
TIdRemoteCMDClient.ErrorMessage ( 1821)

TIdRexec.Execute ( 1872)

TIdRSH.Execute ( 1916)

TIdRemoteCMDClient.UseStdError Property
This property indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the server.

Pascal
property UseStdError: Boolean;
Description
UseStdError is a Boolean property that indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the
server.

When UseStdError contains True, the client listens on a port for a connection from the daemon and the server connects and uses
that port to send any error messages.

When UseStdError contains False, the server sends error information through the main connection.

StdError ports are used because Rexec and RSH are primarily Unix-centered, and Unix programs often use a StdError pipe.
StdError data must be handled separately from non-error related output.

The TIdRemoteCMDClient.ErrorReply ( 1821) and TIdRemoteCMDClient.ErrorMessage ( 1821) properties are not effected by
this property at all.

If the user is behind a firewall, the TIdRemoteCMDClient.UseStdError property should be set to false because a connection to a
Rexec or RSH daemon may fail if it can not connect ( 2342) to a user's StdError port.

Internet Direct (Indy) Version 10.1.5 1821


TIdRemoteCMDServer Class Classes

The default value for UseStdError is IDRemoteUseStdErr ( 4321) as assigned during initialization of the component.

See Also
TIdRemoteCMDClient.ErrorReply ( 1821)

TIdRemoteCMDClient.ErrorMessage ( 1821)

TIdRexec.Execute ( 1872)

TIdRSH.Execute ( 1916)

TIdRemoteCMDServer Class
Implements a common ancestor for a multithreaded server that executes a command for a remote client connection.

File
IdRemoteCMDServer ( 4704)

Hierarchy

Pascal
TIdRemoteCMDServer = class(TIdCustomTCPServer);
Description
TIdRemoteCMDServer is a TIdTCPServer ( 2375) descendant that implements a multithreaded server that accepts remote client
connections in order to execute commands.

TIdRemoteCMDServer implements event handlers that allow execution of the client connection contexts, and generation of result or
error messages for the remote client.

TIdRemoteCMDServer provides a protected method that implements execution of a threaded client connection to the server. The
default implementation handles validation of port numbers for the client connection, command execution and processing, and
closing of the client connection. During execution, the client must provide a Null character (decimal 0) delimited list of arguments to
the TIdRemoteCMDServer that includes:

• Client port number for standard error output. The default value is 0 when standard error output is not used for the connection.

• User name for use in authenticating the client connection in the Rexec protocol or the User ID on the client machine in the RSH
protocol.

• Password for use in authenticating the client connection in the Rexec protocol or the User ID on the host machine in the RSH
protocol.

• Command line and optional arguments to be executed by the server.


When a port number for standard error output is provided, the executing client thread will create ( 267) a TCP connection that will
connect to the client's remote port number indicated in the initial argument to the remote command server. In RSH, this is done
using a local port number in the range 512 through 1023. The standard error connection is closed after execution of the command
for the threaded client connection.

TIdRemoteCMDServer is the ancestor for more specialized server implementations like TIdRexecServer ( 1874) an
TIdRshServer, and contains an protected abstract virtual method that must be overridden in descendant classes to invoke
execution of the command for a threaded client connection.

1822 Internet Direct (Indy) Version 10.1.5


Classes TIdRemoteCMDServer Class

See Also
TIdRexecServer ( 1874) TIdRSHServer ( 1918) TIdTCPServer ( 2375)

TIdRemoteCMDServer Members
The following tables list the members exposed by TIdRemoteCMDServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 462) Identifies the default port number used to listen for new connections.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
SendError ( 1824) Sends an error message to either the standard error connection or the client connection.
SendResults ( 1824) Sends the results from remote command execution to a client connection.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

Internet Direct (Indy) Version 10.1.5 1823


TIdRemoteCMDServer Class Classes

TIdRemoteCMDServer Methods
The Methods of the TIdRemoteCMDServer class are listed here.

Methods
Method Description
SendError ( 1824) Sends an error message to either the standard error connection or the client connection.
SendResults ( 1824) Sends the results from remote command execution to a client connection.

Legend
Method

TIdRemoteCMDServer.SendError Method
Sends an error message to either the standard error connection or the client connection.

Pascal
procedure SendError(
AThread: TIdContext;
AStdErr: TIdTCPClient;
AMsg: String
);
Parameters
Parameters Description
AThread Client connection context for the error message.
AStdErr Standard error connection to use for the error message.
AMsg Error message to send to the client connection.

Description
SendError is a procedure used to send the error message in AMsg to the context for the client connection in AThread using the
standard error connection in AStdErr.

SendError writes the value #1 (Decimal 1) to the connection in AThread to indicate that an error condition has occurred. When
AStdErr contains a valid TCP connection for a non-zero client port number, the error message in AMsg is written to the connection
in AStdErr. When AStdErr dopes not contain a valid TCP connection, the error message in AMsg is written to the connection in
AThread.

Use SendResult to return values that occur during successful execution of the command for the client connection.

See Also
SendResults ( 1824) TIdContext ( 376)

TIdRemoteCMDServer.SendResults Method
Sends the results from remote command execution to a client connection.

Pascal
procedure SendResults(
AThread: TIdContext;
AStdErr: TIdTCPClient;
AMsg: String
);
Parameters
Parameters Description
AThread Client connection context for the error message.
AStdErr Standard error connection to use for the error message.
AMsg Error message to send to the client connection.

1824 Internet Direct (Indy) Version 10.1.5


Classes TIdReplies Class

Description
SendResults is a procedure used to send the results from successful execution of command for a client connection to the
TIdRemoteCMDServer ( 1822) instance.

SendResults write a Null character (Decimal 0) to the client connection in AThread to indicate that the remote command was
completed successfully, followed by the value in AMsg.

Use SendError ( 1824) to return an error message that occurs during execution of the command for the client connection.

See Also
SendError ( 1824) TIdContext ( 376)

TIdReplies Class
Collection for protocol responses having both numeric and textual content.

File
IdReply ( 4705)

Hierarchy

Pascal
TIdReplies = class(TIdOwnedCollection);
Description
TIdReplies is a TOwnedCollection descendant that represents a container for protocol response (TIdReply ( 1836)) items having
both numeric and textual content.

See Also
TOwnedCollection

TIdReply ( 1836)

TIdReplies Members
The following tables list the members exposed by TIdReplies.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Create ( 1827)
Find ( 1828)
Add ( 1826)
UpdateText ( 1828)

Legend
Constructor
virtual
Property

Internet Direct (Indy) Version 10.1.5 1825


TIdReplies Class Classes

TIdReplies Methods
The Methods of the TIdReplies class are listed here.

Methods
Method Description
Add ( 1826)
Create ( 1827)
Find ( 1828)
UpdateText ( 1828)

Legend
Method
virtual

TIdReplies.Add Method
Overload List

Method Description
TIdReplies.Add () ( 1826)
TIdReplies.Add (Integer, string) ( 1826) Add a new reply to the collection.
TIdReplies.Add (string, string) ( 1827)

TIdReplies.Add Method ()
Pascal
function Add: TIdReply; overload;
Returns
TIdReply ( 1836) - Reply added to the collection.

Description
Add is an overloaded TIdReply ( 1836) function used to add a new item to the collection.

Add calls the inherited Add method, and casts the return value to the TIdReply ( 1836) type used as the item class for the
collection.

See Also
TIdReplies.Add

TIdReplies.Add Method (Integer, string)


Add a new reply to the collection.

Pascal
function Add(
ACode: Integer;
AText: string
): TIdReply; overload;
Parameters
Parameters Description
AText Textual values for the reply.
ANumericCode Numeric value for the reply.

1826 Internet Direct (Indy) Version 10.1.5


Classes TIdReplies Class

Returns
TIdReply ( 1836) - Reply added to the collection.

Description
Add is an overloaded TIdReply ( 1836) function used to add a new item to the collection.

ANumericCode is the numeric value to use in the TIdReply ( 1836) created in the collection.

AText is the textual value to use in the TIdReply ( 1836) created in the collection.

Add calls Find ( 1828) to determine if the numeric code is already in use in the collection. If the numeric value is found, a new
TIdReply ( 1836) instance is not created, and the return value from Add is Nil. If the numeric value is not found, a new TIdReply (
1836) item is created and its contents are updated using TIdReply.SetReply ( 1839) with the values specified in ANumericCode
and AText.

See Also
TIdReplies.Add

TIdReplies.Add Method (string, string)


Pascal
function Add(
ACode: string;
AText: string
): TIdReply; overload;
Parameters
Parameters Description
ACode Type is string.
AText Type is string.

Returns
TIdReply ( 1836)

Description
overloaded

See Also
TIdReplies.Add

TIdReplies.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent;
const AReplyClass: TIdReplyClass
); virtual; reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).
AReplyClass Scope is const. Type is TIdReplyClass ( 3077).

Description
TIdReplies.Create reintroduced virtual constructor method.

Internet Direct (Indy) Version 10.1.5 1827


TIdReplies Class Classes

TIdReplies.Find Method
Pascal
function Find(
const ACode: string;
AIgnore: TIdReply = nil
): TIdReply; virtual;
Parameters
Parameters Description
ACode Scope is const. Type is string.
AIgnore Type is TIdReply ( 1836). Default value is nil.

Returns
TIdReply ( 1836)

Description
virtual

TIdReplies.UpdateText Method
Pascal
procedure UpdateText(
AReply: TIdReply
); virtual;
Parameters
Parameters Description
AReply Reply to update with the textual contents for the response.

Description
UpdateText is a procedure used to update the textual contents of the reply in AReply using a reply from the collection.

When the number of lines in TIdReply.Text ( 1842) is 0 (zero), the contents for the instance are updated using an existing
collection item.

UpdateText calls Find ( 1828) to locate the collection item with the numeric value indicated in AReply. If an existing collection item
cannot be located with the numeric value, no action is performed. If a collection item does exist with the indicated numeric value,
the text for the collection item is assigned to the text in AReply.

TIdReplies Properties
The Properties of the TIdReplies class are listed here.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Legend
Property

TIdReplies.Items Property
Provides indexed access to TIdReply ( 1836) instances in the collection.

Pascal
property Items [Index: Integer]: TIdReply;

1828 Internet Direct (Indy) Version 10.1.5


Classes TIdRepliesFTP Class

Description
Items is an indexed TIdReply ( 1836) property that represents the existing TIdReply ( 1836) collection items for the container.

Items can be accessed using the ordinal position of the TIdReply ( 1836) in the collection, where index positions range from 0
(zero) to Count - 1.

Items is the default property for the collection.

Use Add ( 1826) to create ( 1827) a new reply for the collection.

Use Delete to remove a reply from the collection.

Use Find ( 1828) to locate an existing reply with a specific numeric code.

Use UpdateText ( 1828) to store the text for an existing reply to another TIdReply ( 1836) instance.

See Also
TIdReplies.Add ( 1826)

TIdReplies.Find ( 1828)

TIdReplies.UpdateText ( 1828)

TIdRepliesFTP Class
File
IdReplyFTP ( 4705)

Hierarchy

Pascal
TIdRepliesFTP = class(TIdRepliesRFC);
Description
TIdRepliesFTP is a TIdRepliesRFC ( 1832) descendant.

See Also
TIdRepliesRFC ( 1832)

TIdRepliesFTP Members
The following tables list the members exposed by TIdRepliesFTP.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Create ( 1830)
Find ( 1828)
Add ( 1826)
Create ( 1833)
UpdateText ( 1828)
UpdateText ( 1834)

Internet Direct (Indy) Version 10.1.5 1829


TIdRepliesIMAP4 Class Classes

Legend
Constructor
virtual
Property

TIdRepliesFTP Methods
The Methods of the TIdRepliesFTP class are listed here.

Methods
Method Description
Create ( 1830)

Legend
Constructor
virtual

TIdRepliesFTP.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent
); override;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
Create is a overridden constructor for the object instance.

TIdRepliesIMAP4 Class
File
IdReplyIMAP4 ( 4706)

Hierarchy

Pascal
TIdRepliesIMAP4 = class(TIdReplies);
Description
TIdRepliesIMAP4 is a TIdReplies ( 1825) descendant.

See Also
TIdReplies ( 1825)

TIdRepliesIMAP4 Members
The following tables list the members exposed by TIdRepliesIMAP4.

1830 Internet Direct (Indy) Version 10.1.5


Classes TIdRepliesPOP3 Class

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Create ( 1831)
Find ( 1828)
Add ( 1826)
UpdateText ( 1828)

Legend
Constructor
virtual
Property

TIdRepliesIMAP4 Methods
The Methods of the TIdRepliesIMAP4 class are listed here.

Methods
Method Description
Create ( 1831)

Legend
Constructor

TIdRepliesIMAP4.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent
); reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
Create is a reintroduced constructor for the object instance.

TIdRepliesPOP3 Class
File
IdReplyPOP3 ( 4706)

Hierarchy

Pascal
TIdRepliesPOP3 = class(TIdReplies);
Description
TIdRepliesPOP3 is a TIdReplies ( 1825) descendant.

Internet Direct (Indy) Version 10.1.5 1831


TIdRepliesRFC Class Classes

See Also
TIdReplies ( 1825)

TIdRepliesPOP3 Members
The following tables list the members exposed by TIdRepliesPOP3.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Create ( 1832)
Find ( 1828)
Add ( 1826)
UpdateText ( 1828)

Legend
Constructor
virtual
Property

TIdRepliesPOP3 Methods
The Methods of the TIdRepliesPOP3 class are listed here.

Methods
Method Description
Create ( 1832)

Legend
Constructor

TIdRepliesPOP3.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent
); reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
Create is a reintroduced constructor for the object instance.

TIdRepliesRFC Class
File
IdReplyRFC ( 4707)

1832 Internet Direct (Indy) Version 10.1.5


Classes TIdRepliesRFC Class

Hierarchy

Pascal
TIdRepliesRFC = class(TIdReplies);
Description
TIdRepliesRFC TIdReplies ( 1825) descendant

See Also
TIdReplies ( 1825)

TIdRepliesRFC Members
The following tables list the members exposed by TIdRepliesRFC.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Find ( 1828)
Add ( 1826)
Create ( 1833)
UpdateText ( 1834)

Legend
Method
virtual
Property

TIdRepliesRFC Methods
The Methods of the TIdRepliesRFC class are listed here.

Methods
Method Description
Create ( 1833)
UpdateText ( 1834)

Legend
Constructor
virtual

TIdRepliesRFC.Create Constructor
Overload List

Method Description
TIdRepliesRFC.Create
(TIdPersistent) ( 1834)
TIdRepliesRFC.Create
(TIdPersistent, TIdReplyClass) ( 1834)

Internet Direct (Indy) Version 10.1.5 1833


TIdRepliesSMTP Class Classes

TIdRepliesRFC.Create Constructor (TIdPersistent)


Pascal
constructor Create(
AOwner: TIdPersistent
); virtual; overload; reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
TIdRepliesRFC.Create overloaded reintroduced virtual constructor method.

See Also
TIdRepliesRFC.Create

TIdRepliesRFC.Create Constructor (TIdPersistent, TIdReplyClass)


Pascal
constructor Create(
AOwner: TIdPersistent;
const AReplyClass: TIdReplyClass
); override; overload;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).
AReplyClass Scope is const. Type is TIdReplyClass ( 3077).

Description
TIdRepliesRFC.Create overridden overloaded constructor method.

See Also
TIdRepliesRFC.Create

TIdRepliesRFC.UpdateText Method
Pascal
procedure UpdateText(
AReply: TIdReply
); override;
Parameters
Parameters Description
AReply Type is TIdReply ( 1836).

Description
UpdateText overridden

TIdRepliesSMTP Class
File
IdReplySMTP ( 4707)

1834 Internet Direct (Indy) Version 10.1.5


Classes TIdRepliesSMTP Class

Hierarchy

Pascal
TIdRepliesSMTP = class(TIdRepliesRFC);
Description
TIdRepliesSMTP is a TIdRepliesRFC ( 1832) descendant.

See Also
TIdRepliesRFC ( 1832)

TIdRepliesSMTP Members
The following tables list the members exposed by TIdRepliesSMTP.

Properties
Property Description
Items ( 1828) Provides indexed access to TIdReply ( 1836) instances in the collection.

Methods
Method Description
Create ( 1835)
Find ( 1828)
Add ( 1826)
Create ( 1833)
UpdateText ( 1828)
UpdateText ( 1834)

Legend
Constructor
virtual
Property

TIdRepliesSMTP Methods
The Methods of the TIdRepliesSMTP class are listed here.

Methods
Method Description
Create ( 1835)

Legend
Constructor
virtual

TIdRepliesSMTP.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent
); override;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Internet Direct (Indy) Version 10.1.5 1835


TIdReply Class Classes

Description
Create is a overridden constructor for the object instance.

TIdReply Class
Implements a protocol response mechanism with a numeric response code and associated text.

File
IdReply ( 4705)

Hierarchy

Pascal
TIdReply = class(TIdCollectionItem);
Description
TIdReply is a TCollectionItem descendant that implements a protocol response mechanism with a numeric response code and
associated text.

TIdReply is the collection item class used in the TIdReplies ( 1825) collection.

See Also
TCollectionItem

TIdReplies ( 1825)

TIdReply Members
The following tables list the members exposed by TIdReply.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1837)
Destroy ( 1838) Frees the collection item.
IsEndMarker ( 1838) Examines a reply to see if it is a terminal or continutation response message.
RaiseReplyError ( 1839) Specifies an interface for raising exceptions for invalid reply codes.
ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
Create ( 1837)
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
abstract
Property

1836 Internet Direct (Indy) Version 10.1.5


Classes TIdReply Class

TIdReply Methods
The Methods of the TIdReply class are listed here.

Methods
Method Description
Clear ( 1837)
Create ( 1837)
Destroy ( 1838) Frees the collection item.
IsEndMarker ( 1838) Examines a reply to see if it is a terminal or continutation response message.
RaiseReplyError ( 1839) Specifies an interface for raising exceptions for invalid reply codes.
ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
abstract

TIdReply.Clear Method
Pascal
procedure Clear; virtual;
Description
Clear is a procedure used to clear the contents of the reply.

Clear removes any existing values in Text ( 1842), and sets Code ( 1841) to an empty string.

TIdReply.Create Constructor
Overload List

Method Description
TIdReply.Create (TIdCollection) (
1837)
TIdReply.Create (TIdCollection,
TIdReplies) ( 1838)

TIdReply.Create Constructor (TIdCollection)


Pascal
constructor Create(
ACollection: TIdCollection
); override; overload;
Parameters
Parameters Description
ACollection Type is TIdCollection ( 3011).

Description
TIdReply.Create overridden overloaded constructor method.

See Also
TIdReply.Create

Internet Direct (Indy) Version 10.1.5 1837


TIdReply Class Classes

TIdReply.Create Constructor (TIdCollection, TIdReplies)


Pascal
constructor Create(
ACollection: TIdCollection;
AReplyTexts: TIdReplies
); virtual; overload; reintroduce;
Parameters
Parameters Description
ACollection Type is TIdCollection ( 3011).
AReplyTexts Type is TIdReplies ( 1825).

Description
TIdReply.Create overloaded reintroduced virtual constructor method.

See Also
TIdReply.Create

TIdReply.Destroy Destructor
Frees the collection item.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the collection item.

Destroy frees resources allocated to the Text ( 1842) and FormattedReply ( 1841) properties.

Destroy calls the inherited destructor prior to exiting from the method.

TIdReply.IsEndMarker Method
Examines a reply to see if it is a terminal or continutation response message.

Pascal
class function IsEndMarker(
const ALine: string
): Boolean; virtual;
Parameters
Parameters Description
ALine Values to examine for the reply end marker.

Returns
Boolean - True when the reply is not a continuation response.

Description
IsEndMarker is a Boolean class function used to examine the reply in ALine to determine if it is a terminal response or a
continutation response.

IsEndMarker always returns False in TIdReply ( 1836). Descendant classes can override the IsEndMarker to handle the specific
of locating end-marker response messages for a specific protocol.

See Also
TIdReplyRFC.IsEndMarker ( 1853)

1838 Internet Direct (Indy) Version 10.1.5


Classes TIdReply Class

TIdReply.RaiseReplyError Method
Specifies an interface for raising exceptions for invalid reply codes.

Pascal
procedure RaiseReplyError; virtual; abstract;
Description
RaiseReplyError is an abstract virtual procedure that specified an interface used to raise an exception when the numeric code for
the replyis invalid.

Descendant class may override the method to raise an exception (with values from Code ( 1841) and Text ( 1842)) pertinent to
the protocol for the reply.

See Also
TIdReplyRFC.RaiseReplyError ( 1853)

TIdReply.ReplyExists Method
Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.

Pascal
function ReplyExists: Boolean; virtual;
Returns
Boolean - True when the Code ( 1841) and/or Text ( 1842) are valid for the reply.

Description
ReplyExists is a Boolean function used to indicate when the Code ( 1841) for the reply contains a valid value. ReplyExists ensures
that Code ( 1841) is not an empty string ('').

ReplyExists may be overridden in descendant classes to perform additional validation for the Code ( 1841) or Text ( 1842)
assigned to the reply.

See Also
TIdReplyRFC.ReplyExists ( 1853)

TIdReply.SetReply Method
Overload List

Method Description
TIdReply.SetReply (Integer, string) ( Stores the values used for the Code ( 1841) and Text ( 1842) properties in the
1839) reply.
TIdReply.SetReply (string, string) ( Stores the values used for the Code ( 1841) and Text ( 1842) properties in the
1840) reply.

TIdReply.SetReply Method (Integer, string)


Stores the values used for the Code ( 1841) and Text ( 1842) properties in the reply.

Pascal
procedure SetReply(
const ACode: Integer;
const AText: string
); virtual; overload;

Internet Direct (Indy) Version 10.1.5 1839


TIdReply Class Classes

Parameters
Parameters Description
ACode Reply code as an integer value.
AText Reply text as a string value.

Description
SetReply is an overloaded procedure used to store the values used for the Code ( 1841) and Text ( 1842) properties in the reply.

SetReply is used in TIdReplies.Add ( 1826) to set the property values for the new TIdReply ( 1836) instance.

See Also
TIdReply.SetReply

TIdReplies.Add ( 1826)

TIdReply.SetReply Method (string, string)


Stores the values used for the Code ( 1841) and Text ( 1842) properties in the reply.

Pascal
procedure SetReply(
const ACode: string;
const AText: string
); virtual; overload;
Parameters
Parameters Description
ACode Reply code as a string value.
AText Reply text as a string value.

Description
SetReply is an overloaded procedure used to store the values used for the Code ( 1841) and Text ( 1842) properties in the reply.

SetReply is used in TIdReplies.Add ( 1826) to set the property values for the new TIdReply ( 1836) instance.

See Also
TIdReply.SetReply

TIdReplies.Add ( 1826)

TIdReply.UpdateText Method
Pascal
procedure UpdateText;
Description
UpdateText class method

TIdReply Properties
The Properties of the TIdReply class are listed here.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

1840 Internet Direct (Indy) Version 10.1.5


Classes TIdReply Class

Legend
Property

TIdReply.Code Property
String representing the numeric code used in a reply.

Pascal
property Code: string;
Description
Code is a string property that represents the string version of the numeric response code for the reply. Changing the value in code
causes the new value to be validated, and can raise an EIdException ( 76) when the code is invalid.

Code validation simply returns True (for a valid code) in TIdReply ( 1836), but is provided for compatibility with descendant
classes that implement the method.

Use NumericCode ( 1841) to access the value in Code as an Integer data type.

Use Text ( 1842) to assign one or more lines of textual content for the reply.

TIdReply.FormattedReply Property
Generates the text representing the formatted reply for the collection item.

Pascal
property FormattedReply: TIdStrings;
Description
FormattedReply is a TStrings property that represents the formatted text to use for the numeric reply code.

Reading the value in FormattedReply property results in any existing values being cleared, and the text content being regenerated
from the internal reply text for the collection item. If the internal reply contains the numeric code for the reply, its text is asssigned to
the Text ( 1842) property.

The write access specifier for the FormattedReply property is declared as an abstract virtual method, and must be overridden in a
descendant class to implement the specifics of setting the value for the property.

See Also
TIdReplyRFC.FormattedReply

TIdReply.NumericCode Property
Represents the Code ( 1841) for the reply in numeric form.

Pascal
property NumericCode: Integer;
Description
NumericCode is an Integer property that represents the Code ( 1841) for the reply in numeric form.

Reading or writing the value in NumericCode accesses Code ( 1841) and converts the string value to its numeric equivalent or 0
(zero) as the default value for read access.

Use Code ( 1841) to set the response code as a string value.

Use SetReply ( 1839) to set both the Code ( 1841) and Text ( 1842) for the reply.

Internet Direct (Indy) Version 10.1.5 1841


TIdReplyFTP Class Classes

TIdReply.Text Property
Textual values associated with the Code ( 1841) for the reply.

Pascal
property Text: TIdStrings;
Description
Text is a TStrings property that represents the textual content associated with Code ( 1841) in the reply. Writing to Text calls
Assign to set the new values for the property.

Use Code ( 1841) to set the numeric response of the reply in string form.

Use NumericCode ( 1841) to set the numeric response of the reply in integer form.

Use Clear ( 1837) remove all lines in the Text property and set Code ( 1841) to an empty string.

Text is update in SetReply ( 1839).

TIdReplyFTP Class
File
IdReplyFTP ( 4705)

Hierarchy

Pascal
TIdReplyFTP = class(TIdReplyRFC);
Description
TIdReplyFTP is a TIdReplyRFC ( 1851) descendant.

See Also
TIdReplyRFC ( 1851)

TIdReplyFTP Members
The following tables list the members exposed by TIdReplyFTP.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
ReplyFormat ( 1844)
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1837)
Create ( 1843)
Destroy ( 1838) Frees the collection item.
IsEndMarker ( 1843)
RaiseReplyError ( 1839) Specifies an interface for raising exceptions for invalid reply codes.
RaiseReplyError ( 1853) Raises an exception with the NumericCode ( 1841) and Text ( 1842) values for the RFC reply.

1842 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyFTP Class

ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
ReplyExists ( 1853) Indicates the RFC reply contains a valid numeric code and message text.
Create ( 1837)
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
abstract
Property

TIdReplyFTP Methods
The Methods of the TIdReplyFTP class are listed here.

Methods
Method Description
Create ( 1843)
IsEndMarker ( 1843)

Legend
Constructor
virtual

TIdReplyFTP.Create Constructor
Pascal
constructor Create(
ACollection: TIdCollection = nil;
AReplyTexts: TIdReplies = nil
); override;
Parameters
Parameters Description
ACollection Type is TIdCollection ( 3011). Default value is nil.
AReplyTexts Type is TIdReplies ( 1825). Default value is nil.

Description
Create is a overridden constructor for the object instance.

TIdReplyFTP.IsEndMarker Method
Pascal
class function IsEndMarker(
const ALine: string
): Boolean; override;
Parameters
Parameters Description
ALine Scope is const. Type is string.

Returns
Boolean

Description
IsEndMarker is a overridden class method.

IsEndMarker returns a Boolean value.

Internet Direct (Indy) Version 10.1.5 1843


TIdReplyIMAP4 Class Classes

TIdReplyFTP Properties
The Properties of the TIdReplyFTP class are listed here.

Properties
Property Description
ReplyFormat ( 1844)

Legend
Property

TIdReplyFTP.ReplyFormat Property
Pascal
property ReplyFormat: TIdReplyRFCFormat;
Description
ReplyFormat is a Published TIdReplyRFCFormat ( 2973) property. Write access for the property is implemented using
FReplyFormat. The default value for the property is DEF_ReplyFormat ( 3194).

TIdReplyIMAP4 Class
File
IdReplyIMAP4 ( 4706)

Hierarchy

Pascal
TIdReplyIMAP4 = class(TIdReply);
Description
TIdReplyIMAP4 is a TIdReply ( 1836) descendant.

See Also
TIdReply ( 1836)

TIdReplyIMAP4 Members
The following tables list the members exposed by TIdReplyIMAP4.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
Extra ( 1848)
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1848)
SequenceNumber ( 1848)
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1845)

1844 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyIMAP4 Class

Create ( 1845)
Destroy ( 1846)
DoesLineHaveExpectedResponse ( 1846)
DoReplyError ( 1846)
IsEndMarker ( 1838) Examines a reply to see if it is a terminal or continutation response message.
IsItANumber ( 1846)
IsItAValidSequenceNumber ( 1847)
ParseRequest ( 1847)
RaiseReplyError ( 1847)
RemoveUnsolicitedResponses ( 1848)
ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
Create ( 1837)
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
Property
read only

TIdReplyIMAP4 Methods
The Methods of the TIdReplyIMAP4 class are listed here.

Methods
Method Description
Clear ( 1845)
Create ( 1845)
Destroy ( 1846)
DoesLineHaveExpectedResponse ( 1846)
DoReplyError ( 1846)
IsItANumber ( 1846)
IsItAValidSequenceNumber ( 1847)
ParseRequest ( 1847)
RaiseReplyError ( 1847)
RemoveUnsolicitedResponses ( 1848)

Legend
Method
virtual

TIdReplyIMAP4.Clear Method
Pascal
procedure Clear; override;
Description
Clear is a overridden method.

TIdReplyIMAP4.Create Constructor
Pascal
constructor Create(
ACollection: TIdCollection = nil;
AReplyTexts: TIdReplies = nil
); override;

Internet Direct (Indy) Version 10.1.5 1845


TIdReplyIMAP4 Class Classes

Parameters
Parameters Description
ACollection Type is TIdCollection ( 3011). Default value is nil.
AReplyTexts Type is TIdReplies ( 1825). Default value is nil.

Description
Create is a overridden constructor for the object instance.

TIdReplyIMAP4.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy is a overridden destructor for the object instance.

TIdReplyIMAP4.DoesLineHaveExpectedResponse Method
Pascal
function DoesLineHaveExpectedResponse(
ALine: string;
AExpectedResponses: array of string
): Boolean;
Parameters
Parameters Description
ALine Type is string.
AExpectedResponses Type is array of string.

Returns
Boolean

Description
DoesLineHaveExpectedResponse is a method.

DoesLineHaveExpectedResponse returns a Boolean value.

TIdReplyIMAP4.DoReplyError Method
Pascal
procedure DoReplyError(
ADescription: string;
AnOffendingLine: string = ''
); reintroduce;
Parameters
Parameters Description
ADescription Type is string.
AnOffendingLine Type is string.

Description
DoReplyError is a reintroduced method.

TIdReplyIMAP4.IsItANumber Method
Pascal
function IsItANumber(

1846 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyIMAP4 Class

const AValue: string


): Boolean;
Parameters
Parameters Description
AValue Scope is const. Type is string.

Returns
Boolean

Description
IsItANumber is a method.

IsItANumber returns a Boolean value.

TIdReplyIMAP4.IsItAValidSequenceNumber Method
Pascal
function IsItAValidSequenceNumber(
const AValue: string
): Boolean;
Parameters
Parameters Description
AValue Scope is const. Type is string.

Returns
Boolean

Description
IsItAValidSequenceNumber is a method.

IsItAValidSequenceNumber returns a Boolean value.

TIdReplyIMAP4.ParseRequest Method
Pascal
function ParseRequest(
ARequest: string
): Boolean;
Parameters
Parameters Description
ARequest Type is string.

Returns
Boolean

Description
ParseRequest is a method.

ParseRequest returns a Boolean value.

TIdReplyIMAP4.RaiseReplyError Method
Pascal
procedure RaiseReplyError; override;
Description
RaiseReplyError is a overridden method.

Internet Direct (Indy) Version 10.1.5 1847


TIdReplyPOP3 Class Classes

TIdReplyIMAP4.RemoveUnsolicitedResponses Method
Pascal
procedure RemoveUnsolicitedResponses(
AExpectedResponses: array of String
);
Parameters
Parameters Description
AExpectedResponses Type is array of String.

Description
RemoveUnsolicitedResponses is a method.

TIdReplyIMAP4 Properties
The Properties of the TIdReplyIMAP4 class are listed here.

Properties
Property Description
Extra ( 1848)
NumericCode ( 1848)
SequenceNumber ( 1848)

Legend
Property
read only

TIdReplyIMAP4.Extra Property
Pascal
property Extra: TIdStrings;
Description
Extra is a Public read-only TIdStrings ( 3089) property.

TIdReplyIMAP4.NumericCode Property
Pascal
property NumericCode: Integer;
Description
NumericCode is a Public Integer property. Write access for the property is implemented using SetNumericCode.

TIdReplyIMAP4.SequenceNumber Property
Pascal
property SequenceNumber: string;
Description
SequenceNumber is a Public read-only string property.

1848 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyPOP3 Class

TIdReplyPOP3 Class
Implements Enhances Status Codes for the POP3 protocol.

File
IdReplyPOP3 ( 4706)

Hierarchy

Pascal
TIdReplyPOP3 = class(TIdReply);
Description
TIdReplyPOP3 is a TIdReply ( 1836) descendant that implements support for the POP3 Service Extension for Returning
Enhanced Status Codes, as described in the Internet Standards documents:

RFC 2449 - POP3 Extension Mechanism

RFC 3206 - The SYS and AUTH POP Response Codes

TIdReplyPOP3 implements properties and methods read and write access to the EnhancedCode ( 1851) for the POP3 reply.
TIdReplyPOP3 also implements class methods to validate and parse enhanced status code resonses.

See Also
TIdReply ( 1836)

TIdReplyPOP3 Members
The following tables list the members exposed by TIdReplyPOP3.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
EnhancedCode ( 1851)
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1837)
Create ( 1850)
Destroy ( 1850)
IsEndMarker ( 1850)
RaiseReplyError ( 1851)
ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
Create ( 1837)
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
Property

Internet Direct (Indy) Version 10.1.5 1849


TIdReplyPOP3 Class Classes

TIdReplyPOP3 Methods
The Methods of the TIdReplyPOP3 class are listed here.

Methods
Method Description
Create ( 1850)
Destroy ( 1850)
IsEndMarker ( 1850)
RaiseReplyError ( 1851)

Legend
Constructor
virtual

TIdReplyPOP3.Create Constructor
Pascal
constructor Create(
ACollection: TIdCollection = nil;
AReplyTexts: TIdReplies = nil
); override;
Parameters
Parameters Description
ACollection Type is TIdCollection ( 3011). Default value is nil.
AReplyTexts Type is TIdReplies ( 1825). Default value is nil.

Description
Create is a overridden constructor for the object instance.

TIdReplyPOP3.Destroy Destructor
Pascal
destructor Destroy; override;
Description
Destroy overridden class method

TIdReplyPOP3.IsEndMarker Method
Pascal
class function IsEndMarker(
const ALine: string
): Boolean; override;
Parameters
Parameters Description
ALine Values to examine for the end-marker.

Returns
Boolean - True the line does not contain a continuation response.

Description
IsEndMarker is an overridden Boolean class function used to indicate when the RFC-compliant protocol response contains a
terminal response instead of a continuation response.

1850 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyRFC Class

IsEndMarker examines the value in ALine to determine if it contains a continuation mark for the protocol response.

IsEndMarker returns True when ALine contains at least 4 characters and the fourth character is not the continuation marker
character '-' (Decimal 45).

TIdReplyPOP3.RaiseReplyError Method
Pascal
procedure RaiseReplyError; override;
Description
RaiseReplyError overridden class method

TIdReplyPOP3 Properties
The Properties of the TIdReplyPOP3 class are listed here.

Properties
Property Description
EnhancedCode ( 1851)

Legend
Property

TIdReplyPOP3.EnhancedCode Property
Pascal
property EnhancedCode: String;
Description
EnhancedCode is a String property that represents the contents of the POP3 Enhanced Status Code ( 1841).

Writing a value to EnhancedCode caused the new value to be formatted and validated accoring to the requirements for the
enhanced status code. If the new value is a valid enhanced status code, it is assigned to the property. Otherwise, an
EIdPOP3ReplyInvalidEnhancedCode ( 134) exception is raised.

EnhancedCode is used when generating an RFC-formatted reply, and is inserted prior to the message text for the RFC-compliant
response.

EnhancedCode is updated when an RFC-formatted reply has been assigned to the object instance.

Exceptions
Exceptions Description
EIdPOP3ReplyInvalidEnhancedCode ( 134) With the message RSPOP3ReplyInvalidEnhancedCode.

TIdReplyRFC Class
Represents values in an RFC-compliant response.

File
IdReplyRFC ( 4707)

Hierarchy

Internet Direct (Indy) Version 10.1.5 1851


TIdReplyRFC Class Classes

Pascal
TIdReplyRFC = class(TIdReply);
Description
TIdReplyRFC is a TIdReply ( 1836) descendant that implements an RFC-compliant response that consists of a response code (in
both numeric and textual form) and one or more lines of Text ( 1842) messages.

TIdReplyRFC is also a collection item class for use in the TIdReplies ( 1825) container.

TIdRFCReply is used by Indy servers and command handlers to represent the responses used for a specific protocol.

See Also
TIdReply ( 1836)

TIdTCPServer.Greeting

TIdCommand ( 335)

TIdCommandHandler ( 341)

IndySupport ( 15)

TIdReplyRFC Members
The following tables list the members exposed by TIdReplyRFC.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1837)
Destroy ( 1838) Frees the collection item.
IsEndMarker ( 1853)
RaiseReplyError ( 1853) Raises an exception with the NumericCode ( 1841) and Text ( 1842) values for the RFC reply.
ReplyExists ( 1853) Indicates the RFC reply contains a valid numeric code and message text.
Create ( 1837)
SetReply ( 1839)
UpdateText ( 1840)

Legend
Method
virtual
Property

TIdReplyRFC Methods
The Methods of the TIdReplyRFC class are listed here.

Methods
Method Description
IsEndMarker ( 1853)
RaiseReplyError ( 1853) Raises an exception with the NumericCode ( 1841) and Text ( 1842) values for the RFC reply.
ReplyExists ( 1853) Indicates the RFC reply contains a valid numeric code and message text.

1852 Internet Direct (Indy) Version 10.1.5


Classes TIdReplyRFC Class

Legend
Method
virtual

TIdReplyRFC.IsEndMarker Method
Pascal
class function IsEndMarker(
const ALine: string
): Boolean; override;
Parameters
Parameters Description
ALine Values to examine for the end-marker.

Returns
Boolean - True the line does not contain a continuation response.

Description
IsEndMarker is an overridden Boolean function used to indicate when the RFC-compliant protocol response contains a terminal
response instead of a continuation response.

IsEndMarker examines the value in ALine to determine if it contains a continuation mark for the protocol response.

IsEndMarker returns True when ALine contains at least 4 characters where the fourth character is a space (CHAR32 ( 3169)).

For example, a response line with the NumericCode ( 1841) of 200 and multiple lines in Text ( 1842) might be sent like the
following:
200-You were connected
200-Your session started
200 Ok
IsEndMarker would return False for the first two lines, and return True for the thired line.

TIdReplyRFC.RaiseReplyError Method
Raises an exception with the NumericCode ( 1841) and Text ( 1842) values for the RFC reply.

Pascal
procedure RaiseReplyError; override;
Description
RaiseReplyError is an overridden procedure used to implement the method for raising an exception with the NumericCode ( 1841)
and Text ( 1842) values for the RFC reply.

TIdReplyRFC.ReplyExists Method
Indicates the RFC reply contains a valid numeric code and message text.

Pascal
function ReplyExists: Boolean; override;
Returns
Boolean - Indicates the RFC reply contains a valid numeric code and message text.

Description
ReplyExists is an overridden Boolean function that implements the method used to validate the NumericCode ( 1841) and Text (
1842) for an RFC reply.

ReplyExists returns True when NumericCode ( 1841) contains a positive non-zero value, and Text ( 1842) contains at leat one

Internet Direct (Indy) Version 10.1.5 1853


TIdReplySMTP Class Classes

line of text.

TIdReplySMTP Class
Implements Enhanced Error Codes in WSMTP responses.

File
IdReplySMTP ( 4707)

Hierarchy

Pascal
TIdReplySMTP = class(TIdReplyRFC);
Description
TIdReplySMTP is a TIdReplyRFC ( 1851) descendant that implements the SMTP Service Extension for Returning Enhanced Error
Codes, as described in the Internet Standards documents:

RFC 1869 - SMTP Service Extensions

RFC 1893 - Enhanced Mail System Status Codes

TIdReplySMTP extends TIdReplyRFC by adding properties and overridden methods used when reading or writing the formatted
SMTP reply.

See Also
TIdReplyRFC

TIdSMTPEnhancedCode

IndySupport

TIdReplySMTP Members
The following tables list the members exposed by TIdReplySMTP.

Properties
Property Description
Code ( 1841) String representing the numeric code used in a reply.
EnhancedCode ( 1857) SMTP Enhanced Error Code for the SMTP reply.
FormattedReply ( 1841) Generates the text representing the formatted reply for the collection item.
NumericCode ( 1841) Represents the Code ( 1841) for the reply in numeric form.
Text ( 1842) Textual values associated with the Code ( 1841) for the reply.

Methods
Method Description
Clear ( 1837)
Destroy ( 1856) Frees the object instance.
IsEndMarker ( 1838) Examines a reply to see if it is a terminal or continutation response message.
IsEndMarker ( 1853)
RaiseReplyError ( 1856) Raises an exception for the SMTP reply.
ReplyExists ( 1839) Indicates if the Code ( 1841) and/or Text ( 1842) are valid for the reply.
ReplyExists ( 1853) Indicates the RFC reply contains a valid numeric code and message text.
SetEnhReply ( 1856) Updates properties for the SMTP Enhanced Status Code reply.
Create ( 1837)
SetReply ( 1839)
Create ( 1855)

1854 Internet Direct (Indy) Version 10.1.5


Classes TIdReplySMTP Class

UpdateText ( 1840)

Legend
Method
virtual
Property

TIdReplySMTP Methods
The Methods of the TIdReplySMTP class are listed here.

Methods
Method Description
Create ( 1855)
Destroy ( 1856) Frees the object instance.
RaiseReplyError ( 1856) Raises an exception for the SMTP reply.
SetEnhReply ( 1856) Updates properties for the SMTP Enhanced Status Code reply.

Legend
Constructor
virtual

TIdReplySMTP.Create Constructor
Overload List

Method Description
TIdReplySMTP.Create
(TIdCollection) ( 1855)
TIdReplySMTP.Create (TIdCollection,
TIdReplies) ( 1855)

TIdReplySMTP.Create Constructor (TIdCollection)


Pascal
constructor Create(
ACollection: TIdCollection
); override; overload;
Parameters
Parameters Description
ACollection Type is TIdCollection.

Description
Create is a overridden,overloaded constructor for the object instance.

See Also
TIdReplySMTP.Create

TIdReplySMTP.Create Constructor (TIdCollection, TIdReplies)


Pascal
constructor Create(
ACollection: TIdCollection;
AReplyTexts: TIdReplies
); override; overload;

Internet Direct (Indy) Version 10.1.5 1855


TIdReplySMTP Class Classes

Parameters
Parameters Description
ACollection Type is TIdCollection.
AReplyTexts Type is TIdReplies.

Description
Create is a overridden,overloaded constructor for the object instance.

See Also
TIdReplySMTP.Create

TIdReplySMTP.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy frees resources allocated in Create to the EnhancedCode property.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
TIdReplySMTP.Create

TIdReplySMTP.EnhancedCode

TIdReplySMTP.RaiseReplyError Method
Raises an exception for the SMTP reply.

Pascal
procedure RaiseReplyError; override;
Description
RaiseReplyError is an overridden procedure used to create and raise an EIdSMTPReplyError instance when required for the
NumericCode, EnhancedCode, or Text in the SMTP reply.

TIdReplySMTP.SetEnhReply Method
Updates properties for the SMTP Enhanced Status Code reply.

Pascal
procedure SetEnhReply(
const ANumericCode: Integer;
const AEnhReply: String;
const AText: String
);
Parameters
Parameters Description
ANumericCode Numeric SMTP reponse code for the reply.
AEnhReply SMTP Enhanced Status Code for tghe reply.
AText Message text for the reply.

Description
SetEnhReply is a procedure used to update the NumericCode, EnhancedCode, and Text properties for the SMTP Enhanced Status

1856 Internet Direct (Indy) Version 10.1.5


Classes TIdRequestHeaderInfo Class

Code reply. SetEnhReply stores the values in ANumericCode, AText, and AEnhReply to the corresponding properties.

See Also
NumericCode

EnahncedCode

Text

TIdReplySMTP Properties
The Properties of the TIdReplySMTP class are listed here.

Properties
Property Description
EnhancedCode ( 1857) SMTP Enhanced Error Code for the SMTP reply.

Legend
Property

TIdReplySMTP.EnhancedCode Property
SMTP Enhanced Error Code for the SMTP reply.

Pascal
property EnhancedCode: TIdSMTPEnhancedCode;
Description
EnhancedCode is a TIdSMTPEnhancedCode property that represents the SMTP Enhanced Error Code for the SMTP reply, as
described in the Internet Standards documents:

RFC 1869 - SMTP Service Extensions

TIdRequestHeaderInfo Class
Implements message headers for an HTTP request.

File
IdHTTPHeaderInfo ( 4663)

Hierarchy

Pascal
TIdRequestHeaderInfo = class(TIdEntityHeaderInfo);
Description
TIdRequestHeaderInfo is a TIdEntityHeaderInfo descendant that implements properties and methods needed to represent message
headers for an HTTP request, as described in the Internet Standards document:

RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1]

The request headers allow the client to pass additional information about the request, or the request client, to the server.

See Also
TIdResponseHeaderInfo ( 1865)

TIdEntityHeaderInfo ( 668)

Internet Direct (Indy) Version 10.1.5 1857


TIdRequestHeaderInfo Class Classes

TIdRequestHeaderInfo Members
The following tables list the members exposed by TIdRequestHeaderInfo.

Properties
Property Description
Accept ( 1860) Specifies the media types accepted in a HTTP response.
AcceptCharSet ( 1860) Indicates the character sets accepted in a HTTP response.
AcceptEncoding ( 1861) Indicates the content encodings accepted in a HTTP response.
AcceptLanguage ( 1861) Indicates languages accepted in a HTTP response.
Authentication ( 1861) Used to calculate HTTP Access Authentication credentials.
BasicAuthentication ( 1862) Indicates that HTTP Basic Access authentication should be used.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
From ( 1862) Indicates the email address for the requesting user.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
Host ( 1862) Represents the Internet host name or address for the resource accessed by the HTTP request.
LastModified ( 678) Indicates the date and time a server resource was modified.
Password ( 1863) Represents the password used in construction of authorization credentials.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyConnection ( 1863) Indicates the action to perform for a proxied connection.
Range ( 1864)
RawHeaders ( 679) Contains message header names and values in their original form.
Referer ( 1864) Specifies the address where a request URI was obtained.
UserAgent ( 1864) Identifies the user agent (program) issuing the HTTP request.
Username ( 1865) Represents the Username used in construction of authorization credentials.

Methods
Method Description
Clear ( 1859) Resets request headers to their default values.
Create ( 670) Constructor for the object instance.
Destroy ( 1859) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdRequestHeaderInfo Methods
The Methods of the TIdRequestHeaderInfo class are listed here.

1858 Internet Direct (Indy) Version 10.1.5


Classes TIdRequestHeaderInfo Class

Methods
Method Description
Clear ( 1859) Resets request headers to their default values.
Destroy ( 1859) Frees the object instance.

Legend
Method
virtual

TIdRequestHeaderInfo.Clear Method
Resets request headers to their default values.

Pascal
procedure Clear; override;
Description
Clear is an overriden procedure that clears values assigned to object properties. Clear also resets the following object properties to
their default values:

Property Value
Accept ( 1860) 'text/html, */*'
AcceptCharSet ( 1860) '' (Empty string)
UserAgent ( 1864) DefaultUserAgent
BasicAuthentication ( 1862) False

Clear calls the inherited Clear method prior to exit.

TIdRequestHeaderInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the destructor for the object instance.

Destroy frees resources allocated to Authentication ( 1861), when assigned, prior to calling the inherited Destroy method.

See Also
TIdProxyConnectionInfo.Destroy ( 1797)

TIdRequestHeaderInfo Properties
The Properties of the TIdRequestHeaderInfo class are listed here.

Properties
Property Description
Accept ( 1860) Specifies the media types accepted in a HTTP response.
AcceptCharSet ( 1860) Indicates the character sets accepted in a HTTP response.
AcceptEncoding ( 1861) Indicates the content encodings accepted in a HTTP response.
AcceptLanguage ( 1861) Indicates languages accepted in a HTTP response.
Authentication ( 1861) Used to calculate HTTP Access Authentication credentials.

Internet Direct (Indy) Version 10.1.5 1859


TIdRequestHeaderInfo Class Classes

BasicAuthentication ( 1862) Indicates that HTTP Basic Access authentication should be used.
From ( 1862) Indicates the email address for the requesting user.
Host ( 1862) Represents the Internet host name or address for the resource accessed by the HTTP request.
Password ( 1863) Represents the password used in construction of authorization credentials.
ProxyConnection ( 1863) Indicates the action to perform for a proxied connection.
Range ( 1864)
Referer ( 1864) Specifies the address where a request URI was obtained.
UserAgent ( 1864) Identifies the user agent (program) issuing the HTTP request.
Username ( 1865) Represents the Username used in construction of authorization credentials.

Legend
Property

TIdRequestHeaderInfo.Accept Property
Specifies the media types accepted in a HTTP response.

Pascal
property Accept: String;
Description
Accept is a String property that specifies the media types that are acceptable in a resulting HTTP response, and can be used to
limit the request to a small set of desired types. If no Accept header field is present, then it is assumed that the client accepts all
media types.

Accept is composed of the media type, subtype, and optional parameters. The asterisk "*" character is used to group media types
into ranges, with "*/*" indicating all media types and "type/*" indicating all subtypes of that type.

Each media type and subtype may include one or more parameters, beginning with the "q" parameter that indicates the relative
quality factor. Quality factors allow the user agent to determine the relative degree of preference for that media type and subtype,
using the qvalue scale from 0 to 1. The default value is q=1.

Accept is updated in the ProcessHeaders method. Accept is used in SetHeaders to read the header values for the request.

The default value for Accept is set to 'text/html, */*' when the Clear ( 1859) method is called.

Example
ARequestHeaderInfo.Accept := 'audio/*; q=0.2, audio/basic';
ARequestHeaderInfo.Accept := 'text/plain; q=0.5, text/html';
See Also
TIdRequestHeaderInfo.Clear ( 1859)

TIdRequestHeaderInfo.AcceptCharSet Property
Indicates the character sets accepted in a HTTP response.

Pascal
property AcceptCharSet: String;
Description
AcceptCharSet is a String property that indicates the character sets accepted in a resulting HTTP response. AcceptCharSet may
contain any valid Character set value as described in the Internet Standards document:

RFC 1700, Assigned Numbers

Each charset value may have an associated quality value which represents the user's preference for that charset. The default value
is q=1. For example:

iso-8859-5, unicode-1-1; q=0.8


The special value "*" in Accept ( 1860)-CharSet matches every character set including ISO-8859-1. If no "*" is present in
AcceptCharSet, then all character sets not explicitly mentioned get a quality value of 0, except for ISO-8859-1, which gets a quality

1860 Internet Direct (Indy) Version 10.1.5


Classes TIdRequestHeaderInfo Class

value of 1 if not explicitly mentioned.

If no AcceptCharSet header is present, the default is set to allow any character set.

Example
ARequestHeaderInfo.AcceptCharSet := 'iso-8859-1, iso-8859-5; q=0.5';

TIdRequestHeaderInfo.AcceptEncoding Property
Indicates the content encodings accepted in a HTTP response.

Pascal
property AcceptEncoding: String;
Description
AcceptEncoding is a String property that indicates the content encodings accepted in a resulting HTTP response. An
AcceptEncoding value is composed of one or more content encoding scheme and an optional realtive quality factor for the encoding.

AcceptEncoding permits the same values as permitted in ContentEncoding ( 673). The special "*" symbol in AcceptEncoding
matches any available content encoding not explicitly listed in the header field.

Example
ARequestHeaderInfo.AcceptEncoding := '*';
ARequestHeaderInfo.AcceptEncoding := 'compress; q=.5, gzip';
See Also
TIdEntityHeaderInfo.ContentEncoding ( 673)

TIdRequestHeaderInfo.AcceptLanguage Property
Indicates languages accepted in a HTTP response.

Pascal
property AcceptLanguage: String;
Description
AcceptLanguage is a String property that indicates the languages preferred in a HTTP response. AcceptLanguage can contain the
same valid values as the ContentLanguage ( 673) property.

Each language specified may have an associated quality value which represents an estimate of the user preference for the
languages specified by that range. The quality value defaults to "q=1". For

Example
da, en-gb;q=0.8, en;q=0.7
The special character "*" matches every tag not matched by any other language specifier in AcceptLanguage. If no
AcceptLanguage header is present in the request, the server assumes that all languages are equally acceptable.

See Also
TIdEntityHeaderInfo.ContentLanguage ( 673)

TIdRequestHeaderInfo.Authentication Property
Used to calculate HTTP Access Authentication credentials.

Pascal
property Authentication: TIdAuthentication;
Description
Authentication is a TIdAuthentication ( 253) property that represents the object used to perform HTTP Access Authentication.
Authentication will normally contain an instance of a TIdAuthentication ( 253) descendant, like TIdBasicAuthentication ( 275) or

Internet Direct (Indy) Version 10.1.5 1861


TIdRequestHeaderInfo Class Classes

TIdDigestAuthentication ( 573).

Applications can assign the Authentication class to be used for the request. If Authentication has not been assigned, and
BasicAuthentication ( 1862) is True, a TIdBasicAuthentication ( 275) object instance will be automatically created in SetHeaders.

See Also
TIdBasicAuthentication ( 275)

TIdDigestAuthentication ( 573)

TIdRequestHeaderInfo.BasicAuthentication ( 1862)

TIdRequestHeaderInfo.SetHeaders

TIdRequestHeaderInfo.BasicAuthentication Property
Indicates that HTTP Basic Access authentication should be used.

Pascal
property BasicAuthentication: boolean;
Description
BasicAuthentication is a Boolean property that indicates if the HTTP Basic Access authentication algorithm should be used to
calculate authorization credentials for the HTTP request.

Set BasicAuthentication to True to allow TIdBasicAuthentication ( 275) to be assigned to Authentication ( 1861) in SetHeaders.

See Also
TIdRequestHeaderInfo.Authentication ( 1861)

TIdRequestHeaderInfo.SetHeaders

TIdRequestHeaderInfo.From Property
Indicates the email address for the requesting user.

Pascal
property From: String;
Description
From is a String property that contains an optional RFC 1123-complaint Internet email address for the person controlling the
requesting user agent. For example:

webmaster@w3.org
From may be used for server logging, and as a means for identifying the source of invalid or unwanted requests. From should not
be used as an insecure form of access protection.

See Also
TIdRequestHeaderInfo.Host ( 1862)

TIdRequestHeaderInfo.Host Property
Represents the Internet host name or address for the resource accessed by the HTTP request.

Pascal
property Host: String;
Description
Host is a string property used to generate the Host header, as defined in RFC 2616, and indicates the Internet host and port
number of the resource accessed in a HTTP request.

1862 Internet Direct (Indy) Version 10.1.5


Classes TIdRequestHeaderInfo Class

Host normally contains a value derived from the URI indicated in TIdHTTP.URL, and allows identification of the server to
differentiate requests that might use an ambiguous or relative URI on a HTTP server that provides multiple host names using a
single IP address.

When Host does not contain a trailing port number, it is implied that the default TIdHTTP.Port number will be used for the service
requested. For example, a request to the origin server for http://www.w3.org/pub/WWW/ could include the following value in Host:

Host: www.w3.org:80
A value must be included in Host for all HTTP/1.1 request messages. If the requested URI in TIdHTTP.URL does not include an
Internet host name for the service being requested, then the Host property for the request must be given with an empty value.

The most common form of Request-URI is that used to identify a resource on an origin server or gateway using a relative path
specifier. In this case the path in TIdHTTP.URL would contain the absolute path, and the Host property for the request must include
the network location or server identity. For example, a client wishing to retrieve the resource identitifed using the path
'www.w3.org/pub/WWW/TheProject.html' would result in a request containg the following:

Property Value
IdHTTP.URL.URI '/pub/WWW/TheProject.html'
IdHTTP.Request.Host 'www.w3.org'

Host is updated when TIdHTTP ( 1041) prepares the HTTP request for transmission to the remote server.

TIdRequestHeaderInfo.Password Property
Represents the password used in construction of authorization credentials.

Pascal
property Password: String;
Description
Password is a String property used in conjunction with Username ( 1865) to construct authorization credentials during
Authentiction of an HTTP connection.

Username ( 1865) and Password are suppied to the TIdAuthentication ( 253) class instance in Authentication ( 1861), when
BasicAuthentication ( 1862) is True, in the SetHeaders method.

See Also
TIdAuthentication ( 253)

TIdRequestHeaderInfo.Username ( 1865)

TIdRequestHeaderInfo.Authentication ( 1861)

TIdRequestHeaderInfo.BasicAuthentication ( 1862)

TIdRequestHeaderInfo.SetHeaders

TIdRequestHeaderInfo.ProxyConnection Property
Indicates the action to perform for a proxied connection.

Pascal
property ProxyConnection: String;
Description
ProxyConnection is a String property that represents the value to be used in an HTTP request for the 'Proxy-connection' header.

ProxyConnection indicates that an HTTP request using a proxied connection should attempt to use the indicated action during
connection to the proxy host.

Internet Direct (Indy) Version 10.1.5 1863


TIdRequestHeaderInfo Class Classes

ProxyConnection can contain one of the values:

Value Meaning
KEEP—ALIVE The connection should be maintained for subsequent use.
CLOSE The connection should be closed.

See Also
TIdProxyConnectionInfo ( 1795)

TIdRequestHeaderInfo.Range Property
Pascal
property Range: String;
Description
Range is a Published String property

TIdRequestHeaderInfo.Referer Property
Specifies the address where a request URI was obtained.

Pascal
property Referer: String;
Description
Referer is a String property that allows the client to specify, to the server, the address of the resource from which the Request URI
was obtained.

The Referer header allows a server to generate lists of links used to access the resource, and may be used for logging or caching
purposes.

If the Referer value is a relative URI, it should be interpreted relative to the URI for the Request, and may not include a fragment.

Example
ARequestHeaderInfo.Referer :=
'http://www.w3.org/hypertext/DataSources/Overview.html';

TIdRequestHeaderInfo.UserAgent Property
Identifies the user agent (program) issuing the HTTP request.

Pascal
property UserAgent: String;
Description
UserAgent is a String property that contains information about the user agent originating the HTTP request.

UserAgent is the the client which initiates a request. These are often browsers, editors, spiders (web-traversing robots), or other
end user tools. UserAgent is used for statistical purposes, the tracing of protocol violations, and automated recognition of user
agents for the sake of tailoring responses to avoid particular user agent limitations.

UserAgent can contain multiple product identifiers and comments identifying the agent and any subproducts which form a
significant part of the user agent. For example:

User-Agent: CERN-LineMode/2.15 libwww/2.17b3


UserAgent should be provided for all HTTP requests.

UserAgent will be reset to its default value in the Clear ( 1859) method.

1864 Internet Direct (Indy) Version 10.1.5


Classes TIdResponseHeaderInfo Class

TIdRequestHeaderInfo.Username Property
Represents the Username used in construction of authorization credentials.

Pascal
property Username: String;
Description
Username is a String property used in conjunction with Password ( 1863) to construct authorization credentials during
Authentiction of an HTTP connection.

Username and Password ( 1863) are suppied to the TIdAuthentication ( 253) class instance in Authentication ( 1861), when
BasicAuthentication ( 1862) is True, in the SetHeaders method.

See Also
TIdRequestHeaderInfo.Password ( 1863)

TIdRequestHeaderInfo.Authentication ( 1861)

TIdRequestHeaderInfo.BasicAuthentication ( 1862)

TIdRequestHeaderInfo.SetHeaders

TIdAuthentication ( 253)

TIdResponseHeaderInfo Class
Implements message headers for an HTTP response.

File
IdHTTPHeaderInfo ( 4663)

Hierarchy

Pascal
TIdResponseHeaderInfo = class(TIdEntityHeaderInfo);
Description
TIdResponseHeaderInfo is a TIdEntityHeaderInfo ( 668) descendant that implements properties and methods needed to
represent message headers in an HTTP response, as described in the Internet Standards document:

RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1]

The response headers allow the server to provide additional information about the response, or the requested resource, on the
server.

See Also
TIdRequestHeaderInfo ( 1857)

TIdEntityHeaderInfo ( 668)

TIdResponseHeaderInfo Members
The following tables list the members exposed by TIdResponseHeaderInfo.

Internet Direct (Indy) Version 10.1.5 1865


TIdResponseHeaderInfo Class Classes

Properties
Property Description
AcceptRanges ( 1868) Represent the value for the HTTP Accept-Ranges header from an HTTP response.
CacheControl ( 672) Specifies the HTTP Cache-Control general message header directives.
Connection ( 673) Indicates that the connection will be closed after a response.
ContentEncoding ( 673) Indicates transformations applied to the content of an entity.
ContentLanguage ( 673) Identifies the preferred language for the contents of an entity.
ContentLength ( 674) Indicates the size of an entity body.
ContentRangeEnd ( 674) Identifies the upper byte range in a partial request.
ContentRangeInstanceLength ( 675) Represents the entity size for a content range request.
ContentRangeStart ( 675) Identifies the beginning byte range in a partial request.
ContentType ( 675) Indicates the type, subtype, and attribute parameters for data in an entity body.
ContentVersion ( 676) Identifies the version tag associated with a server resource.
CustomHeaders ( 676) Represents custom headers names and values for the HTTP message.
Date ( 676) Indicates the origin date and time for an HTTP message.
Expires ( 677) Represents the timestamp when an entity is considered stale.
HasContentLength ( 677) Indicates if a value has been assigned to ContentLength ( 674) in the entity headers.
HasContentRange ( 678)
HasContentRangeInstance ( 678)
LastModified ( 678) Indicates the date and time a server resource was modified.
Location ( 1868) Redirects the user agent to a new location for a requested resource.
Pragma ( 678) Represents HTTP server directives in a client request.
ProxyAuthenticate ( 1869) Represents Proxy Authentication headers and values for a connection.
ProxyConnection ( 1869) Indicates the action to perform for a proxied connection after an HTTP response.
RawHeaders ( 679) Contains message header names and values in their original form.
Server ( 1869) Identifies the software used on the server.
WWWAuthenticate ( 1869) Identifies authentication schemes and parameters for a server realm.

Methods
Method Description
Clear ( 1866) Resets response header properties to their default values.
Create ( 1867) Constructor for the object instance.
Destroy ( 1867) Frees the object instance.

Legend
Method
virtual
Property
read only

TIdResponseHeaderInfo Methods
The Methods of the TIdResponseHeaderInfo class are listed here.

Methods
Method Description
Clear ( 1866) Resets response header properties to their default values.
Create ( 1867) Constructor for the object instance.
Destroy ( 1867) Frees the object instance.

Legend
Method
virtual

TIdResponseHeaderInfo.Clear Method
Resets response header properties to their default values.

1866 Internet Direct (Indy) Version 10.1.5


Classes TIdResponseHeaderInfo Class

Pascal
procedure Clear; override;
Description
Clear is an overridden procedure in TIdResponseHeaderInfo ( 1865). Clear calls the inherited Clear method. Clear resets the
following properties to their default empty values, including:

Property Value
ContentType ( 675) 'text/html'
Location ( 1868) '' (empty string)
Server ( 1869) '' (empty string)

Clear also resets the values in the ProxyAuthenticate ( 1869) and WWWAuthenticate ( 1869) properties by calling their
respective Clear methods.

The value of the ContentType ( 675) property is set to the default MIME type and subtype for HTTP responses ('text/html').

See Also
TIdResponseHeaderInfo.Server ( 1869)

TIdResponseHeaderInfo.Location ( 1868)

TIdResponseHeaderInfo. ContentType ( 675)

TIdResponseHeaderInfo.ProxyAuthenticate ( 1869)

TIdResponseHeaderInfo.WWWAuthenticate ( 1869)

TIdResponseHeaderInfo.Create Constructor
Constructor for the object instance.

Pascal
constructor Create; override;
Description
Create is the constructor for the object instance, and calls the inherited constructor.

Create allocates the resources required for the ProxyAuthentiucate and WWWAuthenticate ( 1869) properties.

Create sets the default value for the ContentType ( 675) property to 'text/html'.

Use Clear ( 1866) to reset response headers to their default values.

See Also
TIdResponseHeaderInfo.ProxyAuthenticate ( 1869)

TIdResponseHeaderInfo.WWWAuthenticate ( 1869)

TIdResponseHeaderInfo. ContentType ( 675)

TIdResponseHeaderInfo.Clear ( 1866)

TIdResponseHeaderInfo.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;

Internet Direct (Indy) Version 10.1.5 1867


TIdResponseHeaderInfo Class Classes

Description
Destroy is the destructor for the object instance.

Destroy frees resources allocated to the object WWWAuthenticate ( 1869) and ProxyAuthenticate ( 1869) properties.

Destroy calls the inherited Destroy method prior to exiting from the method.

See Also
TIdResponseHeaderInfo.WWWAuthenticate ( 1869)

TIdResponseHeaderInfo.ProxyAuthenticate ( 1869)

TIdResponseHeaderInfo Properties
The Properties of the TIdResponseHeaderInfo class are listed here.

Properties
Property Description
AcceptRanges ( 1868) Represent the value for the HTTP Accept-Ranges header from an HTTP response.
Location ( 1868) Redirects the user agent to a new location for a requested resource.
ProxyAuthenticate ( 1869) Represents Proxy Authentication headers and values for a connection.
ProxyConnection ( 1869) Indicates the action to perform for a proxied connection after an HTTP response.
Server ( 1869) Identifies the software used on the server.
WWWAuthenticate ( 1869) Identifies authentication schemes and parameters for a server realm.

Legend
Property

TIdResponseHeaderInfo.AcceptRanges Property
Represent the value for the HTTP Accept-Ranges header from an HTTP response.

Pascal
property AcceptRanges: string;
Description
AcceptRanges is a string property used to represent the value for the HTTP Accept-Ranges header from an HTTP response.
AcceptRanges indicates that the HTTP server acceptance of range requests for a resource.

AcceptRanges can contain the values 'bytes' or 'none' in the range unit. An HTTP client can generate a byte-range requests without
having received the AcceptRange header for the resource involved.

Servers that do not accept any kind of range request for a resource may send the value 'none' in the AcceptRanges property to
advise the client not to attempt a range request.

TIdResponseHeaderInfo.Location Property
Redirects the user agent to a new location for a requested resource.

Pascal
property Location: string;
Description
Location is a String property used to redirect the recipient of the HTTP response to a location other than the requested URI.
Location is returned as part of an HTTP response.

Location contains a valid URI expressed in the form:

http://www.w3.org/pub/WWW/People.html

1868 Internet Direct (Indy) Version 10.1.5


Classes TIdResponseHeaderInfo Class

TIdResponseHeaderInfo.ProxyAuthenticate Property
Represents Proxy Authentication headers and values for a connection.

Pascal
property ProxyAuthenticate: TIdHeaderList;
Description
ProxyAuthenticate is a TIdHeaderList ( 1024) property that contains header names and values for a Proxy Authentication
challenge.

ProxyAuthenticate values indicate the authentication scheme and parameters applicable to the proxy for the requested server
resource. ProxyAuthenticate header values apply to the current proxy connection and should not be passed to a user agent.

See Also
TIdHeaderList ( 1024)

TIdResponseHeaderInfo.ProxyConnection Property
Indicates the action to perform for a proxied connection after an HTTP response.

Pascal
property ProxyConnection: string;
Description
ProxyConnection is a String property that represents the value received in an HTTP response for the 'Proxy-connection' header.
ProxyConnection indicates that an HTTP response using a proxied connection should perform the indicated action after completion
of the HTTP Response.

ProxyConnection can contain one of the following values:

Value Meaning
KEEP—ALIVE The connection should be maintained for subsequent use.
CLOSE The connection should be closed.

TIdResponseHeaderInfo.Server Property
Identifies the software used on the server.

Pascal
property Server: string;
Description
Server is a String property that contains information about the software used by the server to handle the HTTP request. Server can
contain multiple product tokens and comments identifying the server and any significant subproducts.

For example:

Server: CERN/3.0 libwww/2.17


Revealing the specific software version of the server might allow the server machine to become more vulnerable to attacks against
software that is known to contain security holes. Server implementors are encouraged to make this field a configurable option.

TIdResponseHeaderInfo.WWWAuthenticate Property
Identifies authentication schemes and parameters for a server realm.

Internet Direct (Indy) Version 10.1.5 1869


TIdRexec Class Classes

Pascal
property WWWAuthenticate: TIdHeaderList;
Description
WWWAuthenticate is a TIdHeaderList ( 1024) property that contains header names and values used to indicate at least one
authentication scheme and parameters for a requested server resource.

Unlike ProxyAuthenticate ( 1869) headers, WWWAuthenticate values apply to any connection using the relevant server realm.

See Also
TIdResponseHeaderInfo.ProxyAuthenticate ( 1869)

TIdRexec Class
This class implements Remote Execution (Rexec) as a client.

File
IdRexec ( 4710)

Hierarchy

Pascal
TIdRexec = class(TIdRemoteCMDClient);
Description
TIdRexec is a TIdRemoteCMDClient ( 1817) descendant that implements Unix Remote Execution (Rexec) as a client.

The Rexec protocol is sometimes used to run tasks from remote locations while requiring password authentication. This protocol
was originally intended as a temporary "hack" in some older Berkeley Unix Distributions that came into wide usage.

Note that while this protocol is a little more secure than RSH, it still can pose a security hazard on the Internet because the User ID
and password are sent in plain-text and that can easily be intercepted by someone wanting to run destructive program.

To use this component:

• Set the TIdRexec.Host ( 1873) to the I.P. Address or name of the remote machine.

• Set the TIdRexec.UserName to the user's remote User ID

• Set the TIdRexec.Password ( 1873) to the user's password

• Use the TIdRexec.Execute ( 1872) method with the command to run on the remote machine
See Also
TIdRexec.Port ( 1873) TIdRexec.Username ( 1874) TIdRexec.Password ( 1873) TIdRexec.Execute ( 1872)
TIdRemoteCMDClient ( 1817)

TIdRexec Members
The following tables list the members exposed by TIdRexec.

1870 Internet Direct (Indy) Version 10.1.5


Classes TIdRexec Class

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ErrorMessage ( 1821) Error message returned from the Rexec or RSH Deamon.
ErrorReply ( 1821) Indicates if the RSH or Rexec Deamons returned an error.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
Host ( 1873) RSH daemon for remote command execution.
IOHandler ( 2364) The input / output mechanism for the connection.
LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Password ( 1873) Account authorization used for the connectiong to the remote host.
Port ( 1873) Port number for the connection to the Rexec server.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
Username ( 1874) Account identification used for connecting to the remote host.
UseStdError ( 1821) This property indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the server.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 1820) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
Execute ( 1872) Executes a command on the RSH Daemon.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Internet Direct (Indy) Version 10.1.5 1871


TIdRexec Class Classes

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

TIdRexec Methods
The Methods of the TIdRexec class are listed here.

Methods
Method Description
Execute ( 1872) Executes a command on the RSH Daemon.

Legend
Method
virtual

TIdRexec.Execute Method
Executes a command on the RSH Daemon.

Pascal
function Execute(
ACommand: String
): String; override;
Parameters
Parameters Description
ACommand The command to execute on the remote system.

Returns
String - The results from the command that was executed or no value if an error occurred.

Description
Execute is an overridden String function used to authenticate to the Rexec Deamon with the TIdExec.UserName and the
TIdRexec.Password ( 1873), and than execute a command (ACommand) on the Rexec Deamon. This is only intended for
non-interactive processes where the no input is expected from the user.

If an error occurrs, TIdRemoteCMD.ErrorReply ( 1821) is set to true and the TIdRemoteCMD.ErrorMessage ( 1821) contains the
message returned from the Rexec Deamon. The inherited TIdRemoteCMDClient.UseStdError ( 1821) property effects how error
messages are sent from the Rexec Deamon.

See Also
TIdRemoteCMDClient.ErrorMessage ( 1821)

TIdRemoteCMDClient.UseStdError ( 1821)

TIdRexec.Username ( 1874)

TIdRexec.Password ( 1873)

1872 Internet Direct (Indy) Version 10.1.5


Classes TIdRexec Class

TIdRexec Properties
The Properties of the TIdRexec class are listed here.

Properties
Property Description
Host ( 1873) RSH daemon for remote command execution.
Password ( 1873) Account authorization used for the connectiong to the remote host.
Port ( 1873) Port number for the connection to the Rexec server.
Username ( 1874) Account identification used for connecting to the remote host.

Legend
Property

TIdRexec.Host Property
RSH daemon for remote command execution.

Pascal
property Host;
Description
Host is a Published property in TIdRexec ( 1870) that identifies the RSH daemon for remote command execution.

TIdRexec.Password Property
Account authorization used for the connectiong to the remote host.

Pascal
property Password;
Description
Password is a String property that represents the account authorization used for the connection to the remote host.

Username ( 1874) and Password are used for authentication of the connection when the Execute ( 1872) method is called.

See Also
Execute ( 1872) Username ( 1874)

TIdRexec.Port Property
Port number for the connection to the Rexec server.

Pascal
property Port;
Description
Port is an Integer property that identifies the port number for connecting to an Rexec server.

The default value for Port is Id_PORT_exec ( 3694) (which is commonly used for the Rexec protocol) as assigned during
initialization of the component.

See Also
Create ( 267) Id_PORT_exec ( 3694)

Internet Direct (Indy) Version 10.1.5 1873


TIdRexecServer Class Classes

TIdRexec.Username Property
Account identification used for connecting to the remote host.

Pascal
property Username;
Description
Username is a String property that represents the account identification used for connecting to the remote host.

Username and Password ( 1873) are used for authenticating the client connection when the Execute ( 1872) method is called.

See Also
Execute ( 1872) Password ( 1873)

TIdRexecServer Class
Implements a Remote Execution (REXEC) daemon.

File
IdRexecServer ( 4710)

Hierarchy

Pascal
TIdRexecServer = class(TIdRemoteCMDServer);
Description
TIdRexecServer is a TIdRemoteCMDServer ( 1822) decendant that implements a multi-threaded REXEC Daemon (Server) based
on the Remote Execution (REXEC) defacto standard.

The REXEC protocol provides remote execution facilities for a command, using authentication based on username and password
values. The REXEC daemon performs automatic login, and user authentication when user name and password are provided.

TIdRexecServer implements event handlers that allow notification and execution of a command from a remote client. Client
connections to TIdRexecServer may provide a port number to be used to redirect output from the standard error handler, or NULL
to indicate that standard error redirection is not required.

A TIdRexecServer implementation may assign a procedure to the OnCommand ( 1876) event handler to OnCommand ( 1876)
to control execution of the client thread.

See Also
TIdRemoteCMDServer ( 1822) TIdRexec ( 1870) IndySupport ( 15)

TIdRexecServer Members
The following tables list the members exposed by TIdRexecServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1875) The port number used when listening for new client connections.

1874 Internet Direct (Indy) Version 10.1.5


Classes TIdRexecServer Class

ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.
ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
SendError ( 1824) Sends an error message to either the standard error connection or the client connection.
SendResults ( 1824) Sends the results from remote command execution to a client connection.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommand ( 1876) Event handler for executing a command from a remote client connection.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdRexecServer Properties
The Properties of the TIdRexecServer class are listed here.

Properties
Property Description
DefaultPort ( 1875) The port number used when listening for new client connections.

Legend
Property

TIdRexecServer.DefaultPort Property
The port number used when listening for new client connections.

Internet Direct (Indy) Version 10.1.5 1875


TIdRIPHdr Class Classes

Pascal
property DefaultPort: TIdPort;
Description
DefaultPort is an Integer property that represent the default port number used to listen for new client connections. The value of
DefaultPort is provided for use with TIdSocketHandles ( 2090).

TIdTCPServer ( 2375) and descendant classes use the DefaultPort number to bind allocated sockets handles when the Active (
458) property to set to True.

The default value for DefaultPort is Id_PORT_exec ( 3694) as assigned during intialization of the component.

See Also
TIdSocketHandles.DefaultPort ( 2093) TIdTCPServer ( 2375)

TIdRexecServer Events
The Events of the TIdRexecServer class are listed here.

Events
Event Description
OnCommand ( 1876) Event handler for executing a command from a remote client connection.

Legend
Event

TIdRexecServer.OnCommand Event
Event handler for executing a command from a remote client connection.

Pascal
property OnCommand: TIdRexecCommandEvent;
Description
OnCommand is a TIdRexecCommandEvent ( 3078) property that represents the event handler signalled during execution of the
threaded context for the client connetion to the RExec protocol server.

OnCommand allows the server to perform authentication and execution of a command request from the remote client using
arguments provide in the TIdRexecCommandEvent ( 3078) event notification.

Assign a procedure to the event handler in TIdRexecServer ( 1874) to allow responding to the event notification.

See Also
TIdRexecCommandEvent ( 3078)

TIdRIPHdr Class
File
IdRawHeaders ( 4701)

Hierarchy

Pascal
TIdRIPHdr = class(TIdStruct);

1876 Internet Direct (Indy) Version 10.1.5


Classes TIdRIPHdr Class

Description
TIdRIPHdr is a TIdStruct ( 2261) descendant.

See Also
TIdStruct ( 2261)

TIdRIPHdr Members
The following tables list the members exposed by TIdRIPHdr.

Properties
Property Description
rip_addr ( 1878)
rip_af ( 1878)
rip_cmd ( 1879)
rip_mask ( 1879)
rip_metric ( 1879)
rip_next_hop ( 1879)
rip_rd ( 1879)
rip_rt ( 1879)
rip_ver ( 1879)

Methods
Method Description
create ( 2262)
ReadStruct ( 1877)
WriteStruct ( 1878)

Legend
Constructor
virtual
Property

TIdRIPHdr Methods
The Methods of the TIdRIPHdr class are listed here.

Methods
Method Description
ReadStruct ( 1877)
WriteStruct ( 1878)

Legend
Method
virtual

TIdRIPHdr.ReadStruct Method
Pascal
procedure ReadStruct(
const ABytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
ABytes Scope is const. Type is TIdBytes ( 3007).

Internet Direct (Indy) Version 10.1.5 1877


TIdRIPHdr Class Classes

VIndex Scope is var. Type is Integer.

Description
ReadStruct is a overridden method.

TIdRIPHdr.WriteStruct Method
Pascal
procedure WriteStruct(
var VBytes: TIdBytes;
var VIndex: Integer
); override;
Parameters
Parameters Description
VBytes Scope is var. Type is TIdBytes ( 3007).
VIndex Scope is var. Type is Integer.

Description
WriteStruct is a overridden method.

TIdRIPHdr Properties
The Properties of the TIdRIPHdr class are listed here.

Properties
Property Description
rip_addr ( 1878)
rip_af ( 1878)
rip_cmd ( 1879)
rip_mask ( 1879)
rip_metric ( 1879)
rip_next_hop ( 1879)
rip_rd ( 1879)
rip_rt ( 1879)
rip_ver ( 1879)

Legend
Property

TIdRIPHdr.rip_addr Property
Pascal
property rip_addr: longword;
Description
rip_addr is a Public longword property. Write access for the property is implemented using Frip_addr.

TIdRIPHdr.rip_af Property
Pascal
property rip_af: word;
Description
rip_af is a Public word property. Write access for the property is implemented using Frip_af.

1878 Internet Direct (Indy) Version 10.1.5


Classes TIdRIPHdr Class

TIdRIPHdr.rip_cmd Property
Pascal
property rip_cmd: byte;
Description
rip_cmd is a Public byte property. Write access for the property is implemented using Frip_cmd.

TIdRIPHdr.rip_mask Property
Pascal
property rip_mask: longword;
Description
rip_mask is a Public longword property. Write access for the property is implemented using Frip_mask.

TIdRIPHdr.rip_metric Property
Pascal
property rip_metric: longword;
Description
rip_metric is a Public longword property. Write access for the property is implemented using Frip_metric.

TIdRIPHdr.rip_next_hop Property
Pascal
property rip_next_hop: longword;
Description
rip_next_hop is a Public longword property. Write access for the property is implemented using Frip_next_hop.

TIdRIPHdr.rip_rd Property
Pascal
property rip_rd: word;
Description
rip_rd is a Public word property. Write access for the property is implemented using Frip_rd.

TIdRIPHdr.rip_rt Property
Pascal
property rip_rt: word;
Description
rip_rt is a Public word property. Write access for the property is implemented using Frip_rt.

TIdRIPHdr.rip_ver Property
Pascal
property rip_ver: byte;

Internet Direct (Indy) Version 10.1.5 1879


TIdRR_A Class Classes

Description
rip_ver is a Public byte property. Write access for the property is implemented using Frip_ver.

TIdRR_A Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_A = class(TIdTextModeResourceRecord);
Description
TIdRR_A is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_A Members
The following tables list the members exposed by TIdRR_A.

Properties
Property Description
Address ( 1882)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1881)
ClearAnswer ( 2410)
Create ( 1881)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1881)

Legend
Method
virtual
Property

TIdRR_A Methods
The Methods of the TIdRR_A class are listed here.

1880 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_A Class

Methods
Method Description
BinQueryRecord ( 1881)
Create ( 1881)
TextRecord ( 1881)

Legend
Method
virtual

TIdRR_A.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_A.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_A.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

Internet Direct (Indy) Version 10.1.5 1881


TIdRR_AAAA Class Classes

TIdRR_A Properties
The Properties of the TIdRR_A class are listed here.

Properties
Property Description
Address ( 1882)

Legend
Property

TIdRR_A.Address Property
Pascal
property Address: AnsiString;
Description
Address is a Public AnsiString property. Write access for the property is implemented using SetA.

TIdRR_AAAA Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_AAAA = class(TIdTextModeResourceRecord);
Description
TIdRR_AAAA is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_AAAA Members
The following tables list the members exposed by TIdRR_AAAA.

Properties
Property Description
Address ( 1884)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1883)

1882 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_AAAA Class

ClearAnswer ( 2410)
Create ( 1883)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1884)

Legend
Method
virtual
Property

TIdRR_AAAA Methods
The Methods of the TIdRR_AAAA class are listed here.

Methods
Method Description
BinQueryRecord ( 1883)
Create ( 1883)
TextRecord ( 1884)

Legend
Method
virtual

TIdRR_AAAA.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_AAAA.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1883


TIdRR_CName Class Classes

TIdRR_AAAA.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_AAAA Properties
The Properties of the TIdRR_AAAA class are listed here.

Properties
Property Description
Address ( 1884)

Legend
Property

TIdRR_AAAA.Address Property
Pascal
property Address: AnsiString;
Description
Address is a Public AnsiString property. Write access for the property is implemented using SetA.

TIdRR_CName Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_CName = class(TIdTextModeResourceRecord);
Description
TIdRR_CName is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

1884 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_CName Class

TIdRR_CName Members
The following tables list the members exposed by TIdRR_CName.

Properties
Property Description
CName ( 1886)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1885)
ClearAnswer ( 2410)
Create ( 1886)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1886)

Legend
Method
virtual
Property

TIdRR_CName Methods
The Methods of the TIdRR_CName class are listed here.

Methods
Method Description
BinQueryRecord ( 1885)
Create ( 1886)
TextRecord ( 1886)

Legend
Method
virtual

TIdRR_CName.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Internet Direct (Indy) Version 10.1.5 1885


TIdRR_Error Class Classes

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_CName.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_CName.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_CName Properties
The Properties of the TIdRR_CName class are listed here.

Properties
Property Description
CName ( 1886)

Legend
Property

TIdRR_CName.CName Property
Pascal
property CName: AnsiString;
Description
CName is a Public AnsiString property. Write access for the property is implemented using SetCName.

1886 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_Error Class

TIdRR_Error Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_Error = class(TIdTextModeResourceRecord);
Description
TIdRR_Error is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_Error Members
The following tables list the members exposed by TIdRR_Error.

Properties
Property Description
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 2409)
ClearAnswer ( 2410)
Create ( 1888)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 2411)

Legend
Method
virtual
Property

TIdRR_Error Methods
The Methods of the TIdRR_Error class are listed here.

Methods
Method Description
Create ( 1888)

Internet Direct (Indy) Version 10.1.5 1887


TIdRR_HINFO Class Classes

Legend
Constructor

TIdRR_Error.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_HINFO Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_HINFO = class(TIdTextModeResourceRecord);
Description
TIdRR_HINFO is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_HINFO Members
The following tables list the members exposed by TIdRR_HINFO.

Properties
Property Description
CPU ( 1890)
OS ( 1890)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1889)
ClearAnswer ( 2410)
Create ( 1889)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1889)

1888 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_HINFO Class

Legend
Method
virtual
Property

TIdRR_HINFO Methods
The Methods of the TIdRR_HINFO class are listed here.

Methods
Method Description
BinQueryRecord ( 1889)
Create ( 1889)
TextRecord ( 1889)

Legend
Method
virtual

TIdRR_HINFO.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_HINFO.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_HINFO.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Internet Direct (Indy) Version 10.1.5 1889


TIdRR_MB Class Classes

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_HINFO Properties
The Properties of the TIdRR_HINFO class are listed here.

Properties
Property Description
CPU ( 1890)
OS ( 1890)

Legend
Property

TIdRR_HINFO.CPU Property
Pascal
property CPU: AnsiString;
Description
CPU is a Public AnsiString property. Write access for the property is implemented using SetCPU.

TIdRR_HINFO.OS Property
Pascal
property OS: AnsiString;
Description
OS is a Public AnsiString property. Write access for the property is implemented using SetOS.

TIdRR_MB Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_MB = class(TIdTextModeResourceRecord);
Description
TIdRR_MB is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

1890 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MB Class

TIdRR_MB Members
The following tables list the members exposed by TIdRR_MB.

Properties
Property Description
MADName ( 1892)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1891)
ClearAnswer ( 2410)
Create ( 1892)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1892)

Legend
Method
virtual
Property

TIdRR_MB Methods
The Methods of the TIdRR_MB class are listed here.

Methods
Method Description
BinQueryRecord ( 1891)
Create ( 1892)
TextRecord ( 1892)

Legend
Method
virtual

TIdRR_MB.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Internet Direct (Indy) Version 10.1.5 1891


TIdRR_MG Class Classes

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_MB.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_MB.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_MB Properties
The Properties of the TIdRR_MB class are listed here.

Properties
Property Description
MADName ( 1892)

Legend
Property

TIdRR_MB.MADName Property
Pascal
property MADName: AnsiString;
Description
MADName is a Public AnsiString property. Write access for the property is implemented using SetMADName.

1892 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MG Class

TIdRR_MG Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_MG = class(TIdTextModeResourceRecord);
Description
TIdRR_MG is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_MG Members
The following tables list the members exposed by TIdRR_MG.

Properties
Property Description
MGMName ( 1895)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1894)
ClearAnswer ( 2410)
Create ( 1894)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1894)

Legend
Method
virtual
Property

TIdRR_MG Methods
The Methods of the TIdRR_MG class are listed here.

Methods
Method Description
BinQueryRecord ( 1894)

Internet Direct (Indy) Version 10.1.5 1893


TIdRR_MG Class Classes

Create ( 1894)
TextRecord ( 1894)

Legend
Method
virtual

TIdRR_MG.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_MG.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_MG.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_MG Properties
The Properties of the TIdRR_MG class are listed here.

1894 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MINFO Class

Properties
Property Description
MGMName ( 1895)

Legend
Property

TIdRR_MG.MGMName Property
Pascal
property MGMName: AnsiString;
Description
MGMName is a Public AnsiString property. Write access for the property is implemented using SetMGMName.

TIdRR_MINFO Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_MINFO = class(TIdTextModeResourceRecord);
Description
TIdRR_MINFO is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_MINFO Members
The following tables list the members exposed by TIdRR_MINFO.

Properties
Property Description
ErrorHandle_Mail ( 1897)
Responsible_Mail ( 1897)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1896)
ClearAnswer ( 2410)
Create ( 1896)
Destroy ( 2410)
GetValue ( 2410)

Internet Direct (Indy) Version 10.1.5 1895


TIdRR_MINFO Class Classes

ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1896)

Legend
Method
virtual
Property

TIdRR_MINFO Methods
The Methods of the TIdRR_MINFO class are listed here.

Methods
Method Description
BinQueryRecord ( 1896)
Create ( 1896)
TextRecord ( 1896)

Legend
Method
virtual

TIdRR_MINFO.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_MINFO.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_MINFO.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;

1896 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MR Class

Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_MINFO Properties
The Properties of the TIdRR_MINFO class are listed here.

Properties
Property Description
ErrorHandle_Mail ( 1897)
Responsible_Mail ( 1897)

Legend
Property

TIdRR_MINFO.ErrorHandle_Mail Property
Pascal
property ErrorHandle_Mail: AnsiString;
Description
ErrorHandle_Mail is a Public AnsiString property. Write access for the property is implemented using SetErrorHandle_Mail.

TIdRR_MINFO.Responsible_Mail Property
Pascal
property Responsible_Mail: AnsiString;
Description
Responsible_Mail is a Public AnsiString property. Write access for the property is implemented using SetResponsible_Mail.

TIdRR_MR Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_MR = class(TIdTextModeResourceRecord);
Description
TIdRR_MR is a TIdTextModeResourceRecord ( 2408) descendant.

Internet Direct (Indy) Version 10.1.5 1897


TIdRR_MR Class Classes

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_MR Members
The following tables list the members exposed by TIdRR_MR.

Properties
Property Description
NewName ( 1899)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1898)
ClearAnswer ( 2410)
Create ( 1899)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1899)

Legend
Method
virtual
Property

TIdRR_MR Methods
The Methods of the TIdRR_MR class are listed here.

Methods
Method Description
BinQueryRecord ( 1898)
Create ( 1899)
TextRecord ( 1899)

Legend
Method
virtual

TIdRR_MR.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

1898 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MX Class

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_MR.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_MR.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_MR Properties
The Properties of the TIdRR_MR class are listed here.

Properties
Property Description
NewName ( 1899)

Legend
Property

TIdRR_MR.NewName Property
Pascal
property NewName: AnsiString;
Description
NewName is a Public AnsiString property. Write access for the property is implemented using SetNewName.

Internet Direct (Indy) Version 10.1.5 1899


TIdRR_MX Class Classes

TIdRR_MX Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_MX = class(TIdTextModeResourceRecord);
Description
TIdRR_MX is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_MX Members
The following tables list the members exposed by TIdRR_MX.

Properties
Property Description
Exchange ( 1902)
Preference ( 1902)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1901)
ClearAnswer ( 2410)
Create ( 1901)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1901)

Legend
Method
virtual
Property

TIdRR_MX Methods
The Methods of the TIdRR_MX class are listed here.

1900 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_MX Class

Methods
Method Description
BinQueryRecord ( 1901)
Create ( 1901)
TextRecord ( 1901)

Legend
Method
virtual

TIdRR_MX.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_MX.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_MX.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

Internet Direct (Indy) Version 10.1.5 1901


TIdRR_NS Class Classes

TIdRR_MX Properties
The Properties of the TIdRR_MX class are listed here.

Properties
Property Description
Exchange ( 1902)
Preference ( 1902)

Legend
Property

TIdRR_MX.Exchange Property
Pascal
property Exchange: AnsiString;
Description
Exchange is a Public AnsiString property. Write access for the property is implemented using SetExchange.

TIdRR_MX.Preference Property
Pascal
property Preference: AnsiString;
Description
Preference is a Public AnsiString property. Write access for the property is implemented using SetPref.

TIdRR_NS Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_NS = class(TIdTextModeResourceRecord);
Description
TIdRR_NS is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_NS Members
The following tables list the members exposed by TIdRR_NS.

Properties
Property Description
NSDName ( 1904)

1902 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_NS Class

RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1903)
ClearAnswer ( 2410)
Create ( 1904)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1904)

Legend
Method
virtual
Property

TIdRR_NS Methods
The Methods of the TIdRR_NS class are listed here.

Methods
Method Description
BinQueryRecord ( 1903)
Create ( 1904)
TextRecord ( 1904)

Legend
Method
virtual

TIdRR_NS.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

Internet Direct (Indy) Version 10.1.5 1903


TIdRR_PTR Class Classes

TIdRR_NS.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_NS.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_NS Properties
The Properties of the TIdRR_NS class are listed here.

Properties
Property Description
NSDName ( 1904)

Legend
Property

TIdRR_NS.NSDName Property
Pascal
property NSDName: AnsiString;
Description
NSDName is a Public AnsiString property. Write access for the property is implemented using SetNS.

TIdRR_PTR Class
File
IdDNSCommon ( 4617)

Hierarchy

1904 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_PTR Class

Pascal
TIdRR_PTR = class(TIdTextModeResourceRecord);
Description
TIdRR_PTR is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_PTR Members
The following tables list the members exposed by TIdRR_PTR.

Properties
Property Description
PTRDName ( 1907)
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1906)
ClearAnswer ( 2410)
Create ( 1906)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1906)

Legend
Method
virtual
Property

TIdRR_PTR Methods
The Methods of the TIdRR_PTR class are listed here.

Methods
Method Description
BinQueryRecord ( 1906)
Create ( 1906)
TextRecord ( 1906)

Legend
Method
virtual

Internet Direct (Indy) Version 10.1.5 1905


TIdRR_PTR Class Classes

TIdRR_PTR.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_PTR.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_PTR.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_PTR Properties
The Properties of the TIdRR_PTR class are listed here.

Properties
Property Description
PTRDName ( 1907)

Legend
Property

1906 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_SOA Class

TIdRR_PTR.PTRDName Property
Pascal
property PTRDName: AnsiString;
Description
PTRDName is a Public AnsiString property. Write access for the property is implemented using SetPTRName.

TIdRR_SOA Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_SOA = class(TIdTextModeResourceRecord);
Description
TIdRR_SOA is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_SOA Members
The following tables list the members exposed by TIdRR_SOA.

Properties
Property Description
Expire ( 1909)
Minimum ( 1909)
MName ( 1909)
Refresh ( 1909)
Retry ( 1910)
RName ( 1910)
RRDatas ( 2412)
RRName ( 2412)
Serial ( 1910)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1908)
ClearAnswer ( 2410)
Create ( 1908)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)

Internet Direct (Indy) Version 10.1.5 1907


TIdRR_SOA Class Classes

TextRecord ( 1908)

Legend
Method
virtual
Property

TIdRR_SOA Methods
The Methods of the TIdRR_SOA class are listed here.

Methods
Method Description
BinQueryRecord ( 1908)
Create ( 1908)
TextRecord ( 1908)

Legend
Method
virtual

TIdRR_SOA.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

TIdRR_SOA.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_SOA.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

1908 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_SOA Class

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_SOA Properties
The Properties of the TIdRR_SOA class are listed here.

Properties
Property Description
Expire ( 1909)
Minimum ( 1909)
MName ( 1909)
Refresh ( 1909)
Retry ( 1910)
RName ( 1910)
Serial ( 1910)

Legend
Property

TIdRR_SOA.Expire Property
Pascal
property Expire: AnsiString;
Description
Expire is a Public AnsiString property. Write access for the property is implemented using SetExpire.

TIdRR_SOA.Minimum Property
Pascal
property Minimum: AnsiString;
Description
Minimum is a Public AnsiString property. Write access for the property is implemented using SetMin.

TIdRR_SOA.MName Property
Pascal
property MName: AnsiString;
Description
MName is a Public AnsiString property. Write access for the property is implemented using SetMName.

TIdRR_SOA.Refresh Property
Pascal
property Refresh: AnsiString;

Internet Direct (Indy) Version 10.1.5 1909


TIdRR_TXT Class Classes

Description
Refresh is a Public AnsiString property. Write access for the property is implemented using SetRefresh.

TIdRR_SOA.Retry Property
Pascal
property Retry: AnsiString;
Description
Retry is a Public AnsiString property. Write access for the property is implemented using SetRetry.

TIdRR_SOA.RName Property
Pascal
property RName: AnsiString;
Description
RName is a Public AnsiString property. Write access for the property is implemented using SetRName.

TIdRR_SOA.Serial Property
Pascal
property Serial: AnsiString;
Description
Serial is a Public AnsiString property. Write access for the property is implemented using SetSerial.

TIdRR_TXT Class
File
IdDNSCommon ( 4617)

Hierarchy

Pascal
TIdRR_TXT = class(TIdTextModeResourceRecord);
Description
TIdRR_TXT is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_TXT Members
The following tables list the members exposed by TIdRR_TXT.

Properties
Property Description
RRDatas ( 2412)

1910 Internet Direct (Indy) Version 10.1.5


Classes TIdRR_TXT Class

RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TXT ( 1912)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 1911)
ClearAnswer ( 2410)
Create ( 1912)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 1912)

Legend
Method
virtual
Property

TIdRR_TXT Methods
The Methods of the TIdRR_TXT class are listed here.

Methods
Method Description
BinQueryRecord ( 1911)
Create ( 1912)
TextRecord ( 1912)

Legend
Method
virtual

TIdRR_TXT.BinQueryRecord Method
Pascal
function BinQueryRecord(
FullName: string
): TIdBytes; override;
Parameters
Parameters Description
FullName Type is string.

Returns
TIdBytes ( 3007)

Description
BinQueryRecord is a overridden method.

BinQueryRecord returns a TIdBytes ( 3007) value.

Internet Direct (Indy) Version 10.1.5 1911


TIdRR_WKS Class Classes

TIdRR_TXT.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

TIdRR_TXT.TextRecord Method
Pascal
function TextRecord(
FullName: string
): string; override;
Parameters
Parameters Description
FullName Type is string.

Returns
string

Description
TextRecord is a overridden method.

TextRecord returns a string value.

TIdRR_TXT Properties
The Properties of the TIdRR_TXT class are listed here.

Properties
Property Description
TXT ( 1912)

Legend
Property

TIdRR_TXT.TXT Property
Pascal
property TXT: AnsiString;
Description
TXT is a Public AnsiString property. Write access for the property is implemented using SetTXT.

TIdRR_WKS Class
File
IdDNSCommon ( 4617)

Hierarchy

1912 Internet Direct (Indy) Version 10.1.5


Classes TIdRSH Class

Pascal
TIdRR_WKS = class(TIdTextModeResourceRecord);
Description
TIdRR_WKS is a TIdTextModeResourceRecord ( 2408) descendant.

See Also
TIdTextModeResourceRecord ( 2408)

TIdRR_WKS Members
The following tables list the members exposed by TIdRR_WKS.

Properties
Property Description
RRDatas ( 2412)
RRName ( 2412)
TimeOut ( 2412)
TTL ( 2412)
TypeCode ( 2412)

Methods
Method Description
AddOneParameter ( 2409)
BinQueryRecord ( 2409)
ClearAnswer ( 2410)
Create ( 1913)
Destroy ( 2410)
GetValue ( 2410)
ifAddFullName ( 2411)
ItemCount ( 2411)
TextRecord ( 2411)

Legend
Method
virtual
Property

TIdRR_WKS Methods
The Methods of the TIdRR_WKS class are listed here.

Methods
Method Description
Create ( 1913)

Legend
Constructor

TIdRR_WKS.Create Constructor
Pascal
constructor Create;
Description
Create is a constructor for the object instance.

Internet Direct (Indy) Version 10.1.5 1913


TIdRSH Class Classes

TIdRSH Class
Implements Unix Remote Shell (RSH) client.

File
IdRSH ( 4711)

Hierarchy

Pascal
TIdRSH = class(TIdRemoteCMDClient);
Description
TIdRSH is a TIdRemoteCMDClient ( 1817) descendant that implements a Unix Remote Shell (RSH) client. The RSH protocol is
sometimes used to run tasks from remote locations without having to send passwords to a remote system.

The RSH protocol was originally intended as a temporary "hack" in some older Berkeley Unix Distributions that came into wide
usage.

Please note that this protocol can pose a security hazard on the Internet, as it uses only user ID's which are sent as clear text. In
addition, IP Addresses and host names used as part of the server authentication can be falsified. Port ( 1917) number restrictions
for the RSH protocol can easily be overcome by using a single-user operating system or by someone with administrative privileges
on a multi-user operating system.

The RSH protocol is not compatible with some firewall/proxy configurations.

To use this component:

• Set Host to the IP Address or host name for the remote machine.
• Set ClientUserName ( 1917) to the user's local User ID.
• Set HostUserName ( 1917) to the user's remote User ID.
• Use the Execute ( 1916) method with a command to be run on the remote machine.
See Also
Port ( 1917) ClientUserName ( 1917) HostUserName ( 1917) Execute ( 1916)

TIdRemoteCMDClient ( 1817)

TIdRSH Members
The following tables list the members exposed by TIdRSH.

Properties
Property Description
BoundIP ( 2345) Specifies the the local IP address to be used for the Socket ( 2369) connection.
BoundPort ( 2345) Specifies the the port number to be used for the Socket ( 2369) connection.
BoundPortMax ( 2346) Represents the upper bounds for local port numbers derived when establishing the client connection.
BoundPortMin ( 2346) Represents the lowerr bounds for local port numbers derived when establishing the client connection.
ClientUserName ( 1917) Current user's name on their local machine.
ConnectTimeout ( 2347) Millseconds to wait for successful completion of a connection attempt.
ErrorMessage ( 1821) Error message returned from the Rexec or RSH Deamon.
ErrorReply ( 1821) Indicates if the RSH or Rexec Deamons returned an error.
Greeting ( 2364) Banner or welcome message for a connection to a protocol server.
HostUserName ( 1917) User ID on the remote host.

1914 Internet Direct (Indy) Version 10.1.5


Classes TIdRSH Class

IOHandler ( 2364) The input / output mechanism for the connection.


LastCmdResult ( 2367) Response code and text for the last response from the peer connection.
ManagedIOHandler ( 2367) Indicates tyhe IOHandler ( 2364) for the connection is maintained by the object instance.
OnAfterBind ( 2347) Event handler signalled after the socket handle is bound for the connection.
OnBeforeBind ( 2348) Event handler signalled proper to binding the socket handle for the connection.
OnConnected ( 2348) Event handler signalled to reflect the connection state for the client.
OnDisconnected ( 2367) Event handler signalled when disconnecting the peer connection.
OnWork ( 2368) Event handler signalled for read and / or write operations.
OnWorkBegin ( 2368) Event handler signalled when beginning a read or write operation.
OnWorkEnd ( 2369) Event handler signalled when completing a read or write operation.
Port ( 1917) Port number for the RSH client connection.
ReadTimeout ( 2349) Millseconds to wait for successful completion of a read attempt.
Socket ( 2369) Provides access to the TIdIOHandlerSocket ( 1331) for the connection.
UseReservedPorts ( 1917) Indicates that connections are restricted to a fixed range of port numbers.
UseStdError ( 1821) This property indicates if TIdRexec ( 1870) or TIdRSH ( 1914) should use a StdError port with the server.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
CheckForGracefulDisconnect ( 2351) Determines if the peer has been gracefully disconnected.
ConnectAndGetAll ( 2344) Opens a connection and reads all data.
Connected ( 2353) Indicates if the peer connection has been opened.
Create ( 267) Constructor for the object instance.
CreateIOHandler ( 2353) Creates the IOHandler ( 2364) for the connection.
Destroy ( 357) Frees the object instance.
Destroy ( 1820) Frees the object instance.
Destroy ( 2354) Frees the object instance.
DisconnectNotifyPeer ( 2356) Disconnects the peer connection.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
Execute ( 1916) This method executes a command (ACommand) on the RSH Deamon.
GetInternalResponse ( 2356) Reads response detail lines from a peer connection.
GetVersion ( 269) Version ( 269) number for Indy component suite.
CType ( 267)
Create ( 1274)
Connect ( 2342)
CheckResponse ( 2352)
Disconnect ( 2355)
GetResponse ( 2357)
RaiseExceptionForLastCmdResult ( 2359)
SendCmd ( 2360)
WriteHeader ( 2362) Sends the RFC protocol header values in a list to the connection.
WriteRFCStrings ( 2363) Writes RFC-compliant message bodies on the connection.

Events
Event Description
OnStatus ( 359) Represents the current connection status event handler.

Legend
Method
virtual
Property
read only
Event

Internet Direct (Indy) Version 10.1.5 1915


TIdRSH Class Classes

TIdRSH Methods
The Methods of the TIdRSH class are listed here.

Methods
Method Description
Execute ( 1916) This method executes a command (ACommand) on the RSH Deamon.

Legend
Method
virtual

TIdRSH.Execute Method
This method executes a command (ACommand) on the RSH Deamon.

Pascal
function Execute(
ACommand: String
): String; override;
Parameters
Parameters Description
ACommand The command to execute on the remote system.

Returns
String - The results from the command that was executed or no value if an error occurred.

Description
Execute is an overridden String function that implements the method used to authenticate the RSH shell session, and execute the
command specified in ACommand.

Execute passes the values in ClientUserName ( 1917) and HostUserName ( 1917) to the RSH Daemon to perform
authentication.

Execute is intended for non-interactive processes where the no input is expected from the user.

The return values for the method is the values received from execution of ACommand on the specified Host. If an error occurs,
TIdRemoteCMD.ErrorReply ( 1821) is set to True and ErrorMessage ( 1821) is updated with the value returned from the RSH
Daemon.

The inherited UseStdError ( 1821) property effects how error messages are sent from the RSH Daemon.

See Also
TIdRemoteCMDClient.ErrorMessage ( 1821) TIdRemoteCMDClient.UseStdError ( 1821) TIdRSH.ClientUserName ( 1917)
TIdRSH.HostUserName ( 1917)

TIdRSH Properties
The Properties of the TIdRSH class are listed here.

Properties
Property Description
ClientUserName ( 1917) Current user's name on their local machine.
HostUserName ( 1917) User ID on the remote host.
Port ( 1917) Port number for the RSH client connection.
UseReservedPorts ( 1917) Indicates that connections are restricted to a fixed range of port numbers.

1916 Internet Direct (Indy) Version 10.1.5


Classes TIdRSH Class

Legend
Property

TIdRSH.ClientUserName Property
Current user's name on their local machine.

Pascal
property ClientUserName: String;
Description
ClientUserName is a String property that represents the user's current name on their local machine. ClientUserName and
HostUserName ( 1917) are used when authenticating with the RSH Daemon in the Execute ( 1916) method.

For Windows RSH Clients, this is usually set with the value obtained with the GetUserName Win32 API function.

See Also
TIdRSH.HostUserName ( 1917) TIdRSH.Execute ( 1916)

TIdRSH.HostUserName Property
User ID on the remote host.

Pascal
property HostUserName: String;
Description
HostUserName is the User ID on the remote host.

HostUserName is sent along with the local user name in ClientUserName ( 1917) for authentication when the Execute ( 1916)
method is called.

See Also
Execute ( 1916) ClientUserName ( 1917)

TIdRSH.Port Property
Port number for the RSH client connection.

Pascal
property Port;
Description
Port is an Integer property that identifies the Port number for the RSH client connection. The default value for Port is IdPORT_cmd
( 3927), as assigned during initialization of the component.

See Also
IdPORT_cmd ( 3927)

TIdRSH.UseReservedPorts Property
Indicates that connections are restricted to a fixed range of port numbers.

Pascal
property UseReservedPorts: Boolean;
Description
UseReservedPorts is a Boolean property that indicates if the RSH client is required to use a fixed range of reserved port numbers

Internet Direct (Indy) Version 10.1.5 1917


TIdRSHServer Class Classes

for connections to the RSH daemon.

The default value for UseReservedPorts is IDRemoteFixPort ( 4321), as assigned during initialization of the component.

See Also
IDRemoteFixPort ( 4321)

TIdRSHServer Class
Implements a RSH Daemon.

File
IdRSHServer ( 4711)

Hierarchy

Pascal
TIdRSHServer = class(TIdRemoteCMDServer);
Description
TIdRSHServer is a TIdRemoteCMDServer ( 1822) descendant that implements a Remote Shell Daemon (RSHD), and allows
remote client connections to connect and execute commands or service requests. TIdRSHServer specifies Properties, Methods,
and Events that allow the server to implement and execute command requests using the RSH Protocol.

By convention, TIdRSHServer forces all client connection requests to use port numbers in a reserved range 0 through 1023.
TIdRSHServer allows creation of a secondary client connection to be used for redirecting standard error output to the RSH client. A
secondary connection is created when a non-null valid port number is provided in the connection request.

TIdRSHServer uses the source address of the client connection request to determine the name of the client host. If the name
cannot be determined, the rshd daemon uses the dotted decimal representation of the client host address.

When a client thread is executed for TIdRSHServer, values are read from the client connection for the user name on the client host,
user name on the local server, and the password for use on the local server.

TIdRSHServer provides the OnCommand ( 1920) event handler to allow the implementation to control platform-specific
authentication and execution of the command for the RSH session.

See Also
TIdRemoteCMDServer ( 1822) TIdRSH ( 1914) IndySupport ( 15)

TIdRSHServer Members
The following tables list the members exposed by TIdRSHServer.

Properties
Property Description
Active ( 458) Indicates if the server is running and listening for client connections.
Bindings ( 461) Container for socket handles allocated by the server.
ContextClass ( 461) Class reference used to create ( 267) new executable tasks for client connections to the server.
Contexts ( 462) Executable tasks for client connections to the server.
DefaultPort ( 1919) Port number used when listening for new client connections.
ForcePortsInRange ( 1920) Indicates if clients connections must use a reserved port range.
ImplicitIOHandler ( 463) Indicates if resources in the IOHandler ( 464) are managed by the server.
ImplicitScheduler ( 463) Indicates if resources in the Scheduler ( 466) are managed by the server.
Intercept ( 464) Identifies a data handler for server socket connections.
IOHandler ( 464) Represents the IOHandler used by listener threads for the server.

1918 Internet Direct (Indy) Version 10.1.5


Classes TIdRSHServer Class

ListenQueue ( 465) Indicates the maximum number of unresolved connection attempts allowed for a server listener thread.
MaxConnections ( 465) Indicates the maximum numer of client connections allowed for the server.
OnAfterBind ( 466) Event handler signalled after binding socket handles for listener threads.
ReuseSocket ( 466) Indicates reuse of local addresses for listener threads.
Scheduler ( 466) Identifies the thread-based or fiber-based scheduler used in the server.
TerminateWaitTime ( 468) Specifies the time a server should wait while terminating executable tasks for client connections.
Version ( 269) Identifies the version number for the Indy component suite.
WorkTarget ( 359) Indy component to receive work mode events for the current object instance.

Methods
Method Description
BeginWork ( 356) Triggers the OnBeginWork event.
Create ( 267) Constructor for the object instance.
Destroy ( 357) Frees the object instance.
Destroy ( 457) Frees the object instance.
DoWork ( 357) Triggers the OnWork event handler.
EndWork ( 358) Triggers the OnEndWork event handler.
GetVersion ( 269) Version ( 269) number for Indy component suite.
SendError ( 1824) Sends an error message to either the standard error connection or the client connection.
SendResults ( 1824) Sends the results from remote command execution to a client connection.
CType ( 267)
Create ( 1274)

Events
Event Description
OnBeforeConnect ( 468) Event handler signalled proper to establishing a client connection to the server.
OnBeforeListenerRun ( 468) Event handler signalled prior to executing a listener thread.
OnCommand ( 1920) Allows authentication and execution of the command for the RSH session.
OnConnect ( 469) Event handler signalled for establishing new client connections.
OnDisconnect ( 469) Event handler signalled when disconnecting the client connection.
OnException ( 470) Event handler for exceptions raised in a peer thread.
OnListenException ( 470) Event handler for an exception in a listener thread.
OnStatus ( 359) Represents the current connection status event handler.

Legend
Property
read only
Event
Method
virtual

TIdRSHServer Properties
The Properties of the TIdRSHServer class are listed here.

Properties
Property Description
DefaultPort ( 1919) Port number used when listening for new client connections.
ForcePortsInRange ( 1920) Indicates if clients connections must use a reserved port range.

Legend
Property

TIdRSHServer.DefaultPort Property
Port number used when listening for new client connections.

Pascal
property DefaultPort: TIdPort;

Internet Direct (Indy) Version 10.1.5 1919


TIdRSHServer Class Classes

Description
DefaultPort is an Integer property that represent the default port number used to listen for new client connections to the server.

The value of DefaultPort is provided for use with TIdSocketHandles ( 2090). TIdTCPServer ( 2375) and descendant classes use
the DefaultPort number to bind allocated sockets handles when the Active ( 458) property to set to True.

The default value for DefaultPort is IdPORT_cmd ( 3927) as assigned during initialization of the component.

See Also
TIdSocketHandles.DefaultPort ( 2093) TIdTCPServer ( 2375) IdPORT_cmd ( 3927)

TIdRSHServer.ForcePortsInRange Property
Indicates if clients connections must use a reserved port range.

Pascal
property ForcePortsInRange: Boolean;
Description
ForcePortsInRange is a Boolean property that indicates if the server should disconnect clients that do not connect with ports in the
range 512 - 1023.

The RSH protocol requires clients to connect from ports in the 512-1023 range because, on most multi-user operating systems, this
ensures some security as only administrators on those systems could use it. However, "security" is somewhat limited because
many single user operating systems will not prevent non-administrator users from using those reserved ports and it is possible for
hackers to alter port numbers on packets.

When ForcePortsInRange contains True, the RSH Server component will automatically disconnect clients that do not do connect to
the server from ports in this range. Setting ForcePortsInRange to False will permit the client to use the RSH server even if they do
not connect from this port range.

Normally, ForcePortsInRangeshould be set to true to prevent non-administrative users from using the RSH server. Setting
ForcePortsInRange to false should be done with the caution, as it will increase the likelihood for abuse.

The default value for ForcePortsInRange is RSH_FORCEPORTSINRANGE ( 4370).

TIdRSHServer Events
The Events of the TIdRSHServer class are listed here.

Events
Event Description
OnCommand ( 1920) Allows authentication and execution of the command for the RSH session.

Legend
Event

TIdRSHServer.OnCommand Event
Allows authentication and execution of the command for the RSH session.

Pascal
property OnCommand: TIdRSHCommandEvent;
Description
OnCommand is a TIdRSHCommandEvent ( 3078) property that represents the event handler signalled when a RSH client
connection needs to perform authentication and execution of a service request.

OnCommand is triggered during execution of the context for the client connection, and uses arguments to the event handler to

1920 Internet Direct (Indy) Version 10.1.5


Classes TIdSASL Class

identify values needed during authentication and command execution.

OnCommand is signalled after the optional connection for redirected standard error output has been created, bound, and
successfully connected. In addition, null terminated values for the client user name, host user name, and the RSH command have
been read from the request connection prior to triggering OnCommand.

Applications must assign a procedure to the event handler to allow responding to the event notification. The event handler can be
used to authenticate the client and host user name values, to execute the command, and to send error or result values using the
optional connection for redirected standard error output.

See Also
TIdRSHCommandEvent ( 3078) TIdRemoteCMDServer.SendError ( 1824) TIdRemoteCMDServer.SendResults ( 1824)

TIdSASL Class
Implements a framework supporting the Simple Authentication and Security Layer (SASL).

File
IdSASL ( 4711)

Hierarchy

Pascal
TIdSASL = class(TIdBaseComponent);
Description
TIdSASL is a TIdBaseComponent ( 266) descendant that implements a framework in support of the Simple Authentication and
Security Layer (SASL), as described in the Internet Standards documents:

RFC 2222 - Simple Authentication and Security Layer (SASL)

The Simple Authentication and Security Layer (SASL) is a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating a
security layer for subsequent protocol interactions.

SASL commands require an argument identifying a SASL mechanism. SASL mechanisms are named by strings, from 1 to 20
characters in length, consisting of upper-case letters, digits, hyphens, and/or underscores.

SASL mechanism names must be registered with the IANA ( 4762). The current list of registered SASL mechanisms can be
located at:

IANA Official Simple Authentication and Security Layer Mechanisms

SASL protocol exchanges involve a series of server challenges and client responses that are specific to the requested
authentication mechanism. The challenges and responses are defined by the mechanisms as binary tokens of arbitrary length. The
protocol profile specifies how these binary tokens are then encoded for transfer over the connection.

After receiving the authentication command or any client response, a server may issue a challenge, indicate failure, or indicate
completion. The protocol's profile specifies how the server indicates which of the above it is doing.

After receiving a challenge, a client may issue a response or abort the exchange. The protocol's profile specifies how the client
indicates which of the above it is doing.

During the authentication protocol exchange, the mechanism performs authentication, transmits an authorization identity (frequently
known as a userid) from the client to server, and negotiates the use of a mechanism-specific security layer. If the use of a security
layer is agreed upon, then the mechanism must also define or negotiate the maximum cipher-text buffer size that each side is able
to receive.

The transmitted authorization identity may be different than the identity in the client's authentication credentials. This permits agents
such as proxy servers to authenticate using their own credentials, yet request the access privileges of the identity for which they are

Internet Direct (Indy) Version 10.1.5 1921


TIdSASL Class Classes

proxying. With any mechanism, transmitting an authorization identity of the empty string directs the server to derive an authorization
identity from the client's authentication credentials.

If use of a security layer is negotiated, it is applied to all subsequent data sent over the connection. The security layer takes effect
immediately following the last response of the authentication exchange for data sent by the client and the completion indication for
data sent by the server. Once the security layer is in effect, the protocol stream is processed by the security layer into buffers of
cipher-text. Each buffer is transferred over the connection as a stream of octets prepended with a four octet field in network byte
order that represents the length of the following buffer. The length of the cipher-text buffer must be no larger than the maximum size
that was defined or negotiated by the other side.

TIdSASL implements the base class used to access SASL mechanisms in the Indy library, and to perform authentication using the
protocol exchange for a specific SASL mechanism.

Descendant classes are used to implement the specifics for defined SASL mechanisms and their associated protocol exchange,
including:

• TIdSASLCRAMMD5 ( 1929)
• TIdSASLAnonymous ( 1926)
• TIdSASLExternal ( 1936)
• TIdSASLLogin ( 1941)
• TIdSASLOTP ( 1944)
• TIdSASLPlain ( 1947)
• TIdSASLSKey ( 1952)
• TIdSASLUserPass ( 1954)
TIdSASL and related classes (like TIdSASLEntries ( 1932)) are used toprovide authentication in Indy protocol clients, including:

• TIdSMTP ( 2017)
• TIdPOP3 ( 1772)
• TIdIMAP4 ( 1150)
• TIdDICT ( 552)
See Also
TIdBaseComponent ( 266) TIdSASLCRAMMD5 ( 1929) TIdSASLAnonymous ( 1926) TIdSASLExternal ( 1936)
TIdSASLLogin ( 1941) TIdSASLOTP ( 1944) TIdSASLPlain ( 1947) TIdSASLSKey ( 1952) TIdSASLUserPass ( 1954)
TIdSASLEntries ( 1932) TIdSMTP ( 2017) TIdPOP3 ( 1772) TIdIMAP4 ( 1150) TIdDICT ( 552)

TIdSASL Members
The following tables list the members exposed by TIdSASL.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)

1922 Internet Direct (Indy) Version 10.1.5


Classes TIdSASL Class

ServiceName ( 1924) Service name for the SASL authentication mechanism.


StartAuthenticate ( 1925) Determines the inital client response for the server challenge in a SASL authentication exchange.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
abstract
Property
read only

TIdSASL Methods
The Methods of the TIdSASL class are listed here.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1924) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1925) Determines the inital client response for the server challenge in a SASL authentication exchange.

Legend
Method
virtual
abstract

TIdSASL.ContinueAuthenticate Method
Determines the client response for the server challenge in a SASL authentication exchange.

Pascal
function ContinueAuthenticate(
const ALastResponse: string
): string; virtual;
Parameters
Parameters Description
ALastResponse Server challenge for the SASL authentication exchange.

Returns
string - Client response for the SASL authentication exchange.

Description
ContinueAuthenticate is a virtual String function that specifies the method used to return the client response in the SASL
authentication exchange. ContinueAuthenticate is used to construct the authentication credentials for the client response.

ALastResponse is the Server challenge for the SASL authentication exchange.

ContinueAuthenticate is overridden in descendant classes to implement the specifics for the SASL authentication mechanism.

See Also
TIdSASLSKey ( 1952) StartAuthenticate ( 1925) FinishAuthenticate ( 1924)

Internet Direct (Indy) Version 10.1.5 1923


TIdSASL Class Classes

TIdSASL.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy removes the current object instance from the GlobalSASLList ( 3125) variable used to maintain SASL authentication
mecehanisms created in the application.

Destroy calls the inherited method prior to exiting from the destructor.

See Also
GlobalSASLList ( 3125)

TIdSASL.FinishAuthenticate Method
Indicates resources in the authentication mechanism are no longer needed.

Pascal
procedure FinishAuthenticate; virtual;
Description
FinishAuthenticate is a virtual method in TIdSASL ( 1921) used to indicate that resource allocated to the SASL authentication
mechanism are no longer needed.

FinishAuthenticate must be overridden in descendant classes that implement specific algorithms or protocol exchanges.

See Also
StartAuthenticate ( 1925) ContinueAuthenticate ( 1923)

TIdSASL.IsAuthProtocolAvailable Method
Pascal
function IsAuthProtocolAvailable(
AFeatStrings: TIdStrings
): Boolean; virtual;
Parameters
Parameters Description
AFeatStrings Type is TIdStrings ( 3089).

Returns
Boolean

Description
IsAuthProtocolAvailable is a virtual method.

IsAuthProtocolAvailable returns a Boolean value.

TIdSASL.ServiceName Method
Service name for the SASL authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; virtual;

1924 Internet Direct (Indy) Version 10.1.5


Classes TIdSASL Class

Returns
TIdSASLServiceName ( 3079) - Service name for the SASL authentication mechanism.

Description
ServiceName is a virtual TIdSASLServiceName ( 3079) class function that indicates the service name for the SASL authentication
mechanism. ServiceName is an empty string for TIdSASL ( 1921); use a descendant class to access a SASL authentication
mechanism utilizing a specific algorithm or implementation.

ServiceName is used in IsAuthProtocolAvailable ( 1924) to ddetermine if the current SASL authentication mechanism can be
found in a list of supported authentication mechanisms.

See Also
IsAuthProtocolAvailable ( 1924) TIdSASLServiceName ( 3079)

TIdSASL.StartAuthenticate Method
Determines the inital client response for the server challenge in a SASL authentication exchange.

Pascal
function StartAuthenticate(
const AChallenge: string
): string; virtual; abstract;
Parameters
Parameters Description
AChallenge Server challenge for the SASL authentication exchange.

Returns
string - Inital client response to the server challenge.

Description
StartAuthenticate is an abstract virtual String function that specifies the method used to return the initial client response in the SASL
authentication exchange.

StartAuthenticate is used to construct the authentication identity for the client response.

AChallenge is the Server challenge for the SASL authentication exchange.

StartAuthenticate is overridden in descendant classes to implement the specifics for the SASL authentication mechanism.

See Also
ContinueAuthenticate ( 1923) FinishAuthenticate ( 1924)

TIdSASL Properties
The Properties of the TIdSASL class are listed here.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.

Legend
Property
read only

TIdSASL.SecurityLevel Property
Security level offered in the current SASL authentication mechanism.

Internet Direct (Indy) Version 10.1.5 1925


TIdSASLAnonymous Class Classes

Pascal
property SecurityLevel: Cardinal;
Description
SecurityLevel is a read-only Cardinal property that indicates the relative level of security for the SASL authentication mechanism.

SecurityLevel is a bit-mask used according to the following values:

Dec Hex Bin Description

---------- -------- -------------------------------- --------------------

0 00000000 00000000000000000000000000000000 No security provided.


100 00000064 00000000000000000000000001100100 Minimal security.
200 000000C8 00000000000000000000000011001000 Integrity
900 00000384 00000000000000000000001110000100 SKEY security level.
4294967295 FFFFFFFF 11111111111111111111111111111111 Privacy

Other bit-masks may be defined in the future; bits which are not understood for the current authentication mechanism must be
negotiated off.

SecurityLevel is an advisory value only, and programmers can decide if they choose to to honour its use in the athentication
mechanism.

TIdSASLAnonymous Class
Implements the Anonymous SASL (Simple Authentication and Security Layer) Mechanism.

File
IdSASLAnonymous ( 4712)

Hierarchy

Pascal
TIdSASLAnonymous = class(TIdSASL);
Description
TIdSASLAnonymous is a TIdSASL ( 1921) descendant that implements the Anonymous SASL Mechanism, as described in the
Internet Standards documents:

RFC 2245 - Anonymous SASL Mechanism

RFC 2222 - Simple Authentication and Security Layer (SASL)

SASL authentication mechanism names must be registered with the IANA ( 4762). The current list of registered SASL
authentication mechanisms is located at:

IANA Official Simple Authentication and Security Layer Mechanisms

The Anonymous SASL mechanism consists of a single message from the client to the server. The client sends optional trace
information in the form of a human readable string. The trace information should take one of three forms:

• an Internet email address

1926 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLAnonymous Class

• an opaque string which does not contain the '@' character and can be interpreted by the system administrator of the client
domain
• a blank value
The trace information used in Anonymous SASL is not authenticated - so it can be falsified. This can be used as an attempt to get
someone else in trouble for access to questionable information. Administrators trying to trace abuse need to realize this information
may be falsified.

The Anonymous SASL mechanism grants access to information by anyone. For this reason it should be disabled by default so the
administrator can make an explicit decision to enable it.

A server which permits anonymous access will announce support for the ANONYMOUS mechanism, and allow anyone to log in
using that mechanism, usually with restricted access.

Protocols which fail to require an explicit anonymous login are more susceptible to break-ins given certain common implementation
techniques. Normally such servers refuse all data access commands prior to explicit login and may enter a restricted security
environment (e.g., the Unix chroot function) for anonymous users. Protocols which offer restricted data access should not allow
anonymous data access without an explicit login step.

TIdSASLAnonymous extends the ancestor class by implementing the ServiceName ( 1928) and StartAuthenticate ( 1928)
methods specified in TIdSASL ( 1921). TIdSASLAnonymous also include the TraceInfo ( 1929) property that represents the
optional trace information for the authentication mechanism.

During initialization of the component, TIdSASLAnonymous sets the SecurityLevel ( 1925) property to the value 0 (zero),
indicating no security is provided as part of the authentication mechanism.

See Also
TIdSASL ( 1921)

TIdSASLAnonymous Members
The following tables list the members exposed by TIdSASLAnonymous.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
TraceInfo ( 1929) Optional trace information used in the Anonymous authentication mechanism.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1928) Returns the registered name for the authentication mechanism.
StartAuthenticate ( 1928) Returns the optional trace information used in the Anonymous authentication mechanism.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

Internet Direct (Indy) Version 10.1.5 1927


TIdSASLAnonymous Class Classes

TIdSASLAnonymous Methods
The Methods of the TIdSASLAnonymous class are listed here.

Methods
Method Description
ServiceName ( 1928) Returns the registered name for the authentication mechanism.
StartAuthenticate ( 1928) Returns the optional trace information used in the Anonymous authentication mechanism.

Legend
Method
virtual

TIdSASLAnonymous.ServiceName Method
Returns the registered name for the authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079) - Servie name for the authentication mechanism.

Description
ServiceName is an overridden TIdSASLServiceName ( 3079) class function used to return the registered name for the
authentication mechanism.

SASL authentication mechanism names must be registered with the IANA ( 4762). The current list of registered SASL
authentication mechanisms is located at:

IANA Official Simple Authentication and Security Layer Mechanisms

In TIdSASLAnonymous ( 1926), ServiceName returns the value:

ANONYMOUS

TIdSASLAnonymous.StartAuthenticate Method
Returns the optional trace information used in the Anonymous authentication mechanism.

Pascal
function StartAuthenticate(
const AChallenge: String
): String; override;
Parameters
Parameters Description
AChallenge Server challenge issued in the authentication mechanism.

Returns
String - Optional trace information for the authentication mechanism.

Description
StartAuthenticate is an overridden String function used to provide the optional trace information sent from the client to the server
following the server challenge in the Anonymous authentication mechanism.

StartAuthenticate returns the value stored in the TraceInfo ( 1929) property.

See Also
TraceInfo ( 1929)

1928 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLCRAMMD5 Class

TIdSASLAnonymous Properties
The Properties of the TIdSASLAnonymous class are listed here.

Properties
Property Description
TraceInfo ( 1929) Optional trace information used in the Anonymous authentication mechanism.

Legend
Property

TIdSASLAnonymous.TraceInfo Property
Optional trace information used in the Anonymous authentication mechanism.

Pascal
property TraceInfo: String;
Description
TraceInfo is a String property that represents the optional trace information used in the Anonymous authentication mechanism.

TraceInfo is sent in response to the serve challenge for the Anonymous authentication mechanism. TraceInfo is the value returned
by the StartAuthenticate ( 1928) method specified in the SASL framework for the Indy library.

TraceInfo may contain a human-readable String in one of the three following forms:

• an Internet email address


• an opaque string which does not contain the '@' character and can be interpreted by the administrator of the client domain
• a blank value
The trace information used in Anonymous SASL is not authenticated - so it can be falsified. This can be used as an attempt to get
someone else in trouble for access to questionable information. Administrators trying to trace abuse need to realize this information
may be falsified.

See Also
StartAuthenticate ( 1928)

TIdSASLCRAMMD5 Class
File
IdSASL_CRAM_MD5 ( 4712)

Hierarchy

Pascal
TIdSASLCRAMMD5 = class(TIdSASLUserPass);
Description
TIdSASLCRAMMD5 is a TIdSASLUserPass ( 1954) descendant.

See Also
TIdSASLUserPass ( 1954)

Internet Direct (Indy) Version 10.1.5 1929


TIdSASLCRAMMD5 Class Classes

TIdSASLCRAMMD5 Members
The following tables list the members exposed by TIdSASLCRAMMD5.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
BuildKeydMD5Auth ( 1930)
ContinueAuthenticate ( 1931)
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1931)
StartAuthenticate ( 1931)
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLCRAMMD5 Methods
The Methods of the TIdSASLCRAMMD5 class are listed here.

Methods
Method Description
BuildKeydMD5Auth ( 1930)
ContinueAuthenticate ( 1931)
ServiceName ( 1931)
StartAuthenticate ( 1931)

Legend
Method
virtual

TIdSASLCRAMMD5.BuildKeydMD5Auth Method
Pascal
class function BuildKeydMD5Auth(
const Password: string;
const Challenge: string
): string;
Parameters
Parameters Description
Password Scope is const. Type is string.
Challenge Scope is const. Type is string.

1930 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLEntries Class

Returns
string

Description
BuildKeydMD5Auth is a class method.

BuildKeydMD5Auth returns a string value.

TIdSASLCRAMMD5.ContinueAuthenticate Method
Pascal
function ContinueAuthenticate(
const ALastResponse: String
): String; override;
Parameters
Parameters Description
ALastResponse Scope is const. Type is String.

Returns
String

Description
ContinueAuthenticate is a overridden method.

ContinueAuthenticate returns a String value.

TIdSASLCRAMMD5.ServiceName Method
Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079)

Description
ServiceName is a overridden class method.

ServiceName returns a TIdSASLServiceName ( 3079) value.

TIdSASLCRAMMD5.StartAuthenticate Method
Pascal
function StartAuthenticate(
const AChallenge: string
): String; override;
Parameters
Parameters Description
AChallenge Scope is const. Type is string.

Returns
String

Description
StartAuthenticate is a overridden method.

StartAuthenticate returns a String value.

Internet Direct (Indy) Version 10.1.5 1931


TIdSASLEntries Class Classes

TIdSASLEntries Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
TIdSASLEntries = class(TIdOwnedCollection);
Description
TIdSASLEntries is a TIdOwnedCollection ( 3072) descendant.

See Also
TIdOwnedCollection ( 3072)

TIdSASLEntries Members
The following tables list the members exposed by TIdSASLEntries.

Properties
Property Description
Items ( 1936)

Methods
Method Description
Add ( 1933)
Create ( 1933)
FindSASL ( 1933)
IndexOfComp ( 1933)
Insert ( 1934)
ParseCapaReply ( 1935)
RemoveByComp ( 1936)
LoginSASL ( 1934)

Legend
Method
Property

TIdSASLEntries Methods
The Methods of the TIdSASLEntries class are listed here.

Methods
Method Description
Add ( 1933)
Create ( 1933)
FindSASL ( 1933)
IndexOfComp ( 1933)
Insert ( 1934)
LoginSASL ( 1934)
ParseCapaReply ( 1935)
RemoveByComp ( 1936)

1932 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLEntries Class

Legend
Method

TIdSASLEntries.Add Method
Pascal
function Add: TIdSASLListEntry;
Returns
TIdSASLListEntry ( 1940)

Description
Add is a method.

Add returns a TIdSASLListEntry ( 1940) value.

TIdSASLEntries.Create Constructor
Pascal
constructor Create(
AOwner: TIdPersistent
); reintroduce;
Parameters
Parameters Description
AOwner Type is TIdPersistent ( 3073).

Description
Create is a reintroduced constructor for the object instance.

TIdSASLEntries.FindSASL Method
Pascal
function FindSASL(
const AServiceName: String
): TIdSASL;
Parameters
Parameters Description
AServiceName Scope is const. Type is String.

Returns
TIdSASL ( 1921)

Description
FindSASL is a method.

FindSASL returns a TIdSASL ( 1921) value.

TIdSASLEntries.IndexOfComp Method
Pascal
function IndexOfComp(
AItem: TIdSASL
): Integer;

Internet Direct (Indy) Version 10.1.5 1933


TIdSASLEntries Class Classes

Parameters
Parameters Description
AItem Type is TIdSASL ( 1921).

Returns
Integer

Description
IndexOfComp is a method.

IndexOfComp returns a Integer value.

TIdSASLEntries.Insert Method
Pascal
function Insert(
Index: Integer
): TIdSASLListEntry;
Parameters
Parameters Description
Index Type is Integer.

Returns
TIdSASLListEntry ( 1940)

Description
Insert is a method.

Insert returns a TIdSASLListEntry ( 1940) value.

TIdSASLEntries.LoginSASL Method
Overload List

Method Description
TIdSASLEntries.LoginSASL (String,
array of string, array of string,
TIdTCPConnection, TIdStrings, String) (
1935)
TIdSASLEntries.LoginSASL (String,
String, array of string, array of string,
TIdTCPConnection, TIdStrings, String) (
1934)

TIdSASLEntries.LoginSASL Method (String, String, array of string, array of string,


TIdTCPConnection, TIdStrings, String)
Pascal
function LoginSASL(
const ACmd: String;
const AServiceName: String;
const AOkReplies: array of string;
const AContinueReplies: array of string;
AClient: TIdTCPConnection;
ACapaReply: TIdStrings;
const AAuthString: String = 'AUTH'
): Boolean; overload;

1934 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLEntries Class

Parameters
Parameters Description
ACmd Scope is const. Type is String.
AServiceName Scope is const. Type is String.
AOkReplies Scope is const. Type is array of string.
AContinueReplies Scope is const. Type is array of string.
AClient Type is TIdTCPConnection ( 2349).
ACapaReply Type is TIdStrings ( 3089).
AAuthString Scope is const. Type is String. Default value is 'AUT.

Returns
Boolean

Description
LoginSASL is a overloaded method.

LoginSASL returns a Boolean value.

See Also
TIdSASLEntries.LoginSASL

TIdSASLEntries.LoginSASL Method (String, array of string, array of string,


TIdTCPConnection, TIdStrings, String)
Pascal
function LoginSASL(
const ACmd: String;
const AOkReplies: array of string;
const AContinueReplies: array of string;
AClient: TIdTCPConnection;
ACapaReply: TIdStrings;
const AAuthString: String = 'AUTH'
): Boolean; overload;
Parameters
Parameters Description
ACmd Scope is const. Type is String.
AOkReplies Scope is const. Type is array of string.
AContinueReplies Scope is const. Type is array of string.
AClient Type is TIdTCPConnection ( 2349).
ACapaReply Type is TIdStrings ( 3089).
AAuthString Scope is const. Type is String. Default value is 'AUT.

Returns
Boolean

Description
LoginSASL is a overloaded method.

LoginSASL returns a Boolean value.

See Also
TIdSASLEntries.LoginSASL

TIdSASLEntries.ParseCapaReply Method
Pascal
function ParseCapaReply(
ACapaReply: TIdStrings;
const AAuthString: String = 'AUTH'

Internet Direct (Indy) Version 10.1.5 1935


TIdSASLExternal Class Classes

): TIdStrings;
Parameters
Parameters Description
ACapaReply Type is TIdStrings ( 3089).
AAuthString Scope is const. Type is String. Default value is 'AUT.

Returns
TIdStrings ( 3089)

Description
ParseCapaReply is a method.

ParseCapaReply returns a TIdStrings ( 3089) value.

TIdSASLEntries.RemoveByComp Method
Pascal
procedure RemoveByComp(
AComponent: TIdNativeComponent
);
Parameters
Parameters Description
AComponent Type is TIdNativeComponent ( 3061).

Description
RemoveByComp is a method.

TIdSASLEntries Properties
The Properties of the TIdSASLEntries class are listed here.

Properties
Property Description
Items ( 1936)

Legend
Property

TIdSASLEntries.Items Property
Pascal
property Items [ Index: Integer ]: TIdSASLListEntry;
Description
Items is a Public TIdSASLListEntry ( 1940) property. Write access for the property is implemented using SetItem.

Items is the default property for the object instance.

TIdSASLExternal Class
Implements the SASL External authentication mechanism.

File
IdSASLExternal ( 4713)

1936 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLExternal Class

Hierarchy

Pascal
TIdSASLExternal = class(TIdSASL);
Description
TIdSASLExternal is a TIdSASL ( 1921) descendant that implements the SASL External authentication mechanism, as described
in theInternet Standards document:

RFC 2222 - Simple Authentication and Security Layer (SASL)

SASL mechanism names must be registered with the IANA ( 4762). The current list of registered SASL mechanisms can be
located at:

IANA Official Simple Authentication and Security Layer Mechanisms

The Simple Authentication and Security Layer (SASL) is a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating a
security layer for subsequent protocol interactions.

SASL commands require an argument identifying a SASL mechanism. SASL mechanisms are named by strings, from 1 to 20
characters in length, consisting of upper-case letters, digits, hyphens, and/or underscores.

In the External SASL authentication mechanism, the client sends an initial response to a server challenge with the authorization
identity. The server uses information, external to SASL, to determine whether the client is authorized to authenticate as the
authorization identity. If the client is so authorized, the server indicates successful completion of the authentication exchange;
otherwise the server indicates failure.

The system providing this external information may be, for example, IPsec or TLS.

If the client sends an empty string as the authorization identity (thus requesting the authorization identity be derived from the client's
authentication credentials), the authorization identity is to be derived from authentication credentials which exist in the system which
is providing the external authentication.

TIdSASLExternal extends the ancestor class by implementing the ServiceName ( 1938) and StartAuthenticate ( 1938) methods
specified in TIdSASL ( 1921). TIdSASLExternal also provides the AuthorizationIdentity ( 1939) property that represents the
authorization identity required in the authentication mechanism.

During initialization of the component, the SecurityLevel ( 1925) property is set to the value 0 (zero) since the level of privacy or
security is dependent on the server.

See Also
TIdSASL ( 1921)

TIdSASLExternal Members
The following tables list the members exposed by TIdSASLExternal.

Properties
Property Description
AuthorizationIdentity ( 1939) Authorization identity for the External SASL authentication mechanism.
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.

Internet Direct (Indy) Version 10.1.5 1937


TIdSASLExternal Class Classes

GetVersion ( 269) Version ( 269) number for Indy component suite.


IsAuthProtocolAvailable ( 1924)
ServiceName ( 1938) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1938) Builds the the client response using values for the External SASL authentication mechanism.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLExternal Methods
The Methods of the TIdSASLExternal class are listed here.

Methods
Method Description
ServiceName ( 1938) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1938) Builds the the client response using values for the External SASL authentication mechanism.

Legend
Method
virtual

TIdSASLExternal.ServiceName Method
Service name for the SASL authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079) - Service name for the SASL authentication mechanism.

Description
ServiceName is an overridden TIdSASLServiceName ( 3079) class function that indicates the service name for the SASL
authentication mechanism.

SASL mechanism names must be registered with the IANA ( 4762). The current list of registered SASL mechanisms can be
located at:

IANA Official Simple Authentication and Security Layer Mechanisms

In TIdSASLExternal ( 1936), ServiceName returns the value:

EXTERNAL
ServiceName is used in IsAuthProtocolAvailable ( 1924) to ddetermine if the current SASL authentication mechanism can be
found in a list of supported authentication mechanisms.

See Also
IsAuthProtocolAvailable ( 1924) TIdSASLServiceName ( 3079)

TIdSASLExternal.StartAuthenticate Method
Builds the the client response using values for the External SASL authentication mechanism.

1938 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLExternal Class

Pascal
function StartAuthenticate(
const AChallenge: String
): String; override;
Parameters
Parameters Description
AChallenge Server challenge for the SASL authentication exchange.

Returns
string - Client response to the server challenge.

Description
StartAuthenticate is an overridden String function used to build the client response to the SASL serve challenge in AChallenge.

StartAuthenticate uses the values in AuthenticationIdentity to build the the client response for the PLAIN SASL authentication
mechanism.

In the External SASL authentication mechanism, the client sends an initial response to a server challenge with the authorization
identity. The server uses information, external to SASL, to determine whether the client is authorized to authenticate as the
authorization identity. If the client is so authorized, the server indicates successful completion of the authentication exchange;
otherwise the server indicates failure.

The system providing this external information may be, for example, IPsec or TLS.

If the client sends an empty string as the authorization identity (thus requesting the authorization identity be derived from the client's
authentication credentials), the authorization identity is to be derived from authentication credentials which exist in the system which
is providing the external authentication.

See Also
AuthenticationIdentity

TIdSASLExternal Properties
The Properties of the TIdSASLExternal class are listed here.

Properties
Property Description
AuthorizationIdentity ( 1939) Authorization identity for the External SASL authentication mechanism.

Legend
Property

TIdSASLExternal.AuthorizationIdentity Property
Authorization identity for the External SASL authentication mechanism.

Pascal
property AuthorizationIdentity: String;
Description
AuthorizationIdentity is a String property that represents the authorization identity provided for the External SASL authentication
mechanism.

In the External SASL authentication mechanism, the client sends an initial response to a server challenge with the authorization
identity. The server uses information, external to SASL, to determine whether the client is authorized to authenticate as the
authorization identity. If the client is so authorized, the server indicates successful completion of the authentication exchange;
otherwise the server indicates failure.

The system providing this external information may be, for example, IPsec or TLS.

Internet Direct (Indy) Version 10.1.5 1939


TIdSASLListEntry Class Classes

If the client sends an empty string as the authorization identity (thus requesting the authorization identity be derived from the client's
authentication credentials), the authorization identity is to be derived from authentication credentials which exist in the system which
is providing the external authentication.

AuthorizationIdentity is used in StartAuthenticate ( 1938) to provide the client response for the SASL server challenge.

See Also
StartAuthenticate ( 1938)

TIdSASLListEntry Class
File
IdSASLCollection ( 4713)

Hierarchy

Pascal
TIdSASLListEntry = class(TIdCollectionItem);
Description
TIdSASLListEntry is a TIdCollectionItem ( 3011) descendant.

See Also
TIdCollectionItem ( 3011)

TIdSASLListEntry Members
The following tables list the members exposed by TIdSASLListEntry.

Properties
Property Description
SASL ( 1941)

Methods
Method Description
Assign ( 1941)

Legend
Method
virtual
Property

TIdSASLListEntry Methods
The Methods of the TIdSASLListEntry class are listed here.

Methods
Method Description
Assign ( 1941)

Legend
Method
virtual

1940 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLLogin Class

TIdSASLListEntry.Assign Method
Pascal
procedure Assign(
Source: TIdPersistent
); override;
Parameters
Parameters Description
Source Type is TIdPersistent ( 3073).

Description
Assign is a overridden method.

TIdSASLListEntry Properties
The Properties of the TIdSASLListEntry class are listed here.

Properties
Property Description
SASL ( 1941)

Legend
Property

TIdSASLListEntry.SASL Property
Pascal
property SASL: TIdSASL;
Description
SASL is a Published TIdSASL ( 1921) property. Write access for the property is implemented using FSASL.

TIdSASLLogin Class
Implements a SASL-like mechanism for protocols using Username and Password authentication.

File
IdSASLLogin ( 4713)

Hierarchy

Pascal
TIdSASLLogin = class(TIdSASLUserPass);
Description
TIdSASLLogin is a TIdSASLUserPass ( 1954) descendant that implements a SASL-like mechanism for protocols offering basic
authentication using Username and Password values.

TIdSASLLogin uses the Username and Password values provided by TIdSASLUserPass ( 1954) to construct client responses
used in StartAutheticate and ContinueAuthenticate ( 1942).

StartAutheticate provides a client response that includes the authentication identity (or Username).

Internet Direct (Indy) Version 10.1.5 1941


TIdSASLLogin Class Classes

ContinueAuthenticate ( 1942) provides a client response that includes the authentication credentials (or Password).

ServiceName ( 1943) returns the value LOGIN as the registered name for the authentication mechanism.

During initialization of the component, the SecurityLevel ( 1925) property is set to the value 200.

See Also
TIdSASLUserPass ( 1954) SecurityLevel ( 1925) StartAuthenticate ( 1943) ContinueAuthenticate ( 1942) ServiceName (
1943) SecurityLevel ( 1925)

TIdSASLLogin Members
The following tables list the members exposed by TIdSASLLogin.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1942) Provides the authentication credentials for the client response.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1943) Provides the registered name for the authentication mechanism.
StartAuthenticate ( 1943) Builds the client response with the authentication identity for the SASL exchange.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLLogin Methods
The Methods of the TIdSASLLogin class are listed here.

Methods
Method Description
ContinueAuthenticate ( 1942) Provides the authentication credentials for the client response.
ServiceName ( 1943) Provides the registered name for the authentication mechanism.
StartAuthenticate ( 1943) Builds the client response with the authentication identity for the SASL exchange.

Legend
Method
virtual

TIdSASLLogin.ContinueAuthenticate Method
Provides the authentication credentials for the client response.

1942 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLLogin Class

Pascal
function ContinueAuthenticate(
const ALastResponse: String
): String; override;
Parameters
Parameters Description
ALastResponse Server challenge for the SASL exchange.

Returns
String - Client response for the SASL exchange.

Description
ContinueAuthenticate is an overridden String class function used to provide the authentication identity for the SASL-like protocol
exchange.

ContinueAuthenticate uses the Password value in the ancestor class to build the client response provided as the authentication
credentials.

Use StartAuthenticate ( 1943) to build the authentication identity for the exchange.

See Also
StartAuthenticate ( 1943)

TIdSASLLogin.ServiceName Method
Provides the registered name for the authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079) - Registered name for the authentication mechanism.

Description
ServiceName is an overridden TIdSASLServiceName ( 3079) class function that provides the registered name for the
authentication mechanism.

ServiceName returns the value LOGIN in TIdSASLLogin ( 1941).

TIdSASLLogin.StartAuthenticate Method
Builds the client response with the authentication identity for the SASL exchange.

Pascal
function StartAuthenticate(
const AChallenge: string
): String; override;
Parameters
Parameters Description
AChallenge Server challenge for the SASL exchange.

Returns
String - Client response for the SASL exchange.

Description
StartAuthenticate is an overridden String class function used to build the client response that provides the authentication identity for
the SASL exchange.

Use ContinueAuthenticate ( 1942) to build the client response with the authentication credentials for the SASL exchange.

Internet Direct (Indy) Version 10.1.5 1943


TIdSASLOTP Class Classes

See Also
ContinueAuthenticate ( 1942)

TIdSASLOTP Class
Implements the OTP (One-Time-Password) SASL authentication mechanism.

File
IdSASLOTP ( 4714)

Hierarchy

Pascal
TIdSASLOTP = class(TIdSASLUserPass);
Description
TIdSASLOTP is a TIdSASLUserPass ( 1954) descendant that Implements the OTP (One-Time-Password) SASL authentication
mechanism, as described in the Internet Standards documents:

RFC 2444 - The One-Time-Password SASL Mechanism

RFC 2222 - Simple Authentication and Security Layer (SASL)

SASL authentication mechanism names must be registered with the IANA ( 4762). The current list of registered SASL
authentication mechanisms is located at:

IANA Official Simple Authentication and Security Layer Mechanisms

OTP SASL provides an authentication mechanism for situations where there is limited client or server trust. The OTP SASL
mechanism is intended to replace the SKEY SASL mechanism.

OTP SASL is a good choice for usage scenarios where the client is untrusted (e.g., a kiosk client), as a one-time password will only
give the client a single opportunity to act on behalf of the user. OTP is also a good choice for situations where interactive logins are
permitted to the server, as a compromised OTP authentication database is only subject to dictionary attacks, unlike authentication
databases for other simple mechanisms such as CRAM-MD5.

In OTP SASL, the client begins by sending a message to the server containing the authorization identity and the authentication
identity for the SASL authentication mechanism.

The authorization identity is used to allow login with a different user identity, auch as in a proxy server. The authorization identity
can contain a blank string when the identity is the same as the authentication identity (or Username).

The authentication identity is the Username that will be authenticated using the credentials provided in a subsequent client
response.

Both the authorization identity and the authentication identity are limited to 255 characters. US-ASCII printable characters are
preferred in the values, although UTF-8 printable characters are permitted to support international names. Use of character sets
other than US-ASCII and UTF-8 is forbidden.

The server responds by sending a message containing the OTP challenge as described in OTP and OTP extended responses.

The client must respond by creating a an extended response using the hash algorithm indicated in the server challenge. OTP SASL
requires use of the extended response format as described in the specifications for the authentication mechanism, including:

word
hex
init-hex

1944 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLOTP Class

init-word

TIdSASLOTP uses only the "word" response format in its current implementation.

OTP SASL requires support for the MD5 hashing algorithm used in building client responses. OTP SASL recokmmends support for
the SHA1 hashing algorithm.

TIdSASLOTP implments support for the following hashing algortihms:

MD4
MD5
SHA1

See Also
TIdSASL ( 1921) TIdSASLUserPass ( 1954)

TIdSASLOTP Members
The following tables list the members exposed by TIdSASLOTP.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1946) Builds the client response for the SASL OTP authentication mechanism.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1947) Returns the registered name for the authentication mechanism.
StartAuthenticate ( 1947) Builds the client response with the authentication identity for the SASL authentication mechanism.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLOTP Methods
The Methods of the TIdSASLOTP class are listed here.

Methods
Method Description
ContinueAuthenticate ( 1946) Builds the client response for the SASL OTP authentication mechanism.
ServiceName ( 1947) Returns the registered name for the authentication mechanism.
StartAuthenticate ( 1947) Builds the client response with the authentication identity for the SASL authentication mechanism.

Internet Direct (Indy) Version 10.1.5 1945


TIdSASLOTP Class Classes

Legend
Method
virtual

TIdSASLOTP.ContinueAuthenticate Method
Builds the client response for the SASL OTP authentication mechanism.

Pascal
function ContinueAuthenticate(
const ALastResponse: String
): String; override;
Parameters
Parameters Description
ALastResponse Server challenge with OTP extended respsonses for the SASL exchange.

Returns
String - Client response including the OTP value.

Description
ContinueAuthenticate is an overridden String function used to build the client response for the SASL OTP exchange.

ContinueAuthenticate uses the values in ALastResponse and the Password from the ancestor class to generate the
One-Time-Password for the SASL OTP authentication mechanism.

ALastReponse is the SASL server challenge, and includes the OTP extended responses for the SASL authentication exchange.
ContinueAuthenticate parses the values in ALastReponse to determine the hashing algorithm(s) to be used in constructing the OTP
client response.

TIdSASLOTP ( 1944) implements support for the following hashing algorithms:

Value Description

---- ----------

md4 Message Digest version 4


md5 Message Digest version 5
sha1 Secure Hashing Algorithm version 1

If an unknown hash algorithm name is encountered, an EIdOTPSASLUnknownOTPMethodException ( 132) is raised.

In this situation the client could prompt for the six-word format, issue the cancel sequence as specified by the SASL profile for the
protocol in use and try a different SASL mechanism, or close the connection and refuse to authenticate. As a result of this behavior,
a server is restricted to one OTP hash algorithm per user.

ContinueAuthenticate uses TIdOTPCalculator ( 1762) to build the OTP client response using the seed value from the server
challenge, the authentication credentials (Password), and the indicated hashing algorithm.

On success, the client response will contain the "word" extended response format. At the present time, TIdSASLOTP ( 1944) does
not return client responses in the "hex", "init-hex", or "init-word" extended response formats.

Exceptions
Exceptions Description
EIdOTPSASLUnknownOTPMethodException ( 132) Raised when an invalid hashing algorithm is found in the server challenge.

See Also
EIdOTPSASLUnknownOTPMethodException ( 132) TIdOTPCalculator ( 1762)

1946 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLPlain Class

TIdSASLOTP.ServiceName Method
Returns the registered name for the authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079) - Servie name for the authentication mechanism.

Description
ServiceName is an overridden TIdSASLServiceName ( 3079) class function used to return the registered name for the SASL
authentication mechanism.

SASL authentication mechanism names must be registered with the IANA ( 4762). The current list of registered SASL
authentication mechanisms is located at:

IANA Official Simple Authentication and Security Layer Mechanisms

In TIdSASLOTP ( 1944), ServiceName returns the value:

OTP
See Also
TIdSASLServiceName ( 3079)

TIdSASLOTP.StartAuthenticate Method
Builds the client response with the authentication identity for the SASL authentication mechanism.

Pascal
function StartAuthenticate(
const AChallenge: string
): String; override;
Parameters
Parameters Description
AChallenge Server challenge issued in the authentication mechanism.

Returns
String - Authentication identity for the SASL authentication mechanism.

Description
StartAuthenticate is an overridden String function used to provide the client response that includes the authentication identity for the
SASL authentication mechanism.

StartAuthenticate uses the Username value provided in the ancestor class to build the client response to the server challenge in
AChallenge.

Use ContinueAuthenticate ( 1946) to provide the authentication credentials using the hashing algorithm for the SASL exchange.

See Also
ContinueAuthenticate ( 1946)

TIdSASLPlain Class
Implements the PLAIN SASL authentication mechanism.

Internet Direct (Indy) Version 10.1.5 1947


TIdSASLPlain Class Classes

File
IdSASLPlain ( 4714)

Hierarchy

Pascal
TIdSASLPlain = class(TIdSASLUserPass);
Description
TIdSASLPlain is a TIdSASLUserPass ( 1954) descendant that implements the PLAIN SASL Mechanism, as described in the
Internet Standards documents:

RFC 2595 - Using TLS with IMAP, POP3 and ACAP

RFC 2222 - Simple Authentication and Security Layer (SASL)

SASL authentication mechanism names must be registered with the IANA ( 4762). The current list of registered SASL
authentication mechanisms is located at:

IANA Official Simple Authentication and Security Layer Mechanisms

The PLAIN SASL authentication mechanism provides simple password authentication for systems where authentication is not
tightly bound to the privacy layer for the authentication infrastructure.

PLAIN SASL is normally used in conjunction with TLS (Transport Layer Security) to eliminated transmission of clear-text passwords
over unencrypted channels.

Clients and servers which implement PLAIN SASL must be configurable to refuse all clear-text login commands or mechanisms
(including both standards-track and nonstandard mechanisms) unless an encryption layer of adequate strength is active. Servers
which allow unencrypted clear-text logins should be configurable to refuse clear-text logins both for the entire server, and on a
per-user basis.

Use of PLAIN SASL assumes that a TLS negotiation between the client and server has been successfully completed prior to using
the properties or methods in the authentication mechanism. PLAIN SASL authentication eliminates the need to exchange clear-text
passwords by relying on the security provided by the encrypted TLS network connection.

The PLAIN SASL authentication mechanism consists of a single message from the client to the server, including the following:

• authorization identity (optional identity to login as)


• US-ASCII NUL character
• authentication identity (identity whose password will be used)
• US-ASCII NUL character
• clear-text password (for the authentication identity)
The client may use a blank authorization identity to indicate that it is the same as the authentication identity.

Servers supporting the PLAIN SASL authentication mechanism will verify the authentication identity and password with the system
authentication database, and verify that the authentication credentials (password) permit the client to login as the authorization
identity. If both steps succeed, the user is successfully logged in.

Non-US-ASCII characters are permitted in values used for the authorization identity, authentication identity, or password as long as
they are represented in UTF-8 form. Use of non-visible characters or characters which a user may be unable to enter on some
keyboards is discouraged. The following table represents the UTF-8 character ranges allowed in the values:

(Hex)
01-09
0B-0C

1948 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLPlain Class

0E-7F
C0-DF
E0-EF
F0-F7
F8-FB
FC-FD

TIdSASLPlain extends the ancestor class by implementing the ServiceName ( 1950) and StartAuthenticate ( 1950) methods
from TIdSASL ( 1921), and the LoginAs ( 1951) property that represents the authorization identity for the PLAIN SASL
mechanism.

TIdSASLPlain utilizes the TIdUserPassProvider ( 2569) to acquire username and passwords used in SAL authentication
mechanisms.

See Also
TIdSASLUserPass ( 1954) TIdSASL ( 1921) TIdUserPassProvider ( 2569)

TIdSASLPlain Members
The following tables list the members exposed by TIdSASLPlain.

Properties
Property Description
LoginAs ( 1951) Represents the authorization identity for PLAIN SASL authentication.
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1950) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1950) Builds the the client response using values for the PLAIN SASL authentication mechanism.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLPlain Methods
The Methods of the TIdSASLPlain class are listed here.

Methods
Method Description
ServiceName ( 1950) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1950) Builds the the client response using values for the PLAIN SASL authentication mechanism.

Internet Direct (Indy) Version 10.1.5 1949


TIdSASLPlain Class Classes

Legend
Method
virtual

TIdSASLPlain.ServiceName Method
Service name for the SASL authentication mechanism.

Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079) - Service name for the SASL authentication mechanism.

Description
ServiceName is an overridden TIdSASLServiceName ( 3079) class function that indicates the service name for the SASL
authentication mechanism.

ServiceName represents the registered name for the authentication mechanism, and returns the following value in TIdSASLPlain (
1947):

PLAIN
ServiceName is used in IsAuthProtocolAvailable ( 1924) to determine if the current SASL authentication mechanism can be found
in a list of supported authentication mechanisms.

See Also
IsAuthProtocolAvailable ( 1924) TIdSASLServiceName ( 3079)

TIdSASLPlain.StartAuthenticate Method
Builds the the client response using values for the PLAIN SASL authentication mechanism.

Pascal
function StartAuthenticate(
const AChallenge: string
): String; override;
Parameters
Parameters Description
AChallenge Server challenge for the SASL authentication exchange.

Returns
string - Client response to the server challenge.

Description
StartAuthenticate is an overridden String function used to build the client response to the SASL serve challenge in AChallenge.

StartAuthenticate uses the values in LoginAs ( 1951), and the Username and Password from UserPassProvider ( 1955) to build
the the client response for the PLAIN SASL authentication mechanism.

The PLAIN SASL authentication mechanism consists of a single message from the client to the server, including the following:

• authorization identity (optional identity to login as)


• US-ASCII NUL character
• authentication identity (identity whose password will be used)
• US-ASCII NUL character
• clear-text password (for the authentication identity)

1950 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLSKey Class

The client may use a blank authorization identity in LoginAs ( 1951) to indicate that it is the same as the authentication identity
(Username).

Non-US-ASCII characters are permitted in values used for the authorization identity, authentication identity, or password as long as
they are represented in UTF-8 form. Use of non-visible characters or characters which a user may be unable to enter on some
keyboards is discouraged. The following table represents the UTF-8 character ranges allowed in the values:

(Hex)
01-09
0B-0C
0E-7F
C0-DF
E0-EF
F0-F7
F8-FB
FC-FD

See Also
LoginAs ( 1951) Username Password TIdUserPassProvider ( 2569)

TIdSASLPlain Properties
The Properties of the TIdSASLPlain class are listed here.

Properties
Property Description
LoginAs ( 1951) Represents the authorization identity for PLAIN SASL authentication.

Legend
Property

TIdSASLPlain.LoginAs Property
Represents the authorization identity for PLAIN SASL authentication.

Pascal
property LoginAs: String;
Description
LoginAs is a String property that represents the authorization identity for the PLAIN SASL authentication mechanism. LoginAs is the
login identifier for the SASL exchange. The client may use a blank authorization identity in LoginAs to indicate that it is the same as
the authentication identity (or username).

LoginAs is used with Username and Password when constructing the message sent from the client to the server in
StartAuthenticate ( 1950).

See Also
StartAuthenticate ( 1950)

Internet Direct (Indy) Version 10.1.5 1951


TIdSASLSKey Class Classes

TIdSASLSKey Class
File
IdSASLSKey ( 4714)

Hierarchy

Pascal
TIdSASLSKey = class(TIdSASLUserPass);
Description
TIdSASLSKey is a TIdSASLUserPass ( 1954) descendant.

See Also
TIdSASLUserPass ( 1954)

TIdSASLSKey Members
The following tables list the members exposed by TIdSASLSKey.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1953)
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1953)
StartAuthenticate ( 1953)
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdSASLSKey Methods
The Methods of the TIdSASLSKey class are listed here.

Methods
Method Description
ContinueAuthenticate ( 1953)
ServiceName ( 1953)

1952 Internet Direct (Indy) Version 10.1.5


Classes TIdSASLUserPass Class

StartAuthenticate ( 1953)

Legend
Method
virtual

TIdSASLSKey.ContinueAuthenticate Method
Pascal
function ContinueAuthenticate(
const ALastResponse: String
): String; override;
Parameters
Parameters Description
ALastResponse Scope is const. Type is String.

Returns
String

Description
ContinueAuthenticate is a overridden method.

ContinueAuthenticate returns a String value.

TIdSASLSKey.ServiceName Method
Pascal
class function ServiceName: TIdSASLServiceName; override;
Returns
TIdSASLServiceName ( 3079)

Description
ServiceName is a overridden class method.

ServiceName returns a TIdSASLServiceName ( 3079) value.

TIdSASLSKey.StartAuthenticate Method
Pascal
function StartAuthenticate(
const AChallenge: string
): String; override;
Parameters
Parameters Description
AChallenge Scope is const. Type is string.

Returns
String

Description
StartAuthenticate is a overridden method.

StartAuthenticate returns a String value.

Internet Direct (Indy) Version 10.1.5 1953


TIdSASLUserPass Class Classes

TIdSASLUserPass Class
File
IdSASLUserPass ( 4715)

Hierarchy

Pascal
TIdSASLUserPass = class(TIdSASL);
Description
TIdSASLUserPass is a TIdSASL ( 1921) descendant.

See Also
TIdSASL ( 1921)

TIdSASLUserPass Members
The following tables list the members exposed by TIdSASLUserPass.

Properties
Property Description
SecurityLevel ( 1925) Security level offered in the current SASL authentication mechanism.
UserPassProvider ( 1955)
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
ContinueAuthenticate ( 1923) Determines the client response for the server challenge in a SASL authentication exchange.
Create ( 267) Constructor for the object instance.
Destroy ( 1924) Frees the object instance.
FinishAuthenticate ( 1924) Indicates resources in the authentication mechanism are no longer needed.
GetVersion ( 269) Version ( 269) number for Indy component suite.
IsAuthProtocolAvailable ( 1924)
ServiceName ( 1924) Service name for the SASL authentication mechanism.
StartAuthenticate ( 1925) Determines the inital client response for the server challenge in a SASL authentication exchange.
CType ( 267)
Create ( 1274)

Legend
Property
read only
Method
virtual
abstract

TIdSASLUserPass Properties
The Properties of the TIdSASLUserPass class are listed here.

Properties
Property Description
UserPassProvider ( 1955)

1954 Internet Direct (Indy) Version 10.1.5


Classes TIdScheduler Class

Legend
Property

TIdSASLUserPass.UserPassProvider Property
Pascal
property UserPassProvider: TIdUserPassProvider;
Description
UserPassProvider is a Published TIdUserPassProvider ( 2569) property. Write access for the property is implemented using
SetUserPassProvider.

TIdScheduler Class
Base class for schedulers used in multi-threaded TCP servers.

File
IdScheduler ( 4715)

Hierarchy

Pascal
TIdScheduler = class(TIdBaseComponent);
Description
TIdScheduler is a TIdBaseComponent ( 266) descendant that represents the base class used for schedulers in TIdTCPServer (
2375) and descendant classes.

TIdScheduler introduces an abstract representation for executable tasks for client connections to a multi-threaded TCP server. This
abstraction, called a Yarn, allows the use either threads or fibers for execution of client connections to the server. Each client
connection, or Yarn, represents a task that is managed by the Scheduler for the server.

There are basically two types of Schedulers available for TIdTCPServer ( 2375): Thread-based and Fiber-based. Each is
designed to work with a specific type of executable task (or Yarn) that represents the client connections.

TIdScheduler specifies (and in some cases - implements) methods that handle creation, execution, and termination of tasks for
client connections. Applications must use an instance of a descendant class (like TIdSchedulerOfThreadDefault ( 1967),
TIdSchedulerOfThreadPool ( 1970), or TIdSchedulerOfFiber) that implements the mechanism for managing the TIdYarn ( 2632)
for the executable task.

Resources required for the ActiveYarns ( 1960) property are allocated during intialization of the component instance.

See Also
TIdBaseComponent ( 266)

TIdSchedulerOfThreadDefault ( 1967)

TIdSchedulerOfThreadPool ( 1970)

TIdSchedulerOfFiber

TIdYarn ( 2632)

TIdContext ( 376)

TIdTask ( 2329)

TIdTCPServer.Scheduler

Internet Direct (Indy) Version 10.1.5 1955


TIdScheduler Class Classes

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

TIdScheduler Members
The following tables list the members exposed by TIdScheduler.

Properties
Property Description
ActiveYarns ( 1960) Represents the thread-based or the fiber-based tasks allocated by the scheduler.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AcquireYarn ( 1956) Gets a valid yarn for the scheduler.
Create ( 267) Constructor for the object instance.
Destroy ( 1957) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Init ( 1957) Initializes the scheduler prior to use in a TCP server.
ReleaseYarn ( 1958) Removes a yarn from the list of active yarns.
StartYarn ( 1958) Specifies the interface used to start execution of the yarn and its associated task.
TerminateAllYarns ( 1959) Stops execution of all threads or fibers allocated for the scheduler.
TerminateYarn ( 1959) Specifies the interface used to stop execution of a thread or fiber in the scheduler.
CType ( 267)
Create ( 1274)

Legend
Method
abstract
virtual
Property
read only

TIdScheduler Methods
The Methods of the TIdScheduler class are listed here.

Methods
Method Description
AcquireYarn ( 1956) Gets a valid yarn for the scheduler.
Destroy ( 1957) Frees the object instance.
Init ( 1957) Initializes the scheduler prior to use in a TCP server.
ReleaseYarn ( 1958) Removes a yarn from the list of active yarns.
StartYarn ( 1958) Specifies the interface used to start execution of the yarn and its associated task.
TerminateAllYarns ( 1959) Stops execution of all threads or fibers allocated for the scheduler.
TerminateYarn ( 1959) Specifies the interface used to stop execution of a thread or fiber in the scheduler.

Legend
Method
abstract
virtual

TIdScheduler.AcquireYarn Method
Gets a valid yarn for the scheduler.

1956 Internet Direct (Indy) Version 10.1.5


Classes TIdScheduler Class

Pascal
function AcquireYarn: TIdYarn; virtual; abstract;
Returns
TIdYarn ( 2632) - Thread-based or fiber-based task for the scheduler.

Description
AcquireYarn is an abstract virtual TIdYarn ( 2632) function that specifies the interface used to access a TIdYarn ( 2632) instance
for the scheduler. AcquireYarn must be implemented in a descendant class that specializes in creating threads or fibers for the
scheduler.

The TIdYarn ( 2632) return value for the method will include a TIdThreadWithTask ( 2472) or TIdFiberWithTask depending on
the type of scheduler in use. The IdYarn instance is added to the ActiveYarns ( 1960) property for subsequent execution.

Use StartYarn ( 1958) to begin executing the thread or fiber for the client connection task.

Use TerminateYarn ( 1959) to stop executing the thread or fiber for the client connection task.

Use TerminateAllYarns ( 1959) to force termination of all TIdYarn ( 2632) instances in ActiveYarns ( 1960).

Use ReleaseYarn ( 1958) to free a yarn in ActiveYarns ( 1960) that has already been terminated.

See Also
TIdYarn ( 2632)

TIdThreadWithTask ( 2472)

TIdFiberWithTask

ActiveYarns ( 1960)

StartYarn ( 1958)

TerminateYarn ( 1959)

TerminateAllYarns ( 1959)

ReleaseYarn ( 1958)

TIdScheduler.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy frees resources allocated to the ActiveYarn property during component initialization.

Destroy calls the inherited destructor prior to exiting from the method.

See Also
ActiveYarns ( 1960)

TIdScheduler.Init Method
Initializes the scheduler prior to use in a TCP server.

Pascal
procedure Init; virtual;

Internet Direct (Indy) Version 10.1.5 1957


TIdScheduler Class Classes

Description
Init is a procedure used to initialize the scheduler. In TIdScheduler ( 1955), Init is an empty implementation.

Descendant classes (like TIdSchedulerOfThreadPool ( 1970)) use the Init method to pre-allocate the pool of thread-based yarns
for the scheduler.

See Also
TIdSchedulerOfThreadPool.Init ( 1973)

TIdScheduler.ReleaseYarn Method
Removes a yarn from the list of active yarns.

Pascal
procedure ReleaseYarn(
AYarn: TIdYarn
); virtual;
Parameters
Parameters Description
AYarn Thread or fiber to be release by the scheduler.

Description
ReleaseYarn is a procedure used to remove the TIdYarn ( 2632) instance in AYarn from the list of yarns in ActiveYarns ( 1960).
ReleaseYarn is called to remove a yarn from the list when its has execution has been terminated.

AYarn is the thread- or fiber-based executable task for a client connection returned from the AcquireYarn ( 1956) method.

ReleaseYarn calls the TIdThreadSafeList.Remove method using AYarn as an argument.

Descendant classes may perform additional processing in ReleaseYarn related to the specific scheduler type; for instance,
TIdSchedulerOfThreadPool ( 1970) may return the thread for the TIdYarnOfThread ( 2632) instance to the pool of available
threads in the scheduler.

See Also
AcquireYarn ( 1956)

ActiveYarns ( 1960)

TIdYarn ( 2632)

TIdYarnOfThread ( 2632)

TIdSchedulerOfThreadPool.ReleaseYarn ( 1974)

TIdScheduler.StartYarn Method
Specifies the interface used to start execution of the yarn and its associated task.

Pascal
procedure StartYarn(
AYarn: TIdYarn;
ATask: TIdTask
); virtual; abstract;
Parameters
Parameters Description
AYarn Thread or fiber for the executable task.
ATask Executable task context for the thread or fiber.

Description
StartYarn is an abstract virtual method in TIdScheduler ( 1955) that specifies the interface used to start execution of a yarn using

1958 Internet Direct (Indy) Version 10.1.5


Classes TIdScheduler Class

its associated executable task.

AYarn is a TIdYarn ( 2632) instance the represents the thread or fiber from the scheduler's AcquireYarn ( 1956) method used
control execution of the TIdTask ( 2329) instance in ATask.

StartYarn must be implemented in a descendant class to create ( 267) the appropriate TIdYarn ( 2632) descendant for the
scheduler, and to begin execution of the associated task.

Use TerminateYarn ( 1959) to stop execution of a specific yarn and its associated task.

Use TerminateAllYarns ( 1959) to stop execution of all yarns in the ActiveYarns ( 1960) property.

See Also
TIdSchedulerOfThread.StartYarn ( 1965)

TIdSchedulerOfFiber.StartYarn

TIdYarnOfThread ( 2632)

TIdYarnOfFiber

TIdFiberWeaver

TIdScheduler.TerminateAllYarns Method
Stops execution of all threads or fibers allocated for the scheduler.

Pascal
procedure TerminateAllYarns; virtual;
Description
TerminateAllYarns is the method used to stop execution of all TIdYarn ( 2632) instances allocated in the ActiveYarns ( 1960)
property for the scheduler.

TerminateAllYarns accesses each TIdYarn ( 2632) instance in the ActiveYarns ( 1960) property, and calls the TerminateYarn (
1959) method using the current instance as an argument.

Only one thread or fiber can access the TerminateAllYarns method at a time. Resource protection for the ActiveYarns ( 1960)
property is enabled by calling the TIdThreadSafeList.LockList method for the property. If a thread or fiber is blocked due to resource
protection, it will wait for the resource to become available by attempting to access the resource every 500ms (.5 seconds).

After terminating all of the TIdYarn ( 2632) instances in ActiveYarns ( 1960), resource protection is disabled by calling the
TIdThreadSafeList.UnlockList method for the property.

Descendant classes (like TIdSchedulerOfThreadPool ( 1970)) may implement additional processing in their TerminateAllYarns
implementation to provide the additional capabilities required for the scheduler type.

See Also
ActiveYarns ( 1960)

TIdYarn ( 2632)

TIdYarnOfThread ( 2632)

TIdYarnOfFiber

TIdThreadSafeList.LockList

TIdThreadSafeList.UnlockList

TIdSchedulerOfThreadPool.TerminateAllYarns ( 1975)

TIdScheduler.TerminateYarn Method
Specifies the interface used to stop execution of a thread or fiber in the scheduler.

Internet Direct (Indy) Version 10.1.5 1959


TIdScheduler Class Classes

Pascal
procedure TerminateYarn(
AYarn: TIdYarn
); virtual; abstract;
Parameters
Parameters Description
AYarn Thread or fiber to be stopped.

Description
TerminateYarn is an abstract virtual method in TIdScheduler ( 1955) that specifies the interface used to stop execution of a
specific thread or fiber allocated to the ActiveYarns ( 1960) for the scheduler.

TerminateYarn must be implemented in decendant classes to perform the additional tasks necessary to halt execution of the
associated task for the TIdYarn ( 2632) instance used in the scheduler.

AYarn is the TIdYarn ( 2632) instance returned by AcquireYarn ( 1956) to be terminated.

TerminateYarn is used in the TerminateAllYarns ( 1959) method.

See Also
ActiveYarns ( 1960)

AcquireYarn ( 1956)

TerminateAllYarns ( 1959)

TIdSchedulerOfThread.TerminateYarn ( 1965)

TIdSchedulerOfFiber.TerminateYarn

TIdYarnOfThread ( 2632)

TIdYarnOfFiber

TIdScheduler Properties
The Properties of the TIdScheduler class are listed here.

Properties
Property Description
ActiveYarns ( 1960) Represents the thread-based or the fiber-based tasks allocated by the scheduler.

Legend
Property
read only

TIdScheduler.ActiveYarns Property
Represents the thread-based or the fiber-based tasks allocated by the scheduler.

Pascal
property ActiveYarns: TIdThreadSafeList;
Description
ActiveYarns is a read-only TIdThreadSafeList ( 2457) property that represents the thread-based or the fiber-based tasks allocated
by the scheduler. ActiveYarns is instantiated during initialization of the component.

ActiveYarns is used in methods that create ( 267), manage, or free the TIdYarn ( 2632) instances like AcquireYarn ( 1956),
ReleaseYarn ( 1958), TerminateAllYarns ( 1959).

ActiveYarns is freed in the Destroy ( 1957) destructor.

1960 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThread Class

Use AcquireYarn ( 1956) to get the thread or fiber for the client connection task.

Use StartYarn ( 1958) to begin executing a thread or fiber for the client connection task.

Use TerminateYarn ( 1959) to stop executing the thread or fiber for the client connection task.

Use TerminateAllYarns ( 1959) to force termination of all TIdYarn ( 2632) instances in ActiveYarns.

Use ReleaseYarn ( 1958) to free a yarn in ActiveYarns that has already been terminated.

See Also
TIdThreadSafeList ( 2457)

TIdYarn ( 2632)

AcquireYarn ( 1956)

StartYarn ( 1958)

TerminateYarn ( 1959)

TerminateAllYarns ( 1959)

ReleaseYarn ( 1958)

TIdSchedulerOfThread Class
Implements a thread-based scheduler for client connections to a server.

File
IdSchedulerOfThread ( 4715)

Hierarchy

Pascal
TIdSchedulerOfThread = class(TIdScheduler);
Description
TIdSchedulerOfThread is a TIdScheduler ( 1955) descendant that implements a thread-based scheduler as used in
TIdTCPServer ( 2375) and descendant classes.

TIdScheduler ( 1955) introduced an abstract representation for executable tasks for client connections to a multi-threaded TCP
server. This abstraction, called a Yarn, allows the use either threads or fibers for execution of client connections to the server. Each
client connection, or Yarn, represents a task that is managed by the Scheduler for the server.

TIdSchedulerOfThread extends the capabilities of the TIdScheduler ( 1955) ancestor class by implementing methods that handle
the executable threads for yarns managed by the scheduler.

During initialization of the component, TIdSchedulerOfThread assigns the default values for the ThreadPriority ( 1967) and
MaxThreads ( 1966) properties.

Freeing the scheduler instance forces all thread-based yarns in ActiveYarns ( 1960) to be terminated prior to releasing resources
allocated to the scheduler.

See Also
TIdScheduler ( 1955)

TIdSchedulerOfThreadDefault ( 1967)

TIdSchedulerOfThreadPool ( 1970)

TIdSchedulerOfFiber

Internet Direct (Indy) Version 10.1.5 1961


TIdSchedulerOfThread Class Classes

TIdYarnOfThread ( 2632)

TIdContext ( 376)

TIdTask ( 2329)

TIdTCPServer.Scheduler

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

TIdSchedulerOfThread Members
The following tables list the members exposed by TIdSchedulerOfThread.

Properties
Property Description
ActiveYarns ( 1960) Represents the thread-based or the fiber-based tasks allocated by the scheduler.
MaxThreads ( 1966) Indicates the maximum number of threads permitted in the scheduler.
ThreadClass ( 1966) Class reference use to create ( 267) new thread instances for the scheduler.
ThreadPriority ( 1967) Represents the thread priority assigned to threads created in the scheduler.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AcquireYarn ( 1956) Gets a valid yarn for the scheduler.
Create ( 267) Constructor for the object instance.
Destroy ( 1963) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Init ( 1957) Initializes the scheduler prior to use in a TCP server.
NewThread ( 1963) Initializes a new thread for a client connection task in the scheduler.
NewYarn ( 1964) Creates the thread-based task for a client connection scheduled in a server.
ReleaseYarn ( 1958) Removes a yarn from the list of active yarns.
StartYarn ( 1965) Starts execution of the task for a scheduled thread or fiber.
TerminateAllYarns ( 1959) Stops execution of all threads or fibers allocated for the scheduler.
TerminateYarn ( 1965) Halts execution of the thread-based task for a client connection.
CType ( 267)
Create ( 1274)

Legend
Method
abstract
virtual
Property
read only

TIdSchedulerOfThread Methods
The Methods of the TIdSchedulerOfThread class are listed here.

Methods
Method Description
Destroy ( 1963) Frees the object instance.
NewThread ( 1963) Initializes a new thread for a client connection task in the scheduler.
NewYarn ( 1964) Creates the thread-based task for a client connection scheduled in a server.
StartYarn ( 1965) Starts execution of the task for a scheduled thread or fiber.
TerminateYarn ( 1965) Halts execution of the thread-based task for a client connection.

1962 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThread Class

Legend
Destructor
virtual

TIdSchedulerOfThread.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden destructor for the object instance.

Destroy forces all of the thread-based yarns in ActiveYarns ( 1960) to be terminated by calling the TerminateAllYarns ( 1959)
method.

Destroy calls the inherited destructor prior to exiting form the method.

See Also
ActiveYarns ( 1960)

TerminateAllYarns ( 1959)

TIdSchedulerOfThread.NewThread Method
Initializes a new thread for a client connection task in the scheduler.

Pascal
function NewThread: TIdThreadWithTask; virtual;
Returns
TIdThreadWithTask ( 2472) - Thread created for the scheduler, or Nil when a thread cannot be created.

Description
NewThread is a TIdThreadWithTask ( 2472) function used to create ( 267) and initialize the executable task for a yarn managed
by the thread-based scheduler.

The return value for the method is a TIdThreadWithTask ( 2472) instance that represents the thread created for the client
connection executable task in the scheduler, or Nil when a thread cannot be created.

NewThread uses the value in MaxThreads ( 1966) to determine is a limit is imposed on the number threads allowed in the
thread-based scheduler. When MaxThreads ( 1966) contains a positive non-zero value, the number of active yarns in ActiveYarns
( 1960) is checked to ensure that new thread would not exceed the limit.

If the number of TIdYarn ( 2632) instances in ActiveYarns ( 1960) would exceed the value in MaxThreads ( 1966), an
EIdSchedulerMaxThreadsExceeded ( 145) is raised.

NewThread uses the class reference in ThreadClass ( 1966) to create ( 267) a new instance of the relevant class. The value in
Name is used as the name in the thread instance. An EAssertionFailed exception will be raised if the class reference in
ThreadClass ( 1966) is unassigned, or contains the value Nil.

NewThread uses the value in ThreadPriority ( 1967) to determine if the thread priority for the new thread should be adjusted.
When ThreadPriority ( 1967) contains a value other than tpNormal ( 4416), SetThreadPriority ( 2903) is called to adjust the
preference given to the thread during pre-emptive scheduling by the operating system.

NewThread is used in the AcquireYarn ( 1956) method for descendant classes when an executable thread is needed for one of
the ActiveYarns ( 1960) managed by the scheduler.

Use StartYarn ( 1965) to begin execution of the thread for a client connections' executable task.

Internet Direct (Indy) Version 10.1.5 1963


TIdSchedulerOfThread Class Classes

Use TerminateYarn ( 1965) to halt execution of the thread for a client connections' executable task.

Exceptions
Exceptions Description
EIdSchedulerMaxThreadsExceeded ( 145) Raised with the message RSchedMaxThreadEx when the number of threads would exceed the value in
MaxThreads ( 1966).
EAssertionFailed Raised when the ThreadClass ( 1966) is unassigned for the thread-based scheduler.

See Also
TIdThreadWithTask ( 2472)

MaxThreads ( 1966)

ActiveYarns ( 1960)

ThreadPriority ( 1967)

AcquireYarn ( 1956)

StartYarn ( 1965)

TerminateYarn ( 1965)

TIdYarnOfThread ( 2632)

NewThread

EAssertionFailed

EIdSchedulerMaxThreadsExceeded ( 145)

RSchedMaxThreadEx

TIdSchedulerOfThread.NewYarn Method
Creates the thread-based task for a client connection scheduled in a server.

Pascal
function NewYarn(
AThread: TIdThreadWithTask = nil
): TIdYarnOfThread;
Parameters
Parameters Description
AThread Executable task for a client connection. Default value is nil.

Returns
TIdYarnOfThread ( 2632) - Thread-based yarn for the client connections executable task.

Description
NewYarn is a TIdYarnOfThread ( 2632) function used to create ( 267) the thread-based task for a client connection to a server.

NewYarn will raise an EIdException ( 76) exception with the message in RSThreadSchedulerThreadRequired when AThread
contains a Nil value.

The return value for the method is a TIdYarnOfThread ( 2632) instance containing the thread-based yarn for the client
connections executable task.

NewYarn is used in the AcquireYarn ( 1956) method in descendant classes.

See Also
AcquireYarn ( 1956)

EIdException ( 76)

RSThreadSchedulerThreadRequired

1964 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThread Class

TIdYarnOfThread ( 2632)

TIdTask ( 2329)

TIdTaskWithThread

TIdSchedulerOfThread.StartYarn Method
Starts execution of the task for a scheduled thread or fiber.

Pascal
procedure StartYarn(
AYarn: TIdYarn;
ATask: TIdTask
); override;
Parameters
Parameters Description
AYarn Thread-based yarn to be executed.
ATask Task context for the client connection.

Description
StartYarn is an overridden procedure in TIdSchedulerOfThread ( 1961) used to begin execution of the thread using the task
context for a client connection to the server.

StartYarn ensures that AYarn is cast to a TIdYarnOfThread ( 2632) instance, and assigns the executeable task for the client
connection in ATask to the task in the yarn. Execution of the thread is begun by calling the Start method in the TIdThreadWithTask
( 2472) instance.

StartYarn is used in TIdTCPServer ( 2375) to begin execution of the task context for a client connection after accepting a
connection request in a listener thread.

Use TerminateYarn ( 1965) to halt execution of the yarn and its executable task in the scheduler.

See Also
TIdYarnOfThread ( 2632)

TIdThreadWithTask ( 2472)

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

TIdListenerThread ( 1445)

TIdSchedulerOfThread.TerminateYarn Method
Halts execution of the thread-based task for a client connection.

Pascal
procedure TerminateYarn(
AYarn: TIdYarn
); override;
Parameters
Parameters Description
AYarn Thread or fiber in the scheduler to be terminated.

Description
TerminateYarn is an overridden procedure in TIdSchedulerOfThread ( 1961) used to halt execution of the thread-based task for a
client connection to a server.

TerminateYarn casts AYarn to a TIdYarnOfThread ( 2632) instance, as used in the scheduler, to access the thread for the task
context. If the thread is suspended, both the thread and its yarn in the scheduler are freed. If the thread has been terminated, the

Internet Direct (Indy) Version 10.1.5 1965


TIdSchedulerOfThread Class Classes

associated yarn will be freed when the thread is freed.

TerminateYarn is used in TerminateAllYarns ( 1959) to halt execution of all TIdYarnOfThread ( 2632) instances in ActiveYarns
( 1960).

Use AcquireYarn ( 1956) to get a new thread-based executable task for a client connection.

Use StartYarn ( 1965) to begin execution of the thread-based yarn in the scheduler.

See Also
ActiveYarns ( 1960)

TerminateAllYarns ( 1959)

AcquireYarn ( 1956)

StartYarn ( 1965)

TIdYarnOfThread ( 2632)

TIdThreadWithTask ( 2472)

TIdSchedulerOfThread Properties
The Properties of the TIdSchedulerOfThread class are listed here.

Properties
Property Description
MaxThreads ( 1966) Indicates the maximum number of threads permitted in the scheduler.
ThreadClass ( 1966) Class reference use to create ( 267) new thread instances for the scheduler.
ThreadPriority ( 1967) Represents the thread priority assigned to threads created in the scheduler.

Legend
Property

TIdSchedulerOfThread.MaxThreads Property
Indicates the maximum number of threads permitted in the scheduler.

Pascal
property MaxThreads: Integer;
Description
MaxThreads is an Integer property that indicates the maximum number of threads permitted in the thread-based scheduler.

The default value for MaxThreads is 0, as assigned during component initialization, and indicates that the scheduler does not
impose a limit on the number of threads created in scheduler.

Set MaxThreads to a positive non-zero value to limit the number of threads created in NewThread ( 1963) to the specified value.

See Also
NewThread ( 1963)

EIdSchedulerMaxThreadsExceeded ( 145)

RSchedMaxThreadEx

TIdSchedulerOfThread.ThreadClass Property
Class reference use to create ( 267) new thread instances for the scheduler.

Pascal
property ThreadClass: TIdThreadWithTaskClass;

1966 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThreadDefault Class

Description
ThreadClass is a TIdThreadWithTaskClass ( 3095) property that represents the class reference used when creating new thread
instances for the thread-based scheduler.

ThreadClass is used in the NewThread ( 1963) method to create ( 267) a new instance of relevant thread class.

The default class reference assigned to ThreadClass is TIdThreadWithTask ( 2472), as assigned during initialization of the
component.

See Also
NewThread ( 1963)

TIdThreadWithTask ( 2472)

TIdSchedulerOfThread.ThreadPriority Property
Represents the thread priority assigned to threads created in the scheduler.

Pascal
property ThreadPriority: TIdThreadPriority;
Description
ThreadPriority is a TIdThreadPriority ( 3094) property that represents the default thread priority assigned to threads created in the
thread-based scheduler.

The default value for ThreadPriority is tpNormal ( 4416), as assigned during initialization of the component instance. Assign a
value from the TIdThreadPriority ( 3094) enumeration to the property to alter the priority given to the thread during pre-emptive
scheduling in the operating system.

ThreadPriority is used in NewThread ( 1963) when initializing the TIdThreadWithTask ( 2472) instance for the yarn.

See Also
NewThread ( 1963)

TIdThreadWithTask ( 2472)

TIdThreadPriority ( 3094)

SetThreadPriority ( 2903)

TIdSchedulerOfThreadDefault Class
Implements the default thread-based scheduler for client connections to a server.

File
IdSchedulerOfThreadDefault ( 4716)

Hierarchy

Pascal
TIdSchedulerOfThreadDefault = class(TIdSchedulerOfThread);
Description
TIdSchedulerOfThreadDefault is a TIdSchedulerOfThread ( 1961) descendant that implements the default thread-based
scheduler as used in TIdTCPServer ( 2375) and descendant classes.

TIdSchedulerOfThread ( 1961) introduced a scheduler using threads to represents a task that is managed by the Scheduler for
the server. TIdSchedulerOfThreadDefault extends the ancestor class implementing methods that create ( 267) the yarns and

Internet Direct (Indy) Version 10.1.5 1967


TIdSchedulerOfThreadDefault Class Classes

threads needed for the default implementation.

See Also
TIdScheduler ( 1955)

TIdSchedulerOfThread ( 1961)

TIdSchedulerOfThreadPool ( 1970)

TIdSchedulerOfFiber

TIdYarnOfThread ( 2632)

TIdContext ( 376)

TIdTask ( 2329)

TIdTCPServer.Scheduler

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

TIdSchedulerOfThreadDefault Members
The following tables list the members exposed by TIdSchedulerOfThreadDefault.

Properties
Property Description
ActiveYarns ( 1960) Represents the thread-based or the fiber-based tasks allocated by the scheduler.
MaxThreads ( 1966) Indicates the maximum number of threads permitted in the scheduler.
ThreadClass ( 1966) Class reference use to create ( 267) new thread instances for the scheduler.
ThreadPriority ( 1967) Represents the thread priority assigned to threads created in the scheduler.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AcquireYarn ( 1969) Creates a thread-based yarn for the scheduler in the server.
Create ( 267) Constructor for the object instance.
Destroy ( 1957) Frees the object instance.
Destroy ( 1963) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Init ( 1957) Initializes the scheduler prior to use in a TCP server.
NewThread ( 1969) Initializes a new thread for a client connection task in the scheduler.
NewYarn ( 1964) Creates the thread-based task for a client connection scheduled in a server.
ReleaseYarn ( 1958) Removes a yarn from the list of active yarns.
StartYarn ( 1958) Specifies the interface used to start execution of the yarn and its associated task.
StartYarn ( 1965) Starts execution of the task for a scheduled thread or fiber.
TerminateAllYarns ( 1959) Stops execution of all threads or fibers allocated for the scheduler.
TerminateYarn ( 1959) Specifies the interface used to stop execution of a thread or fiber in the scheduler.
TerminateYarn ( 1965) Halts execution of the thread-based task for a client connection.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
abstract
Property
read only

1968 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThreadDefault Class

TIdSchedulerOfThreadDefault Methods
The Methods of the TIdSchedulerOfThreadDefault class are listed here.

Methods
Method Description
AcquireYarn ( 1969) Creates a thread-based yarn for the scheduler in the server.
NewThread ( 1969) Initializes a new thread for a client connection task in the scheduler.

Legend
Method
virtual

TIdSchedulerOfThreadDefault.AcquireYarn Method
Creates a thread-based yarn for the scheduler in the server.

Pascal
function AcquireYarn: TIdYarn; override;
Returns
TIdYarn ( 2632) - Thread-based yarn created for the scheduler.

Description
AcquireYarn is an overridden TIdYarn ( 2632) function in TIdSchedulerOfThreadDefault ( 1967) that handles getting a new
TIdYarn ( 2632) instance for the thread-based scheduler.

AcquireYarn calls the NewYarn ( 1964) method to create ( 267) a thread-based yarn which is added to the list of ActiveYarns (
1960) for the scheduler. When NewYarn ( 1964) is called, the overridden NewThread ( 1969) method is used to get the
executable task representing the client context for the scheduler.

Use StartYarn ( 1965) to begin executing the thread or fiber for the client connection task.

Use TerminateYarn ( 1965) to stop executing the thread or fiber for the client connection task.

Use TerminateAllYarns ( 1959) to force termination of all TIdYarn ( 2632) instances in ActiveYarns ( 1960).

Use ReleaseYarn ( 1958) to free a yarn in ActiveYarns ( 1960) that has already been terminated.

See Also
TIdYarnOfThread ( 2632)

TIdYarn ( 2632)

TIdThreadWithTask ( 2472)

ActiveYarns ( 1960)

StartYarn ( 1965)

TerminateYarn ( 1965)

TerminateAllYarns ( 1959)

ReleaseYarn ( 1958)

TIdSchedulerOfThreadDefault.NewThread Method
Initializes a new thread for a client connection task in the scheduler.

Pascal
function NewThread: TIdThreadWithTask; override;

Internet Direct (Indy) Version 10.1.5 1969


TIdSchedulerOfThreadPool Class Classes

Returns
TIdThreadWithTask ( 2472) - Thread created for the scheduler, or Nil when a thread cannot be created.

Description
NewThread is an overridden TIdThreadWithTask ( 2472) function used to create ( 267) and initialize the executable task for a
yarn managed by the thread-based scheduler.

The return value for the method is a TIdThreadWithTask ( 2472) instance that represents the thread created for the client
connection executable task in the scheduler, or Nil when a thread cannot be created.

NewThread calls the inherited NewThread method to initialize the thread for the scheduler.

NewThread uses the value in MaxThreads ( 1966) to determine is a limit is imposed on the number threads allowed in the
thread-based scheduler. When MaxThreads ( 1966) contains a positive non-zero value, the number of active yarns in ActiveYarns
( 1960) is checked to ensure that new thread would not exceed the limit. If the number of TIdYarn ( 2632) instances in
ActiveYarns ( 1960) would exceed the value in MaxThreads ( 1966), an EIdSchedulerMaxThreadsExceeded ( 145) is raised.

NewThread uses the value in ThreadPriority ( 1967) to determine if the thread priority for the new thread should be adjusted.
When ThreadPriority ( 1967) contains a value other than tpNormal ( 4416), SetThreadPriority ( 2903) is called to adjust the
preference given to the thread during pre-emptive scheduling by the operating system.

NewThread also sets the value in FreeOnTerminate to True.

NewThread is used in the AcquireYarn ( 1969) method when an executable thread is needed for one of the ActiveYarns ( 1960)
managed by the scheduler.

Use StartYarn ( 1965) to begin execution of the thread for a client connections' executable task.

Use TerminateYarn ( 1965) to halt execution of the thread for a client connections' executable task.

Exceptions
Exceptions Description
EIdSchedulerMaxThreadsExceeded ( 145) Raised with the message RSchedMaxThreadEx when the number of threads would exceed the value in
MaxThreads ( 1966).

See Also
TIdThreadWithTask ( 2472)

MaxThreads ( 1966)

ActiveYarns ( 1960)

ThreadPriority ( 1967)

AcquireYarn ( 1969)

StartYarn ( 1965)

TerminateYarn ( 1965)

TIdYarnOfThread ( 2632)

EIdSchedulerMaxThreadsExceeded ( 145)

RSchedMaxThreadEx

TIdSchedulerOfThreadPool Class
Implements a thread-based scheduler using a pool of pre-allocated thread instances.

File
IdSchedulerOfThreadPool ( 4716)

1970 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThreadPool Class

Hierarchy

Pascal
TIdSchedulerOfThreadPool = class(TIdSchedulerOfThread);
Description
TIdSchedulerOfThreadPool is a TIdSchedulerOfThread ( 1961) descendant that implements a thread-based scheduler for
TIdTCPServer ( 2375) using a pool of pre-allocated thread instances.

TIdSchedulerOfThreadPool introduces members and properties needed to indicate the size of the thread pool, and the internal
storage for the thread instances.

TIdSchedulerOfThreadPool overrides methods from the ancestor class to handle initialization of the thread pool, allocating new
threads and yarns for the scheduler, and terminating yarns for the scheduler.

See Also
TIdSchedulerOfThread ( 1961)

TIdYarnOfThread ( 2632)

TIdThreadWithTask ( 2472)

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

IndySupport ( 15)

TIdSchedulerOfThreadPool Members
The following tables list the members exposed by TIdSchedulerOfThreadPool.

Properties
Property Description
ActiveYarns ( 1960) Represents the thread-based or the fiber-based tasks allocated by the scheduler.
MaxThreads ( 1966) Indicates the maximum number of threads permitted in the scheduler.
PoolSize ( 1975) Number of thread instances for the thread pool in the scheduler.
ThreadClass ( 1966) Class reference use to create ( 267) new thread instances for the scheduler.
ThreadPriority ( 1967) Represents the thread priority assigned to threads created in the scheduler.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
AcquireYarn ( 1972) Gets a valid yarn for the scheduler.
Create ( 267) Constructor for the object instance.
Destroy ( 1973) Frees the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Init ( 1973) Initialize the thread pool for the thread-based scheduler.
NewThread ( 1973) Initializes a new thread for a client connection task in the scheduler.
NewYarn ( 1964) Creates the thread-based task for a client connection scheduled in a server.
ReleaseYarn ( 1974) Removes a yarn from the list of active yarns.
StartYarn ( 1958) Specifies the interface used to start execution of the yarn and its associated task.
StartYarn ( 1965) Starts execution of the task for a scheduled thread or fiber.
TerminateAllYarns ( 1975) Stops execution of all threads-based yarns allocated for the scheduler.
TerminateYarn ( 1959) Specifies the interface used to stop execution of a thread or fiber in the scheduler.
TerminateYarn ( 1965) Halts execution of the thread-based task for a client connection.
CType ( 267)
Create ( 1274)

Internet Direct (Indy) Version 10.1.5 1971


TIdSchedulerOfThreadPool Class Classes

Legend
Method
virtual
abstract
Property
read only

TIdSchedulerOfThreadPool Methods
The Methods of the TIdSchedulerOfThreadPool class are listed here.

Methods
Method Description
AcquireYarn ( 1972) Gets a valid yarn for the scheduler.
Destroy ( 1973) Frees the object instance.
Init ( 1973) Initialize the thread pool for the thread-based scheduler.
NewThread ( 1973) Initializes a new thread for a client connection task in the scheduler.
ReleaseYarn ( 1974) Removes a yarn from the list of active yarns.
TerminateAllYarns ( 1975) Stops execution of all threads-based yarns allocated for the scheduler.

Legend
Method
virtual

TIdSchedulerOfThreadPool.AcquireYarn Method
Gets a valid yarn for the scheduler.

Pascal
function AcquireYarn: TIdYarn; override;
Returns
TIdYarn ( 2632) - Thread-based or fiber-based task for the scheduler.

Description
AcquireYarn is an overridden TIdYarn ( 2632) function that implements the interface used to access a TIdYarn ( 2632) instance
for the scheduler. AcquireYarn implements the abstract virtual method from the ancestor class that specializes in creating threads
for the scheduler.

AcquireYarn use an existing thread from the thread pool for the scheduler. If no threads are available in the thread pool, a new
TIdThreadWithTask ( 2472) instance is created by calling the NewThread ( 1973) method.

AcquireYarn creates a new yarn for the thread-based scheduler by calling NewYarn ( 1964) using the thread for the executable
task for the client connection. The IdYarn instance is added to the ActiveYarns ( 1960) property for subsequent execution.

Use StartYarn ( 1965) to begin executing the thread or fiber for the client connection task.

Use TerminateYarn ( 1965) to stop executing the thread or fiber for the client connection task.

Use TerminateAllYarns ( 1975) to force termination of all TIdYarn ( 2632) instances in ActiveYarns ( 1960).

Use ReleaseYarn ( 1974) to free a yarn in ActiveYarns ( 1960) that has already been terminated.

See Also
TIdYarnOfThread ( 2632)

TIdThreadWithTask ( 2472)

ActiveYarns ( 1960)

StartYarn ( 1965)

1972 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThreadPool Class

TerminateYarn ( 1965)

TerminateAllYarns ( 1975)

ReleaseYarn ( 1974)

TIdSchedulerOfThreadPool.Destroy Destructor
Frees the object instance.

Pascal
destructor Destroy; override;
Description
Destroy is the overridden derstructor for the object instance.

Destroy calls the inherited method to terminate executing threads in the ActiveYarns ( 1960) for the scheduler. Destroy also frees
and releases resources allocated in Init ( 1973) to the thread pool for the scheduluer.

See Also
Init ( 1973)

ActiveYarns ( 1960)

TIdSchedulerOfThreadPool.Init Method
Initialize the thread pool for the thread-based scheduler.

Pascal
procedure Init; override;
Description
Init is an overridden procedure in TIdSchedulerOfThreadPool ( 1970) used to initialize the pre-allocated internal pool of threads for
the thread-based scheduler.

Init calls the inherited method, and creates the TIdThreadSafeList ( 2457) member used for internal storage of the threads. At
runtime, Init uses the value in PoolSize ( 1975) is used to create ( 267) the specified number of threads in the thread pool by
calling NewThread ( 1973).

Calling Init at design-time has no effect.

Threads allocated to the thread pool are extracted for use in the AcquireYarn ( 1972) method. Thread instances are returned to
the thread pool in the ReleaseYarn ( 1974), TerminateYarn ( 1965), and TerminateAllYearns methods.

See Also
TIdTCPServer.Scheduler

TIdTCPServer.Contexts

TIdTCPServer.ContextClass

TIdThreadSafeList ( 2457)

TIdThreadWithTask ( 2472)

TIdYarnOfThread ( 2632)

TIdSchedulerOfThreadPool.NewThread Method
Initializes a new thread for a client connection task in the scheduler.

Pascal
function NewThread: TIdThreadWithTask; override;

Internet Direct (Indy) Version 10.1.5 1973


TIdSchedulerOfThreadPool Class Classes

Returns
TIdThreadWithTask ( 2472) - Thread created for the scheduler, or Nil when a thread cannot be created.

Description
NewThread is an overridden TIdThreadWithTask ( 2472) function used to create ( 267) and initialize the executable task for a
yarn managed by the thread-based scheduler.

The return value for the method is a TIdThreadWithTask ( 2472) instance that represents the thread created for the client
connection executable task in the scheduler, or Nil when a thread cannot be created.

NewThread calls the inherited NewThread method to determine the thread priority and the maximum number of threads allowed in
the thread-based scheduler. NewThread also sets the StopMode value in the thread instance to Suspend (rather than Terminate)
which allows a stopped thread to be returned to the internal thread pool for subsequent use.

NewThread is used in the AcquireYarn ( 1972) method when an executable thread is needed for one of the ActiveYarns ( 1960)
managed by the scheduler.

Use StartYarn ( 1965) to begin execution of the thread for a client connections' executable task.

Use TerminateYarn ( 1965) to halt execution of the thread for a client connections' executable task.

Exceptions
Exceptions Description
EIdSchedulerMaxThreadsExceeded ( 145) Raised with the message RSchedMaxThreadEx when the number of threads would exceed the value in
MaxThreads ( 1966).

See Also
TIdThreadWithTask ( 2472)

MaxThreads ( 1966)

ActiveYarns ( 1960)

ThreadPriority ( 1967)

AcquireYarn ( 1972)

StartYarn ( 1965)

TerminateYarn ( 1965)

TIdYarnOfThread ( 2632)

EIdSchedulerMaxThreadsExceeded ( 145)

RSchedMaxThreadEx

TIdSchedulerOfThreadPool.ReleaseYarn Method
Removes a yarn from the list of active yarns.

Pascal
procedure ReleaseYarn(
AYarn: TIdYarn
); override;
Parameters
Parameters Description
AYarn Thread-based yarn to be release by the scheduler.

Description
ReleaseYarn is an overridden method used to remove the TIdYarnOfThread ( 2632) instance in AYarn from the list of yarns in
ActiveYarns ( 1960). ReleaseYarn is called to remove a yarn from the list when its has execution has been terminated.

AYarn is the thread-based executable task for a client connection returned from the AcquireYarn ( 1972) method.

1974 Internet Direct (Indy) Version 10.1.5


Classes TIdSchedulerOfThreadPool Class

ReleaseYarn will return the TIdThreadWithTask ( 2472) instance for the yarn to the internal thread pool when the size of the pool
is smaller than PoolSize ( 1975). If the thread pool is already larger than PoolSize ( 1975), the thread is terminated (instead of
Suspended) and freed.

See Also
ActiveYarns ( 1960)

AcquireYarn ( 1972)

PoolSize ( 1975)

TIdYarn ( 2632)

TIdYarnOfThread ( 2632)

TIdSchedulerOfThreadPool.TerminateAllYarns Method
Stops execution of all threads-based yarns allocated for the scheduler.

Pascal
procedure TerminateAllYarns; override;
Description
TerminateAllYarns is an overridden method in TIdSchedulerOfThreadPool ( 1970). TerminateAllYarns is the method used to stop
execution of all TIdYarnOfThread ( 2632) instances allocated in the ActiveYarns ( 1960) property for the scheduler.

TerminateAllYarns calls the inherited method to halt scheduling for all ActiveYarns ( 1960).

In addition, TerminateAllYarns will Terminate (rather than Suspend) and Free any thread instances allocated to the internal thread
pool for thread-based scheduler.

See Also
ActiveYarns ( 1960)

TIdYarn ( 2632)

TIdYarnOfThread ( 2632)

TIdThreadWithTask ( 2472)

TIdThreadSafeList.LockList

TIdThreadSafeList.UnlockList

TIdSchedulerOfThreadPool Properties
The Properties of the TIdSchedulerOfThreadPool class are listed here.

Properties
Property Description
PoolSize ( 1975) Number of thread instances for the thread pool in the scheduler.

Legend
Property

TIdSchedulerOfThreadPool.PoolSize Property
Number of thread instances for the thread pool in the scheduler.

Pascal
property PoolSize: Integer;

Internet Direct (Indy) Version 10.1.5 1975


TIdServerCompressionIntercept Class Classes

Description
PoolSize is an Integer property that indicates the number of thread instances to allocate to the internal thread pool for a
thread-based scheduler. The default value for PoolSize is 0, as assigned during initialization of the component, and indicates that
no thread instances are allocated to the internal thread pool.

PoolSize is used in the Init ( 1973) method which allocates thread instances to the internal thread pool at runtime.

PoolSize is also used in the ReleaseYarn ( 1974) method to determine if the thread reference for the freed yarn should be
returned to the internal thread pool.

PoolSize is used only when loading the component (component streaming) or when new threads are required in AcquireYarn (
1972).

Setting PoolSize to a large value will lead to longer load times.

Setting the value in PoolSize after a server has become active will result in thread instances being accumulated after execution in
the thread pool until the number in PoolSize is reached.

See Also
TIdThreadSafeList ( 2457)

Init ( 1973)

ReleaseYarn ( 1974)

AcquireYarn ( 1972)

TIdServerCompressionIntercept Class
Implements a server-side intercept component for compressing a data stream using the zlib library.

File
IdCompressionIntercept ( 4603)

Hierarchy

Pascal
TIdServerCompressionIntercept = class(TIdServerIntercept);
Description
TIdServerCompressionIntercept is a TIdServerIntercept ( 1983) descendant that implements an Indy intercept component for
compressing a data stream using the open-source zlib compression library. As the name implies, TIdServerCompressionIntercept is
used in TIdTCPServer ( 2375) and descendant classes to return a TIdConnectionIntercept ( 368) for client connections to the
multhithreaded server.

Set the CompressionLevel ( 1979) property to a value between 1 and 9 to enable compressing of the data stream for client
connections. A setting of 0(zero) disables compression and the component is dormant. Bothe the sender (client) and receiver
(server) must have compression enabled to properly exchange decompress the data stream. They do not have to use the same
CompressionLevel ( 1979) as long as they are both set to a value between 1 and 9.

In order for this file to compile on Windows, the follow .obj files must be provided as delivered with this file:

deflate.obj inflate.obj inftrees.obj trees.obj adler32.obj infblock.obj infcodes.obj infutil.obj inffast.obj

On Linux, the shared-object file libz.so.1 must be available on the system. Most modern Linux distributions include this file.

You may sometimes get the following compiler errors with this file:
IdCompressionIntercept.pas(331) Error: Incompatible types
IdCompressionIntercept.pas(152) Error: Unsatisfied forward or external declaration: '_tr_init'

1976 Internet Direct (Indy) Version 10.1.5


Classes TIdServerCompressionIntercept Class

IdCompressionIntercept.pas(153) Error: Unsatisfied forward or external declaration: '_tr_tally'


IdCompressionIntercept.pas(154) Error: Unsatisfied forward or external declaration:
'_tr_flush_block'
IdCompressionIntercept.pas(155) Error: Unsatisfied forward or external declaration: '_tr_align'
IdCompressionIntercept.pas(156) Error: Unsatisfied forward or external declaration:
'_tr_stored_block'
IdCompressionIntercept.pas(157) Error: Unsatisfied forward or external declaration: 'adler32'
IdCompressionIntercept.pas(158) Error: Unsatisfied forward or external declaration:
'inflate_blocks_new'
IdCompressionIntercept.pas(159) Error: Unsatisfied forward or external declaration:
'inflate_blocks'
IdCompressionIntercept.pas(160) Error: Unsatisfied forward or external declaration:
'inflate_blocks_reset'
IdCompressionIntercept.pas(161) Error: Unsatisfied forward or external declaration:
'inflate_blocks_free'
IdCompressionIntercept.pas(162) Error: Unsatisfied forward or external declaration:
'inflate_set_dictionary'
IdCompressionIntercept.pas(163) Error: Unsatisfied forward or external declaration:
'inflate_trees_bits'
IdCompressionIntercept.pas(164) Error: Unsatisfied forward or external declaration:
'inflate_trees_dynamic'
IdCompressionIntercept.pas(165) Error: Unsatisfied forward or external declaration:
'inflate_trees_fixed'
IdCompressionIntercept.pas(166) Error: Unsatisfied forward or external declaration:
'inflate_trees_free'
IdCompressionIntercept.pas(167) Error: Unsatisfied forward or external declaration:
'inflate_codes_new'
IdCompressionIntercept.pas(168) Error: Unsatisfied forward or external declaration:
'inflate_codes'
IdCompressionIntercept.pas(169) Error: Unsatisfied forward or external declaration:
'inflate_codes_free'
IdCompressionIntercept.pas(170) Error: Unsatisfied forward or external declaration:
'_inflate_mask'
IdCompressionIntercept.pas(171) Error: Unsatisfied forward or external declaration:
'inflate_flush'
IdCompressionIntercept.pas(172) Error: Unsatisfied forward or external declaration:
'inflate_fast'
IdCompressionIntercept.pas(189) Error: Unsatisfied forward or external declaration:
'deflateInit_'
IdCompressionIntercept.pas(196) Error: Unsatisfied forward or external declaration: 'deflate'
IdCompressionIntercept.pas(203) Error: Unsatisfied forward or external declaration: 'deflateEnd'
IdCompressionIntercept.pas(213) Error: Unsatisfied forward or external declaration:
'inflateInit_'
IdCompressionIntercept.pas(220) Error: Unsatisfied forward or external declaration: 'inflate'
IdCompressionIntercept.pas(227) Error: Unsatisfied forward or external declaration: 'inflateEnd'
IdCompressionIntercept.pas(234) Error: Unsatisfied forward or external declaration:
'inflateReset'
Indy40.dpk(196) Fatal: Could not compile used unit 'IdCompressionIntercept.pas'
Do not be alarmed. This is due to a bug in DCC32 in Delphi 4, 5, 6, plus C++Builder, 4, 5, and 6.

There is a workaround for this issue. The workaround is to compile this unit separately from the other units and than build Indy with
a command such as DCC32 using the /M parameter. DO not use the /B parameter as that does force everything to be recompiled
triggering the DCC32 error.

The batch files FULLC4.BAT, FULLC5.BAT, FULLC6.BAT, FULLD4.BAT, FULLD5.BAT and FULLD6.BAT now have the
workaround in them so we recommend that you use those to build Indy.

Borland is aware of the issue.

See Also
TIdServerIntercept ( 1983) TIdConnectionIntercept ( 368)

TIdServerCompressionIntercept Members
The following tables list the members exposed by TIdServerCompressionIntercept.

Internet Direct (Indy) Version 10.1.5 1977


TIdServerCompressionIntercept Class Classes

Properties
Property Description
CompressionLevel ( 1979) Represents the compression level applied the data stream for the intercept.
Version ( 269) Identifies the version number for the Indy component suite.

Methods
Method Description
Accept ( 1978) Creates a compression intercept for client connections to a server.
Create ( 267) Constructor for the object instance.
GetVersion ( 269) Version ( 269) number for Indy component suite.
Init ( 1978) Implements the virtual abstract method from the ancestor.
CType ( 267)
Create ( 1274)

Legend
Method
virtual
Property
read only

TIdServerCompressionIntercept Methods
The Methods of the TIdServerCompressionIntercept class are listed here.

Methods
Method Description
Accept ( 1978) Creates a compression intercept for client connections to a server.
Init ( 1978) Implements the virtual abstract method from the ancestor.

Legend
Method
virtual

TIdServerCompressionIntercept.Accept Method
Creates a compression intercept for client connections to a server.

Pascal
function Accept(
AConnection: TComponent
): TIdConnectionIntercept; override;
Description
Accept is a TIdConnectionIntercept ( 368) function that returns an intercept for use with a client connection to a multithreaded
server. When a client connection is Accepted by the server, a new TIdCompressionIntercept ( 360) is created with the client
connection as the owner of the object instance. The CompressionLevel ( 1979) for the client intercept is set to the value specified
in the property for the server.

See Also
TIdCompressionIntercept ( 360) CompressionLevel ( 1979)

TIdServerCompressionIntercept.Init Method
Implements the virtual abstract method from the ancestor.

Pascal
procedure Init; override;

1978 Internet Direct (Indy) Version 10.1.5


Classes TIdServerCookie Class

Description
Init is an overridden procedure in TIdServerCompressionIntercept ( 1976), that implements the virtual abstract method from the
ancestor. Init is an empty implementation in TIdServerCompressionIntercept ( 1976).

See Also
TIdServerIntercept ( 1983)

TIdServerCompressionIntercept Properties
The Properties of the TIdServerCompressionIntercept class are listed here.

Properties
Property Description
CompressionLevel ( 1979) Represents the compression level applied the data stream for the intercept.

Legend
Property

TIdServerCompressionIntercept.CompressionLevel Property
Represents the compression level applied the data stream for the intercept.

Pascal
property CompressionLevel: TCompressionLevel;
Description
CompressionLevel is a TCompressionLevel ( 2941) property that represents the compression level to be applied when
transforming data using Send or Receive. Set CompressionLevel to a value between 1 and 9 to enable compressing of the data
stream for intercept. When CompressionLevel is 0 (zero), compression is disabled and the intercept is dormant.

Both the sender and receiver must have compression enabled in order to properly decompress the data stream for the intercept.
They do not have to use the same CompressionLevel as long as they are both set to a value between 1 and 9.

Changing the value in CompressionLevel ensures that the internal compression and decompression records are reset and cleared.
The new value for CompressionLevel will also be forced into the range allowed by the TCompressionLevel ( 2941) enumeration.

See Also
TCompressionLevel ( 2941) TIdCompressionIntercept ( 360) Send Receive

TIdServerCookie Class
Implements a server cookie.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdServerCookie = class(TIdCookieRFC2109);
Description
TIdServerCookie is a TIdCookieRFC2109 ( 388) descendant that implements Cookies used in an HTTP server.

Internet Direct (Indy) Version 10.1.5 1979


TIdServerCookie Class Classes

TIdServerCookie is descended from TIdCookieRFC2109 ( 388) to provide access to the Expires ( 1683) property (instead of
Max ( 2875)-Age, which is not supported in most new browsers).

TIdServerCookie reimplements the GetCookie method to update the ExpiresDate property when a value has been assigned to
MaxAge ( 390).

TIdServerCookie implements the AddAttribute ( 1981) method to handle server-specific Path ( 1684) and Domain ( 1683)
values.

See Also
TIdCookieRFC2109 ( 388)

TIdServerCookie Members
The following tables list the members exposed by TIdServerCookie.

Properties
Property Description
ClientCookie ( 1682) Represents the Cookie name and value.
Comment ( 390) Represents private data or documentation in a Cookie.
CookieName ( 1682) Represents the identity for a Cookie header.
CookieText ( 1683) Represents the textual representation for a Cookie including attribute parameters.
Domain ( 1683) Indicates the host system where a Cookie is valid.
Expires ( 1683) Indicates the life time of the Cookie.
MaxAge ( 390) Represents the longevity of the Cookie.
Path ( 1684) Specifies the subset of URLs valid for the Cookie.
Secure ( 1684) Indicates the Cookie requires a secure communications channel.
ServerCookie ( 1684) Represents the Cookie contents in a Server response.
Value ( 1684) Represents persistent state data associated with a Cookie name.
Version ( 391) Version of the Cookie specification supported.

Methods
Method Description
AddAttribute ( 1981) Sets the Path ( 1684) or Domain ( 1683) for a server cookie.
Assign ( 1680) Copies property values to the current object instance.
Create ( 1981) Constructor for the collection item.
Destroy ( 1681) Frees the collection item.
IsValidCookie ( 1681) Indicates if the Domain ( 1683) for the Cookie matches the host server for the request.

Legend
Method
virtual
Property
read only

TIdServerCookie Methods
The Methods of the TIdServerCookie class are listed here.

Methods
Method Description
AddAttribute ( 1981) Sets the Path ( 1684) or Domain ( 1683) for a server cookie.
Create ( 1981) Constructor for the collection item.

Legend
Method
virtual

1980 Internet Direct (Indy) Version 10.1.5


Classes TIdServerCookies Class

TIdServerCookie.AddAttribute Method
Sets the Path ( 1684) or Domain ( 1683) for a server cookie.

Pascal
procedure AddAttribute(
const Attribute: String;
const Value: String
);
Parameters
Parameters Description
Attribute Cookie attribute name.
Value Cookie attribute value.

Description
AddAttribute is a procedure AddAttribute used to to set the '$PATH' and '$DOMAIN' attributes for the server cookie.

Attribute is the Cookie attribute name, and can contains the values '$PATH' and '$DOMAIN' (in upper-, lower-, or mixed-case). All
other Attribute names are ignored.

Value ( 1684) is the content for the named attribute to be set for the server cookie.

TIdServerCookie.Create Constructor
Constructor for the collection item.

Pascal
constructor Create(
ACollection: TIdCollection
); override;
Parameters
Parameters Description
ACollection Owner of the collection item.

Description
Create is the constructor for the collection item.

Create calls the inherited constructor using ACollection as the owner for the collection item.

Create sets the internal cookie version to cvNetscape prior to exiting from the method.

TIdServerCookies Class
Implements a container for Cookie ( 1983) class instances.

File
IdCookie ( 4606)

Hierarchy

Pascal
TIdServerCookies = class(TIdCookies);
Description
TIdServerCookies is a TIdCookies ( 394) decendant that implements a container for server Cookie ( 1983) class instances.

Internet Direct (Indy) Version 10.1.5 1981


TIdServerCookies Class Classes

TIdServerCookies provides methods that allow creation of both TIdCookieRFC2109 ( 388) Cookie ( 1983) class instances.
TIdServerCookies also provides methods that provide access to Cookie ( 1983) class instances using Cookie ( 1983) name, and
an integer position in the server Cookie ( 1983) collection.

TIdServerCookies is the type used by TIdHTTPRequestInfo ( 1077) and TIdHTTPResponseInfo ( 1089) to represent the Cookie
( 1983) collection maintained by a TIdHTTP ( 1041) server.

See Also
TIdCookies ( 394) TIdCookieManager ( 382) TIdHTTPServer ( 1102) TIdCookieRFC2109 ( 388)

TIdServerCookies Members
The following tables list the members exposed by TIdServerCookies.

Properties
Property Description
Cookie ( 1983) Provides access to server Cookie collection items by name.
Items ( 401) Provides access to Cookie ( 401) collection items by position in the container.

Methods
Method Description
Add ( 1982) Creates a server Cookie ( 1983) class instance to be added to the collection.
Add2 ( 396) Creates a Cookie ( 401) class instance to be added to the Cookie ( 401) collection.
AddCookie ( 396) Adds or updates a Cookie ( 401) instance in the collection.
AddSrcCookie ( 397) Creates a new Cookie ( 401) collection item using the textual Cookie ( 401) data.
Create ( 397) Constructor f

You might also like