Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

What functions connect( ) and accept ( ) call in Socket interfacing?

connect() system call:

Clients use procedures connect to initiate connection with an exact server. The form is connect ( socket , saddress, saaddresslen)

Argument socket is the descriptor of a socket upon the client's computer to utilize for the connection. Argument sockaddress is a sockaddr structure which specifies protocol port number and the server's address. Argument saaddresslen identifies the length of the server's address measured in octets.

The client doesn't have to bind a local address before call ing connect( ).

connect( ) inside can call bind() to connect to a local address if not completed previous.

accept() system call:

After a connection oriented server executes the listen( ) system call , a real connect ion from some client process is waited for throgh having the server execute the accept () system call. Therefore the form is:

accept (sockfd, sockaddr * peer, int* addrlen)

Such system call returns up to three values: an integer return code which is either an error indication or a newly socket descriptor, the address of the client process (i.e. peer) and the size of such address(i.e. addrlen).

Accept automatically creates a new socket descriptor, supposing the server is a concurrent server.

While a connection request is obtained, the process forks, along with the child process servicing the connection and also the parent process waits for the other connection request.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9546324

Have any Question?


Related Questions in Computer Engineering

Question you have been recently promoted to lead a new

Question: You have been recently promoted to lead a new division of Company XYZ. This company is known for its team-oriented atmosphere, and your boss has raved about some of your natural leadership qualities. Your first ...

Question suppose you are the analyst charged with

Question : Suppose you are the analyst charged with developing a new system to help senior managers make better strategic decisions. What methodology would you use? How would the business strategy affect your approach? W ...

Question recall the on the spot courier service introduced

Question : Recall the On the Spot courier service introduced in Unit 1. The details of the package pickup and delivery process are described here. When Bill got an order, at first, only on his phone, he recorded when he ...

What is a domain name in the context of internet what is

What is a domain name in the context of Internet? What is the procedure to get a domain name and link it to an Internet Protocol (IP) address? Use an example.

A security system is used to monitor doors and windows of a

A security system is used to monitor doors and windows of a residence. This system uses several components, including photodiodes and contact switches to detect intruders. Circuits associated with contact switches provid ...

Question part 2 1using the major business performance

Question: Part 2: 1. Using the major business performance management (BPM) processes, describe the general process of how the case study organization will collect data that are relevant to the following: • Strategize • P ...

A wholesale t-shirt company offers sizes small medium large

A wholesale T-shirt company offers sizes small, medium, large, and extra-large in organic or non-organic cotton and colors white, black, gray, blue, and red. How many different T-shirts are there to choose from?

Given an undirected graph with both positive and negative

Given an undirected graph with both positive and negative edge weights, design an algorithm to find a maximum spanning forest with the largest total edge weights.

How can word processing software give a person the ability

How can Word Processing software give a person the ability to better position themself or a business, in today's society? Why?

What are the assumptions of linear regression analysis and

What are the assumptions of linear regression analysis and ,How do we interpret the regression coefficients ,can u give a real life example of how linear regression is used in statistical research

  • 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