connect(url:configuration:tlsConfiguration:eventLoopGroup:logger:handler:)
Create websocket client, connect and handle connection
@discardableResult static func connect(url: String, configuration: WebSocketClientConfiguration = .init(), tlsConfiguration: TLSConfiguration? = nil, eventLoopGroup: EventLoopGroup = MultiThreadedEventLoopGroup.singleton, logger: Logger, handler: @escaping WebSocketDataHandler<Context>) async throws -> WebSocketCloseFrame?
Returns
WebSocket close frame details if server returned any
Parametes:
url: URL of websocket
tlsConfiguration: TLS configuration
maxFrameSize: Max frame size for a single packet
eventLoopGroup: EventLoopGroup to run WebSocket client on
logger: Logger
process: Closure handling webSocket