|
@@ -198,8 +198,7 @@ public class Socket: Hashable, Equatable {
|
|
|
|
|
|
|
|
private class func htonsPort(port: in_port_t) -> in_port_t {
|
|
private class func htonsPort(port: in_port_t) -> in_port_t {
|
|
|
#if os(Linux)
|
|
#if os(Linux)
|
|
|
- return port
|
|
|
|
|
- //return htons(port)
|
|
|
|
|
|
|
+ return htons(port)
|
|
|
#else
|
|
#else
|
|
|
let isLittleEndian = Int(OSHostByteOrder()) == OSLittleEndian
|
|
let isLittleEndian = Int(OSHostByteOrder()) == OSLittleEndian
|
|
|
return isLittleEndian ? _OSSwapInt16(port) : port
|
|
return isLittleEndian ? _OSSwapInt16(port) : port
|