src/WebServer.java
public void Run() {
		System.out.println("Listening on port: " + m_Port);
		while (true)
		{
			Socket connection = waitForConnection();
			if (connection == null) { 
				continue;
			} else {
				System.out.println("Recieved a new HTTP request");
				HTTPRequestHandler request = new HTTPRequestHandler(connection, new Runnable() {

					@Override
					public void run() {
						onFinishThread();
					}
				});

				m_ThreadPool.AddThread(request);
			}
		}
	}
/*
	 * Wait for connection. 
	 * For each connection - create HTTPRequestHandler.
	 * When the thread finished - manage the thread pool.
	 */
Wait for connection.
For each connection - create HTTPRequestHandler.
When the thread finished - manage the thread pool.
Wait for connection . For each connection - create HTTPRequestHandler . When the thread finished - manage the thread pool .
public void Run() {
		System.out.println("Listening on port: " + m_Port);
		while (true)
		{
			Socket connection = waitForConnection();
			if (connection == null) { 
				continue;
			} else {
				System.out.println("Recieved a new HTTP request");
				HTTPRequestHandler request = new HTTPRequestHandler(connection, new Runnable() {
					@Override
					public void run() {
						onFinishThread();
					}
				});
				m_ThreadPool.AddThread(request);
			}
		}
	}
public void Run ( ) { System . out . println ( "Listening on port: " + m_Port ) ; while ( true ) { Socket connection = waitForConnection ( ) ; if ( connection == null ) { continue ; } else { System . out . println ( "Recieved a new HTTP request" ) ; HTTPRequestHandler request = new HTTPRequestHandler ( connection , new Runnable ( ) { @ Override public void run ( ) { onFinishThread ( ) ; } } ) ; m_ThreadPool . AddThread ( request ) ; } } }
Wait for connection.
Wait for connection .