Minor changes

This commit is contained in:
Thiago Holanda 2020-05-22 21:58:06 +02:00
parent aee6c3a237
commit b7d550ee5c
No known key found for this signature in database
GPG Key ID: F94B6756E6B6D57A
3 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
4.0.3
5.2.4

View File

@ -1,5 +1,4 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.2
import PackageDescription

View File

@ -109,8 +109,9 @@ public final class Socket {
return true
}
public func send(_ data: Data, mode: SendMode = []) throws -> Bool {
var data = data
return try data.withUnsafeMutableBytes { bytes in
var newData = data
return try newData.withUnsafeMutableBytes { bytes in
return try self.send(bytes, length: data.count, mode: mode)
}
}