freerdp_peer objects via the PeerAccepted callback.
Header: <freerdp/listener.h>
Lifecycle
freerdp_listener_new
NULL on failure. Pair with freerdp_listener_free() when done.
freerdp_listener_free
Struct: rdp_freerdp_listener
typedefd as freerdp_listener. All functional members are function pointers set by the implementation.
psPeerAccepted
freerdp_peer*. Typically used to spawn a worker thread for the peer. Return FALSE to immediately reject and free the peer.psListenerOpen
bind_address may be NULL to listen on all interfaces. Returns FALSE on error.psListenerOpenLocal
path. Useful for local IPC connections.psListenerOpenFromSocket
psListenerGetEventHandles
events[] with all waitable handles the listener uses (one per open socket). Returns the number of handles written. Use these with WaitForMultipleObjects in the accept loop.psListenerCheckFileDescriptor
freerdp_peer is created and PeerAccepted is called. Returns FALSE on a fatal listener error.psListenerCheckFileDescriptor
PeerAccepted to allow early connection filtering (e.g. rate limiting, IP allow-lists).psListenerClose
Accept Loop Example
PeerAccepted is called on the listener thread. Offload long-running work (the entire peer RDP handshake) to a dedicated thread to avoid blocking incoming accepts.