Work in progress
Correct behaviour if handshake fails.
Catch some cases where we end up spinning forever in the mex function (and hence have to kill matlab)
Refactor threadFailed to threadFinished
This now correctly writes data to a single connected AM_TARGET
Now we have a multithreaded server which creates a thread for each incoming connection. This is still in a testing state, with long delays between data writes.
Additional code comments.
Adds failed connection cleanup
This code now supports 2 simultaneous AM_TARGET connections and so I'm ready to get the matlab->mex data transfer working.
Adds the new handshake stage in which the connection name is passed from the client
Rename the mex building script
We don't need the linux define
Work in progress towards data-transfer between matlab and C++ environments
Comments only
New mex function to add data to a connection (needs writing)
Demonstrating data transfer between c-space and matlab-space
Create data cache so matlab user can send data before connection established.

This will make the calling of the code in matlab user space much much easier.

Also in this commit is a re-factoring of threadPtr to "context"
Remove c++-11 syntax code
Adds a mutex for the dataCache

...and actually inserts the data that comes from matlab space instead of dummy data.
Data writing now works!