Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By helpme
#39814 I am using the SMING framework to create a TCP server/client. Looking at the TCP example, I encounter the following code;

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;
}


I am confused over which function to use to sending TCP data. It seems sendString() and writeString() both do the same job. Under what situation should I use which one?