Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: ReceiveLn does not work - problem solved
| Subject: | Re: ReceiveLn does not work - problem solved |
| Posted by: | "Ivan Kossey" (spamers.sollen.sterben@cablenet.de) |
| Date: | Sun, 26 Mar 2006 16:50:15 |
commands were sent without #13#10 at end. Typical newby error :)
> Hi All,
>
> after connection I get normally the answer with ReceiveLn (TTcpClient in
> Delphi7). Thereafter I send the POP3 command USER<blank><username> which
> seems to be executed well (no delay). Thereafter I try to get the answer
> again with ReceiveLn. It returns an empty string after about 15 minutes.
> Should I make some preparing manipulations before ReceiveLn (like reset
> some properties in TTcpClient?) I'm experimenting with real POP3 server of
> my provider :(
>
> The source is folowing:
>
> iLengthIndeed := 0;
> while iLengthToTransfer > 0 do begin // this loop will be executed
> normally only once
> iLengthIndeed := TcpClient1.SendBuf(pBuffer, iLengthToTransfer) +
> iLengthIndeed;
> dec(iLengthToTransfer, iLengthIndeed);
> inc(pBuffer, iLengthIndeed);
> end;
> s := TcpClient1.Receiveln; // this returns an empty string after
> timeout
>
> Thanks
none