One Logo Pool Ball
Foundation · IOS API REFERENCE

FileHandle.ConnectionAcceptedMessage

struct · iOS 26.0+ · SDK 27.1

struct ConnectionAcceptedMessage

A message a file handle sends when it creates a socket connection between two processes and creates a file handle for one end of the connection. Before adding an observer for this message type, call either ``FileHandle/acceptConnectionInBackgroundAndNotify()`` or ``FileHandle/acceptConnectionInBackgroundAndNotify(forModes:)`` on a ``FileHandle`` object that represents a server stream-type socket. Observe this message with the identifier ``NotificationCenter/MessageIdentifier/connectionAccepted``, or specify its type directly to the `addObserver(of:for:using:)` method. The ``NotificationCenter/MainActorMessage/Subject`` of this message type is ``FileHandle``. This message interoperates with the notification ``NSNotification/Name/NSFileHandleConnectionAccepted``. The system notifies observers of the message when the ``NotificationCenter`` posts the notification. Similarly, the system notifies observers of the notification when it posts the message.

Members (6)

init · iOS 26.0+

init

TypeScript
static init(fileHandleItem: SDKHandle): FileHandle_ConnectionAcceptedMessage
Swift declaration
init(fileHandleItem: Result<FileHandle, POSIXError>)

Creates a message for a file handle connection acceptance. - Parameter fileHandleItem: A result instance containing either the file handle representing the "near" end of a socket connection, or an error.

get · iOS 26.0+

fileHandleItem

TypeScript
get fileHandleItem(): SDKHandle
Swift declaration
var fileHandleItem: Result<FileHandle, POSIXError>

A result instance that contains either the file handle representing the "near" end of a socket connection, or an error.

set · iOS 26.0+

fileHandleItem

TypeScript
set fileHandleItem(value: SDKHandle)
Swift declaration
var fileHandleItem: Result<FileHandle, POSIXError>

A result instance that contains either the file handle representing the "near" end of a socket connection, or an error.

static · iOS 26.0+

makeMessage

TypeScript
static makeMessage(notification: Notification): (FileHandle_ConnectionAcceptedMessage) | null
Swift declaration
static func makeMessage(_ notification: Notification) -> FileHandle.ConnectionAcceptedMessage?

Converts a posted notification into this asynchronous message type for any observers. To implement this method in your own `AsyncMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message. - Parameter notification: The posted ``Notification``. - Returns: The converted `AsyncMessage`, or `nil` if conversion is not possible.

static · iOS 26.0+

makeNotification

TypeScript
static makeNotification(message: FileHandle_ConnectionAcceptedMessage): Notification
Swift declaration
static func makeNotification(_ message: FileHandle.ConnectionAcceptedMessage) -> Notification

Converts a posted asynchronous message into a notification for any observers. To implement this method in your own `AsyncMessage` conformance, use the properties defined by the message to populate the ``Notification``'s ``Notification/userInfo``. - Parameters: - message: The posted `AsyncMessage`. - Returns: The converted ``Notification``.

get · iOS 26.0+

name

TypeScript
static get nameValue(): NSNotification_Name
Swift declaration
static var name: Notification.Name { get }

A optional name corresponding to this type, used to interoperate with notification posters and observers.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →