Find Jobs
Hire Freelancers

2 programs related to TCP-UDP Socket/Network Programming

₹600-1500 INR

Closed
Posted over 9 years ago

₹600-1500 INR

Paid on delivery
=============================================================== Important to Note: 1.Pls. don’t use temporary files and system() function. 2. Only working programs will be evaluated. If there are compilation errors, it will not be evaluated. 3. Pls. provide makefile for each problem. =============================================================== Question1. Write a pre-forking TCP server chatserver.c that works in the following way. It takes port number, and N on command line. It pre-forks N children. That means at a time N clients can be handled. Each child waits on accept() call and accepts connections. When it receives a message from client, it should send the message to all other clients which are connected to the server. Child should also print to console "<pid> received <msg> from <client ip>:<client port>". A client ("web browser") sends a message in the URL itself. E.g.: Say chat server is running at port 9000. In the browser one types http://localhost:9000/?msg=hi all. Server should send the message "hi all" to all other clients which are connected to it. Since server has to interact with the browsers, replies should in HTTP Response format. Use message queues for inter process communication. Question2. Write a UDP server gameserver.c that works in the following way. It takes P, nextP, nextIP, and start values on the command-line. It binds its socket to port number P. When it receives an integer N on the socket, it reduces it by 1 and sends it to the next destination represented by nextIP and nextP. Server should print "<pid> received N and sent N-1". When a server receives 0, it will send K (a random integer) to the next destination and print "Out from the game". When a server is out from the game, it doesn't reduce the incoming integer but rather forward it as it is to the next destination. A server that remain till end is the winner. E.g: A three server game. server1, server2 and srever3 are all executables of gameserver.c. ./server1 9000 [login to view URL] 9001 0 ./servar2 9001 [login to view URL] 9002 0 ./server3 9002 [login to view URL] 9000 1 Here server3 is the starting server. It will chose a random integer K and send it to the next destination. How to send me? Make a directory for each problem like P1, P2 etc and copy your source files into these directories. Tar all of them into [login to view URL]
Project ID: 6622130

About the project

3 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average ₹4,155 INR for this job
User Avatar
La propuesta todavía no ha sido proveída
₹5,611 INR in 3 days
5.0 (1 review)
3.6
3.6
User Avatar
Wed, 22 Oct 2014 12:26:04 +0530 Forked servers from TCP server will all be tcp-servers. How does UDP server relate to TCP-server? What is start value ( in UDP server for? Is it children forked (like in tcp server)? What is the compiler and version? Any default CFLAGS? Any compile option configuration required -- static | shared?
₹1,300 INR in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I am interested in this job. I'm experienced in Network programming. I hope you will consider my application. Thank You
₹5,555 INR in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
0.0
0
Member since Oct 21, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.