websocket-kit icon indicating copy to clipboard operation
websocket-kit copied to clipboard

Pass a copy of the control frame buffer to ping/pong callbacks

Open tkrajacic opened this issue 3 years ago • 5 comments

This PR enables access to the data in the control frames handled via onPing/onPong.

⚠️ This is an API change

tkrajacic avatar Jun 07 '22 15:06 tkrajacic

Codecov Report

Merging #116 (7a5cb18) into main (2ec1450) will decrease coverage by 1.08%. The diff coverage is 53.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   83.93%   82.85%   -1.08%     
==========================================
  Files           6        6              
  Lines         641      659      +18     
==========================================
+ Hits          538      546       +8     
- Misses        103      113      +10     
Impacted Files Coverage Δ
...bSocketKit/Concurrency/WebSocket+Concurrency.swift 48.80% <26.66%> (-5.36%) :arrow_down:
Sources/WebSocketKit/WebSocket.swift 89.04% <84.61%> (+0.30%) :arrow_up:

codecov-commenter avatar Jun 07 '22 15:06 codecov-commenter

This is obviously something that's going to have to wait for the next major version of Vapor. Will leave it open

0xTim avatar Jun 08 '22 08:06 0xTim

This is obviously something that's going to have to wait for the next major version of Vapor. Will leave it open

Maybe I can restructure it into an additive change (e.g. have an overload). Would that work then?

tkrajacic avatar Jun 08 '22 08:06 tkrajacic

Yeah if you can make it work that would be great

0xTim avatar Jun 08 '22 09:06 0xTim

@0xTim now the old API is back. no more version bump needed. there is only new API. I am not sure about the deprecation messages, but the renamed: variant doesn't help, since it only takes the method name of the new variant, and those are the same (these are just overloads). I don't think it's possible to make Xcode fix-up the code with the overload automatically.

tkrajacic avatar Jun 10 '22 19:06 tkrajacic

@tkrajacic ok now the Sendable stuff is finally landed we can pull this in. Once you've updated I'll merge it

0xTim avatar May 25 '23 11:05 0xTim

@0xTim I rebased this morning. What do you want updated?

tkrajacic avatar May 25 '23 11:05 tkrajacic

@tkrajacic there was a release 10 mins ago to fix the Sendable issues from yesterday that are causing conflicts in the merge

0xTim avatar May 25 '23 11:05 0xTim

These changes are now available in 2.14.0

VaporBot avatar May 29 '23 10:05 VaporBot