nanoserv
[ class tree: nanoserv ] [ index: nanoserv ] [ all elements ]

Procedural File: NS_HTTP_Service_Handler.php

Source Location: /handlers/NS_HTTP_Service_Handler.php



Classes:

NS_HTTP_Service_Handler
Connection handler class
NS_HTTP_Async_Service_Handler
HTTP Asynchronous service handler class


Page Details:

nanoserv handlers - HTTP service handler

Copyright (C) 2004-2010 Vincent Negrier aka. sIX <six@aegis-corp.org>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *




Includes:

require_once("nanoserv-compat/nanoserv.php") [line 30]
Require the nanoserv core







Add_Header [line 269]

void Add_Header( string $header)

Add HTTP header to the response



Parameters

string   $header  
[ Top ]



Compress_Response [line 323]

bool Compress_Response( string &$data, [string &$encoding = NULL])

Compress a response if possible and needed



Parameters

string   &$data  
string   &$encoding  
[ Top ]



on_Request [line 262]

string on_Request( string $url)

Event called on HTTP request

the string returned by on_Request() will be sent back as the HTTP response




Parameters

string   $url  
[ Top ]



Send_Response [line 356]

void Send_Response( string $data, [ $length = null])

Send HTTP response back to client

This method is only invoked by the on_Read() handler




Parameters

string   $data  
   $length  
[ Top ]



Set_Compression [line 304]

void Set_Compression( [ $opt = self::COMPRESS_AUTO], int $option)

Set compression option



Parameters

int   $option  
   $opt  
[ Top ]



Set_Content_Type [line 280]

void Set_Content_Type( string $content_type)

Set response content type



Parameters

string   $content_type  
[ Top ]



Set_Response_Status [line 293]

void Set_Response_Status( [int $code = 200])

Set HTTP response status code

200 = OK, 403 = Forbidden, 404 = Not found, ...




Parameters

int   $code  
[ Top ]



Documentation generated on Thu, 10 May 2012 22:01:24 +0200 by phpDocumentor 1.4.4