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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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