Share via


GattSession.MaxPduSizeChanged Event

Definition

An event that is raised when the maximum protocol data unit (PDU) size changes. The PDU is also known as the maximum transmission unit (MTU).

MaxPduSizeChanged is raised whenever the negotiated MTU for the Attribute Protocol (ATT) is changed. And that can be changed or negotiated by a remote Bluetooth peripheral. As a developer, you can't change the value used by Windows itself, since that's fully managed by the operating system.

Also see the GattSession.MaxPduSize property which, as mentioned, is read-only.

// Register
event_token MaxPduSizeChanged(TypedEventHandler<GattSession, IInspectable const&> const& handler) const;

// Revoke with event_token
void MaxPduSizeChanged(event_token const* cookie) const;

// Revoke with event_revoker
GattSession::MaxPduSizeChanged_revoker MaxPduSizeChanged(auto_revoke_t, TypedEventHandler<GattSession, IInspectable const&> const& handler) const;
public event TypedEventHandler<GattSession,object> MaxPduSizeChanged;
function onMaxPduSizeChanged(eventArgs) { /* Your code */ }
gattSession.addEventListener("maxpdusizechanged", onMaxPduSizeChanged);
gattSession.removeEventListener("maxpdusizechanged", onMaxPduSizeChanged);
- or -
gattSession.onmaxpdusizechanged = onMaxPduSizeChanged;
Public Custom Event MaxPduSizeChanged As TypedEventHandler(Of GattSession, Object) 

Event Type

Windows requirements

App capabilities
bluetooth

Remarks

Important

See the Remarks in the GattSession.MaxPduSize property topic.

Applies to