Socket Rience

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

rrBUSS9EE
Posts: 98
Joined: Wed May 02, 2012 3:46 pm

Re: Socket Rience

Post by rrBUSS9EE » Thu Jul 12, 2012 12:13 am

sturgis wrote: It would get old to have to send a huge file every sync.
That isn't a concern for this application, especially over wifi. Thanks for the pointers… I'll try and check it all out tomorrow.

rrBUSS9EE
Posts: 98
Joined: Wed May 02, 2012 3:46 pm

Re: Socket Rience

Post by rrBUSS9EE » Fri Jul 13, 2012 12:10 am

Ok… I have this working over http to the point of exchanging data between mobile and desktop devices. Now to implement the file transfer stuff, but this looks like it is going to work.

Thanks all for the suggestions.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Socket Rience

Post by mwieder » Fri Jul 13, 2012 12:24 am

Yay! No, seriously, Yay! That's great news.
Did you end up using rev on rockets for the server end?

rrBUSS9EE
Posts: 98
Joined: Wed May 02, 2012 3:46 pm

Re: Socket Rience

Post by rrBUSS9EE » Fri Jul 13, 2012 12:47 am

No. It appeared to be serious overkill… although I did start out using bits and pieces from it.

All I really need is an initial handshake confirmation (which I now have), and then the ability to post the database from the client and receive an updated copy as a reply. I still haven't decided whether I will just be exchanging info in the way of updated records to both sides, or transferring the entire database to the server, updating it there, and sending it back to the client.

I am guessing that, considering the size of the database file, it would be much simpler to simply transfer the entire file back and forth.

Yay indeed!

rca
Posts: 16
Joined: Wed Aug 03, 2011 8:22 pm

Re: Socket Rience

Post by rca » Mon Aug 06, 2012 3:34 am

Hi rrBUSS9EE

Did you get this working? I think I have a solution..
I haven't had time to debug your code, but I do have a solution working with a Desktop RunRev Server (using accept connections...) and iOs devices using rreSocket to sync with the server from iOs devices. I have SQLite running on the Desktop Server, and on the iOs devices, and I use timestamped records to synchronize between them
No Dropbox, no webserver - just all sockets
If you are interested,we can chat offline, and work out details - there are many tricky issues - I don't have a "solution" to post, but I would be happy to work alongside someone doing the same things. email me: info at mobss dot com
r

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Socket Rience

Post by Nakia » Sun Jan 27, 2013 10:54 pm

Realize this is an old thread but wondering if you ever got this to work?

Looking at a project right now where I need to use iOS Client Sockets via this external and would love to confirm it works before going through the paces!!

EDIT - I see above you seem to have got this working, if you are willing to share with me the how to I would greatly appreciate it!

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

Re: Socket Rience

Post by monte » Mon Jan 28, 2013 9:14 am

rresockets works fine Nakia. The original code had a few issues that it looks like nobody corrected. Namely the initial write to the socket didn't have a callback message parameter. You need to wait for the callback then read from the socket with another callback message that has the data. The original code also missed the second param on the read which in most cases you want to be 0 because that tells the external to read all available data. Check the demo for an example.

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Socket Rience

Post by Nakia » Tue Jan 29, 2013 5:40 am

Thanks monte..

For some reason the demo stack in the folder is corrupt.
I might download it again from mergExt and see if I can get it to
Load..

Post Reply