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

  Discuss two major issues involved with acquiring systems

Discuss two major issues involved with acquiring systems and two major issues commonly faced when maintaining them. Address how each can be minimized or overcome.

  Use strong mathematical induction to prove

Use (Weak) Mathematical Induction to prove that for n ? 0, an = 4 · 3^n

  Explain standards and impact of organizations like oasis

describe the differences in these standards and impact of organizations like OASIS as a growing factor in worldwide standards setting

  What are the advantages of flash memory

What are the advantages of flash memory over hard disk storage? What are the advantages of hard disk over flash memory storage

  Write the definition of the function

Write the definition of the function, nodeCount, that returns the number of nodes in a binary tree. Add this function to the classbinaryTreeType and create a program to test this function.

  Which item is template argument

Consider this function call: DoThis (3.85) a. Which item is template argument? b. Which template is function argument? c. Could the call be written as DoThis(3.85)?

  Declare any additional variables as necessary

Given two int variables, firstPlaceWinner and secondPlaceWinner , write some code that swaps their values. Declare any additional variables as necessary.

  Why motherboard sometimes support more than one speed

Why does motherboard sometimes support more than one system bus speed? So that it can support different processors running at different speeds.

  Explain why soap is said to provide more flexibility

Explain why SOAP is said to provide more flexibility than previous RPC (remote procedure call) models

  Receive the measurement for the diam-eter of a circle

Design an algorithm that will prompt for and receive the measurement for the diam-eter of a circle, and calculate and display the area and circumference of that circle. Your program is to continue processing until a sentinel of 999 is entered.

  Compare and contrast pop e-mail to web-based e-mail

Compare and contrast POP e-mail to Web-based e-mail systems in terms of control, security, and accessibility.

  Calculation for programming and machine independency

Assume f is a function that returns the result of reversing string of symbols given as its input, and g is a function that returns concatenation of the 2-strings given as its input. If x is the string abcd,

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