Download File
Download File Download File
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
- Page 1 and 2: IV YEAR B.Tech Network Programming
- Page 3 and 4: o after call to fork o after both c
- Page 5 and 6: WEEK 1: Aim: Implement the pipe usi
- Page 7 and 8: Subject: NETWORK PROGRAMMING LAB Ye
- Page 9 and 10: Output: [student@localhost ~]$ vi p
- Page 11 and 12: Output: [student@localhost ~/khan]$
- Page 13 and 14: } fclose(f); //closing file //creat
- Page 15 and 16: Subject: NETWORK PROGRAMMING LAB Ye
- Page 17 and 18: Output: [student@localhost ~]$ cc m
- Page 19 and 20: main() { int shmid; int semid; key_
- Page 21 and 22: } for (i = 0; i < CHILD_INCREMENT_C
- Page 23: if (*parent_shm == (CHILD_INCREMENT
- Page 27 and 28: Output: [student@localhost ~]$ cc t
- Page 29 and 30: Output: [student@localhost ~]$ ./ t
- Page 31 and 32: } bzero(&servaddr, sizeof(servaddr)
- Page 33 and 34: Subject: NETWORK PROGRAMMING LAB Ye
- Page 35 and 36: Subject: NETWORK PROGRAMMING LAB Ye
- Page 37 and 38: Output: [student@localhost ~]$ cc t
- Page 39 and 40: Output: [student@localhost ~]$ cc t
- Page 41 and 42: servAddr.sin_addr.s_addr = htonl(IN
- Page 43 and 44: Output: [student@localhost ~]$ cc u
- Page 45 and 46: *error = 0; return FD_ISSET(sd,&soc
- Page 47 and 48: if(n
- Page 49 and 50: Subject: NETWORK PROGRAMMING LAB Ye
- Page 51 and 52: printf("%s: from %s:UDP%u : %s \n"
- Page 53 and 54: Subject: NETWORK PROGRAMMING LAB Ye
- Page 55 and 56: cliAddr.sin_family = AF_INET; cliAd
- Page 57 and 58: Output: [student@localhost ~]$ cc u
- Page 59 and 60: if(rc
- Page 61 and 62: Output: [student@localhost ~]$ cc u
- Page 63 and 64: if (select(sd+1,&socketReadSet,0,0,
- Page 65 and 66: } (struct sockaddr *) &echoServAddr
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