/// <summary>Constructor specifying the destination web socket location</summary> /// <param name="webSocketUrl">URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web /// socket frames will be sent to this URL.</param> /// <param name="subprotocols">CSV of supported protocols</param> /// <param name="allowExtensions">Allow extensions to be used in the reserved bits of the web socket frame</param> /// <param name="maxFramePayloadLength">Maximum allowable frame payload length. Setting this value to your application's /// requirement may reduce denial of service attacks using long data frames.</param> /// <param name="allowMaskMismatch">When set to true, frames which are not masked properly according to the standard will still be /// accepted.</param> public WebSocketServerHandshaker13(string webSocketUrl, string subprotocols, bool allowExtensions, int maxFramePayloadLength, bool allowMaskMismatch) : this(webSocketUrl, subprotocols, WebSocketDecoderConfig.NewBuilder() .AllowExtensions(allowExtensions) .MaxFramePayloadLength(maxFramePayloadLength) .AllowMaskMismatch(allowMaskMismatch) .Build()) { }
public WebSocket08FrameDecoder(bool expectMaskedFrames, bool allowExtensions, int maxFramePayloadLength, bool allowMaskMismatch) : this(WebSocketDecoderConfig.NewBuilder() .ExpectMaskedFrames(expectMaskedFrames) .AllowExtensions(allowExtensions) .MaxFramePayloadLength(maxFramePayloadLength) .AllowMaskMismatch(allowMaskMismatch) .Build()) { }
public WebSocketServerProtocolHandler(string websocketPath, string subprotocols, bool allowExtensions, int maxFrameSize, bool allowMaskMismatch, bool checkStartsWith, bool dropPongFrames, long handshakeTimeoutMillis, bool enableUtf8Validator = true) : this(websocketPath, subprotocols, checkStartsWith, dropPongFrames, handshakeTimeoutMillis, WebSocketDecoderConfig.NewBuilder() .MaxFramePayloadLength(maxFrameSize) .AllowMaskMismatch(allowMaskMismatch) .AllowExtensions(allowExtensions) .WithUTF8Validator(enableUtf8Validator) .Build()) { }
/// <summary> /// Constructor specifying the destination web socket location /// </summary> /// <param name="webSocketUrl">URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be /// sent to this URL.</param> /// <param name="subprotocols">CSV of supported protocols</param> /// <param name="maxFramePayloadLength">Maximum allowable frame payload length. Setting this value to your application's requirement may /// reduce denial of service attacks using long data frames.</param> public WebSocketServerHandshaker00(string webSocketUrl, string subprotocols, int maxFramePayloadLength) : base(WebSocketVersion.V00, webSocketUrl, subprotocols, WebSocketDecoderConfig.NewBuilder().MaxFramePayloadLength(maxFramePayloadLength).Build()) { }
/// <summary> /// Constructor specifying the destination web socket location /// </summary> /// <param name="version">the protocol version</param> /// <param name="uri">URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be /// sent to this URL.</param> /// <param name="subprotocols">CSV of supported protocols. Null if sub protocols not supported.</param> /// <param name="maxFramePayloadLength">Maximum length of a frame's payload</param> protected WebSocketServerHandshaker(WebSocketVersion version, string uri, string subprotocols, int maxFramePayloadLength) : this(version, uri, subprotocols, WebSocketDecoderConfig.NewBuilder().MaxFramePayloadLength(maxFramePayloadLength).Build()) { }