Package de.ioexception.www.http

Examples of de.ioexception.www.http.HttpResponse


  {
    // Parse request from InputStream
    HttpRequest request = parseRequest(socket.getInputStream());

    // Create appropriate response
    HttpResponse response = handleRequest(request);

    // Send response and close connection, if necessary
    if (keepAlive(request, response))
    {
      sendResponse(response, socket.getOutputStream());
      server.dispatchRequest(socket);
    }
    else
    {
      response.getHeaders().put("Connection", "close");
      sendResponse(response, socket.getOutputStream());
      socket.close();
    }

    // We do not return anything here.
View Full Code Here

TOP

Related Classes of de.ioexception.www.http.HttpResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.