FileDescriptor
FileDescriptor.swift:15protocol FileDescriptor
Browse conforming typesprotocol FileDescriptor
import NIOCore
The core abstractions that make up SwiftNIO.
var isOpen: Bool { get }
true
if this FileDescriptor
is open (which means it was not closed yet).
func close() throws
Close this FileDescriptor
.
func withUnsafeFileDescriptor<T>(_ body: (CInt) throws -> T) throws -> T
Will be called with the file descriptor if still open, if not it will throw an IOError
.
struct ByteBuffer
ByteBuffer
stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
struct ByteBufferView
A view into a portion of a ByteBuffer
.
struct ByteBufferAllocator
The preferred allocator for ByteBuffer
values. The allocation strategy is opaque but is currently libc’s malloc
, realloc
and free
.
enum Endianness
Endianness refers to the sequential order in which bytes are arranged into larger numerical values when stored in memory or when transmitted over digital links.
final class NIOFileHandle
Deprecated. NIOFileHandle
is a handle to an open file descriptor.
struct FileRegion
A FileRegion
represent a readable portion usually created to be sent over the network.
typealias NIOPOSIXFileMode = mode_t
enum IOData
IOData
unifies standard SwiftNIO types that are raw bytes of data; currently ByteBuffer
and FileRegion
.