ServerSocket serverSocket = new ServerSocket(8080); Socket clientSocket = serverSocket.accept();In this example, we create a new ServerSocket object listening on port 8080. We then call the accept method, which will block until a client makes a connection to the server. Once a connection is made, accept returns a new Socket object representing that connection. The Node accept method is included in the java.net package library.