Skip to content

Commit

Permalink
port fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Feb 5, 2016
1 parent 7472327 commit cf17494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Request.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class Request {

/**
POST data is sent in the body of the request
as `key=value` pairs separated by ampersands.
as `key=value` pairs separated by `&`.
- returns: String dictionary of parsed POST data.
*/
Expand Down
3 changes: 2 additions & 1 deletion Sources/Socket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public class Socket: Hashable, Equatable {

private class func htonsPort(port: in_port_t) -> in_port_t {
#if os(Linux)
return htons(port)
let fixedPort = htons(port)
return fixedPort
#else
let isLittleEndian = Int(OSHostByteOrder()) == OSLittleEndian
return isLittleEndian ? _OSSwapInt16(port) : port
Expand Down

0 comments on commit cf17494

Please sign in to comment.