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

.bus, clasification of bus

clasification of bus

Example of unification, Example of Unification: Let now here, assume i...

Example of Unification: Let now here, assume instead that we had these two sentences as:  knows(john,X) → hates(john, X)  knows(jack, mary)  Thus here the predicate n

What is the relation between response time and throughput, The Throughput g...

The Throughput graph represents the amount of data in bytes that the Vusers received from the server in a second. When we evaluate this with the transaction response time, we will

Multiple instruction and single data stream (misd), Multiple Instruction an...

Multiple Instruction and Single Data stream (MISD) In this association, multiple processing elements are structured under the control of multiple control units. Each control un

Define keyword and identifiers, Q. Define Keyword and Identifiers? Key...

Q. Define Keyword and Identifiers? Keyword:   A keyword is a statement which defines nature of that statement. If statement is a directive then keyword would be the title of t

Explain traffic handling capacity, Traffic Handling Capacity is given by ...

Traffic Handling Capacity is given by (A)  Switching capacity × Theoretical maximum load (B)  Switching capacity / Theoretical maximum load (C)  Theoretical maximu

Define physical context, Question : Context aware mobile web applicatio...

Question : Context aware mobile web applications are the important to achieve ubiquity, device independence and personalization. The context provides detailed information about

What are the types of data warehouses, What are the types of data warehouse...

What are the types of data warehouses? Various types of data warehouses are illustrated below: a) Financial Data Warehouses b) Insurance Data Warehouses c) Human Resou

What is called when network address prefixed by 1110, Network address prefi...

Network address prefixed by 1110 is a? Network address prefixed through 1110 is a multicast address.

Algebra, Discrete Mathematics - (A?B)-(AnB)=(A-B)?(B-A) - prove by cases?? ...

Discrete Mathematics - (A?B)-(AnB)=(A-B)?(B-A) - prove by cases?? State which law you have used at each step. I''ve just started learning this, this semester .. and i havnt quite

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