Develop a server program running on one computer

Assignment Help Other Subject
Reference no: EM132286003

Assignment - TCP/IP Communications via Socket Programming

1. Introduction

This assignment of TCP/IP communications is a group-of-two or group-of-three assignment worth 15%. Working individually without a group for this assignment is only acceptable with an pre-approval from the unit coordinator. The assignment will require Socket Programming, which is the topic of Week02 Lecture and Week03 Tutorial.

Sections 1 through 3 introduce some background information relevant to the assignment. The assignment tasks are described in Section 4. Section 5 highlights what and where you need to hand in your project report. In Section 6, the marking scheme of the assignment is enclosed for your reference.

This assignment relates to the following unit outcomes described in the unit outline:

2. Skills to undertake planning and design of computer networks to satisfy a set of requirements specifications with particular emphases on connectivity, scalability, reliability, security and QoS; and

4. Advanced collaborative and communication skills through a group project and formal technical report.

The criteria and performance standards used in this assessment are described in a table at the end of this document. Use the table as a marking guide.

You are asked to self-assess your assignment (in the enclosed marking guide table) and reflect on what you have achieved before handing in your assignment report. This enables you to check the completeness of your assignment tasks, and also gives you the opportunity to reflect on your achievements, e.g., what you have learned from this assignment and what you need to improve.

• For the self-assessment, submit the self-assessed sheet together with your assignment. The self-assessment sheet is the table at the end of this document, and is used as a marking guide.
• For reflection, compose a Reflection Section, in which each of the group members writes a separate paragraph of individual reflection.

Key technical aspects that this assignment is addressing include: TCP/IP communications, socket programming. No-technical aspects of the assignment include: team work, communication and report, and reflection.

2. Background: Dealing with Time

There are basically three types of methods to deal with time in C programming:

(1) Use some well-developed timing control APIs. For example, in Windows, a few functions are implemented in windows library (header file: windows.h); and QueryPerformanceCounter() can be used for high-resolution timing control. This is the method we used in our examples, and is recommended to you for this assignment.

(2) Using the standard time library. The standard time library provides a number of functions for time operations, e.g., time(), localtime(), etc. Find a book or search the Internet to learn how to use this time library.
(3) Using hardware timer interrupt, which is the highest hardware interrupt. In this assignment, you do not have to use this method.

For Linux users, sys/time.h declares a few time functions for high-resolution timing control, e.g., gettimeofday().

3. Background: Socket Programming

What is a "network socket"? A socket is a way to talk to other programs using the standard (Unix) file descriptors (Everything is treated as a file in Unix). A file descriptor is simply an integer associated with an open file; and the file can be a network connection!

Where to get this file descriptor for network communication? Call the socket() system routine. Then, send() and recv() and other socket calls can be used to talk to other computers. In this assignment, we deal with TCP socket only although other sockets are also available, e.g., UDP.

4. Assignment Tasks

You are asked to develop a Server program running on one computer, and a Client program running on another computer. (When you test your server and client programs on one computer, you may use Loopback IP Address 127.0.0.1, with which any packets sent out from this machine will immediately loop back to itself.)

The Server will accept input from keyboard for system initialization, selection of menu items, human command and instructions, etc. It will also display information on the monitor, periodically send commands to the Client, and receive feedback from the Client. After receiving a command from the Server, the Client will send feedback to the Server, and displays some information of your interest.

1552_figure.jpg

Assignment tasks are described below:

(1) When the Server is started, it initializes the settings of the server's IP address, port number, and the client's IP address, etc., through command window arguments, e.g., header file, arguments to main(), keyboard input, or input from a configuration file which is a pure text file.

(2) Every 3 seconds, the Server sends the Client a command to ask for data, e.g., through a single letter "R" or "r" (request). (Timing control is required here. Using our examples in the lecture materials if you like.)

(3) After receiving the command from the Server, the Client sends back to the Server an ACK consisting of the client's time hh:mm:ss:xxx ("xxx" means three digits, e.g., 251, indicating 251 ms) and also a random integer number between 0 and 100 with a uniform distribution. The Client may also display some useful information on its monitor. It is up to your design on what information the Client displays. (You may use a random generator to generate random numbers. For example, rand()%101; srand(time(NULL)) can give a seed for rand(), where time() is defined in header file time.h).

(4) The Server gets the feedback from the Client, and display the result.

(5) The Server reads keyboard input of various command and instructions. An obvious command is to terminate the Server program, e.g., using a single letter "E" or "e" (exit). When the Sever is to be terminated, the Server should also notify the Client of the Server's termination so that the Client also terminates properly.

How to test your programs:

(1) At early stages of your program development, you may test your programs on a single computer. Execute the Server program in one command window, and execute the Client program in another command window. Both the Server and Client share the same IP address, e.g., the Loopback IP address 127.0.0.1.

