ContextID
A vsock Context Identifier (CID).
struct ContextID
The CID identifies the source or destination, which is either a virtual machine or the host.
A vsock Context Identifier (CID).
struct ContextID
The CID identifies the source or destination, which is either a virtual machine or the host.
import NIOPosix
struct VsockAddress
A vsock socket address.
init(cid: VsockAddress.ContextID, port: VsockAddress.Port)
Creates a new vsock address.
var cid: VsockAddress.ContextID
The context ID associated with the address.
var description: String { get }
var port: VsockAddress.Port
The port associated with the address.
func withSockAddr<T>(_ body: (UnsafePointer<sockaddr>, Int) throws -> T) rethrows -> T
struct Port
A vsock port number.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol ExpressibleByIntegerLiteral
A type that can be initialized with an integer literal.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
A thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(_ value: Int)
init(integerLiteral value: UInt32)
init(rawValue: UInt32)
static var any: VsockAddress.ContextID { get }
Wildcard, matches any address.
static var host: VsockAddress.ContextID { get }
The address of the host.
static var hypervisor: VsockAddress.ContextID { get }
The address of the hypervisor.
static var local: VsockAddress.ContextID { get }
The address for local communication (loopback).
var description: String { get }
var rawValue: UInt32
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)