File tree Expand file tree Collapse file tree
Sources/GraphQLTransportWS Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,20 +45,6 @@ public actor Client<InitPayload: Equatable & Codable> {
4545 }
4646 }
4747
48- /// Listen and react to the provided async sequence of server messages. This function will block until the stream is completed.
49- /// - Parameter incoming: The server message sequence that the client should react to.
50- @available ( * , deprecated, message: " Use `Data` sequence instead. " )
51- public func listen< A: AsyncSequence & Sendable > ( to incoming: A ) async throws
52- where A. Element == String {
53- for try await stringMessage in incoming {
54- guard let message = stringMessage. data ( using: . utf8) else {
55- try await self . error ( . invalidEncoding( ) )
56- return
57- }
58- try await respond ( to: message)
59- }
60- }
61-
6248 private func respond( to message: Data ) async throws {
6349 let response : Response
6450 do {
Original file line number Diff line number Diff line change 6565 }
6666 }
6767
68- /// Listen and react to the provided async sequence of client messages. This function will block until the stream is completed.
69- /// - Parameter incoming: The client message sequence that the server should react to.
70- @available ( * , deprecated, message: " Use `Data` sequence instead. " )
71- public func listen< A: AsyncSequence & Sendable > ( to incoming: A ) async throws
72- where A. Element == String {
73- for try await stringMessage in incoming {
74- guard let message = stringMessage. data ( using: . utf8) else {
75- try await error ( . invalidEncoding( ) )
76- return
77- }
78-
79- try await respond ( to: message)
80- }
81- }
82-
8368 private func respond( to message: Data ) async throws {
8469 let request : Request
8570 do {
You can’t perform that action at this time.
0 commit comments