This blog records some ideas, notes, and information of my works and studies in information technology.

Thursday, June 25, 2009

SCJD Exam with J2SE 5.0--Chapter 7

  • Socket Server P. 216
     。xxxSocketServer extends Thread:
    1. new DvdSocketServer(dbLocation, port).start();
    2. ServerSocket aServerSocket = new ServerSocket(port);
    3. while (true) {
    Socket aSocket = aServerSocket.accept();
    DbSocketRequest request = new DbSocketRequest(dbLocation, aSocket);
    request.start();
    }
    。xxxSocketRequest implements Runnable:
    1. handle the input and output stream
    2. call executeRequest();
  • Application Protocol 1. Need a "Command" object to perform a protocol

No comments:

Post a Comment