Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.19 KB

ListenerClose.md

File metadata and controls

39 lines (27 loc) · 1.19 KB

ListenerClose function

Closes an existing listener.

Syntax

typedef
_IRQL_requires_max_(PASSIVE_LEVEL)
void
(QUIC_API * QUIC_LISTENER_CLOSE_FN)(
    _In_ _Pre_defensive_ __drv_freesMem(Mem)
        HQUIC Listener
    );

Parameters

Listener

A valid handle to an open listener object.

Remarks

ListenerClose frees all allocated resources associated with the listener handle. If a listener has not had ListenerStop called on it at the time ListenerClose is called, ListenerStop is invoked internally.

A call to ListenerClose is blocking: a server application MUST NOT call ListenerClose within any callback, unless it received the QUIC_LISTENER_EVENT_STOP_COMPLETE event, previously or as the current event. Calling ListenerClose in a callback before the QUIC_LISTENER_EVENT_STOP_COMPLETE event may cause a deadlock.

ListenerClose is equivalent to free and MUST be the final call on a listener handle. Any API calls using a listener handle after ListenerClose has been called is a use-after-free error!

See Also

ListenerOpen
ListenerStart
ListenerStop