private static WebSocketServerProtocolConfig CheckNotNull(WebSocketServerProtocolConfig serverConfig) { if (serverConfig is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.serverConfig); } return(serverConfig); }
internal WebSocketServerProtocolHandshakeHandler(WebSocketServerProtocolConfig serverConfig) { if (serverConfig is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.serverConfig); } _serverConfig = serverConfig; }
public WebSocketServerProtocolHandler(string websocketPath, string subprotocols, bool checkStartsWith, bool dropPongFrames, long handshakeTimeoutMillis, WebSocketDecoderConfig decoderConfig) : this(WebSocketServerProtocolConfig.NewBuilder() .WebsocketPath(websocketPath) .Subprotocols(subprotocols) .CheckStartsWith(checkStartsWith) .HandshakeTimeoutMillis(handshakeTimeoutMillis) .DropPongFrames(dropPongFrames) .DecoderConfig(decoderConfig) .Build()) { }
internal Builder(WebSocketServerProtocolConfig serverConfig) { if (serverConfig is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.serverConfig); } _websocketPath = serverConfig.WebsocketPath; _subprotocols = serverConfig.Subprotocols; _checkStartsWith = serverConfig.CheckStartsWith; _handshakeTimeoutMillis = serverConfig.HandshakeTimeoutMillis; _forceCloseTimeoutMillis = serverConfig.ForceCloseTimeoutMillis; _handleCloseFrames = serverConfig.HandleCloseFrames; _sendCloseFrame = serverConfig.SendCloseFrame; _dropPongFrames = serverConfig.DropPongFrames; _decoderConfig = serverConfig.DecoderConfig; }
public WebSocketServerProtocolHandler(WebSocketServerProtocolConfig serverConfig) : base(CheckNotNull(serverConfig).DropPongFrames, serverConfig.SendCloseFrame, serverConfig.ForceCloseTimeoutMillis) { _serverConfig = serverConfig; }