Skip to content
Snippets Groups Projects
Commit 31fbfb90 authored by Abhisha Nirmalathas's avatar Abhisha Nirmalathas
Browse files

debug

parent 90471174
Branches
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ int main(int argc, char *argv[]){ ...@@ -109,7 +109,7 @@ int main(int argc, char *argv[]){
char value[100]; char value[100];
sprintf(value,"%d", val); sprintf(value,"%d", val);
for(int i=0; i < strlen(value); i++){ for(int i=0; i < strlen(value); i++){
printf("value is %s\n", value); printf("write value is %s\n", value);
n = write(sockfd, value, 1); n = write(sockfd, value, 1);
if (n < 0) if (n < 0)
{ {
...@@ -118,10 +118,10 @@ int main(int argc, char *argv[]){ ...@@ -118,10 +118,10 @@ int main(int argc, char *argv[]){
} }
} }
n = write(sockfd, "\n", 1); n = write(sockfd, "\n", 1);
printf("n is %d\n", n); printf("write newline n is %d\n", n);
while(1){ while(1){
n = read(sockfd, buffer, 255); n = read(sockfd, buffer, 255);
printf("n is %d\n", n); printf("read n is %d\n", n);
if(!strcmp(buffer,"\n")){ if(!strcmp(buffer,"\n")){
buffer[n] = 0; buffer[n] = 0;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment