Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : ReceiveLn does not work

www.cryer.info
Managed Newsgroup Archive

ReceiveLn does not work

Subject:ReceiveLn does not work
Posted by:"Ivan Kossey" (spamers.sollen.sterben@cablenet.de)
Date:Sat, 25 Mar 2006 12:32:56

   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

Replies:

www.cryer.info
Managed Newsgroup Archive