Commit Graph

70 Commits

Author SHA1 Message Date
levlam
9856b0e46e Add some workariunds for crashes on exit without closing all clients.
GitOrigin-RevId: 5c74e9fe6951b6a8eb65d6c1e5ddf7bf8e0c8163
2020-10-11 21:21:38 +03:00
levlam
714f037f15 Move ClientManager singleton creation to ClientManager::get_manager_singleton.
GitOrigin-RevId: 071b947ff072186c70387cbd00f1c6b1c17d0e6b
2020-10-11 11:08:56 +03:00
levlam
09f906f192 Protect access to some static variables using ExitGuard.
GitOrigin-RevId: 65c7510c60d585b90e90d09067c7dfdaf79c4cd3
2020-10-11 01:59:27 +03:00
levlam
c484cc4773 Postpone td_api::authorizationStateClosed until the client is fully closed.
GitOrigin-RevId: 064696a00110c1f567b6da6afbee58d868ff4938
2020-10-10 22:08:41 +03:00
levlam
2850e596d3 Fix ConcurrentScheduler guard usage.
GitOrigin-RevId: 6f4dd470a690cdbe98870c89433634b31136f832
2020-10-10 22:05:20 +03:00
levlam
38f72b353a Clear ClientManager when the last Client is closed.
GitOrigin-RevId: d2d5194f7ffc59dc8db1196401c80689a8645dac
2020-10-09 15:39:30 +03:00
levlam
b491964a81 Store TdReceiver by value.
GitOrigin-RevId: 51dbcaf815c5ba1a42539242b1e57b456f188d38
2020-10-09 14:25:06 +03:00
levlam
35a9a93fc9 Fix std::...::erase return value usages.
GitOrigin-RevId: d9729ccd619e3b99554f1e1c2262d8826f0a8571
2020-10-08 23:04:40 +03:00
Arseny Smirnov
cee68e5a48 Client: bugfix
GitOrigin-RevId: 0267cb2475fecae85d85f03abc96215762dc46e0
2020-10-08 16:14:01 +03:00
levlam
6bbb7cde8d Remove unneeded explicit td:: usages.
GitOrigin-RevId: a6d2bf8a1e13f35dd07b9ce43f4320e93cf36040
2020-10-08 15:20:22 +03:00
levlam
be374f38ac Improve error message for requests to closed client.
GitOrigin-RevId: 4870c3614ea52ecd0fd1124dfc517471b6d30b55
2020-10-08 13:59:03 +03:00
levlam
5ac5acd1cb Fix ClientManager closing.
GitOrigin-RevId: eb588d9991ea6c8c2b4a339d1396d58179c84f43
2020-10-08 01:28:24 +03:00
levlam
74987bf8f0 Do not build MultiTd without threads.
GitOrigin-RevId: 7707b2922937604b31eff50e67d7ba921c279f48
2020-10-06 20:47:22 +03:00
levlam
d875581772 Simplify Client closing.
GitOrigin-RevId: 9a35d7ef66cea495d376a98df81a568478b0bb35
2020-10-06 20:46:54 +03:00
levlam
f7393d2717 Fix handling of requests to unexisting Client.
GitOrigin-RevId: 5de9709abe73ae73dc52c9ca04c480a60efbf437
2020-10-05 23:05:16 +03:00
levlam
3fc140b4a2 Add ClientManager documentation.
GitOrigin-RevId: 5254af6d55288851e633a6567d700f6b15b18d1a
2020-10-05 14:32:23 +03:00
levlam
3cc97684ec Fix tdweb build.
GitOrigin-RevId: 3609f3fa52030a242d0587d2ca6f584417af247b
2020-08-25 16:32:22 +03:00
levlam
dfb3e124b8 Minor.
GitOrigin-RevId: 47042cd58afacf0470e0ee60c48ece88ae5f7485
2020-08-17 14:40:22 +03:00
Arseny Smirnov
ce80dd77f0 Actors: safer tag_ in context
GitOrigin-RevId: 9f9ef2a024e0bcfb0e5aed76a23174f1faad3b5a
2020-08-17 13:57:05 +03:00
levlam
008fc6e101 Rename Client::destroy to close.
GitOrigin-RevId: 9780492da143c2a79877ea8ff0868a9a232d9844
2020-08-06 21:28:44 +03:00
levlam
871fe2210d Major new Client fixes.
GitOrigin-RevId: 34c263a4adb3c312328530e1382108d98e9048a3
2020-07-30 23:39:10 +03:00
levlam
9ab0880680 Various improvements.
GitOrigin-RevId: 7648a2536a315335c0d258f07de7269ac7a67fb0
2020-07-30 22:59:23 +03:00
levlam
c055ec15f9 Various improvements.
GitOrigin-RevId: 4eb8b7e43d10f1b5657f40aa2b7eef1c93429ca7
2020-07-30 22:59:23 +03:00
Arseny Smirnov
4635b7b791 MuliClient: quick fix of TdReceiver
GitOrigin-RevId: feae0c3caffb5ebb4ef0402dbb7e2f3a15e714be
2020-07-30 17:38:36 +03:00
Arseny Smirnov
cacabaf6d1 NetQueryStats
GitOrigin-RevId: 5a04b322e12e2838b1d7f812fcf06bff4eefbace
2020-07-30 17:28:56 +03:00
levlam
e4ee1b7ce1 Minor new Client fixes.
GitOrigin-RevId: f7c455192f5d35a8cbf6271522202bfbff867698
2020-07-30 04:04:57 +03:00
Arseny Smirnov
b1222a9bb7 MultiClient: draft
GitOrigin-RevId: 4d1bdd6ad99909ce7ad94cfd32a43262051a6d18
2020-07-29 16:49:35 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
116f0028a2 Make G() safe.
GitOrigin-RevId: d417008f94ce6f8c587561af352d696ef55895b3
2019-08-01 22:12:04 +03:00
levlam
c856242644 Mark constructor explicit.
GitOrigin-RevId: ac21a4de5e4f33036ba8193b7f91e3497ae5888c
2019-06-12 16:37:11 +03:00
Arseny Smirnov
a1bc213f90 Client.cpp: fix data race
GitOrigin-RevId: f2432676c697aef05a3047959ac987aa46e37b0b
2019-05-20 19:57:28 +03:00
levlam
cdb5aa38a7 Fix includes.
GitOrigin-RevId: ba08dcfdbc4da34a986b876331beaf4a20e57437
2019-04-23 13:02:10 +03:00
Arseny Smirnov
eaf48c36a1 Client: set unique tag for each Td actor
GitOrigin-RevId: 7ee500c44703a395aae9151969b6bb8e3aee5ebd
2019-04-23 11:56:32 +03:00
Arseny Smirnov
3193d5c2d9 Client: use several threads for multiple clients
GitOrigin-RevId: 180f2977371a5a13b35ca929918450f88efcfec5
2019-04-23 10:42:46 +03:00
levlam
0bd7881fb7 Minor Client fixes.
GitOrigin-RevId: 039c9affda4f3b70eacb545c05b99cfd6523c5e1
2019-03-22 01:42:41 +03:00
Arseny Smirnov
18900e9d69 Client: share scheduler between different clients
GitOrigin-RevId: 6bddeaf1938a1bb35dc9a7670c10b044419089fe
2019-03-21 22:59:20 +13:00
levlam
9b42166c68 Explicitly include common.h.
GitOrigin-RevId: 5ae32c18d0ff18aac36334b494ea526ce7da4a9a
2019-02-13 00:26:36 +03:00
levlam
eaebfad034 Update copyright year.
GitOrigin-RevId: 359e2b43322222922c44c430d3814b0a4c778dc6
2019-01-01 01:02:34 +03:00
levlam
035e4a69ed Improve iOS README.
GitOrigin-RevId: 5141bd0bb172f72c7cda70dba249d4c3f0d90849
2018-10-31 15:15:16 +03:00
levlam
6b3b190037 Add logging to Client::receive.
GitOrigin-RevId: 2cb36c61e186a0e598dd5ce3a330d1a0baa884c3
2018-10-31 15:09:25 +03:00
levlam
f948956bf7 Use td::unique_ptr instead of std::unique_ptr whenever possible.
GitOrigin-RevId: 424beb72dc62efdefdbffb75f1036ba9417f84cb
2018-09-27 04:19:03 +03:00
Arseny Smirnov
2766e7d16b emscripten: td_get_timeout
GitOrigin-RevId: 920dac2d11ed999019e7faafe47cadf96d06900f
2018-09-18 16:43:16 +03:00
levlam
10063f39f4 Fix inheritors of TdCallback.
GitOrigin-RevId: a356594a86e79118dc32b1a09b0c4747dd331c59
2018-09-15 19:33:27 +03:00
levlam
5dfeb9adf4 Fix CE.
GitOrigin-RevId: 762719f8093a862b93bd77c1e8e28d7feb4486e0
2018-09-14 23:03:26 +03:00
levlam
c081f6c79c Rename scheduler_ field to concurrent_scheduler_.
GitOrigin-RevId: c760e0fab2ed8c1d93d32260f4a1d9b9b70359d9
2018-09-14 21:40:33 +03:00
levlam
7b2684b3ed Add "me" to example.
GitOrigin-RevId: 945f8ca30b3ca9f8667d4f481d5bd7070c9b2fcd
2018-09-14 21:03:36 +03:00
Arseny Smirnov
da118270bd Remove TdCallback::on_closed
GitOrigin-RevId: e08d6c10e4147c39f2d6f5ea795f92875644f1a7
2018-09-14 19:58:13 +03:00
levlam
03a11bc2ec Client improvements.
GitOrigin-RevId: 85b45a31fbb7b7b84a87d3951086332d750de01c
2018-09-14 19:35:34 +03:00
Arseny Smirnov
5ee113439f Simplify Client.cpp
GitOrigin-RevId: 1a109f7f08dc73123b5d4fb7bfb4c75c19419f9b
2018-09-14 16:14:40 +03:00
levlam
7e2053fcf5 Fix some includes.
GitOrigin-RevId: 3e3323045c44976ceea99b218d6806d3c836bbf2
2018-09-14 01:00:21 +03:00