rpc: Reduce code duplication
rpc: Reduce code duplication

Message-Id: <9790012c193145df3b5458ccdb8b9e9352032cee@scylladb.com>

cloudius-systems/seastar,cloudius-systems/seastar,dreamsxin/seastar,syuu1228/seastar,avikivity/seastar,avikivity/seastar,avikivity/seastar,dreamsxin/seastar,scylladb/seastar,scylladb/seastar,scylladb/seastar,cloudius-systems/seastar,syuu1228/seastar,syuu1228/seastar,dreamsxin/seastar