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 sec
On Mon, Jul 6, 2015 at 2:15 PM, Bob Sneidar
wrote:
> 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 th
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 wi
Hmm. YOu might check socketError
Also, in 7.0.5, I just tried this in a button.
on mouseUp
put "www.google.com:443" into theSocket
open secure socket to theSocket with message socketConnected
wait for messages
put "HI!" & cr
end mouseUp
on socketConnected pSocket
-- callBack for o
Out of curiosity, would having these handlers in a frontscript be a problem?
Bob S
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runr
I am connecting to a mySQL server so I do not need to manage the host.
Bob S
On Jul 6, 2015, at 12:59 , Eric Corbett
mailto:e...@canelasoftware.com>> wrote:
Did you accept connection on port aConnection["deport”]?
I think it’s possible for the open socket to remain in the openSockets list
un
It doesn’t wait. It passes the wait for messages just fine. I am using wait for
messages because that is what the dictionary says I should be doing if I need
to wait for the connection to be made before proceeding, otherwise the script
will just keep going, which is precisely what I do NOT want
A couple things.. Remove the wait for messages, its not needed and is
probably a bad idea.
Then, since you're opening a secure socket, you might need to specify with,
or without verification (depending on your needs of course)
Also, there is a parameter that is passed along with the message that
Did you accept connection on port aConnection["deport”]?
I think it’s possible for the open socket to remain in the openSockets list
until the connection times out. Grab message socketTimeout pSocketID to see if
it’s timing out without connecting.
Eric
On Jul 6, 2015, at 12:36 PM, Bob Sneidar
Hi all.
I am trying to use open socket like this:
put aConnection["dbhost"] & ":" & aConnection["dbport"] into theSocket
open secure socket to theSocket with message socketConnected
wait for messages
put the openSockets into theOpenSockets
close socke
10 matches
Mail list logo