disconnectHandler
The block to be executed when the port disconnects.
Declaration
var disconnectHandler: (((any Error)?) -> Void)? { get set }Discussion
An optional block to be invoked when the port disconnects, taking an optional error that indicates if the disconnection was caused by an error.