bzero(buf, MAX_BUF_SIZE + 1); printf("please input message that will send to other side : "); fgets(buf, MAX_BUF_SIZE, stdin); if (!strncmp(buf, "quit", 4)) break;
while (1) { memset(buf, 0, MAX_BUF_SIZE +1); printf("please input message that will send to other side: "); fgets(buf, MAX_BUF_SIZE, stdin); if (!strncmp(buf, "quit", 4)) { printf("quit chat!\n"); break; }