What functions connect( )& accept( ) call in socket interfac, Computer Engineering

Assignment Help:

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.


Related Discussions:- What functions connect( )& accept( ) call in socket interfac

What are qualified associations, What are qualified associations? A qua...

What are qualified associations? A qualified association is an association in which an attribute known as the qualifier disambiguates the object many associated end.

What are packages, What are packages? Package is a group of elements (c...

What are packages? Package is a group of elements (classes, generalizations, associations and lesser packages) with a common theme. Package partitions a model making it simpler

Computer graphics, What is intractive graphics and user dialouge in comput...

What is intractive graphics and user dialouge in computer graphics

What is a priority interrupt, What is a Priority Interrupt? A priority ...

What is a Priority Interrupt? A priority interrupt is an interrupt that establishes a priority over the various sources to determine which condition is to be serviced first whe

Explain about candidate check, The process which is underlined throughout t...

The process which is underlined throughout the check of base data is called as candidate check. When performing candidate check performance varies either towards the positive side

What are the concerns for growth of e-commerce in india, What are the conce...

What are the concerns for growth of e-commerce in India? Government as Facilitator for the growth of e-commerce has taken following steps: a. Promotion of competitive dataco

Super ASCII string checker, In the Byteland country a string "s" is said to...

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

Explain the term - strong typing and weak typing, Explain the term - Strong...

Explain the term - Strong Typing and  Weak Typing Strong Typing : When any operation upon an object can be checked during compile time, when type is confirmed forcefully.

Process of interaction design, This unit starts by discussing the importanc...

This unit starts by discussing the importance of involving users in the interaction design process, explaining the reasons why user involvement can be useful, the different degrees

Write Your Message!

Captcha
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