Create a tcp server and client

Assignment Help Computer Networking
Reference no: EM131945631

Assignment

In this assignment you will create a TCP Server and Client.

You have two options. You can implement a TCP QOTD Client and Server program similar to the UDP assignment. This option is worth the standard 50 points. The second option is to implement a TCP Simple File Server and Client. This option includes 8 extra credit points. You can only get credit for one of the options. Do not turn in both. Submit your .py files on Canvas.. A description of each option follows.

TCP QOTD Client and Server

The client program should:

1. accept a host and port number from the command line or prompt the user for these values at startup
2. Request the QOTD from the specified host and port over TCP
3. Print out the resulting quote

The server program should:

1. accept a port number from the command line or prompt the user for this value at startup

2. Accept connections from any address

You do not need to handle more than one connection at a time.

However, once you have transferred the file you should go back to accepting connections.

3. Reply to requests with the QOTD

This can be a single hard-coded quote.

To test your client, try requesting the qotd from djxmmx.net on port 17

To test your sever, try requesting the qotd from your server using your client.

Because TCP is byte/stream oriented, you will want to consider how your program will handle the sending and receiving of information. Will you use a fixed-size format for the request? Will you specify the size of the request in the first several bytes of the message. Will you use a delimiter to indicate the end of the request? Will you close the connection after the request has been sent?

Similarly you need to decide the same thing for the response. Will you use a fixed-size format for the response? Will you specify the response size in the first several bytes of the message. Will you use a delimiter to indicate the end of the response? Will you close the connection after the response has been sent?

You will not get full credit if you program does not handle the byte/stream nature of TCP even if it "appears" to be working correctly.

TCP Simple File Server and Client

The client program should:

1. accept a host, port number, remote file name and local file name from the command line or prompt the user for these values at startup
2. Request the remote file from the specified host and port over TCP
3. Save the received file to local file name

The server program should:

1. accept a port number from the command line or prompt the user for this value at startup

2. Accept connections from any address

You do not need to handle more than one connection at a time.

However, once you have transferred the file you should go back to accepting connections.

3. Get the filename to be transferred

4. Send the file to the client.

To test your client, try requesting sample.txt from icarus.cs.weber.edu on port 2080(uses a half-close for requests) or from icarus.cs.weber.edu on port 2081(uses a new-line delimiter for requests). You will want to be connected to the Weber State network (on campus or use vpn).

To test your sever, try requesting a file from your server using your client.

Because TCP is byte/stream oriented, you will want to consider how your program will handle the sending and receiving of information. Will you use a fixed-size format for the filename? Will you specify the filename size in the first several bytes of the message. Will you use a delimiter to indicate the end of the filename? Will you close the connection after the filename has been sent? Similarly you need to decide the same thing for the actual file. Will you use a fixed-size format for the file? Will you specify the file size in the first several bytes of the message. Will you use a delimiter to indicate the end of the file? Will you close the connection after the file has been sent?

You will not get full credit if you program does not handle the byte/stream nature of TCP even if it "appears" to be working correctly.

Reference no: EM131945631

Questions Cloud

Small business experiences in an international expansion : What do you think are some factors a small business experiences in an international expansion?
Create barriers to fulfilling professional responsibility : Post a scenario of how a social worker's personal, ethical, and moral values in relation to the LGBTQ community might conflict with those of their clients.
Compute the total materials variance : Compute the total materials variance and the price and quantity variances, assuming the purchase price is $5.84 and the quantity purchased
Currency appreciation and cross rates : Suppose that 1 Euro could be purchased in the foreign exchange market today for $0.25. how many Euros would a dollar buy tomorrow?
Create a tcp server and client : In this assignment you will create a TCP Server and Client. Accept a port number from the command line or prompt the user for this value at startup.
Discuss about the adoption of laws : NASW encourages the adoption of laws that recognize inheritance, insurance, same-sex marriage, child custody, property, and other rights in lesbian, gay.
Calculate basic and diluted earnings per share for sanchez : Sanchez, Inc. has an income tax rate of 40%. Its reported net income for 2010 was $88,000, Calculate basic and diluted earnings per share for Sanchez
Value of each investment based on required rate of return : Calculate the value of each investment based on your required rate of return. What required rates of return would make you indifferent to all three? options?
Problem of very personal nature : Aunt Clara has a problem of a very personal nature, If Clara is able to sell this bond at fair market price, will she have enough cash for Snookies' operations?

Reviews

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd