Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

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.

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M92784287

Have any Question?


Related Questions in Computer Network & Security

What are three ways that even every forecast model should

What are three ways that even every forecast model should be evaluated to obtain the best forecast result.

Question for the remaining questions consider a 4-bit block

Question : For the remaining questions, consider a 4-bit block cipher, described in hexadecimal by the following table: Plaintext Ciphertext Plaintext Ciphertext 0 a 8 e 1 c 9 d 2 f a 0 3 6 b 7 4 3 c 5 5 8 d b 6 4 e 9 7 ...

The abstract should not be more than 250 words describe

The abstract should not be more than 250 words. Describe your project, focusing on research questions and research method for next stage of the project. 1. Introduction [The introduction should describe what the project ...

Autonomous consumptionnbsp 660marginal propensity to

Autonomous consumption  = 660 Marginal propensity to consume  = 0.8 Autonomous taxation  = 200 Income tax rate =  0.2 Planned investment  = 500 Government spending  = 500 Autonomous net exports  = 300 NX  = 0.04 Calculat ...

From the product designed expanded as follows1 from your

From the product designed expanded as follows. 1. From your list of possible responses to the threat, choose one that you will focus on in this product. Create the requirements for your product by completely identifying ...

You just signed a 30-year lease agreement for a business

You just signed a 30-year lease agreement for a business property. The monthly rent for the first year is $1,000/month, with the ?rst month's rent due today. Starting from the second year onward, the monthly rent will be ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

1srin response to nmap -n -sn localhost what kind of

1. SR In response to "nmap -n -sn localhost": What kind of information did the nmap scan results show you, specifically? 2. FIB What does the "-sn" option do in nmap? ping scan -disable port scan 3. SR How does the "-sn" ...

Security challenges in emerging networksassignment

Security Challenges in Emerging Networks Assignment Description The purpose of this assignment is to develop skills to independently think of innovation. In this assignment students will first learn how to develop knowle ...

Content analysis assignmentoverviewthis assignment has

Content Analysis Assignment Overview This assignment has three major aims: - To help students gain good understanding of all ITECH1102 theoretical and practical material. - To encourage students to use content analysis s ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As