td_json_client_receive method

Pointer<Int32> td_json_client_receive(
  1. Pointer<Void> client,
  2. double timeout
)

Receives incoming updates and request responses from the TDLib client. May be called from any thread, but must not be called simultaneously from two different threads. Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute in the same thread, so it can't be used after that. \paramin client The client. \paramin timeout The maximum number of seconds allowed for this function to wait for new data. \return JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires.

Implementation

ffi.Pointer<ffi.Int32> td_json_client_receive(
  ffi.Pointer<ffi.Void> client,
  double timeout,
) {
  return _td_json_client_receive(
    client,
    timeout,
  );
}