Everyone is aware of socket programming in java. we write a code as below:
ServerSocket serverSocket = new ServerSocket(1234);
Socket server = serverSocket.accept();
We know that we create object of serverSocket and next we write serverSocket.accept();
code to receive client request. we know that serverSocket.accept();
wait until new request comes.
but my question is : what serverSocket.accept();
method does internally? might be is running in while loop ? how server identify that any new request is came to serve ? what is the internal implmentation of serverSocket.accept();
method? Any One has idea about this?