My Project
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
WebSocketSharp.Net.Cookie Class Reference

Provides a set of methods and properties used to manage an HTTP cookie. More...

Public Member Functions

 Cookie (string name, string value)
 Initializes a new instance of the Cookie class with the specified name and value.
 
 Cookie (string name, string value, string path)
 Initializes a new instance of the Cookie class with the specified name, value, and path.
 
 Cookie (string name, string value, string path, string domain)
 Initializes a new instance of the Cookie class with the specified name, value, path, and domain.
 

Properties

string Comment [get, set]
 Gets the value of the Comment attribute of the cookie.
 
Uri CommentUri [get, set]
 Gets the value of the CommentURL attribute of the cookie.
 
bool Discard [get, set]
 Gets a value indicating whether the client discards the cookie unconditionally when the client terminates.
 
string Domain [get, set]
 Gets or sets the value of the Domain attribute of the cookie.
 
bool Expired [get, set]
 Gets or sets a value indicating whether the cookie has expired.
 
DateTime Expires [get, set]
 Gets or sets the value of the Expires attribute of the cookie.
 
bool HttpOnly [get, set]
 Gets or sets a value indicating whether non-HTTP APIs can access the cookie.
 
string Name [get, set]
 Gets or sets the name of the cookie.
 
string Path [get, set]
 Gets or sets the value of the Path attribute of the cookie.
 
string Port [get, set]
 Gets the value of the Port attribute of the cookie.
 
bool Secure [get, set]
 Gets or sets a value indicating whether the security level of the cookie is secure.
 
DateTime TimeStamp [get]
 Gets the time when the cookie was issued.
 

Detailed Description

Provides a set of methods and properties used to manage an HTTP cookie.

This class refers to the following specifications:

RFC 2109

RFC 2965

RFC 6265

This class cannot be inherited.

Constructor & Destructor Documentation

◆ Cookie() [1/3]

WebSocketSharp.Net.Cookie.Cookie ( string  name,
string  value 
)
inline

Initializes a new instance of the Cookie class with the specified name and value.

Parameters
nameA string that specifies the name of the cookie. The name must be a token defined in RFC 2616.
valueA string that specifies the value of the cookie.
Exceptions
ArgumentNullExceptionname is null.
ArgumentExceptionname is an empty string.
  • or -
name starts with a dollar sign.
  • or -
name contains an invalid character.
  • or -
value is a string not enclosed in double quotes that contains an invalid character.

◆ Cookie() [2/3]

WebSocketSharp.Net.Cookie.Cookie ( string  name,
string  value,
string  path 
)
inline

Initializes a new instance of the Cookie class with the specified name, value, and path.

Parameters
nameA string that specifies the name of the cookie. The name must be a token defined in RFC 2616.
valueA string that specifies the value of the cookie.
pathA string that specifies the value of the Path attribute of the cookie.
Exceptions
ArgumentNullExceptionname is null.
ArgumentExceptionname is an empty string.
  • or -
name starts with a dollar sign.
  • or -
name contains an invalid character.
  • or -
value is a string not enclosed in double quotes that contains an invalid character.

◆ Cookie() [3/3]

WebSocketSharp.Net.Cookie.Cookie ( string  name,
string  value,
string  path,
string  domain 
)
inline

Initializes a new instance of the Cookie class with the specified name, value, path, and domain.

Parameters
nameA string that specifies the name of the cookie. The name must be a token defined in RFC 2616.
valueA string that specifies the value of the cookie.
pathA string that specifies the value of the Path attribute of the cookie.
domainA string that specifies the value of the Domain attribute of the cookie.
Exceptions
ArgumentNullExceptionname is null.
ArgumentExceptionname is an empty string.
  • or -
name starts with a dollar sign.
  • or -
name contains an invalid character.
  • or -
value is a string not enclosed in double quotes that contains an invalid character.

Property Documentation

◆ Comment

string WebSocketSharp.Net.Cookie.Comment
getset

Gets the value of the Comment attribute of the cookie.

A string that represents the comment to document intended use of the cookie.

null if not present.

The default value is null.

◆ CommentUri

Uri WebSocketSharp.Net.Cookie.CommentUri
getset

Gets the value of the CommentURL attribute of the cookie.

A Uri that represents the URI that provides the comment to document intended use of the cookie.

null if not present.

The default value is null.

◆ Discard

bool WebSocketSharp.Net.Cookie.Discard
getset

Gets a value indicating whether the client discards the cookie unconditionally when the client terminates.

true if the client discards the cookie unconditionally when the client terminates; otherwise, false.

The default value is false.

◆ Domain

string WebSocketSharp.Net.Cookie.Domain
getset

Gets or sets the value of the Domain attribute of the cookie.

A string that represents the domain name that the cookie is valid for.

An empty string if this attribute is not needed.

◆ Expired

bool WebSocketSharp.Net.Cookie.Expired
getset

Gets or sets a value indicating whether the cookie has expired.

true if the cookie has expired; otherwise, false.

The default value is false.

◆ Expires

DateTime WebSocketSharp.Net.Cookie.Expires
getset

Gets or sets the value of the Expires attribute of the cookie.

A DateTime that represents the date and time that the cookie expires on.

DateTime.MinValue if this attribute is not needed.

The default value is DateTime.MinValue.

◆ HttpOnly

bool WebSocketSharp.Net.Cookie.HttpOnly
getset

Gets or sets a value indicating whether non-HTTP APIs can access the cookie.

true if non-HTTP APIs cannot access the cookie; otherwise, false.

The default value is false.

◆ Name

string WebSocketSharp.Net.Cookie.Name
getset

Gets or sets the name of the cookie.

A string that represents the name of the cookie.

The name must be a token defined in RFC 2616

.

Exceptions
ArgumentNullExceptionThe value specified for a set operation is null.
ArgumentExceptionThe value specified for a set operation is an empty string.
  • or -
The value specified for a set operation starts with a dollar sign.
  • or -
The value specified for a set operation contains an invalid character.

◆ Path

string WebSocketSharp.Net.Cookie.Path
getset

Gets or sets the value of the Path attribute of the cookie.

A string that represents the subset of URI on the origin server that the cookie applies to.

◆ Port

string WebSocketSharp.Net.Cookie.Port
getset

Gets the value of the Port attribute of the cookie.

A string that represents the list of TCP ports that the cookie applies to.

null if not present.

The default value is null.

◆ Secure

bool WebSocketSharp.Net.Cookie.Secure
getset

Gets or sets a value indicating whether the security level of the cookie is secure.

When this property is true, the cookie may be included in the request only if the request is transmitted over HTTPS.

true if the security level of the cookie is secure; otherwise, false.

The default value is false.

◆ TimeStamp

DateTime WebSocketSharp.Net.Cookie.TimeStamp
get

Gets the time when the cookie was issued.

A DateTime that represents the time when the cookie was issued.


The documentation for this class was generated from the following file: