Adrien Béraud
f5f71a0365
log: fix LogMethod copy
2018-05-24 11:57:12 -04:00
Adrien Béraud
5b5349d7ad
proxy client: lock proxy info thread, catch detach exceptions
2018-05-17 11:34:25 -04:00
Adrien Béraud
8606e87684
proxy client: allow concurrent proxy info requests ( #292 )
2018-05-11 15:47:24 -04:00
Adrien Béraud
2a15435be3
Merge pull request #291 from AmarOk1412/fixPushIdle
...
proxy: set status to CONNECTED when receiving a push notifications
2018-05-08 13:46:59 -04:00
Sébastien Blin
bf2f2369b1
proxy: set status to CONNECTED when receiving a push notifications
...
If a device receives a push notification, we can assume that the
proxy is up and running (because it sends a push notification).
Indeed, if the proxy is declared as disconnected, no operatons will
be executed when a push notification is received. This state is logic
when not using push notifications (because the local node is down),
but here, the status depends more on the proxy than the local node.
2018-05-08 13:35:13 -04:00
Adrien Béraud
68f52a815d
proxy client: refactor ( #289 )
...
Factor various ways of sending listen requests.
2018-05-07 14:54:32 -04:00
Sébastien Blin
9f987e24fe
Merge pull request #277 from savoirfairelinux/proxy_refresh
...
proxy client: independently resubscribe push listeners
2018-04-30 10:56:18 -04:00
Sébastien Blin
95f1d59a7f
proxy: add comment for refresh job
2018-04-30 10:42:39 -04:00
Sébastien Blin
2ce0c5c4c9
proxy: restart listeners if the proxy server close the connection
...
Detect if the proxy server close the connection linked to a listener and
relaunch listeners
2018-04-26 16:45:14 -04:00
Adrien Béraud
522a15c410
proxy client: refresh persistent put with margin
2018-04-21 17:57:59 -04:00
Adrien Béraud
cc37fb50e2
proxy client: take persistent put by reference
2018-04-21 17:44:45 -04:00
Adrien Béraud
1c9acfe001
proxy client: call opFailed on failure
2018-04-21 15:08:48 -04:00
Adrien Béraud
9f503dbb65
proxy client: loopSignal on put refresh notification
2018-04-21 12:22:58 -04:00
Adrien Béraud
7e4478123f
proxy client: use time_point::max() on persistent put
2018-04-21 12:22:00 -04:00
Adrien Béraud
1a2d783c2a
op cache: keep listeners alive for some time after cancel
2018-04-20 11:35:45 -04:00
Adrien Béraud
f98658f10f
proxy client: independently resubscribe push listeners
2018-04-19 11:32:22 -04:00
Adrien Béraud
e140116fed
proxy client: close old socket when restarting listeners
2018-04-19 11:31:08 -04:00
Adrien Béraud
7b3ce69b62
proxy client: send remote token on cancel
2018-04-16 15:04:57 -04:00
Adrien Béraud
ab0f4f6f17
proxy client: refresh now in case of refresh notification
2018-04-13 11:14:40 -04:00
Adrien Béraud
e3114cd5b9
proxy client: catch name resolving exception
2018-04-13 11:09:34 -04:00
Adrien Béraud
e088cd10be
proxy server: keep only one push listener per token.key.clientId
2018-04-10 16:01:14 -04:00
Adrien Béraud
7b88a2122a
proxy: always use string tokens
2018-04-10 12:48:19 -04:00
Adrien Béraud
4884306135
proxy client: restart listeners on reconnect
...
* track IPv4, IPv6 connectivity seperately
* properly restart listeners when connected
* get proxy info in parallel for multiple AF
2018-04-08 19:54:43 -04:00
Adrien Béraud
fd11a4b3e4
proxy client: prevent callback during cancelAllListeners
2018-04-08 19:54:00 -04:00
Adrien Béraud
b3c637536f
proxy client: prevent use-after-free after destruction
2018-04-08 19:54:00 -04:00
Adrien Béraud
1debe012c1
proxy client: restart listeners on connectivity change
2018-04-08 19:54:00 -04:00
Adrien Béraud
368a842d2e
proxy client: don't block resolving address
2018-04-08 19:53:59 -04:00
Adrien Béraud
d250e9b630
proxy client: avoid sending listen with push notifications
2018-04-08 19:53:59 -04:00
Adrien Béraud
3ff6863287
proxy client: add logs
2018-04-08 19:53:59 -04:00
Adrien Béraud
567fa1c703
proxy client: retrieve search from callback
2018-04-06 11:43:51 -04:00
Adrien Béraud
1acace1b91
proxy client: add missing mutex, cleanup
2018-04-05 02:35:01 -04:00
Sébastien Blin
5b71af3cec
proxy: remove useless callback_id
...
callback_id was used for token problems which are not present anymore.
Now token is sufficient and we can remove callback_id.
2018-04-03 10:43:56 -04:00
Sébastien Blin
393a403ff2
proxy_client: fix address split
2018-03-29 11:00:33 -04:00
Adrien Béraud
62e4655d4f
Merge pull request #264 from AmarOk1412/fixPublicAddr
...
dht_proxy_client: fix getPublicAdresss parsing
2018-03-28 16:44:34 -04:00
Sébastien Blin
60d43319e2
dht_proxy_client: fix getPublicAdresss
...
Retrieve all public ips (Ipv6 + v4). Has to resolve all proxy
address (so two get requests to get all ips)
2018-03-28 15:59:04 -04:00
Adrien Béraud
0edee443f5
cache: improve value expiration handling
2018-03-28 09:54:04 -04:00
Adrien Béraud
647de16f1c
proxy client: implement getLocal(), getLocalById()
2018-03-16 13:34:41 -04:00
Adrien Béraud
2f4acd26d6
dhtinterface: add listen() callback to signal expired values
2018-03-16 13:34:41 -04:00
Adrien Béraud
48bb804792
proxy client: add cache for values and operations
2018-03-16 13:34:40 -04:00
Sébastien Blin
2315dc089a
proxy_client: avoid to call getConnectivityStatus() when destroying
...
Because getConnectivityStatus is called each time an operation fails,
when destroying the proxy_client, we stop all operations so it fails.
2018-03-14 11:33:01 -04:00
Sébastien Blin
547fa2eff5
dht_proxy_client: fix getCallback for push notifications
...
Note: Also fix Value deserialization
2018-03-05 19:15:04 -05:00
Sébastien Blin
6f4283b7d5
proxyclient: avoid useless opFailed when correctly cancel a listen
2018-03-01 16:11:49 -05:00
Sébastien Blin
22ef53acef
dhtproxy: fix cancelListen with pushNotifications
...
Fill the body of the UNSUBSCRIBE method and fix dhtnode application
2018-02-26 15:25:48 -05:00
Sébastien Blin
63c9c607bd
pushnotifications: fix build without push notifications, improve travis script
2018-02-26 13:27:06 -05:00
Adrien Béraud
636eb1972d
proxy client: improve robustness, switch behavior
2018-01-18 16:36:13 -05:00
Adrien Béraud
27a250d2c0
proxyclient: fall to disconnected in case of connectivity failure
2018-01-17 12:09:39 -05:00
Adrien Béraud
0420ebcce3
dhtinterface: pass listen filters by value
2018-01-17 11:40:18 -05:00
Adrien Béraud
15e3696b88
proxy client: fix build when push notifications are disabled
2018-01-13 16:16:19 -05:00
Adrien Béraud
ca693a6ac1
pushNotificationReceived: take a map<string, string>
...
JSON is used for the DHT proxy protocol and to communicate with gorush.
Push notifications services might use any format, not necessarily JSON.
Push values are received as a map<string, string>, so receive them in
that format.
2018-01-12 13:20:07 -05:00
Adrien Béraud
ef82a7ecba
proxy client: make proxy status check asynchronous
2018-01-11 14:24:59 -05:00