(2) If you test your programs in computer labs, you may execute the Server and Client programs on two different computers, which have different IP addresses.

Reference no: EM132286003

Questions Cloud

Social communication model in shaping messages : Which of the following is an advantage of using the Social Communication Model in shaping messages?
Describe the task that the program must perform : Describe the task that the program must perform. What questions would you ask a client to get more details on the requirements of the program?
Activist investing in terms of corporate top management : Discuss the concept of activist investing in terms of corporate top management.
Cleaning in-house versus outsourcing the cleaning : How many bottles per year would have equal total annual cost of doing the cleaning in-house versus outsourcing the cleaning?
Develop a server program running on one computer : ENN523 - Advanced Network Engineering - Queensland University develop a Server program running on one computer, and a Client program running on another computer
Which makes its own line of soft beverages : You are in-house counsel for a soft drink company, Sodas R Us, Inc., which makes its own line of soft beverages.
Discuss the importance of culture in the house of spirits : Discuss the importance of culture in The house of spirits (Isabel Allende) . What is specifically local about it? And what makes it universal?
Past demand and forecasts data to generate new forecast : Which time-series model uses both past forecasts and past demand data to generate a new forecast?
What is the significance of cave art : What is the significance of cave art? What does it represent? Why was it created? What do you think Stonehenge was used for? Name at least 2 other theories.

Reviews

len2286003

4/17/2019 2:49:41 AM

Element Wt % 100-85 84-75 A. TCP/IP Server & Client 8 Server and Client functional with keyboard input to the Server, use configuration file to assist in initiation Server and Client functional with keyboard input to the Server, make use of keyboard input in initialization B. Report 4 File provided; Report professionally organized and presented File provided; Report well organized and presented

len2286003

4/17/2019 2:49:28 AM

c. The report should be less than 20 A4 pages for the body text. Additional materials that you feel important could be organized in an appendix. d. The report is expected to have a Reflection Section which discusses what you have learned from this unit or this assignment, what you feel is beneficial to you, and what aspects you think you need to improve. Each of the group members writes a separate paragraph of individual reflection. Be specific about yourself and the unit/module. (2) A zipped file of your c/c++ source files, header file/s, and data file if any; do NOT submit any project files; and

len2286003

4/17/2019 2:49:21 AM

Submit your assignment with the following items through QUT’s Blackboard: (1) A report on your design/solutions/discussions and other aspects that you feel relevant. We will discuss in class what the report should look like. a. The report should start with a cover page, followed by an Executive Summary of no more than 1 page, and Table of Contents. Then, body text, and references if any. b. The body text can be organized with the following components: background of the project (e.g, main requirements and functions, etc), system design and logic flows at a high level (which is independent of any languages), implementation of the main components (but not line-by-line code), test plan and testing results, reflection, conclusion, and references if any.

Write a Review

Other Subject Questions & Answers

  Why state-federal relations need to change

Why state-federal relations need to change? What does all of this mean for American government and politics?

  What is a nonequivalent control group pretest-posttest

What is a nonequivalent control group pretest-posttest design study involving diet and weight loss?

  Describe how that characteristic is commodified

Describe how that characteristic is "commodified" (made sellable/consumable) and/or shaped by the current economic system (e.g., If I buy the $60 car seat

  Define the terms race and racism

Define the terms race and racism. What are some of the problems with the concept of "race" that lead most scientists to say that it is not a biologically meaningful concept?

  Write a description of the setting and process

Use classical conditioning to produce consistently some startle response (reflex) in an unsuspecting friend at an abnormal signal (produces the reflex). Start with your friend's reflex response and a signal that will produce that reflex response;..

  Detailed analysis incorporation reading and textbook

Your paper should be citing specific examples and providing detailed analysis incorporation reading and textbook material. If outside sources are used

  Describe and explain the formation of landforms

Describe and explain the formation of landforms that result from strike-slip faulting (such as linear fault troughs, sag ponds, and offset streams).

  Should the social security earnings test be eliminated

In what ways do younger workers pay for Social Security benefits received by retired workers? Should the Social Security earnings test be eliminated? What are the benefits and costs of doing so?

  Describe the type of event the effects and fabrication wmd

Describe the type of event, the effects, fabrication, and development of the WMD event and Discuss the environmental, political, economic, and sociological effects of the WMD event.

  Describe disturbance and recovery

Describe disturbance and recovery

  Essay below and fix it with the following feedback

Read the essay below and fix it with the following feedback. All second drafts should includeyellow highlighting for all revisions made in the draft, along with a 1-paragraph summary explaining what issues the instructor pointed out, as well as ho..

  Explore the positive and negative consequences

technology that interest you and you believe impacts your peers. In the essay, explore the positive

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