pjsua_resolve_stun_servers method
Auxiliary function to resolve and contact each of the STUN server entries (sequentially) to find which is usable. The #pjsua_init() must have been called before calling this function.
@param count Number of STUN server entries to try. @param srv Array of STUN server entries to try. Please see the \a stun_srv field in the #pjsua_config documentation about the format of this entry. @param wait Specify non-zero to make the function block until it gets the result. In this case, the function will block while the resolution is being done, and the callback will be called before this function returns. @param token Arbitrary token to be passed back to application in the callback. @param cb Callback to be called to notify the result of the function.
@return If \a wait parameter is non-zero, this will return PJ_SUCCESS if one usable STUN server is found. Otherwise it will always return PJ_SUCCESS, and application will be notified about the result in the callback.
Implementation
int pjsua_resolve_stun_servers(
int count,
ffi.Pointer<pj_str_t> srv,
int wait,
ffi.Pointer<ffi.Void> token,
pj_stun_resolve_cb cb,
) {
return _pjsua_resolve_stun_servers(
count,
srv,
wait,
token,
cb,
);
}