Skip to main content

rt_get_userdata

Description

The rt_get_userdata function retrieves user data associated with an RTTP socket.

Syntax:

void* rt_get_userdata(RTEngine engine, RTSOCKET s, int index);

Parameters:

engine: The pointer to the RTTP engine instance returned by rt_init().

s: The descriptor identifying the RTTP socket. If s is NULL, it will return user data from the engine instance.

index: The user data index, used to distinguish among multiple user data items; supports up to 10.

Return Value:

rt_get_userdata returns the user data set by the rt_set_userdata function.