Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread david . lyon
Hi Michael, I've had similar problems here. It sounds like you might be missing a "QUIT". This closes the mail server. else if (RqType = smtpMail) and (ErrorCode = 0) then begin sgProgress.Value := 90; // -- Write every entry for xc :=1 to SmtpEmail.EmailFiles.Count do

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Michael Kochendoerfer
Arno and all, I realized and appreciated your hint to perform it all event-driven and I tried to accomplish it the way you suggested. However, I have some problems building the correct logic, it seems. In short words, the mail sending part of my application is as follows: 1. Opening a SQL serv

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Angus Robertson - Magenta Systems Ltd
> my app is just single-threaded. The design doesn't require > multithreading because each mail is sent when the previous one has > been delivered. You still don't need threads to handle parallel delivery, just create an array of say 50 SMTP components, and queue mail to the next free one. A

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Michael Kochendoerfer
Wilfried, my app is just single-threaded. The design doesn't require multithreading because each mail is sent when the previous one has been delivered. But you gave me another idea for another part of my app ;) I think that all ideas I collected from Arno and all other contributors will help m

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Arno Garrels
Tobias Rapp wrote: > Hello Arno, > >>> By default winsock's send buffer size is 8 kb which is much bigger >>> than TFtpCli's constant BLOCK_SIZE of 1460 bytes. So one condition >>> described in the article is not true since a single send call in >>> TFtpCli does not fill the whole underlying winso

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Tobias Rapp
Hello Arno, >> By default winsock's send buffer size is 8 kb which is much bigger >> than TFtpCli's constant BLOCK_SIZE of 1460 bytes. So one condition >> described in the article is not true since a single send call in >> TFtpCli does not fill the whole underlying winsock send buffer. >> I realy

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Arno Garrels
Arno Garrels wrote: > Tobias Rapp wrote: > >> http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 > > By default winsock's send buffer size is 8 kb which is much bigger > than TFtpCli's constant BLOCK_SIZE of 1460 bytes. So one condition > described in the article is not true since a s

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Arno Garrels
Tobias Rapp wrote: > http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 By default winsock's send buffer size is 8 kb which is much bigger than TFtpCli's constant BLOCK_SIZE of 1460 bytes. So one condition described in the article is not true since a single send call in TFtpCli does n

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Wilfried Mestdagh
Hello Michael, In addition to the reply of Arno: > Currently, I have a loop after calling Connect() looking like this: > while not FlagDone do begin > Sleep(50); > end; If this works then be aware that you call connect in another thread as the thread where the component is executing. Maybe it

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Tobias Rapp
Hello Wilfried, >> Looks like >> http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 is wrong >> in my special case or the system is automagically increasing the > > Can you resent the URL please ? It seems dead here. http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 It'

Re: [twsocket] Pause, Resume and wsoNoReceiveLoop

2007-01-16 Thread Wilfried Mestdagh
Hello Jack, It's a while ago, but possible OnDataAvailable is fired when you call Pauze. If this is the reason you can set a flag to call it only 1 time. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settin

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Wilfried Mestdagh
Hello Tobias, > Looks like > http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 is wrong > in my special case or the system is automagically increasing the Can you resent the URL please ? It seems dead here. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.htm

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Tobias Rapp
Hi SZ, > Ok I think the problem is in sliding windows then. Make sure the receiving > client/server has a large sliding window. There is a way to calculate it but > I am not sure of the exact formula. Something related with the round trip > times and bandwidth. Sliding windows _should_ be expla

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Fastream Technologies
Ok I think the problem is in sliding windows then. Make sure the receiving client/server has a large sliding window. There is a way to calculate it but I am not sure of the exact formula. Something related with the round trip times and bandwidth. Sliding windows _should_ be explained in wikipedi

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Tobias Rapp
Hi SZ, > I think your problem should be in the message pump. What do you use > for that in your thread? When I switched to GetMessage from > PeekMessage, I was WOW! I use TWSocket's MessageLoop() function in my threaded application which uses GetMessage() internally. And Wilfried's test programm

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Fastream Technologies
I think your problem should be in the message pump. What do you use for that in your thread? When I switched to GetMessage from PeekMessage, I was WOW! Regards, SZ - Original Message - From: "Tobias Rapp" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, January 16, 2007 12

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Arno Garrels
> while not FlagDone do begin > //Application.ProcessMessages; // Don't know whether or not to use > the message pump here Sleep(50); > end; This is bad design. Do not wait in a loop. While sleeping the calling thread is blocked. Instead let your derived component do the work in the backgrou

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Kochendoerfer, Michael
You all are giving excellent information in this mailing list, thanks a lot! I guess my problem is - as you describe - that the component is still active, even if smtpQuit has been reached within OnRequestDone. I don't currently check if it's still connected, but I will change it. Errors will be

Re: [twsocket] Throughput problem with TWSocket over a "long line"

2007-01-16 Thread Tobias Rapp
Hi Wilfried, > You find on my site a few programs to test performance with TWSocket. I have found the PerformanceTest project and tested it. In the first run it also gave the well-known value of ~1.2MB/s. Then I digged into TWSocket's Send() function and found the BufSize property. After changing

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread DZ-Jay
On Jan 16, 2007, at 02:49, Arno Garrels wrote: > When the response to the Quit command is received the connection > (may) still be alive. So watch both, whether Quit response has been > received as well as the SessionClose event. Call connect only > after the session has been closed. > Don't star

[twsocket] Pause, Resume and wsoNoReceiveLoop

2007-01-16 Thread Jack
This is definitely the first time I ask about this topic. Not the second time, either. I guess I'm just dumb enough to not be able to get it all working even after reading many replies to my earlier questions :) May problem again, is that I have a port forwarder type of application. Local clients