Java Reference
In-Depth Information
fThread = null;
}
catch (IOException ioe) {
fTextArea.append ("IO Exception while closing socket");
}
}
}
...
Figure 14.3 shows the client talking to a server running on the same Windows
platform. The client displays the file in a text area and provides text fields to enter
the server host address and port and the file that the user wants to download.
14.7 Server applications
We now know how to make a simple HTTP web server. What can we do with it?
Several possibilities come to mind:
Custom server -ifyou don't want to install a full-function web server for your PC,
you can develop your own small, customized server.
Client input -aserver could record input from clients.
Figure 14.3 The client application - ClientApp - displays a file that it obtained from
the MicroServer . The fields in the lower control panel indicate the host name of the
server, the port on which to contact the server, and the name of the file to request
from the server. Here the server and client ran on the same machine.
 
Search WWH ::




Custom Search