adjusted clsocket build and test, so there is an EchoServer and QueryDayTime sending a string to the EchoServer.

This commit is contained in:
Erwin Coumans
2017-02-19 12:08:58 -08:00
parent 4faa6613c9
commit 3faab1b019
5 changed files with 74 additions and 8 deletions

View File

@@ -24,10 +24,12 @@ int main(int argc, char **argv)
//----------------------------------------------------------------------
// Send a requtest the server requesting the current time.
//----------------------------------------------------------------------
const char* data = "Hello!";
char data[1024];
sprintf(data,"%s","Hello!");
int len = strlen(data);
if (socket.Send((const uint8 *)"HELLO\n", len))
data[len]=0;
len++;
if (socket.Send((const uint8 *)data, len))
{
//----------------------------------------------------------------------
// Receive response from the server.