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 You could be interested by my IMD messaging system (Real time chat like MSN). It only uses HTTP. See my website. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Cosmin Prund" <[EMAIL PROTECTED]> To: "ICS support mailing" <[email protected]> Sent: Saturday, November 18, 2006 1:55 PM Subject: [twsocket] Multi-Threaded THttpServer? > 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 > because I want my application to work in places where my clients only > have access to the Internet using an HTTP Proxy! > > The chat application has 2 basic components: send your text, receive > text sent by the other party. The "send your text" is really easy, but > the "receive text sent by the other party" part is a bit more difficult, > because I can't keep an open connection between client and server, I > need the client to pool for text sent from the server! That is, the > client will GET a document of the following format: > http://myserver.server.ro/getchat?conversation=12346&seq=1 > 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 delay elapses. > This would stop the client from going into a bandwidth-consuming > busy-loop. > > Unfortunately THttpServer doesn't include a "MultiThreaded" checkbox > like TSocketServer does, and I'm not sure what I should do to Sleep() > without actually freezing the server in the process! I might try > subclassing THttpServer and setting FWSocketServer.MultiThreaded = True > in CreateSocket but I know too little about the internals of THttpServer > and ICS in general to understand the consequences of doing this. > > Any help on the matter is welcomed, thanks. > > -- > Cosmin Prund > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
