WebSocket.send guaranty delivery
guarland opened this issue · 3 comments
guarland commented
Is there any way to guarantee delivery via WebSocket.send, or catch an error when not delivering,
tanner0101 commented
send
accepts a promise: https://github.com/vapor/websocket/blob/master/Sources/WebSocket/WebSocket.swift#L182
That will succeed (or fail) when the channel write is done: https://github.com/vapor/websocket/blob/master/Sources/WebSocket/WebSocket.swift#L290
saroar commented
@tanner0101 both link does not work
grundoon commented
@saroar Many things have changed in master
since those links were posted. At the moment they look to be at:
https://github.com/vapor/websocket-kit/blob/master/Sources/WebSocketKit/WebSocket.swift#L60-L65
https://github.com/vapor/websocket-kit/blob/master/Sources/WebSocketKit/WebSocket.swift#L76