Agora Java API Reference for Android

Public Member Functions | List of all members
agora::ILocalDataChannel Class Referenceabstract
Inheritance diagram for agora::ILocalDataChannel:

## Public Member Functions
virtual int | sendDataPacket (const char *packet, size_t length, uint64_t capture_time_ms, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | setMetaData (const char *metaData, size_t length, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual Optional< int > | configuredChannelId () const =0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Member Function Documentation

## ◆ sendDataPacket()

virtual int agora::ILocalDataChannel::sendDataPacket | ( | const char * | packet,
|  | size_t | length,
|  | uint64_t | capture_time_ms,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| pure virtual

Send data packet to this data channel after publishing.

Parameters

  [in] | packet | packet buffer pointer.
  [in] | length | packet buffer length.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ setMetaData()

virtual int agora::ILocalDataChannel::setMetaData | ( | const char * | metaData,
|  | size_t | length,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| pure virtual

Send meta data to this data channel before publishing.

Parameters

  [in] | metaData | meta data pointer.
  [in] | length | meta data length.

Returns
  ····
  - 0: Success.
  - < 0: Failure.

## ◆ configuredChannelId()

virtual Optional<int> agora::ILocalDataChannel::configuredChannelId | ( |  | ) | const
| pure virtual

return configured channel id

Returns