Make a client server program with tcp (sockstream) socket

Assignment Help Basic Computer Science
Reference no: EM13868910

Part I ..............Function calls 

Write down the complete syntax and purpose of following calls.
Socket()
Connect()
Listen()
Bind()
Send()
Recv()

Q No 1: Make a Client Server program with following requirements......
The server will create a TCP (sockstream) socket. 
The server will listen on the port 9999. 
When client connected to the server, the client will get its current time and send to the server. 
The server will, upon reception of client's time, simply echo that message.
The server will also get its own time and display a line on its consol in the following format:

o Client_IP Client_port current_time client's_sent_time 

After that the server will close the connection and start listening for another connection.
When the client will receive the echo reply from server, it again gets its current time, takes the difference (RTT) 
and display on its consol in the following format: 

o current_time client's_sent_time 

After that the client will close its connection and exits normally. 
NOTE: Make sure that your application will follow the required instructions. Your application should also be able to run with ANY other application having the SAME specifications. Make your application to support the asked specifications ONLY. Also provide a README file if you made any assumptions. Please make sure to enable your application to support the APPROPRIATE BYTE ORDERING whenever necessary. 

Reference no: EM13868910

Questions Cloud

Discuss the elements of social responsibility : Discuss the three elements of social responsibility. When discussing CSR, there's always the discussion of the cost associated (financial performance) with it. What is the relationship between financial performance and CSR
Value for portb after the execution : Find the value for PORTB after the execution of the following code:
Does a credit balance in the fund balance account : Does a credit balance in the fund balance account( s) at the end of the year necessarily mean the fund has sufficient cash to pay its liabilities in a timely manner? Explain.
Determine the internal forces at point : Problem 1: Determine the internal forces at point J for the structure shown, where member BD can only carry axial forces. Take the dimension a = 160mm and the external load P = 450N
Make a client server program with tcp (sockstream) socket : Make a Client Server program with following requirements : The server will create a TCP (sockstream) socket. The server will listen on the port 9999.
What does a debit balance signify : what does a credit balance in the fund balance account(s) at the end of the year signify? What does a debit balance signify?
Which financial statements or schedules : Which financial statements or schedules must be prepared for General Funds?
Explain why those accruals must be made : Give examples of liabilities that must be accrued under the modified accrual basis of accounting, and explain why those accruals must be made.
The fasb conclude in regard to interperiod income tax : What did the FASB conclude in regard to interperiod income tax allocation?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Jerry''s appliance has a special promotion

Jerry's Appliance has a special promotion for its week long Anniversary Sale. After Customers have picked out the merchandise they wish to buy, they can draw three balls from an urn to determine the sum of the discount they will receive on their p..

  Receive funding for select planning projects

Imagine that you are trying to receive funding for select planning projects. Compare and contrast the attributes of business continuity and disaster recovery plans, and suggest the primary ways in which you would explain these differences to yo..

  The sender always sends a packet

The sender always sends a packet with an even number of bits set to 1

  Explain what the tradeoffs are in using a marker-column

Modify the database by adding an additional column ("Deleted_Date") to those tables that represent entities that could contain data which can be deleted and justify your rationale in a short paragraph

  Why does wireshark show the actual mac address

Why does Wireshark show the actual MAC address of the local hosts, but not the actual MAC address for the remote hosts?

  Calculate fourier transform of function

Given a function f(x) as follows: f(0) = 2, f(1) = 3, f(2) = 5, f(3) = 4. Calculate the Fourier Transform of f(x), i.e: F(0), F(1), F(2) and F(3)!

  Compare clock cycle times and execution times

Instead of a single cycle orgization we use multicycle organization where each instruction takes multiple cucles but only one instruction finishes before another is fetched. in this organization.

  What are techniques to use in planning presentation

You prepared and distributed a system requirements document, and you anticipate some intense questioning at the meeting. When planning your presentation, what are some techniques you will use?

  Systems analysis and design

What are the benefits of a thorough system requirements document? Drawbacks? How can a system requirements document be used to manage stakeholder expectations?

  Create a new group called mygroup

Directions: As you complete each of the following steps, keep track of what occurs at each point, including what you type, the output given, and if you experience any errors.

  Find a successive pair of elements

Consider the obvious algorithm for checking whether a list of integers is sorted: start at the beginning of the list, and scan along until we first find a successive pair of elements that is out of order. In that case, return false. If no such pai..

  Discuss the different reasons for terminating a process

discuss the different reasons for terminating a process and the commands used for this purpose.

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