tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 246 forks source link

Swift/3.0 #129

Open xareelee opened 6 years ago

xareelee commented 6 years ago

This fix is for swift 3.

Add the keyword required to designated initializers for protocol extension.

I found that @danthorpe forked this repo to add protocols to the class WebSocket, and the protocol could be extracted out of this repo.

https://github.com/danthorpe/SwiftWebSocket/blob/SWS-9_websockettype_protocol/Source/WebSocket.swift#L1677

To make a generic type instantiatable, we need to make the designated initializers marked with the keyword required.