vapor / websocket-kit

WebSocket client library built on SwiftNIO

Home Page:https://docs.vapor.codes/4.0/advanced/websockets/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for compression

bridger opened this issue · comments

I'm curious if compression support has been considered in this package. I'd be interested in using it in my server-side app.

Kitura developed this package for websocket compression which is also using NIO's websockets. Maybe it could be adapted to work with Vapor? https://github.com/IBM-Swift/Kitura-WebSocket-Compression

It looks like the only dependency that package has is SwiftNIO, so it would be possible to use that if WebSocketKit exposed some way to add additional handlers.

I wonder if this is something SwiftNIO would consider adopting. That would make it really easy for WebSocketKit to allow configuring compression like we do for HTTP: https://github.com/vapor/vapor/blob/master/Sources/Vapor/Server/HTTPServer.swift#L42

Yeah, I wasn’t sure if this is better at the NIO level or the library level that uses NIO. I’ll make another issue to ask there.

Sent with GitHawk