Chat freely about anything...

User avatar
By helpme
#40236 I am using the SMING framework. I have a tcpServer function which receives data from a TCP port. I would like to convert the incoming char *data into String data type.

Code: Select allbool tcpServerClientReceive(TcpClient& client, char *data, int size)
{
    String rx_data;
    rx_data = String(data);
    Serial.printf("rx_data=%s\r",rx_data);
}


The contents of rx_data is rubbish. How to make rx_data into a proper string?