Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By helpme
#39813 I am looking at some sample code in Telnet_TCPServer_TCPClient example.

What is the difference between sendString() and writeString() used in this example? It seems like there are no difference. The outcome is to send string data over to the other TCP party.

Code: Select allbool tcpServerClientReceive (TcpClient& client, char *data, int size)
{
   debugf("Application DataCallback : %s, %d bytes \r\n", client.getRemoteIp().toString().c_str(),size );
   debugf("Data : %s", data);
   client.sendString("sendString data\r\n", false);
   client.writeString("writeString data\r\n",0 );
   if (strcmp(data,"close") == 0)
   {
      debugf("Closing client");
      client.close();
   };
   return true;
}