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

Dbms, types of lock

types of lock

How much frequency is centered in typical human voice, Typical human voice ...

Typical human voice is centered around                   Hz. (A)  200-400                                     (B)  280-3000  (C)  400-600

How do you get workflow automation in e-business environment, How do you ge...

How do you get workflow automation into e-business environment? In order to run smoothly, organizations frequently standardize processes across the organization and support use

Implication connective - modus ponens rule, Implication connective - Modus ...

Implication connective - Modus ponens rule: We notice that this is a trivial example, so it highlights how we use truth tables: as the first line is the only one when both abo

How to access the disk data, Q. How to Access the Disk Data? Disks oper...

Q. How to Access the Disk Data? Disks operate is semi-random mode of operation and generally referenced block wise. The data access time on a disk comprises two major component

Advantage of booth and restoring division algorithm, Describe the advantage...

Describe the advantage of using Booth algorithm? Ans:  a) It achieves efficiency in the number of additions needed when the multiplier has a few large blocks of 1's. b) It

Summary of tasks, Summary of Tasks Task Summary attempts to show amoun...

Summary of Tasks Task Summary attempts to show amount of duration every task has spent starting from beginning of task until its completion on any processor as displayed in Fi

Define intranet, Intranet : An Intranet is a type of information system...

Intranet : An Intranet is a type of information system that facilitates communication within the organizations between widely dispersed departments, divisions, and regional loc

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