At the moment, I am using client.write(byte) in order to send the data byte by byte but it is too slow for my application. It seems like it is recreating the socket with every call. I would like to use the client.print(string) function but as my data contains zero values occasionally, I lose a lot of my data due to null terminated strings. Is there a way to bypass the arduino string functions and send a buffer of chars or uint8_t's? Or is there an easier way to do this?
Also, I have gotten UDP to work but I would prefer to use a TCP connection.
Any help would be greatly appreciated. Thanks!