Contents

accept(_:)

Accepts an incoming session request from a client, delegating incoming encodable messages to a separate object.

Declaration

func accept<Handler>(_ inactiveSessionHandler: (XPCSession) -> Handler) -> XPCListener.IncomingSessionRequest.Decision where Handler : XPCPeerHandler, Handler.Input : Decodable, Handler.Output == any Encodable

Parameters

  • inactiveSessionHandler:

    A closure that receives an inactive incoming session and returns an object to handle messages in the session.

Return Value

A decision that indicates whether the listener accepts or rejects the incoming session.

See Also

Responding to client sessions requests