View Single Post
Old 28-11-07, 12:55 AM   #2 (permalink)
sk_kireeti
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 255 Times in 206 Posts
Thanks: 117
Thanked 255 Times in 206 Posts
Blog Entries: 4
Rep Power: 53 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   Reply With Quote