Class ConnectionClosedEventArgs
- Namespace
- AppleTvControlLibrary.Protocol
- Assembly
- AppleTvControlLibrary.dll
Event data for ConnectionFaulted and ConnectionClosed.
public sealed class ConnectionClosedEventArgs : EventArgs
- Inheritance
-
ConnectionClosedEventArgs
- Inherited Members
Remarks
Mirrors pyatv's DeviceListener.connection_lost(exc) / connection_closed()
distinction (see pyatv/interface.py): a null Exception
means the connection was closed cleanly (the equivalent of pyatv's connection_closed()),
while a non-null value means it was lost unexpectedly (connection_lost(exc)).
Constructors
ConnectionClosedEventArgs(Exception?)
Event data for ConnectionFaulted and ConnectionClosed.
public ConnectionClosedEventArgs(Exception? exception)
Parameters
Remarks
Mirrors pyatv's DeviceListener.connection_lost(exc) / connection_closed()
distinction (see pyatv/interface.py): a null Exception
means the connection was closed cleanly (the equivalent of pyatv's connection_closed()),
while a non-null value means it was lost unexpectedly (connection_lost(exc)).
Properties
Exception
Gets the exception that caused the connection to be lost, or null if the connection was closed cleanly/expectedly (e.g. via Dispose() being an explicit teardown is still reported with an exception; only an intentional, non-faulting close reports null).
public Exception? Exception { get; }