td_client library

Classes

TdNativePlugin
TDLib Native Library Instance.
TdPlugin
TDLib Library Instance.

Functions

tdCreate() int
TdLib Client class for interaction with TDLib. The main TDLib interface is asynchronous. To match requests with a corresponding response, the field "TdFunction.extra" can be added to the request object. The corresponding response will have an "TdObject.extra" field with exactly the same value. Each returned object will have an "TdObject.client_id" field, containing the identifier of the client for which a response or an update was received.
tdExecute(TdFunction event) TdObject?
Synchronously executes a TDLib request. A request can be executed synchronously, only if it is documented with "Can be called synchronously". event is synchronous TdFunction request to TDLib.
tdJsonClientCreate() int
Creates a new instance of TDLib. Returns client id for the created instance of TDLib.
tdJsonClientDestroy(int clientId) → void
Destroys the TDLib client instance by clientId identifier. After this is called the client instance must not be used anymore.
tdJsonClientExecute(TdFunction event) TdObject?
Synchronously executes TDLib TdFunction event. May be called from any thread. Only a few requests can be executed synchronously.
tdJsonClientReceive(int clientId, [double timeout = 8]) TdObject?
Events from the incoming updates and request responses from the TDLib client by clientId identifier. Must be call once per client. Receives incoming updates and request responses from the TDLib client by clientId identifier and timeout. May be called from any thread, but shouldn't be called simultaneously from two different threads.
tdJsonClientSend(int clientId, TdFunction event, [dynamic extra]) → void
Sends TdFunction event to the TDLib client by clientId identifier. May be called from any thread.
tdReceive([double timeout = 8]) TdObject?
Receives incoming updates and request responses from the TDLib with timeout.
tdSend(int clientId, TdFunction event, [dynamic extra]) → void
Sends request to the TDLib client. May be called from any thread. clientId is TDLib client identifier. event is TdFunction request to TDLib.