Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/NetTCP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import PerfectThread
import SwiftGlibc
let AF_UNSPEC: Int32 = 0
let AF_INET: Int32 = 2
let INADDR_NONE = UInt32(0xffffffff)
let INADDR_CONST: UInt64 = 0xffffffff
let INADDR_NONE = UInt32(truncatingBitPattern: INADDR_CONST)
let EINPROGRESS = Int32(115)
#else
import Darwin
Expand Down
6 changes: 5 additions & 1 deletion Sources/NetTCPSSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ public class NetTCPSSL : NetTCP {
SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_ECDH_AUTO, 1, nil)
#endif
SSL_CTX_ctrl(sslCtx, SSL_CTRL_MODE, SSL_MODE_AUTO_RETRY, nil)
SSL_CTX_ctrl(sslCtx, SSL_CTRL_OPTIONS, SSL_OP_ALL, nil)
#if arch(arm)
SSL_CTX_ctrl(sslCtx, SSL_CTRL_OPTIONS, Int(bitPattern: SSL_OP_ALL), nil)
#else
SSL_CTX_ctrl(sslCtx, SSL_CTRL_OPTIONS, SSL_OP_ALL, nil)
#endif
}

public func errorCode() -> UInt {
Expand Down