Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ns_conngetstatus(3aolserv) [debian man page]

Ns_ConnStatus(3aolserver)				   AOLserver Library Procedures 				 Ns_ConnStatus(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_ConnGetStatus, Ns_ConnSetStatus - Routines to manage the HTTP response status SYNOPSIS
#include "ns.h" int Ns_ConnGetStatus(conn) void Ns_ConnSetStatus(conn, status) ARGUMENTS
Ns_Conn conn (in) Pointer to open connection. int status (in) Integer HTTP status code. _________________________________________________________________ DESCRIPTION
These routines manage the HTTP response code sent to the client in a later call to Ns_ConnFlush or Ns_ConnFlushDirect. Higher level rou- tines such as the Ns_ConnReturn functions normally call these routines automatically using standard HTTP status codes and the Ns_ConnQueue- Headers routine can be used to set the status code for lower level code which bypasses Ns_ConnFlush. int Ns_ConnGetStatus(conn) Return the current HTTP status to be sent. int Ns_ConnSetStatus(conn, status) Set the status code to be sent in the response, for example, 200 for a normal "OK" response. A later call to Ns_ConnFlush will con- struct the appropriate HTTP response including the given status with the cooresponding string status code. EXAMPLES
The following example demonstrates setting an odd status code followed by a call to Ns_ConnFlushDirect to send some data: Ns_ConnSetStatus(conn, 600); Ns_ConnSetType(conn, "text/plain"); Ns_ConnFlushDirect(conn, "hello", 5, 0); The following should provide similar results: Ns_ConnSetRequiredHeaders(conn, "text/plain", 5); Ns_ConnQueueHeaders(conn, 600); Ns_ConnPuts(conn, "hello"); Ns_ConnClose(conn); SEE ALSO
Ns_ConnGetType(3), Ns_ConnSetType(3), Ns_ConnFlush(3), Ns_ConnFlushDirect(3), Ns_ConnSetRequiredHeaders(3), Ns_ConnQueueHeaders(3), ns_conn(n) KEYWORDS
connectionn, response, status AOLserver 4.0 Ns_ConnStatus(3aolserver)

Check Out this Related Man Page

Ns_ConnStatus(3aolserver)				   AOLserver Library Procedures 				 Ns_ConnStatus(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_ConnGetStatus, Ns_ConnSetStatus - Routines to manage the HTTP response status SYNOPSIS
#include "ns.h" int Ns_ConnGetStatus(conn) void Ns_ConnSetStatus(conn, status) ARGUMENTS
Ns_Conn conn (in) Pointer to open connection. int status (in) Integer HTTP status code. _________________________________________________________________ DESCRIPTION
These routines manage the HTTP response code sent to the client in a later call to Ns_ConnFlush or Ns_ConnFlushDirect. Higher level rou- tines such as the Ns_ConnReturn functions normally call these routines automatically using standard HTTP status codes and the Ns_ConnQueue- Headers routine can be used to set the status code for lower level code which bypasses Ns_ConnFlush. int Ns_ConnGetStatus(conn) Return the current HTTP status to be sent. int Ns_ConnSetStatus(conn, status) Set the status code to be sent in the response, for example, 200 for a normal "OK" response. A later call to Ns_ConnFlush will con- struct the appropriate HTTP response including the given status with the cooresponding string status code. EXAMPLES
The following example demonstrates setting an odd status code followed by a call to Ns_ConnFlushDirect to send some data: Ns_ConnSetStatus(conn, 600); Ns_ConnSetType(conn, "text/plain"); Ns_ConnFlushDirect(conn, "hello", 5, 0); The following should provide similar results: Ns_ConnSetRequiredHeaders(conn, "text/plain", 5); Ns_ConnQueueHeaders(conn, 600); Ns_ConnPuts(conn, "hello"); Ns_ConnClose(conn); SEE ALSO
Ns_ConnGetType(3), Ns_ConnSetType(3), Ns_ConnFlush(3), Ns_ConnFlushDirect(3), Ns_ConnSetRequiredHeaders(3), Ns_ConnQueueHeaders(3), ns_conn(n) KEYWORDS
connectionn, response, status AOLserver 4.0 Ns_ConnStatus(3aolserver)
Man Page