More linux stuff

This commit is contained in:
Erik Little 2017-09-17 10:42:41 -04:00
parent 4eccf87ecc
commit 26af5a6296
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
2 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,8 @@ extension SocketEngineWebsocket {
let socket = try TCPInternetSocket(scheme: url.scheme ?? "http", let socket = try TCPInternetSocket(scheme: url.scheme ?? "http",
hostname: url.host ?? "localhost", hostname: url.host ?? "localhost",
port: Port(url.port ?? 80)) port: Port(url.port ?? 80))
let stream = secure ? try TLS.InternetSocket(socket, TLS.Context(.client)) : socket let stream: ClientStream = secure ? try TLS.InternetSocket(socket, TLS.Context(.client)) : socket
try WebSocket.background(to: connectURL, using: stream) {[weak self] ws in try WebSocket.background(to: url, using: stream) {[weak self] ws in
guard let this = self else { return } guard let this = self else { return }
this.ws = ws this.ws = ws

View File

@ -22,6 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
import Dispatch
import Foundation import Foundation
#if !os(Linux) #if !os(Linux)
import StarscreamSocketIO import StarscreamSocketIO