Member Functions of CCookie Class

Member functions of CCookie class set or get the name and value of a cookie, as well as optional attributes.

The Ch cookie class supports both Version 0 (by Netscape) and Version 1 (by RFC 2965 which obsoletes RFC 2109). By default, Ch cookies uses version 0. Since RFC 2965 is released on October 2000, most browsers might not support RFC 2965. Thus, Version 1 is experimental and you are encouraged to use Version 0 features.

Function Description
CCookie::addPort Adds a new port into the portlist of the cookie. For version 1 only
CCookie::getComment Retrieve the Comment attribute of the cookie. For version 1 only
CCookie::getCommentURL Retrieve the CommentURL attribute of the cookie. For version 1 only
CCookie::getDiscard Retrieve the Discard attribute of the cookie. For version 1 only
CCookie::getDomain Retrieve the Domain attribute of the cookie.
CCookie::getMaxAge Retrieve maximum age of the cookie.
CCookie::getName Retrieve the name of the cookie.
CCookie::getPath Retrieve the path on the server to which browser returns the cookie.
CCookie::getPorts Retrieve all ports in the portlist of the cookie. For version 1 only
CCookie::getSecure determine if the browser is sending the cookie only over a secure protocol.
CCookie::getValue Retrieve the value of the cookie.
CCookie::getVersion Retrieve the version of the protocol the cookie complies with.
CCookie::setComment Set the Comment attribute of the cookie. For version 1 only
CCookie::setCommentURL Set the CommentURL attribute of the cookie. For version 1 only
CCookie::setDiscard Set the Discard attribute of the cookie. For version 1 only
CCookie::setDomain Set the Domain attribute of the cookie.
CCookie::setMaxAge Set maximum age of the cookie.
CCookie::setName Set the name of the cookie.
CCookie::setPath Set the path on the server to which browser returns the cookie.
CCookie::setSecure Set the Secure attribute of the cookie.
CCookie::setValue Set the value of the cookie.
CCookie::setVersion Set the version of the protocol the cookie complies with.


Also see

Index, CResponse, CRequest, CServer