Commit ad32ce36 authored by 강임주's avatar 강임주

Add new file

parent d03e51da
import* ;
import* ;
import java.util.* ;
public final class WebServer_Blank {
public static void main(String argv[]) throws Exception {
try {
// Could get the port number from the command line.
// int port = (new Integer(argv[0])).intValue();
// Establish the listen socket.
ServerSocket serversocket = new ServerSocket(8080);// Mission 1
// Process HTTP service requests in an infinite loop.
while (true) {
// Listen for a TCP connection request.
Socket socket = serversocket.accept();// Mission 1
// Construct an object to process the HTTP request message.
HttpRequest_upgrade_blank request = new HttpRequest_upgrade_blank (socket);
// Create a new thread to process the request.
Thread thread = new Thread(request); // mission 2
// Start the thread.
}catch(IOException e) {
}catch(Exception e) {
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment