mirror of
https://github.com/apple/swift-system
synced 2026-11-24 04:38:14 +00:00
Add socket APIs to swift-system (#281) Port the long-standing sockets implementation from #30 to the new staging branch. This adds comprehensive low-level Swift APIs for POSIX socket programming.
23 lines
535 B
Swift
23 lines
535 B
Swift
/*
|
|
This source file is part of the Swift System open source project
|
|
|
|
Copyright (c) 2021 - 2025 Apple Inc. and the Swift System project authors
|
|
Licensed under Apache License v2.0 with Runtime Library Exception
|
|
|
|
See https://swift.org/LICENSE.txt for license information
|
|
*/
|
|
|
|
extension FixedWidthInteger {
|
|
@_alwaysEmitIntoClient
|
|
@inline(__always)
|
|
internal var _networkOrder: Self {
|
|
bigEndian
|
|
}
|
|
|
|
@_alwaysEmitIntoClient
|
|
@inline(__always)
|
|
internal init(_networkOrder value: Self) {
|
|
self.init(bigEndian: value)
|
|
}
|
|
}
|