C-DEngine 5.105

WebSocketBehavior..::..OriginValidator Property

Gets or sets the delegate called to validate the Origin header included in a connection request to the WebSocket service.

Namespace:  WebSocketSharp.Server
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public Func<string, bool> OriginValidator { get; set; }
Public Property OriginValidator As Func(Of String, Boolean)
	Get
	Set
public:
property Func<String^, bool^>^ OriginValidator {
	Func<String^, bool^>^ get ();
	void set (Func<String^, bool^>^ value);
}

Field Value

A Func<string, bool> delegate that references the method(s) used to validate the origin header. A String passed to this delegate represents the value of the origin header to validate if any.

This delegate should return true if the origin header is valid.

The default value is nullNothingnullptra null reference (Nothing in Visual Basic), and it does nothing to validate.

Remarks


This delegate is called when the WebSocket used in a session validates the connection request.