Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Dod
Hello, I think you got the point ! as I call ReceiveStr() a second time (or more) in the loop within same OnDataAvailable I may retrieve a non fully received line of data that I send back to client side and also brake the next full line. So dumb I am ... dumb dumb dumb slapping myself ;-) W

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Francois PIETTE
FP> No need to loop beause ReceiveStr() will receive the complete line received FP> so far and if more lines are available, then more OnDataAvailable events FP> will be triggered. yes, I forgot that when using line mode the OnDataAvailable is only triggered when an entire SINGLE line has bee

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Wilfried Mestdagh
uari 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 > Rece

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Francois PIETTE
> This is our problem with the web client component--what happpens when a > malicous web server returns a header line of 100MB??! > We need a maximum line length property. You already have it: LineLimit property and OnLineLimitExceeded event Please use a proper subject. begin a new message thr

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Dod
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 basical

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Dod
Hello, FP> I assume you have set LineMode to true. yes FP> No need to loop beause ReceiveStr() will receive the complete line received FP> so far and if more lines are available, then more OnDataAvailable events FP> will be triggered. yes, I forgot that when using line mode the OnDataAvail

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Dod
Hello, For my problem there is no very long lines as mails are well formatted with standard base64 encoded attachement formatted into 40 chars/line. FT> This is our problem with the web client component--what happpens when a FT> malicous web server returns a header line of 100MB??! We need a maxi

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Fastream Technologies
On Fri, Feb 25, 2011 at 10:09 AM, Francois PIETTE wrote: > I assume you have set LineMode to true. > No need to loop beause ReceiveStr() will receive the complete line received > so far and if more lines are available, then more OnDataAvailable events > will be triggered. > This is our problem w

Re: [twsocket] Trying POP3 proxy but loosing lines

2011-02-25 Thread Francois PIETTE
I am trying to make POP3 proxy/gateway, I am working linemode ON as it a CRLF lined protocol so its easier. But I noticed that not all lines are sent back to POP3 client, so e-mail (especially the ones with attachements) get corrupted. Each time I go into OnDataAvailable on server-side soc

[twsocket] Trying POP3 proxy but loosing lines

2011-02-24 Thread Dod
Hello, I am trying to make POP3 proxy/gateway, I am working linemode ON as it a CRLF lined protocol so its easier. But I noticed that not all lines are sent back to POP3 client, so e-mail (especially the ones with attachements) get corrupted. Each time I go into OnDataAvailable on server-s