Java ServerSocket accept() method The accept() method of ServerSocket class is used to accept the incoming request to the socket. To complete the request, the security manager checksthe host address, port number, and localport.