Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
fff

fff

Ratings: (0)|Views: 1|Likes:
Published by Nivi Senthil
aafa
aafa

More info:

Published by: Nivi Senthil on Oct 01, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

10/01/2013

pdf

text

original

 
#include<sys/types.h>#include<sys/socket.h>#include<netinet/in.h>#include<stdio.h>#include<string.h>int main(int argc,char **argv){socklen_t len;int sockfd,n;struct sockaddr_in servaddr,cliaddr;char buff[1024],str1[1024],str2[1024];sockfd=socket(AF_INET,SOCK_DGRAM,0);if(sockfd < 0)perror("\nsocket error\n");bzero(&servaddr,sizeof(servaddr));servaddr.sin_family=AF_INET;servaddr.sin_addr.s_addr=inet_addr(argv[1]);servaddr.sin_port=htons(5000);printf("STRING CONCATENATION");printf("\nEnter the 1st string :");gets(str1);len=sizeof(servaddr);sendto(sockfd,str1,sizeof(str1),0,(struct sockaddr*)&servaddr,len);len=sizeof(servaddr);sendto(sockfd,str2,sizeof(str2),0,(struct sockaddr*)&servaddr,len);close(sockfd);return 0;

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->