🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3027

Re: Indy CommandHandler (CR+LF) Issue

#3027
From: Darlington ADIBE
Date: Wed, 23 Nov 2005 19:28
65 lines
3075 bytes
Thanx

Darl

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4384b3c9$1@newsgroups.borland.com...
>
> "Darlington ADIBE" <bcb@triative.com> wrote in message
> news:43847621@newsgroups.borland.com...
>
> > The CommandHandler for SENDTO was trigered ok. but
> > the unparsedParams value (am not parsing param) contain
> > only the first line from the memo1-text, after the commadhandler
> > have removed the "SENDTO#".
>
> The CommandHandler system does not support multi-line commands.
>
> > My observation is that the Commandhandler stoped reading
> > after CR or CR+LF,.
>
> The CommandHandler system uses ReadLn() to receive commands, where the
line
> terminator is LF.  When the terminator is LF, ReadLn() will stop reading
> when it encounters either a LF or a CRLF.  It will not stop on a solitary
> CR.
>
> > So how do I pass a parameter to the commandhandler if the
> > parameter is the text value of controls like Memo controlls that
> > insert CR and or CR+LF as you type if WordWrap is set to true
> > (which in my vase have to be).
>
> Don't insert line breaks into the middle of a command in the first place.
> Replace them with another character sequence that will not break the
reading
> of the command.  For example:
>
>     AnsiString s = StringReplace(Memo1->Text, "\r\n", "\r",
TReplaceFlags()
> << rfReplaceAll);
>     cmd.sprintf("SENDTO#'%s'#'%s'#, s.c_str(),
LabeledEdit1->Text.c_str());
>
>     //...
>
>     AnsiString s = StringReplace(ASender->UnparsedParams, "\r", "\r\n",
> TReplaceFlags() << rfReplaceAll);
>
> > Do I have controll over what is considered the ATerminator for
> > the commandhandler
>
> No.
>
> > like when I use ReadLn
>
> The CommandHandler system uses ReadLn() to receive commands.  But it does
> not allow you to specify the ATerminator parameter.
>
> > how do I control the commandhabdler Line Terminator char.
>
> You cannot, unless you rewrite and recompile TIdTCPServer manually.
>
>
> Gambit
>
>
Technical Details
Message-ID: <4384c299@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43847621@newsgroups.borland.com> <4384b3c9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,cb4e95bbbefbce66
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Darlington ADIBE" <bcb@triative.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <43847621@newsgroups.borland.com> <4384b3c9$1@newsgroups.borland.com>
Subject: Re: Indy CommandHandler (CR+LF) Issue
Date: Wed, 23 Nov 2005 20:28:20 +0100
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 83.229.68.10
Message-ID: <4384c299@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132774041 83.229.68.10 (23 Nov 2005 11:27:21 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail