Watch this Author's files
Very nice example. However I've noticed your read function could be improved or perhaps cleaned up a little. Instead of the while loop for timeout you could do the following.
sAddress = InetSocketAddress(Host,Port);
%Establish unconnected socket.
socket = Socket();