AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Unbekannte Anzahl an Zeilen auslesen + unerwartete Textzeile
Thema durchsuchen
Ansicht
Themen-Optionen

Unbekannte Anzahl an Zeilen auslesen + unerwartete Textzeile

Ein Thema von -lx- · begonnen am 22. Jul 2006 · letzter Beitrag vom 1. Aug 2006
 
-lx-
(Gast)

n/a Beiträge
 
#10

Re: Unbekannte Anzahl an Zeilen auslesen + unerwartete Textz

  Alt 24. Jul 2006, 10:42
Zitat:
function ReadLn(ATerminator: string; const ATimeout: Integer; AMaxLineLength: Integer): string; virtual;

Parameters

ATerminator: string = LF

End-of-line termination character or characters.

const ATimeout: Integer = IdTimeoutDefault

Time-out in milliseconds. Default value IdTimeoutInfinite.

AMaxLineLength: Integer = -1

Returns

String - Line read from the buffer.

Description

ReadLn is a function that returns a string containing a single line from the buffer maintained by TIdTCPConnection.

The optional ATerminator parameter indicates the end-of-line symbol for the particular protocol. If data is expected, and you do not need a custom end-of-line symbol, you can use the default ATerminator value (#0). ATerminator values include:

#0 - Default Line Feed (#10)
LF - Line Feed (#10)
CR - Carriage Return (#13)
EOL - End-of-line (Carriage Return + Line Feed)


If there is no terminator (ATerminator) in the buffer, ReadLn will read more bytes from the TCP stack through the ReadFromStack method.

Use a custom time-out (ATimeout) 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 IdTimeoutInfinite. See IdGlobal.pas for more information on constant timeout values.

ReadLn will return an empty string ('') if the peer connection is prematurely closed or a time-out occurs. When a timeout condition occurs in ReadLn, the ReadLnTimedOut property is set to True.
Wenn ihr mir nun nochmal helfen könntet das zu entschlüsseln wäre dies sehr hilfreich.

Also dieses TimeOut Ding würde in Verbindung mit einem Timer gut funktionieren, da man ja eig. aus schleifen nicht einfach aussteigen sollte außer ich nehm ne repeat-until bzw. do-while schleife.
Wie geht das aber nun mit diesem EOL ? scheint eine etwas elegantere Methode zu sein.
Jedoch werd eich aus der Hilfe dazu (s.o.) nicht schlau. Es liegt vll. daran, dass ich Delphi direkt gelernt habe. D.h. es wurde kein Wert darauf gelegt, wie der Syntax zu stand ekommt und wieso usw... das mal am Rande.



Mit freundlichen Grüßen
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz