日期:2014-05-20 浏览次数:20728 次
while ( true ) { final Socket sock = acceptConnection (); Thread t = new Thread() { public void run () { HttpRequest req = parseRequest(sock); HttpResponse resp = createResponse ( req ); sendResponse(sock , resp ); sock . close (); } }; t.start(); }