msgpack-rpc / msgpack-rpc-python

MessagePack RPC implementation for Python
205 stars 72 forks source link

Separate timeout for connect() and call() #20

Open wosiu opened 6 years ago

wosiu commented 6 years ago

My use-case: If I connect to server, I want to know that there is something wrong immediately. However when I call my client, I want to wait longer, as my calculation in RPC server logic takes a while. The best would be to be able to provide timeout kwarg to call() method, so that a developer can specify separate timeouts for each call. Question is, how timeout parameter in call method should be set as a default. 2 ideas: 1) whatever, like 10 sec 2) None. In that case timeout which was used for creating Client is used for call as it is done right now - backward compatibility provided.

I may try to develop something and PR, but let me know first what do you think plz.