sockets & post to url
monte at sweattechnologies.com
Thu Sep 2 03:14:01 EDT 2010
I have an app that accepts connections on a socket to sync to an iOS version.
post to url works before and after:
accept connections on port lPort with message "newConnection" -- lPort is 8009 as default but user settable
until the connections start coming in from the server. To avoid socket timeouts while the user does some licensing stuff the phone repeatedly asks if it's ok to sync and the app either responds with an accept, reject or pending message. While these connections are coming in post to url does not return although it doesn't block the UI either so you can click the button that sends the post again and then it returns immediately with "error Previous request not completed" as result. The docs say url commands block each other but no mention of other socket connections blocking them too.
When the connections stop coming in from the phone (no open sockets but still listening) then post works again but not if you have tried to post to a url while the connections are coming in in which case you still get the error in the result. resetAll (libURLresetAll) does nothing for me.
Is this a known bug?
Is there a workaround?
More information about the Use-livecode