Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > DATA STRUCTURES, C, C++, VC ++ > ds. c , c++ Interview / Technical Questions
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

ds. c , c++ Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too.

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 27-11-07, 10:52 PM   #1 (permalink)
Junior Member
 
Join Date: Sep 2007
Age: 25
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 2 gouriproutray is on a distinguished road
Smile What is the need of accept() function????

In socket programing(tcp/ip)..we use socket() function to get the socket file descriptor.
And using the accept() function again this function gives another socket file descriptor.
My question is ????????
What is the need of accept() function to get file descriptor when we have already one file descriptor by using socket() function.

gouriproutray is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-11-07, 12:55 AM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: What is the need of accept() function????

Gouriproutray,

If you are talking about java network programming, as far as I remember there is not accept() method in Socket class. But it is the method of ServerSocket class.

Here, SeverSocket is server (running at a specified port) which listens to all requests and accepts new requests using accept() method which returns Socket class using which we can perform IO operations.

Simple here you can treat ServerSocket as Server and Socket as a request/client.

Thanks,
Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-11-07, 11:11 AM   #3 (permalink)
Junior Member
 
Join Date: Sep 2007
Age: 25
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 2 gouriproutray is on a distinguished road
Smile Re: What is the need of accept() function????

This is a question based on c,c++.. not for java
gouriproutray is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some Loadrunner FAQs kiran2710 Testing Tools & QA 1 25-10-08 01:42 AM
C questions Spoorthi DATA STRUCTURES, C, C++, VC ++ 3 30-10-07 09:49 AM
Function pointers- simple example jithendra.b ds. c , c++ Interview / Technical Questions 1 30-03-07 04:31 PM
TCS Pacement paper 29 sridhar TCS Placement Papers 0 12-02-07 05:43 PM
What’s the difference between thesr shilpa VB / ASP.NET Technologies 5 08-03-06 12:09 PM


All times are GMT +6.5. The time now is 01:16 PM.





Search Engine Optimization by vBSEO 3.1.0