I am using ESP8266 with the SMING framework.
I found this sample code in the Telnet_TCPServer_TCPClient example.
bool 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;
}
What is the difference between sendString()
and writeString()
in this sample code? It seems like there is no difference. The outcome is to send string data over to the other TCP party.