As a companion piece to the video from earlier in the week we added a new 38 minute video today on using a ServerSocket that allows your Xojo application to communication with multiple client apps that are using TCPSockets. It turns out that it’s incredibly easy to use if you understand TCPSockets (which hopefully you know better now with that video).
I was chatting with an old developer friend this morning that I wish I had made this video a number of years ago when I was beating my head up against the wall on a big project that was using TCPSockets and ServerSockets. Hopefully this gets you over the hump and you get some use out of it. My pain is your gain in this case.
In this video we create a TCPSocket subclass on the ‘server’ that handles all of the communication details with the client apps. The ServerSocket is a pretty dumb object (since it knows nothing about about our communications protocol with the client apps) but it is a pretty powerful class since you don’t have to do much to communicate to the clients other than provide a socket.
Our client apps can send a command, a single file, or a folder full of files. Each client could potentially send a file with the same name and it would keep track of it properly. We wrap up the video with having the server app send a message to all of the connected clients.
Direct link for subscribers: http://www.bkeeney.com/XojoTraining/xojotraining.cgi?video=340