You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to make it so that tdlib operates like a daemon? #139
I don't think we support the ClientManager, yet. This is out of scope of "normal" MTProto API, since this is just a C++ class (not sure it has C wrappers around it to be available for P/Invoke).
But I can't see how it relates to your daemon question. What do you mean by that? AFAIK, tdlib just normally updates its database during execution; there's no special "daemon approach" or something like that.
But I can't see how it relates to your daemon question. What do you mean by that?
I have created a simple application in CLI however I have been left in a request and response model. I would like to know if it's possible to have a concurrent approach to request & response wherein the CLI will not shutdown but always receive updates.
Can you recommend a simple pattern for this?
For now when my cli app for example lists chats and messages in chats, the application stops after completion. What I'm looking for is to keep tdlib awake and keep on receiving updates and my cli app can then just listen to the updates indefinitely.
I may be missing something fundamental here though.
I will look in to ClientManager as it seems you may be suggesting something here but I don't understand it full yet at the moment. 😅
Activity
ForNeVeR commentedon Aug 28, 2022
I don't think we support the
ClientManager, yet. This is out of scope of "normal" MTProto API, since this is just a C++ class (not sure it has C wrappers around it to be available for P/Invoke).ForNeVeR commentedon Aug 28, 2022
But I can't see how it relates to your daemon question. What do you mean by that? AFAIK, tdlib just normally updates its database during execution; there's no special "daemon approach" or something like that.
bangonkali commentedon Aug 29, 2022
Hi @ForNeVeR ,
I have created a simple application in CLI however I have been left in a request and response model. I would like to know if it's possible to have a concurrent approach to request & response wherein the CLI will not shutdown but always receive updates.
Can you recommend a simple pattern for this?
For now when my cli app for example lists chats and messages in chats, the application stops after completion. What I'm looking for is to keep tdlib awake and keep on receiving updates and my cli app can then just listen to the updates indefinitely.
I may be missing something fundamental here though.
I will look in to
ClientManageras it seems you may be suggesting something here but I don't understand it full yet at the moment. 😅ForNeVeR commentedon Aug 29, 2022
The usual pattern for daemon-like code in C# is to use a Generic Host, that has no relation to tdlib's
ClientManagerwhatsoever.