Merge pull request #91 from DavidLin1577/patch-7

Minor optimisation to the tcp_server code
This commit is contained in:
Arthur
2020-02-15 20:45:45 +08:00
committed by GitHub

View File

@@ -51,7 +51,7 @@ void application_entry(void *arg)
buff[n] = '\0';
printf("recv(%d) msg from client:%s\n", ++cnt, buff);
if ((send(connfd, buff, strlen(buff), 0)) < 0) {
printf("send mes error: %s errno : %d\n", strerror(errno), errno);
printf("send msg error: %s errno : %d\n", strerror(errno), errno);
break;
}
close(connfd);