Starting from:

$29

Project 6 Network server named shoutd.cpp

UNIX System Programming – Programming
Project 6 Assignment
Write a network server named shoutd.cpp that reads ASCII messages from a client, converts them to upper case and sends them back to the client. The messages may be of arbitrary length and should be terminated with a null byte. The server should bind to all local IP addresses and a dynamically assigned port number. The server should display the assigned port number to standard output when it starts. The server should be capable of handling multiple simultaneous clients and must use I/O multiplexing to do so (select()). The server should use getaddrinfo() to form the address that is passed to bind() and should use getnameinfo() to determine the dynamically assigned port number. Write a client named shout.cpp that takes the server hostname and port number as arguments (the client should also accept an IPV4 address in dotted quad notation in place of the hostname). It should use getaddrinfo() to convert the arguments to a connection address. The client should prompt the user for an input and output file name pairs. The client opens the input file, sends the contents to the shoutd server and writes the returned data from the server to the output file. The client should then prompt the user for another input and output file name pair. The connection to the server should be terminated when the user closes standard input (CTRL-D at the terminal). A typical run of the client might look something like this (assuming the server is running on csserver): shout csserver.evansville.edu 43100 Enter input and output file names: timid.txt loud.txt Conversion is complete. Enter input and output file names: ^D What to submit ● Provide a makefile named Makefile that will make both programs for this assignment as the default target (typically called all). Each program must be a separate target. ● Create a tarfile or zipfile containing your program source files and makefile. ● 

More products