Re: [twsocket] Newbee writing webcam utility

2007-12-01 Thread Bob Reeves
Hi Mike,

You just saved me a bunch of time trying to figure out something I didn't need 
(Chasing Ghosts as we use to say). This prompted me to actually run the HttpCli 
demo and discovered Get() already does what I need.  The Get method actually 
transfers the file to the local hard drive... Can't get much easier than that...

Thanks
Bob

- Original Message - 
From: Mike Sutton 
To: ICS support mailing 
Sent: Saturday, December 01, 2007 4:00 AM
Subject: Re: [twsocket] Newbee writing webcam utility


Hi Bob,


BR Thanks for the tip, looks like HttpCli will work fine and from
BR looking at the demo it will save the image in a stream buffer
BR which if I understand correctly I will then need to decode using the 
MimeUtils.

There's no need to do any decoding on the returned buffer. Just save
it as a JPEG (or whatever else it is).

Mike
-- 
http://smallphry.com - The diary of my layout build.
Southern English, 1980s, N gauge with DCC control.
[EMAIL PROTECTED]

-- 
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


Re: [twsocket] Exceptions ignored in OnDataAvailable method

2007-12-01 Thread Arno Garrels
DZ-Jay wrote:
 Hello:
 
 In the TWSocket component, I've noticed that if an exception is thrown
 within an OnDataAvailable handler
 (which is triggered from TCustomWSocket.ASyncReceive() method) they
 will be ignored, and only the bMore flag is set to false which will
 stop the receive loop.

Have you got any exception that was raised from TWSocket internaly?
I mean outside of your handler?

--

Arno Garrels 
-- 
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


Re: [twsocket] Exceptions ignored in OnDataAvailable method

2007-12-01 Thread DZ-Jay

On Dec 1, 2007, at 13:36, Arno Garrels wrote:

 Have you got any exception that was raised from TWSocket internaly?
 I mean outside of your handler?

Well, I noticed the issue because my handler raised an unhandled 
exception and the application then behaved in a strange manner because 
it was never caught (just absorbed by ASyncReceive).  But then looking 
deeper, I found that at least SmtpProt and FtpProt *can* raise 
exceptions in the WSocketDataAvailable event (not that they have).  In 
particular, the obvious exception they raise is if the FNext pointer is 
NULL and its processing ExecAsync.

Admittedly that should never happen, but ignoring it is just asking for 
trouble (which is why I think Francois added the check and the 
exception there).  Also, the buffer manipulations performed there could 
theoretically fail, and an exception would not be caught, yet the 
component would be in a strange state.

Perhaps wrapping those handlers in a try..except block would be better.

dZ.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
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


[twsocket] Webserver with local connections only

2007-12-01 Thread George
Hello,

I created a THttpServer that is used as a middleware between my delphi app
and a flash application.
I want to make sure that only me and flash will communicate each other so I
 want to restrict connections
 from outside internet or local IPs. What's the safest way to check it? Any
piece of code is welcomed.

Thanks
George

-- 
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