Synchronous HTTPSecureSocket.Post

Hi,

I have program that continously do stuff, and sometimes it needs to send information to server with HTTPSecureSocket.Post (php in server handles information).
I need to do it synchronously so I know if it success or not and can’t wait it, so I had to do it in background.

So my question is, should I use thread to handle post or is setting socket.yield same thing?

Thanks,

Jukka

Use a thread. The synchronous version calls App.DoEvents behind the scenes, and thus can cause the same reentry problems using it anywhere else can cause. But when used in a thread, DoEvents simply yields to the next thread, so this would work fine and safely.

Can I just drag httpsocket and thread controls to window and call this socket from thread? I’ve read that you can’t call ui from thread but socket isn’t ui i guess?

You are correct.