TCP buffer sending issues
Posted: Fri Aug 12, 2016 12:23 pm
I am working on a project that uses the ESP8266 to send data from an FPGA. The ESP8266 retrieves data from the FPGA via a SPI bus in a 16 bit message. I am struggling to find an efficient way to send the values over a tcp connection.
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!
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!