CCookie::setDiscard

The CCookie::setDiscard function sets the Discard attribute of the cookie.

int setDiscard(
bool discard // containing the value of the Discard attribute
);



Return Type

int
Upon successful completion, zero is returned. Otherwise, a value of non-zero is returned.


Parameters

discard
A boolean value that contains the value of the Discard attribute of the cookie.


Remarks

This function sets the Discard attribute of the cookie. The Discard attribute instructs the user agent to discard the cookie unconditionally when the user agent terminates.

The CCookie::getDiscard function can be used to retrieve the Discard attribute of the cookie.


See Also

CCookie, CCookie::getDiscard, CResponse::addCookie, CRequest::getCookies, CRequest::getCookie

Example