Comments (3)
AddProxy
will return response after the request will be completed, no matter from which thread it is sent. But the request can't be complited before the TDLib instance is initialized (SetTdlibParameters
is called). If the request isn't return, then it is because SetTdlibParameters
is never called.
from td.
Hi @levlam, thanks a lot for the prompt answer!
It seems that I may not have grasped the correct sequence for utilizing the proxy API.
So what you have to do is initiate the library using SetTdlibParameters
call and subsequently incorporate your proxies with AddProxy. Those proxies are kept into the session/cache so if you restart the program they are saved. I guess its clear now.
Just one question, why dont you just raise exception on AddProxy
when the lib is not initialized?
That would make it easier to spot the API misusage.
from td.
It is better to call AddProxy
before SetTdlibParameters
. This is supported and intended order of the calls, otherwise you may try to connect without proxy first. But you must not wait synchronously for AddProxy
response. Waiting synchronously for request response is a bad idea most of the time.
from td.
Related Issues (20)
- Global search HOT 6
- Android build fails: 'algorithm' file not found HOT 2
- isUploadingCompleted field is not becoming true when using PreliminaryUploadFile. HOT 3
- Telegram knowledge
- Unknown class "messageReplyToMessage"" HOT 8
- How do I understand by calling serachPublicChat that I can join this group or apply to join HOT 1
- Unable to get File from user HOT 1
- Chat with an unknown user
- How to connect 'updateGroupCall' with exact chat? HOT 1
- Does authorization code have an expiration date? HOT 1
- Phone number banned when testing login flow HOT 10
- Question: how to send welcome message for new user in channel by using tdlib HOT 1
- How to get number of comments of a message? HOT 2
- Edit Message Prompts error { code = 400 message = "Message not found" } HOT 2
- messageUnsupported HOT 2
- [ASK] How revoke all message for everyone in chat group? HOT 4
- How do I upgrade tdlib from version 1.8.10 to the latest 1.8.25 on Ubuntu? HOT 1
- How can I log in to my account using .session files or session string? HOT 1
- how to in python? HOT 11
- In Java, I called ClearImportedContacts but did not clear the contacts I imported. Why? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from td.