tdjson

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientID

func CreateClientID() int

CreateClientID returns an opaque identifier of a new TDLib instance. The TDLib instance will not send updates until the first request is sent to it.

func Execute

func Execute(request string) string

Execute synchronously executes a TDLib request. Only a few requests can be executed synchronously. Returns a JSON-serialized request response.

func Init

func Init(libPath string) error

Init initializes the TDLib JSON interface by loading the library. If libPath is empty, it attempts to load the library from the default system paths or the current directory using the default name (libtdjson.so, libtdjson.dylib, tdjson.dll).

func Receive

func Receive(timeout float64) string

Receive receives incoming updates and request responses. Must not be called simultaneously from two different threads. Returns a JSON-serialized update or request response, or an empty string if the timeout expires.

func Send

func Send(clientID int, request string)

Send sends request to the TDLib client. May be called from any thread.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL