/*PROG 20.16 SIMPLE SERVER FOR DISPLAYING SOCKET RELATED
INFORMATION */
import java.net.*;
import java.io.*;
class Info_Socket_Server
{
static void show(String s)
{
System.out.println(s);
}
public static void main(String args[])
{
ServerSocket server_socket;
Socket socket = null;
try
{
server_socket = new ServerSocket(1500);
while (true)
{
show(“Server waiting for client “);
socket = server_socket.accept();
show(“Client Port no.:= “
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.