From 66e664ec54feb4fef01a211d601851f669ab9650 Mon Sep 17 00:00:00 2001 From: kpl Date: Wed, 18 Mar 2020 16:20:23 -0400 Subject: [PATCH] cwSocket.cpp : print error mesg. when test send fails. --- cwSocket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cwSocket.cpp b/cwSocket.cpp index 91b5665..da96717 100644 --- a/cwSocket.cpp +++ b/cwSocket.cpp @@ -206,8 +206,7 @@ namespace cw goto errLabel; } - printf("Socket: userId:%i connected.", s->userId); - + printf("Socket: userId:%i connected.\n", s->userId); // initialize the socket record cs = p->sockA + sockIdx; @@ -1237,7 +1236,8 @@ cw::rc_t cw::socksrv::test( sock::portNumber_t localPort, const char* remoteAdd printf("Sending:%s",sbuf); // send a message to the remote socket - sock::send( mgrHandle(h), userId, 0, sbuf, strlen(sbuf)+1 ); + if( sock::send( mgrHandle(h), userId, 0, sbuf, strlen(sbuf)+1 ) != kOkRC ) + printf("Send failed."); if( strcmp(sbuf,"quit\n") == 0) break;