Hello, > I fixed the problem but I don't understand why it did as what I > changed should not have chaneg anything, I only removed the > ReceiveStr() loop
The design is that this method only be called 1 time in OnDataAvailable. So by calling it multiple times you are in an untested situation. -- mvg, Wilfried http://www.mestdagh.biz http://www.comfortsoftware.be http://www.expertsoftware.be > -----Oorspronkelijk bericht----- > Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] > Namens Dod > Verzonden: vrijdag 25 februari 2011 10:35 > Aan: ICS support mailing > Onderwerp: Re: [twsocket] Trying POP3 proxy but loosing lines > > Hello, > > I fixed the problem but I don't understand why it did as what I > changed should not have chaneg anything, I only removed the > ReceiveStr() loop (as it is useless with linemode:=true) in > OnDataAvailable, but why did it fix the problem as this loop was > basically useless, now I have : > > procedure TPOPOut.POPOutDataAvailable(Sender: TObject; ErrCode: Word); > begin > StringRLine := TPOPOut(sender).ReceiveStr; > TPOPOut(sender).POPIn.SendStr(StringRLine); > end; > > Bad procedure : > > procedure TPOPOut.POPOutDataAvailable(Sender: TObject; ErrCode: Word); > begin > StringRLine := TPOPOut(sender).ReceiveStr; > while (Length(StringRLine) > 0) > begin > TPOPOut(sender).POPIn.SendStr(StringRLine); > StringRLine := TPOPOut(sender).ReceiveStr; > end; > end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be