td_client library
Classes
- TdNativePlugin
-
Placeholder used where
dart:ffiisn't available (the web). - TdPlugin
- Low-level access to TDLib's JSON interface on the current platform.
Functions
-
tdCreate(
) → int - Returns the identifier of a new TDLib client (0 means none). The client sends no updates until the first request is sent to it.
-
tdExecute(
TdFunction< TdObject> event) → TdObject? -
Executes
eventsynchronously; only requests documented as "Can be called synchronously" (TdFunction.canBeCalledSynchronously). -
tdJsonClientCreate(
) → int - Creates a new instance of TDLib and returns its handle.
-
tdJsonClientDestroy(
int clientId) → void -
Destroys the TDLib instance
clientId. It must not be used afterwards. -
tdJsonClientExecute(
TdFunction< TdObject> event) → TdObject? -
Executes
eventsynchronously (only requests documented as such). -
tdJsonClientReceive(
int clientId, [double timeout = 8]) → TdObject? -
Receives the next update or response of the TDLib instance
clientId, waiting up totimeoutseconds. Must not run on two threads at once. -
tdJsonClientSend(
int clientId, TdFunction< TdObject> event, [dynamic extra]) → void -
Sends
eventto the TDLib instanceclientId, tagged withextraif given. May be called from any thread. -
tdReceive(
[double timeout = 8]) → TdObject? -
Receives the next update or response, waiting up to
timeoutseconds. Blocks the calling isolate: don't call it on Flutter's UI isolate. -
tdSend(
int clientId, TdFunction< TdObject> event, [dynamic extra]) → void -
Sends
eventto clientclientId, tagged withextraif given.