Client pool


If for some reason you need to keep multiple clients opened, Kotlogram helps you with that.
The class TelegramClientPool is basically a Map in which you can put client, with a timeout value.
Once the client timeout, it'll be automatically closed, and you'll have a callback fired.

For convenience, two pools are available

  • DefaultPool: used for normal clients
  • DownloadPool to store client probably created by getDownloaderClient method. The clients you put in this pool will probably have a shorter timeout value.

Did this page help you?