ich is a path to a folder on the hard disk from which the server will retrieve Web pages. This path needs to be set. Then initialize the array list of sockets and start the main server thread. // Set the path; String path = " < path > " i listSockets = new ArrayList ( ) ; Thread threadListener = new Thread (new ThreadStart (newConnection). ) ; threadListener.Start ( ) ; 3. The newConnection function manages new incoming connections, allocating each new connection to a new thread for handling client requests. HTTP operates over port 80. In this program we have set the port as 9080 and this can be customized. Start the TcpListener on the port specified. This thread runs in an infinite loop and waits for a socket connection for invoking AcceptSocket method. Once the socket is connected a new thread called the socketHandler function. Web Communication public void newConnection () // Specify port to use int port = 9080; TcpListener tcpListener = new TcpListener (port) tcpListener.Start () ; while (true) Socket socketHandler = tcpListener. AcceptSocket () ; if (handlerSocket.Connected) listSockets.Add (socketHandler) ; ThreadStart thdstHandler = new ThreadStart (handlerThread) ; Thread thdHandler = new Thread (thdstHandler) ; thdHandler.Start () ; 4. The first task this thread must perform, before it can communicate with the client, is to retrieve a socket from the top of the ArrayList. Once this socket has been obtained, it can then create a stream to this client by passing the socket to the constructor of a NetworkStream. A StreamReader is used to read from the incoming NetworkStream. The incoming line is assumed to be HTTP GET in this example and the same can be extended to handle other HTTP POST. The physical path also needs to be resolved. It can be read from disk and sent out on the network stream. Then the socket is closed. The response file- Contents needs to be modified to include the HTTP headers so that the cli- ent can understand how to handle the response. public void handlerThread () Socket socketHandler 