public void run() {
   HTTPSocket httpSock = new HTTPSocket(sock);
   if (httpSock.open() == false) return;
   HTTPRequest httpReq = new HTTPRequest();
   httpReq.setSocket(httpSock);
   while (httpReq.read() == true) {
     httpServer.performRequestListener(httpReq);
     if (httpReq.isKeepAlive() == false) break;
   }
   httpSock.close();
 }
 public void set(HTTPRequest httpReq) {
   set((HTTPPacket) httpReq);
   setSocket(httpReq.getSocket());
 }
 public boolean post(HTTPRequest req) {
   return send(req.toString(), null, -1);
 }
 public boolean post(HTTPRequest req, String bindAddr, int bindPort) {
   return send(req.toString(), bindAddr, bindPort);
 }