LW 15 - Network Socket Programming
LW 15 - Network Socket Programming
LABORATORY WORKSHEET 15
Outcomes:
1. Student be able to develop application that implements network socket.
Introduction:
Steps / Procedures:
import java.net.*;
import java.io.*;
System.out.println("
Waiting for a client ...");
socket = server.accept();
System.out.println("Client accepted");
}
catch(IOException i)
{
System.out.println(i);
}
}
System.out.println("Closing connection");
// close connection
socket.close();
in.close();
}
catch(IOException i)
{
System.out.println(i);
}
}