tdjson

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 4 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.

func Execute

func Execute(request string) string

Execute synchronously executes a TDLib request. Returns a JSON-serialized request response.

func Init

func Init(libPath string) error

Init initializes the TDLib JSON interface by loading the library.

func Receive

func Receive(timeout float64) string

Receive receives incoming updates and request responses. 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.

func SetLogMessageCallback added in v0.5.0

func SetLogMessageCallback(maxVerbosityLevel int32, callback func(verbosityLevel int32, message string))

SetLogMessageCallback registers a callback for TDLib log messages. The callback function receives the verbosity level and the log message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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