highras/rtm

1.0.19 2023-09-26 01:46 UTC

This package is auto-updated.

Last update: 2024-03-26 02:51:08 UTC


README

Requirements

  • PHP >= 5.4

  • ext-mcrypt

  • ext-gmp

  • ext-msgpack

Installations

The preferred way to install this sdk is through composer.

Note: Check the composer.json for this SDK's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require highras/rtm $LATEST_VERSION

or add

"highras/rtm": $LATEST_VERSION

to the require section of your composer.json file.

Notice

  • Before using the SDK, please make sure the server time is correct, RTM-Server will check whether the signature time has expired

API

  • __construct($pid, $secretKey, $endpoint, $timeout = 5000, $autoReconnect = true): RTMServerClient Construct

    • pid: (int) Project ID
    • secretKey: (string) Secret key
    • endpoint: (string) Server endpoint
    • timeout: (int) connection timeout(ms)
    • autoReconnect: (bool) support auto reconnect
  • enableEncryptor($peerPubData): Enable encrypted connection

    • peerPubData: (string) Certificate content
  • enableEncryptorByFile($file): Enable encrypted connection

    • file: (string) Certificate file path

Token Functions

Please refer Token Functions

User Functions

Please refer User Functions

Room Functions

Please refer Room Functions

Group Functions

Please refer Group Functions

Friend Functions

Please refer Friend Functions

Message Functions

Please refer Message Functions

Chat Functions

Please refer Chat Functions

File Functions

Please refer File Functions

Device Functions

Please refer Device Functions

Data Functions

Please refer Data Functions

RTC Functions

Please refer RTC Functions

Error Codes

Please refer RTM Error Codes

Please refer FPNN Error Codes