Click or drag to resize

WebSocketSetCredentials Method

Sets the credentials for the HTTP authentication (Basic/Digest).

Namespace:  Sfs2X.WebSocketSharp
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public void SetCredentials(
	string username,
	string password,
	bool preAuth
)

Parameters

username
Type: SystemString

A String that represents the username associated with the credentials.

or an empty string if initializes the credentials.

password
Type: SystemString

A String that represents the password for the username associated with the credentials.

or an empty string if not necessary.

preAuth
Type: SystemBoolean
true if sends the credentials for the Basic authentication in advance with the first handshake request; otherwise, false.
Exceptions
ExceptionCondition
InvalidOperationException This instance is not a client.
ArgumentException

username contains an invalid character.

-or-

password contains an invalid character.

Remarks
This method does nothing if the connection has already been established or it is closing.
See Also