Documentation

Support

Vivox Core SDK

Vivox Core SDK

Sending and Receiving Vivox Messages

Learn how to send messages to groups.
Read time 2 minutesLast updated 20 hours ago

Functions

Name

VIVOXSDK_DLLEXPORT intvx_get_message(vx_message_base_t ** message)
The VxSDK polling function.
VIVOXSDK_DLLEXPORT intvx_issue_request(vx_req_base_t * request)
VIVOXSDK_DLLEXPORT intvx_issue_request2(vx_req_base_t * request)
Execute the given request.
VIVOXSDK_DLLEXPORT intvx_issue_request3(vx_req_base_t * request, int * request_count)
Execute the given request.
VIVOXSDK_DLLEXPORT intvx_register_message_notification_handler(void(*)(void *) pf_handler, void * cookie)
Register a callback that is called when a message is placed in the queue.
VIVOXSDK_DLLEXPORT intvx_unregister_message_notification_handler(void(*)(void *) pf_handler, void * cookie)
Unregister a notification handler.
VIVOXSDK_DLLEXPORT vx_message_base_t *vx_wait_for_message(int msTimeout)
Block the caller until a message is available.
VIVOXSDK_DLLEXPORT intvx_set_out_of_process_server_address(const char * address, unsigned short port)
Set the default out of process server address.

Functions Documentation

function vx_get_message

VIVOXSDK_DLLEXPORT int vx_get_message( vx_message_base_t ** message)
The VxSDK polling function. Parameters:
  • message [out] The object containing the message data.
Return: The status of the poll: VX_GET_MESSAGE_AVAILABLE = Success, VX_GET_MESSAGE_FAILURE = Failure, VX_GET_MESSAGE_NO_MESSAGE = No Message Available This should be called periodically to check for any incoming events.

function vx_issue_request

VIVOXSDK_DLLEXPORT int vx_issue_request( vx_req_base_t * request)
Parameters:
  • request The request object to execute. This is of one of the vx_req_* structs.
Return: The success status of the request.

function vx_issue_request2

VIVOXSDK_DLLEXPORT int vx_issue_request2( vx_req_base_t * request)
Execute the given request. Parameters:
  • request The request object to execute. This is of one of the vx_req_* structs.
Return: The success status of the request. This function returns an error if the SDK is not initialized (see vx_initialize3()).

function vx_issue_request3

VIVOXSDK_DLLEXPORT int vx_issue_request3( vx_req_base_t * request, int * request_count)
Execute the given request. Parameters:
  • request The request object to execute. This is of one of the vx_req_* structs.
  • request_count If non-null, vx_issue_request3 outputs the number of requests that are still outstanding. Requests at a rate of 12 requests per second - an application can use this value to determine if the application is issuing requests at an unacceptable rate.
Return: The success status of the request. This function returns an error if the SDK is not initialized (see vx_initialize3()).

function vx_register_message_notification_handler

VIVOXSDK_DLLEXPORT int vx_register_message_notification_handler( void(*)(void *) pf_handler, void * cookie)
Register a callback that is called when a message is placed in the queue. The application should use this to signal the main application thread that will then wakeup and call vx_get_message;

function vx_unregister_message_notification_handler

VIVOXSDK_DLLEXPORT int vx_unregister_message_notification_handler( void(*)(void *) pf_handler, void * cookie)
Unregister a notification handler.

function vx_wait_for_message

VIVOXSDK_DLLEXPORT vx_message_base_t * vx_wait_for_message( int msTimeout)
Block the caller until a message is available. Returns NULL if no message was available within the allotted time.

function vx_set_out_of_process_server_address

VIVOXSDK_DLLEXPORT int vx_set_out_of_process_server_address( const char * address, unsigned short port)
Set the default out of process server address. Parameters:
  • address - The address of the out of process server. Use "127.0.0.1" for most applications.
  • port - port - Use 44125 for most applications.
Return: - 0 if successful, non-zero if failed. When an address is set, requests issued by using vx_issue_request are sent to the server at the supplied address instead of being handled in the current process context.