MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


neon API reference                            NESETUSERAGENT(3)



NAME
     nesetuseragent,    nesetpersist,    nesetreadtimeout,
     negetscheme,  negetserverhostport  -  common properties
     for HTP sessions

SYNOPSIS
     #include 


     void nesetuseragent (nesession *session,
                            const char *product);

     void nesetpersist (nesession *session, int flag);

     void nesetreadtimeout (nesession *session, int timeout);

     const char *negetscheme (nesesssion *session);

     const char *negetserverhostport (nesesssion *session);


DESCRIPTION
     The User-Agent  request  header  is  used  to  identify  the
     software  which generated the request for statistical or de-
     bugging purposes. neon does not send a User-Agent header un-
     less    a    call   is   made   to   the   nesetuseragent.
     nesetuseragent must be passed a product string  conforming
     to   RFC2616's   product   token   grammar;   of   the  form
     "Product/Version".


     By default neon will use a  persistent  connection  whenever
     possible.  For  specific applications, or for debugging pur-
     poses, it is sometimes useful to disable persistent  connec-
     tions.  The  nesetpersist function will disable persistent
     connections if passed a flag parameter of 0, and will enable
     them otherwise.


     When neon reads from a socket, by default the read operation
     will  time  out  after 60 seconds, and the request will fail
     giving an NETIMEOUT error. To configure this timeout inter-
     val,  call  nesetreadtimeout giving the desired number of
     seconds as the timeout parameter.


     The scheme used to initially create the session will be  re-
     turned by negetscheme.


     The hostport pair with which the session is associated  will
     be  returned  by  the  negetserverhostport;  for  example



neon 0.25.5       Last change: 20 January 2006                  1






neon API reference                            NESETUSERAGENT(3)



     www.example.com:8080. Note that the :port will be omitted if
     the default port for the scheme is used.


EXAMPLES
     Set a user-agent string:

     nesession *sess = nesessioncreate(...);
     nesetuseragent(sess, "MyApplication/2.1");


     Disable use of persistent connections:

     nesession *sess = nesessioncreate(...);
     nesetpersist(sess, 0);


     Set a 30 second read timeout:

     nesession *sess = nesessioncreate(...);
     nesetreadtimeout(sess, 30);


AUTHOR
     Joe Orton .

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     box; cbp-1  cbp-1 l  l .  ATRIBUTE TYPE ATRIBUTE VALUE =
     Availability   SUNWneon = Interface Stability Volatile

NOTES
     Source for Neon is available on http:/opensolaris.org.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWneon       
    
     Interface Stability  Volatile       
    

NOTES
     Source for Neon is available on http:/opensolaris.org.





neon 0.25.5       Last change: 20 January 2006                  2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™