fix CURVE getters

This commit is contained in:
Paulo Faria 2015-10-26 03:05:13 -02:00
parent e26e2a2cde
commit 8bedab1672
1 changed files with 2 additions and 2 deletions

View File

@ -520,14 +520,14 @@ extension Socket {
}
public func getCURVESecretKey() throws -> String {
var value = [Int8](count: 42, repeatedValue: 0)
var value = [Int8](count: 41, repeatedValue: 0)
var length = value.count
try getOption(ZMQ_CURVE_SECRETKEY, value: &value, length: &length)
return String.fromCString(Array(value[0 ..< length]))!
}
public func getCURVEServerKey() throws -> String {
var value = [Int8](count: 42, repeatedValue: 0)
var value = [Int8](count: 41, repeatedValue: 0)
var length = value.count
try getOption(ZMQ_CURVE_SERVERKEY, value: &value, length: &length)
return String.fromCString(Array(value[0 ..< length]))!