huge integer addition client

Write a network client program in C or C++ on UNIX system that communicates with the huge integer addition server (port 3300) on host . Program will read pairs of very long strings representing very large integers from a file. Each character in the input string will be in the range ?&#8364;&#732;0?&#8364;&#8482; to ?&#8364;&#732;9?&#8364;&#8482;. Your program will then send the string pair to the server. The server will perform addition on the huge integers and return the resulting string back to your client program. The strings represent integers such that the leftmost character is the least significant digit. The strings to be added may be of arbitrary length, not to exceed 100,000 characters each. Your client will accept command-line parameters as follows: programname <server s="" ip="" address=""> [port] where: t specifies TCP or u specifies UDP, filename specifies the name of the input file, server's IP address can be in either the dotted decimal form or name form of the server's IP address , and port specifies the port to connect to; port number is optional. If the user specifies a port number, use it; otherwise use the default value of 3300. The server expects your program to first send a long integer containing the number of digits in the first string, followed by the first string. Then it expects a long integer containing the number of digits in the second string, followed by the second string. After the server performs the computation, it returns a long integer containing the number of digits in the result, followed by the result string. If the server detects an error, it will send a value of negative one (-1) to your client in the result length, and will not return a string. Be sure to convert the digit counts to (and from) network format. In the TCP version of the program, use the same connection to process all pairs and be able to handle message fragmentation. The TCP server fragments long results into multiple messages for return. Also, the UDP server expects to get all the data required for a single addition operation in one message. Therefore, you will not be able to use multiple sendto() calls for a single operation. You will, instead, have to construct one message containing the operand pairs and send it in one sendto() call. It is possible that the strings will be too large to be sent in a single datagram. In this case, simply report the error and go on to the next pair. <h2>Deliverables</h2> Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. <h2>Deadline information</h2> I need to give back this homework on Tuesday November the 20th at midnight (end of day)</server>

Skills: C Programming, Engineering, Linux, MySQL, PHP, Software Architecture, Software Testing, UNIX

See more: unix network programming, strings in c programming, pair programming, pair line, message to client, integers form 1, integers and, get length of string in c, c programming strings, command line programming, 0 1 integer programming, client deliverables, udp tcp client, tcp programming, tcp client, integer programming, case report form, form server client, program udp, fragments

About the Employer:
( 0 reviews ) United States

Project ID: #2831542

4 freelancers are bidding on average $133 for this job


See private message.

$114.75 USD in 14 days
(35 Reviews)

See private message.

$340 USD in 14 days
(6 Reviews)

See private message.

$42.5 USD in 14 days
(5 Reviews)

See private message.

$34 USD in 14 days
(0 Reviews)