Open Socket With Messages
bobsneidar at iotecdigital.com
Fri Jul 10 12:28:21 EDT 2015
Aye, but that wasn’t my goal. I wanted to wait until a specific callback event was triggered. The trouble is, open socket to mySQL, when it fails, seems to fail silently. No callback, no error message.
To work around this I created my own timing loop which keeps trying every second for ten seconds, checking the openSockets property and bailing on the loop after success or timeout.
Now my problem is, it seems every other time I try to open a socket to a perfectly good mySQL installation, the socket connection fails. I am not sure why. I am wondering if this is an issue with mySQL security or not.
> On Jul 6, 2015, at 14:15 , Bob Sneidar <bobsneidar at iotecdigital.com> wrote:
> I figured it out. First, wait for messages is just this side of useless. *ANY* message that comes through will do, not just messages from the open socket command. Secondly, I just set up my own wait loop that exits when the socket is in the openSockets or else times out after 10 seconds. This will work for me.
> I went back to the dictionary and read more thoroughly what wait for messages does, and while it is working as advertised, it is fairly worthless in it’s present form unless you find a way to trap for *ALL* messages and only respond to the callback, which is way more involved than it ought to be.
> Bob S
>> On Jul 6, 2015, at 13:54 , Mike Bonner <bonnmike at gmail.com> wrote:
>> Hmm. YOu might check socketError
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode