Instance Propertyswift-nio 2.72.0NIOWebSocket
requiredUpgradeHeaders
We deliberately do not actually set any required headers here, because the websocket spec annoyingly does not actually force the client to send these in the Upgrade header, which NIO requires. We check for these manually.
NIOWebSocketServerUpgrader.swift:209let requiredUpgradeHeaders: [String]
Other members in extension
Type members
init(maxFrameSize: Int, enableAutomaticErrorHandling: Bool, shouldUpgrade: @escaping (Channel, HTTPRequestHead) -> EventLoopFuture<HTTPHeaders?>, upgradePipelineHandler: @escaping (Channel, HTTPRequestHead) -> EventLoopFuture<UpgradeResult>
) Create a new
NIOTypedWebSocketServerUpgrader
.
Instance members
let supportedProtocol: String
RFC 6455 specs this as the required entry in the Upgrade header.
func buildUpgradeResponse(channel: Channel, upgradeRequest: HTTPRequestHead, initialResponseHeaders: HTTPHeaders
) -> EventLoopFuture<HTTPHeaders> func upgrade(channel: Channel, upgradeRequest: HTTPRequestHead
) -> EventLoopFuture<UpgradeResult>