Download File
Download File
Download File
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Subject: NETWORK PROGRAMMING LAB Year : 2010<br />
Class : IV B-Tech C.S.E Semester: First<br />
WEEK 7:<br />
AIM: Design a TCP concurrent server to echo given text into upper case using<br />
multiplexing system call “select” /* tcp_str_ser.c */<br />
#include "unp.h"<br />
void str_echo(int sockfd)<br />
{<br />
long arg1, arg2;<br />
ssize_t n;<br />
char line[MAXLINE];<br />
for ( ; ; )<br />
{<br />
if ( (n = Readline(sockfd, line, MAXLINE)) == 0)<br />
return; /* connection closed by other end */<br />
n = strlen(line);<br />
printf("\nReq From Client : %s",line);<br />
/* converting into upper case */<br />
for(i=0;i=97 && line[i]