Re: [twsocket] SmtpClient problem on disconnect

2006-11-18 Thread David A. G.
I have post a demo in my webserver. If any one want to try it to see the problem and test it with your own SMTP, please download it from: http://www.mcrenox.com.ar/smtptest.zip Remember use SMTP servers with AUTH if possible. thanks David - Original Message - From: "Francois PIETTE"

Re: [twsocket] Flow control

2006-11-18 Thread Angus Robertson - Magenta Systems Ltd
> I don't understand what you want. Obviously you can't make a TCP > session running fatser than a TCP session ! But I can supply data faster than the session can support. The data might be coming from another application and I'm sending it over a slow modem, so there must be flow control som

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Cosmin Prund
Francois PIETTE wrote: >> (1) Not reply to the client until after 10 seconds (using a TTimer?). You >> don't have to sleep. I'm sure the HTTP server has some kind of delayed >> reply mechanism. >> > > Yes, you can reply later. Use hgSendMySelf Does it work like this? In my OnGetDocument I

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Cosmin Prund
Francois PIETTE wrote: > You defenitely doin't need multithread to throttle a connexion. See how it > is done in the HTTP client component where you have a Bandwidth limitation > feature. > I'm not interested in throttling a connection. I don't have an set amount of data and want to send it a

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Arno Garrels
Cosmin Prund wrote: > The server should return any available text for the given conversation > or an NOP if no text is available. But here's a trick: If there's no > text available for the connection I would like to delay returning an > NOP until there IS some text available, or until a 10 seconds

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Cosmin Prund
Dan wrote: > You could either: > (1) Not reply to the client until after 10 seconds (using a TTimer?). You > don't have to sleep. I'm sure the HTTP server has some kind of delayed > reply mechanism. You can put the client in a 'waiting' list and only send > the reply after your timeout. > Tha

Re: [twsocket] Telnet problems

2006-11-18 Thread Francois PIETTE
> I already looked at TnScript 2-3 minutes, but I think this only works if > the Telnet session is designed like this: > > Step 1 - Step 2 - Step 3... so each step is a screen completely > different from each other. TTnScript associate events to strings detected in the data flow no matter how it

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Francois PIETTE
> (1) Not reply to the client until after 10 seconds (using a TTimer?). You > don't have to sleep. I'm sure the HTTP server has some kind of delayed > reply mechanism. Yes, you can reply later. Use hgSendMySelf. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [E

Re: [twsocket] Flow control

2006-11-18 Thread Francois PIETTE
> If I'm trying to send random data at a speed faster than a TCP socket > can support, I don't understand what you want. Obviously you can't make a TCP session running fatser than a TCP session ! You can make it run slower but not faster ! Or maybe you want to use UDP which is faster than TCP b

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Francois PIETTE
You defenitely doin't need multithread to throttle a connexion. See how it is done in the HTTP client component where you have a Bandwidth limitation feature. > I'm working on a HelpDesk application that should include a Chat function, > amongst other things. I want to do it all using HTTP only

Re: [twsocket] Telnet problems

2006-11-18 Thread Markus Humm
> Francois replied: > > I think TTnScript is the way to go. You can dynamically add/remove events > according to which "screen" you detect. If you don't use TTnScript, has a > look at his source code to understand how to get hand on the input stream to > chack for data. > > I also uploaded a modi

Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Dan
You could either: (1) Not reply to the client until after 10 seconds (using a TTimer?). You don't have to sleep. I'm sure the HTTP server has some kind of delayed reply mechanism. You can put the client in a 'waiting' list and only send the reply after your timeout. (2) Have the client only ret

Re: [twsocket] Need example code for identifying a record beforeprocessing

2006-11-18 Thread Francois PIETTE
> All of the records have as their first member an Integer named OpCode > which > identifies itself as to which type of record it is, such as: > PInductionComplete = ^TInductionComplete; > TInductionComplete = packed record >OpCode: Integer; >Sort: Integer; >CarrierCount: Integer; >

Re: [twsocket] Shutdown(How: Integer)

2006-11-18 Thread Francois PIETTE
> When do I need, or would I want, to call Shutdown(), and what are the > ramifications of the different parameters that one can pass it. You use Shutdown() to initiate a gracefull close of a TCP session. Shutdown() send the signal to the remote side to close the connection. The remote side see

Re: [twsocket] SmtpClient problem on disconnect

2006-11-18 Thread Francois PIETTE
> Thanks for all, I understand. Today I have tryed with a simple TCP client > emulating the SMTP protocol manually, and ALL works good, the server is > closing the connection. But again using the SmtpCli.pas component the > connection is not closed or OnRequestDone is not fired (this only happens >

Re: [twsocket] HttpCli & ContentRangeBegin

2006-11-18 Thread Francois PIETTE
> Conclusion: I think data corruption might be a problem in some cases. > Notice how all Linux distributions include MD5 hashes for all downloads, > so they can be checked on the receiving end? This is not to detect data corrumption because of data transmission but to detect "man in the middle" a

[twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Cosmin Prund
Hello! Here's me again, trying to do strange things. I'm working on a HelpDesk application that should include a Chat function, amongst other things. I want to do it all using HTTP only (that is, no direct connection, everything needs to be pure HTTP). I really want this HTTP-only thing becaus

[twsocket] Flow control

2006-11-18 Thread Angus Robertson - Magenta Systems Ltd
If I'm trying to send random data at a speed faster than a TCP socket can support, what errors should I expect from TWSocket.Send? This might be a slow connection, or a remote that can not process the stream fast enough. I can not see any error handling in the send buffering code to reject

Re: [twsocket] Pulling my hair out trying to receive a record

2006-11-18 Thread Francois PIETTE
> Ptr := PByte(X); > while iSize > 0 do begin >iSent := WSocket_AsClient.Send(Ptr, iSize); >if iSent > 0 then begin > Inc(Ptr, iSent); > Dec(iSize, iSent); > Continue; >end; Your record will be sent in one call to Send(). No need to do a loop ! Also no need to use an i

Re: [twsocket] SmtpClient problem on disconnect

2006-11-18 Thread David A. G.
Thanks for all, I understand. Today I have tryed with a simple TCP client emulating the SMTP protocol manually, and ALL works good, the server is closing the connection. But again using the SmtpCli.pas component the connection is not closed or OnRequestDone is not fired (this only happens when