|
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.
|