Modules
ADT Database GTK2 GUI IP PiJAX Public Sql Stdio Subversion System Tools Xosd lua v4l2 wx
Recent Changes
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Popular Downloads
Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48
|
Pike Module Reference: module version 1.5, prepared
MODULE Public.Web |
Modules FCGI
|
|
MODULE Public.Web.FCGI |
Classes FCGI
Methods decode_url() encode_url() open_socket() shutdown()
|
-
Method open_socket
int Public.Web.FCGI.open_socket(string path, int backlog)
- Description
Creates a socket for fastcgi communication with a webserver.
Returns the file descriptor to be used when creating a FCGI.FCGI()
object, or -1 on failure.
- Parameter path
The filename of the unix domain socket (or named pipe on WinNT),
or an optional host, followed by a colon and a port number for a TCP socket.
- Parameter backlog
The size of the queue used in the listen() call for this socket
-
Method shutdown
void Public.Web.FCGI.shutdown()
- Description
Stop accepting new connections. Any calls to accept() after shutdown() has
been called will fail. This function is signal handler safe.
-
Method decode_url
string Public.Web.FCGI.decode_url(string s)
- Description
Decodes a urlencoded string, replacing "+" with " ", and converting
%XX hex codes to their appropriate values. Any invalid %XX codes
are removed from the string, while saving as much of the string as
possible. For example, "%2r" will become "r".
- Parameter s
The urlencoded string.
-
Method encode_url
string Public.Web.FCGI.encode_url(string s)
- Description
Encodes a urlencoded string, replacing " " with "+", and converting
characters that cannot be in urls to their appropriate %XX hex codes
according to RFC 1738.
- Parameter s
The string to encode.
|
CLASS Public.Web.FCGI.FCGI |
Methods accept() clear_errno() create() eof() errno() finish() flush() gets() read() start_filter_data() werror() write()
|
-
Variable env
mapping(string
: string) Public.Web.FCGI.FCGI()->env
- Description
A mapping of all HTTP and server variables supplied for this FCGI request.
-
Method create
void Public.Web.FCGI.FCGI()->create(int sock)
- Description
Creates a new fastcgi request object
- Parameter sock
The file descriptor to accept on, as returned from open_socket()
-
Method accept
int Public.Web.FCGI.FCGI()->accept()
- Description
Frees the resources allocated to, and closes any previous connection,
then accepts a new connection. This function blocks indefinately until
a new connection is ready, and returns 0 on failure or 1 on success.
-
Method finish
void Public.Web.FCGI.FCGI()->finish()
- Description
Frees the resources allocated to this connection, and closes it.
This function flushes all buffered data to the client's web browser
and must be called when done with a request before calling accept()
again.
-
Method write
int Public.Web.FCGI.FCGI()->write(string data, mixed ... extras)
- Description
Write a string to the current connection's standard output (someone's web browser).
This function takes the same aruments and works just like predef::write
-
Method werror
int Public.Web.FCGI.FCGI()->werror(string data, mixed ... extras)
- Description
Write a string to the current connection's standard error.
This function takes the same aruments and works just like predef::werror
-
Method read
string Public.Web.FCGI.FCGI()->read(int len)
- Description
Read data from the current connection's input stream.
- Parameter len
The number of bytes to read. If fewer than len bytes are available, read will
return all the available data.
-
Method gets
string Public.Web.FCGI.FCGI()->gets()
- Description
Read a single line (including trailing newline) from the current connection's
input stream.
-
Method flush
int Public.Web.FCGI.FCGI()->flush()
- Description
Flush the output buffer of the current connection manually. The buffer is flushed
automatically when finish or accept are called. Returns 1 on success or 0 on failure.
-
Method eof
int Public.Web.FCGI.FCGI()->eof()
- Description
Returns 1 if the current connection's input stream has been
read until EOF, or 0 if it has not.
-
Method errno
int Public.Web.FCGI.FCGI()->errno()
- Description
Returns the most recent error that has occured on the current connection's
input stream, or 0 if no error has occured.
-
Method clear_errno
void Public.Web.FCGI.FCGI()->clear_errno()
- Description
Clears any error or EOF indications from the current connection's input stream.
-
Method start_filter_data
int Public.Web.FCGI.FCGI()->start_filter_data()
- Description
Sets the current connection's input stream to read from the FCGI_DATA area.
You must read all data from the input stream before calling this function.
Returns 1 on success, or 0 if an error occured.
|
|