Signaling (previously RTM) v1.4.8 API Reference for Unity
|
Classes | |
class | LocalInvitation |
class | FileMessage |
class | ImageMessage |
class | IMessage |
class | TextMessage |
class | IRtmApiNative |
class | RemoteInvitation |
struct | PeerOnlineStatus |
struct | MediaOperationProgress |
struct | ChannelAttributeOptions |
struct | RtmAttribute |
struct | ChannelMemberCount |
struct | SendMessageOptions |
class | RtmCallEventHandler |
class | RtmCallManager |
class | RtmChannel |
class | RtmChannelAttribute |
class | RtmChannelEventHandler |
class | RtmChannelMember |
class | RtmClient |
class | RtmClientEventHandler |
|
strong |
Error codes related to attrubute operations.
Enumerator | |
---|---|
ATTRIBUTE_OPERATION_ERR_OK | 0: The method call succeeds, or the attribute operation succeeds. |
ATTRIBUTE_OPERATION_ERR_NOT_READY | 1: |
ATTRIBUTE_OPERATION_ERR_FAILURE | 2: Common failure. The attribute operation fails. |
ATTRIBUTE_OPERATION_ERR_INVALID_ARGUMENT | 3: The argument you put for this attribute operation is invalid. For example, you cannot set a user or channel attribute as "". |
ATTRIBUTE_OPERATION_ERR_SIZE_OVERFLOW | 4: The attribute size exceeds the limit.
|
ATTRIBUTE_OPERATION_ERR_TOO_OFTEN | 5: The method call frequency exceeds the limit.
|
ATTRIBUTE_OPERATION_ERR_USER_NOT_FOUND | 6: The specified user is not found, either because the user is offline or because the user does not exist. |
ATTRIBUTE_OPERATION_ERR_TIMEOUT | 7: A timeout occurs during the attribute operation. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
ATTRIBUTE_OPERATION_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before the attribute operation. |
|
strong |
Error codes related to cancelling a download task or cancelling an upload task.
Enumerator | |
---|---|
CANCEL_MEDIA_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
CANCEL_MEDIA_ERR_FAILURE | 1: Unknown common failure. |
CANCEL_MEDIA_ERR_NOT_EXIST | 2: The task to cancel does not exist. You can only cancel an ongoing download or upload task. If the download or upload task completes, the corresponding |
CANCEL_MEDIA_ERR_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before this operation. |
|
strong |
Error codes related to sending a channel message.
Enumerator | |
---|---|
CHANNEL_MESSAGE_ERR_OK | 0: The method call succeeds, or the server receives the channel message. |
CHANNEL_MESSAGE_ERR_FAILURE | 1: Common failure. The user fails to send the channel message. |
CHANNEL_MESSAGE_ERR_SENT_TIMEOUT | 2: The SDK does not receive a response from the server in 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
CHANNEL_MESSAGE_ERR_TOO_OFTEN | 3: The method call frequency exceeds the limit of (RTM SDK for Windows C++) 180 calls every three seconds, with channel and peer messages taken together. |
CHANNEL_MESSAGE_ERR_INVALID_MESSAGE | 4: The message is null or exceeds 32 KB in length. |
CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before sending out a channel message. |
|
strong |
|
strong |
Reasons for a connection state change.
Enumerator | |
---|---|
CONNECTION_CHANGE_REASON_LOGIN | 1: The SDK is logging in the Agora RTM system. |
CONNECTION_CHANGE_REASON_LOGIN_SUCCESS | 2: The SDK has logged in the Agora RTM system. |
CONNECTION_CHANGE_REASON_LOGIN_FAILURE | 3: The SDK fails to log in the Agora RTM system. |
CONNECTION_CHANGE_REASON_LOGIN_TIMEOUT | 4: The SDK fails to log in the Agora RTM system within six seconds and gives up. |
CONNECTION_CHANGE_REASON_INTERRUPTED | 5: The connection between the SDK and the Agora RTM system is interrupted. The system defines an interruption when the SDK loses connection with the Agora RTM system for network reasons and cannot recover in four seconds. |
CONNECTION_CHANGE_REASON_LOGOUT | 6: The user has called the Logout method to log out of the Agora RTM system. |
CONNECTION_CHANGE_REASON_BANNED_BY_SERVER | 7: The SDK login to the Agora RTM system is banned by Agora. |
CONNECTION_CHANGE_REASON_REMOTE_LOGIN | 8: Another user is logging in the Agora RTM system with the same User ID. |
|
strong |
Connection states between the SDK and the Agora RTM system.
Enumerator | |
---|---|
CONNECTION_STATE_DISCONNECTED | 1: The initial state. The SDK is disconnected from the Agora RTM system. When the user calls the Login method, the SDK starts to log in the Agora RTM system, triggers the OnConnectionStateChangedHandler callback, and switches to the CONNECTION_STATE_CONNECTING state. |
CONNECTION_STATE_CONNECTING | 2: The SDK is logging in the Agora RTM system.
|
CONNECTION_STATE_CONNECTED | 3: The SDK has logged in the Agora RTM system.
|
CONNECTION_STATE_RECONNECTING | 4: The connection state between the SDK and the Agora RTM system is interrupted due to network issues, and the SDK keeps re-logging in the Agora RTM system.
|
CONNECTION_STATE_ABORTED | 5: The SDK gives up logging in the Agora RTM system, mainly because another instance has logged in the Agora RTM system with the same user ID. You must call the Logout method to leave this state before calling the Login method again. |
|
strong |
Error codes related to downloading a file or image.
Enumerator | |
---|---|
DOWNLOAD_MEDIA_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
DOWNLOAD_MEDIA_ERR_FAILURE | 1: Unknown common failure. Check whether you have write access. |
DOWNLOAD_MEDIA_ERR_INVALID_ARGUMENT | 2: An argument you put is invalid. For example, |
DOWNLOAD_MEDIA_ERR_TIMEOUT | 3: A timeout occurs. The current timeout is set as 120 seconds. The SDK assumes that a timeout occurs if it has not detected any file transmission between the SDK and the file server for 120 seconds. |
DOWNLOAD_MEDIA_ERR_NOT_EXIST | 4: The file or image to download does not exist, either because the media ID you input is incorrect or because the validity of the media ID has expired. |
DOWNLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED | 5: You have exceeded the upper limit for file download. You can initiate a maximum of nine file download or upload tasks at the same time (download and upload tasks count together). |
DOWNLOAD_MEDIA_ERR_INTERRUPTED | 6: The file or image download task is aborted for either of the following reasons:
|
DOWNLOAD_MEDIA_ERR_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before this operation. |
|
strong |
Error codes related to retrieving the channel member count of specified channels.
Enumerator | |
---|---|
GET_CHANNEL_MEMBER_COUNT_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
GET_CHANNEL_MEMBER_COUNT_ERR_FAILURE | 1: Unknown common failure. |
GET_CHANNEL_MEMBER_COUNT_ERR_INVALID_ARGUMENT | 2: One or several of your channel IDs is invalid, or |
GET_CHANNEL_MEMBER_COUNT_ERR_TOO_OFTEN | 3: The method call frequency exceeds the limit of one query per second. |
GET_CHANNEL_MEMBER_COUNT_ERR_TIMEOUT | 4: A timeout occurs during this operation. The current timeout is set as five seconds. |
GET_CHANNEL_MEMBER_COUNT_ERR_EXCEED_LIMIT | 5: |
GET_CHANNEL_MEMBER_COUNT_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before this operation. |
|
strong |
Error codes related to retrieving a channel member list.
Enumerator | |
---|---|
GET_MEMBERS_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
GET_MEMBERS_ERR_FAILURE | 1: Common failure. The user fails to retrieve a member list of the channel. |
GET_MEMBERS_ERR_REJECTED | 2: RESERVED FOR FUTURE USE |
GET_MEMBERS_ERR_TIMEOUT | 3: A timeout occurs when retrieving a member list of the channel. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
GET_MEMBERS_ERR_TOO_OFTEN | 4: The method call frequency exceeds the limit of five queries every two seconds. |
GET_MEMBERS_ERR_NOT_IN_CHANNEL | 5: The user is not in channel. |
GET_MEMBERS_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before retrieving a member list. |
|
strong |
Error codes of the call invitation methods.
|
strong |
Error codes related to joining a channel.
Enumerator | |
---|---|
JOIN_CHANNEL_ERR_OK | 0: The method call succeeds, or the user joins the channel successfully. |
JOIN_CHANNEL_ERR_FAILURE | 1: Common failure. The user fails to join the channel. |
JOIN_CHANNEL_ERR_REJECTED | 2: For v1.0.0 and earlier, the SDK returns this error when you try to join a channel that you have already joined. The SDK does not return this error code after v1.0.0. |
JOIN_CHANNEL_ERR_INVALID_ARGUMENT | 3: The user fails to join the channel because the argument is invalid. |
JOIN_CHANNEL_TIMEOUT | 4: A timeout occurs when joining the channel. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
JOIN_CHANNEL_ERR_EXCEED_LIMIT | 5: The number of the RTM channels you are in exceeds the limit of 20. |
JOIN_CHANNEL_ERR_ALREADY_JOINED | 6: The user is joining or has joined the channel. |
JOIN_CHANNEL_ERR_TOO_OFTEN | 7: The method call frequency exceeds 50 queries every three seconds. |
JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN | 8: The frequency of joining the same channel exceeds two times every five seconds. |
JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before joining the channel. |
|
strong |
Error codes related to leaving a channel.
Enumerator | |
---|---|
LEAVE_CHANNEL_ERR_OK | 0: The method call succeeds, or the user leaves the channel successfully. |
LEAVE_CHANNEL_ERR_FAILURE | 1: Common failure. The user fails to leave the channel. |
LEAVE_CHANNEL_ERR_REJECTED | 2: RESERVED FOR FUTURE USE |
LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL | 3: The user is not in the channel. |
LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before calling the Leave method. |
|
strong |
|
strong |
RETURNED TO THE CALLER. Error codes of an outgoing call invitation.
|
strong |
RETURNED TO THE CALLER. States of an outgoing call invitation.
|
strong |
Error codes related to login.
Enumerator | |
---|---|
LOGIN_ERR_OK | 0: The method call succeeds, or login succeeds. |
LOGIN_ERR_UNKNOWN | 1: Login fails. The reason is unknown. |
LOGIN_ERR_REJECTED | 2: Login is rejected by the server. |
LOGIN_ERR_INVALID_ARGUMENT | 3: Invalid login argument. |
LOGIN_ERR_INVALID_APP_ID | 4: The App ID is invalid. |
LOGIN_ERR_INVALID_TOKEN | 5: The token is invalid. |
LOGIN_ERR_TOKEN_EXPIRED | 6: The token has expired, and hence login is rejected. |
LOGIN_ERR_NOT_AUTHORIZED | 7: Unauthorized login. |
LOGIN_ERR_ALREADY_LOGGED_IN | 8: The user has already logged in or is logging in the Agora RTM system, or the user has not called the CONNECTION_STATE_ABORTED state. |
LOGIN_ERR_TIMEOUT | 9: The login times out. The current timeout is set as six seconds. You need to log in again. |
LOGIN_ERR_TOO_OFTEN | 10: The call frequency of the Login method exceeds the limit of two queries per second. |
|
strong |
Error codes related to logout.
Enumerator | |
---|---|
LOGOUT_ERR_OK | 0: The method call succeeds, or logout succeeds. |
LOGOUT_ERR_REJECTED | 1: RESERVED FOR FUTURE USE |
LOGOUT_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before the user logs out of the Agora RTM system. |
|
strong |
|
strong |
|
strong |
Error codes related to sending a peer-to-peer message.
Enumerator | |
---|---|
PEER_MESSAGE_ERR_OK | 0: The method call succeeds, or the specified user receives the peer-to-peer message. |
PEER_MESSAGE_ERR_FAILURE | 1: The sender fails to send the peer-to-peer message. |
PEER_MESSAGE_ERR_SENT_TIMEOUT | 2: A timeout occurs when sending the peer-to-peer message. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
PEER_MESSAGE_ERR_PEER_UNREACHABLE | 3: The specified user is offline and does not receive this peer-to-peer message. |
PEER_MESSAGE_ERR_CACHED_BY_SERVER | 4: The receiver is offline and does not receive this offline peer-to-peer message, but the server has cached it and will re-send it once he/she is back online. |
PEER_MESSAGE_ERR_TOO_OFTEN | 5: The method call frequency exceeds the limit of 180 calls every three seconds, with channel and peer messages taken together. |
PEER_MESSAGE_ERR_INVALID_USERID | 6: The user ID is invalid. |
PEER_MESSAGE_ERR_INVALID_MESSAGE | 7: The message is null or exceeds 32 KB in length. |
PEER_MESSAGE_ERR_IMCOMPATIBLE_MESSAGE | 8: The message receiver‘s SDK is of an earlier version and hence cannot recognize this message. |
PEER_MESSAGE_ERR_USER_NOT_LOGGED_IN | 102: The sender does not call the Login method, or the method call of Login does not succeed before sending the peer-to-peer message. |
|
strong |
The online states of a peer.
|
strong |
|
strong |
Error codes related to subscribing to or unsubscribing from the status of specified peers.
Enumerator | |
---|---|
PEER_SUBSCRIPTION_STATUS_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
PEER_SUBSCRIPTION_STATUS_ERR_FAILURE | 1: Common failure. The user fails to subscribe to or unsubscribe from the status of the specified peers. |
PEER_SUBSCRIPTION_STATUS_ERR_INVALID_ARGUMENT | 2: The method call fails. The argument is invalid. |
PEER_SUBSCRIPTION_STATUS_ERR_REJECTED | 3: RESERVED FOR FUTURE USE |
PEER_SUBSCRIPTION_STATUS_ERR_TIMEOUT | 4: The SDK fails to receive a response from the server within 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
PEER_SUBSCRIPTION_STATUS_ERR_TOO_OFTEN | 5: The method call frequency exceeds the limit of 10 queries every five seconds. |
PEER_SUBSCRIPTION_STATUS_ERR_OVERFLOW | 6: The number of peers, to whom you subscribe, exceeds the limit of 512. |
PEER_SUBSCRIPTION_STATUS_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before this operation. |
|
strong |
Error codes related to getting a list of the peers by subscription option type.
Enumerator | |
---|---|
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_FAILURE | 1: Common failure. The user fails to query peers by subscription option type. |
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TIMEOUT | 2: The SDK fails to receive a response from the server within 5 seconds. The current timeout is set as 5 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TOO_OFTEN | 3: The method call frequency exceeds the limit of 10 queries every five seconds. |
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before the query. |
|
strong |
Error codes related to querying the online status of the specified peers.
Enumerator | |
---|---|
QUERY_PEERS_ONLINE_STATUS_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
QUERY_PEERS_ONLINE_STATUS_ERR_FAILURE | 1: Common failure. The user fails to query the online status of the specified peers. |
QUERY_PEERS_ONLINE_STATUS_ERR_INVALID_ARGUMENT | 2: The method call fails. The argument is invalid. |
QUERY_PEERS_ONLINE_STATUS_ERR_REJECTED | 3: RESERVED FOR FUTURE USE |
QUERY_PEERS_ONLINE_STATUS_ERR_TIMEOUT | 4: The SDK fails to receive a response from the server in 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state. |
QUERY_PEERS_ONLINE_STATUS_ERR_TOO_OFTEN | 5: The method call frequency exceeds the limit of (RTM SDK for Windows C++) 10 calls every five seconds. |
QUERY_PEERS_ONLINE_STATUS_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before querying the online status. |
|
strong |
RETURNED TO THE CALLEE. Error codes of an incoming call invitation.
|
strong |
RETURNED TO THE CALLEE. States of an incoming call invitation.
|
strong |
Error codes related to renewing the RTM Token.
Enumerator | |
---|---|
RENEW_TOKEN_ERR_OK | 0: The method call succeeds, or the renewing operation succeeds. |
RENEW_TOKEN_ERR_FAILURE | 1: Common failure. The user fails to renew the token. |
RENEW_TOKEN_ERR_INVALID_ARGUMENT | 2: The method call fails. The argument is invalid. |
RENEW_TOKEN_ERR_REJECTED | 3: RESERVED FOR FUTURE USE |
RENEW_TOKEN_ERR_TOO_OFTEN | 4: The method call frequency exceeds the limit of two queries per second. |
RENEW_TOKEN_ERR_TOKEN_EXPIRED | 5: The token has expired. |
RENEW_TOKEN_ERR_INVALID_TOKEN | 6: The token is invalid. |
RENEW_TOKEN_ERR_USER_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before renewing the token. |
|
strong |
Error codes related to uploading a file or image.
Enumerator | |
---|---|
UPLOAD_MEDIA_ERR_OK | 0: The method call succeeds, or the operation succeeds. |
UPLOAD_MEDIA_ERR_FAILURE | 1: Unknown common failure. Please check whether the file exists and whether you can access the file. |
UPLOAD_MEDIA_ERR_INVALID_ARGUMENT | 2: The argument you put is invalid. For example, |
UPLOAD_MEDIA_ERR_TIMEOUT | 3: A timeout occurs. The current timeout is set as 120 seconds. The SDK assumes that a timeout occurs if it has not detected any file transmission between the SDK and the file server for 120 seconds. |
UPLOAD_MEDIA_ERR_SIZE_OVERFLOW | 4: The size of the file or image to upload exceeds 30 MB. |
UPLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED | 5: You have exceeded the upper limit for file upload. You can initiate a maximum of nine file upload or download tasks at the same time (upload and download tasks count together). |
UPLOAD_MEDIA_ERR_INTERRUPTED | 6: The file or image upload task is aborted for either of the following reasons:
|
UPLOAD_MEDIA_ERR_NOT_LOGGED_IN | 102: The user does not call the Login method, or the method call of Login does not succeed before this operation. |