Download File

Download File Download File

mycnis.weebly.com
from mycnis.weebly.com More from this publisher
22.07.2013 Views

Output: [student@localhost ~]$ cc sem.c -o sema [student@localhost ~]$ ./sema Child Incremented 67787 times, Parent 84823 times. SHM Value 152610 Total of Parent & Child matches SHM value NP Lab Manual , RNEC page: 24

Subject: NETWORK PROGRAMMING LAB Year : 2010 Class : IV B-Tech C.S.E Semester: First WEEK 5: AIM: Design TCP iterative Client and server application to reverse the given input sentence /*tcp_strrev_ser.c*/ #include "unp.h" void str_echo(int sockfd) { long arg1, arg2; int x,y; ssize_t n; char line[MAXLINE]; char swp; } for ( ; ; ) { if ( (n = Readline(sockfd, line, MAXLINE)) == 0) return;/* connection closed by other end */ n = strlen(line); /*strrev(line);*/ for(x=0,y=n-1;x

Subject: NETWORK PROGRAMMING LAB Year : 2010<br />

Class : IV B-Tech C.S.E Semester: First<br />

WEEK 5:<br />

AIM: Design TCP iterative Client and server application to reverse the given input<br />

sentence /*tcp_strrev_ser.c*/<br />

#include "unp.h"<br />

void str_echo(int sockfd)<br />

{<br />

long arg1, arg2;<br />

int x,y;<br />

ssize_t n;<br />

char line[MAXLINE];<br />

char swp;<br />

}<br />

for ( ; ; )<br />

{<br />

if ( (n = Readline(sockfd, line, MAXLINE)) == 0)<br />

return;/* connection closed by other end */<br />

n = strlen(line);<br />

/*strrev(line);*/<br />

for(x=0,y=n-1;x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!