sockets

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2648
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: sockets

Post by mwieder » Wed Jun 19, 2013 6:05 am

Ditto on the awesome.

And... if you can give me client and server sockets I can give you in-app debugging.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 961
Joined: Thu Apr 11, 2013 11:27 am

Re: sockets

Post by LCMark » Wed Jun 19, 2013 5:17 pm

@monte: I've pushed the changes to get notify.cpp (and therefore DNS resolution in the socket code) to work on iOS to the feature-externals_api_v5 branch in my repo (it builds on the previous changes)... I'd hoped to have time to pull out the notify-related changes separately today as a separate branch, but that wasn't to be. I'll see if I can tomorrow morning though.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 961
Joined: Thu Apr 11, 2013 11:27 am

Re: sockets

Post by LCMark » Wed Jun 19, 2013 5:18 pm

@runrevmark: if you tell me where to look, I'll see if I can help untangle the Java synchronization stuff
Turns out it isn't java synchronization related... But more the attempt to use the JNI on a thread that Java knows nothing about - the Android VM doesn't seem to like that much ;)

DarScott
Posts: 225
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: sockets

Post by DarScott » Wed Jun 19, 2013 5:42 pm

I think this means I should stop work on the iOS sockets external and script library.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: sockets

Post by monte » Wed Jun 19, 2013 11:01 pm

@DarScott I possibly wouldn't have done mergSocket if I knew you were still working on darzSockets... Anyway, it's done now and engine sockets make both redundant which is a good thing in my opinion.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

DarScott
Posts: 225
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: sockets

Post by DarScott » Wed Jun 19, 2013 11:38 pm

Yeah, it is a good thing that sockets are in the engine, especially now that there is a mechanism for getting fixes for obscure bugs. And simple enhancements like broadcasting (assuming that is a good and proper thing, even with an allowBroadcast property if that makes moralizers happy).

And as for darzSockets, I only recently got back to it. It works, but I wanted to make something with some of the same quirks as the engine version. And by going to partial blocking, the LiveCode level can be greatly simplified.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: sockets

Post by monte » Sun Jun 23, 2013 2:50 am

OK, got sockets working on iOS... testing between desktop and simulator. But there seems to be a strange delay occasionally between the new connection callback on desktop and the socket open callback on the simulator... most of the time it's immediate but occasionally there's a fair wait... any ideas why that would happen?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: sockets

Post by splash21 » Sun Jun 23, 2013 10:27 am

It's great that you guys are looking at sockets. One useful addition would be the ability to specify the local port to be used when connecting to a remote server - bug 5097 : http://quality.runrev.com/show_bug.cgi?id=5097

If that's possible, it would open up a whole load of P2P possibilities - the same way as Skype and others do it.
LiveCode Development & Training : http://splash21.com

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: sockets

Post by monte » Sun Jun 23, 2013 12:28 pm

doesn't look overly complicated... why not give it a crack John?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 961
Joined: Thu Apr 11, 2013 11:27 am

Re: sockets

Post by LCMark » Mon Jun 24, 2013 9:56 am

OK, got sockets working on iOS... testing between desktop and simulator. But there seems to be a strange delay occasionally between the new connection callback on desktop and the socket open callback on the simulator... most of the time it's immediate but occasionally there's a fair wait... any ideas why that would happen?
Great! This is going to make lots of people happy I think :)

In regards to the delay, then this is quite likely due to the event loop not being interrupted on the iOS side so there's a delay until some other event happens. In the callback that processes the socket events from CoreFoundation, is there a 'pingwait()'? This method causes any pending 'wait()' to be broken and thus events to be processed on the engine side.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: sockets

Post by monte » Mon Jun 24, 2013 10:42 am

That was it... so opening sockets seems to work now... still something going on with the callbacks from accepting them so I'll look into that
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: sockets

Post by monte » Wed Oct 09, 2013 11:05 pm

I see the new openSSL branch... I suspect this means mobile [ssl] sockets, encryption etc are on the way... Will this make 6.5?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 961
Joined: Thu Apr 11, 2013 11:27 am

Re: sockets

Post by LCMark » Mon Oct 14, 2013 9:26 am

@monte: Yes - after much fiddling around I finally got OpenSSL (latest version) compiling for all platforms with a collection of build scripts. Thus far I've got as far as getting encrypt/decrypt working for iOS, sockets still need some more poking. There's still a fair bit to do since the standalone builder needs tweaking as well (to handle the additional, optional, revsecurity blob), but if not in 6.5, I'm hoping to get it all done for 6.6 which should follow not too long after.

Post Reply

Return to “Engine Contributors”