NewPersistentCallerWithPool returns a persistent RPCCaller. IMPORTANT: If a PersistentCaller is firstly used by a DHT.Ping, which is an anonymous ETLS connection. It should not be used by any other RPC except DHT.Ping.
(pool NOClientPool, target proto.NodeID)
| 42 | // IMPORTANT: If a PersistentCaller is firstly used by a DHT.Ping, which is an anonymous |
| 43 | // ETLS connection. It should not be used by any other RPC except DHT.Ping. |
| 44 | func NewPersistentCallerWithPool(pool NOClientPool, target proto.NodeID) *PersistentCaller { |
| 45 | return &PersistentCaller{ |
| 46 | pool: pool, |
| 47 | TargetID: target, |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func (c *PersistentCaller) initClient(isAnonymous bool) (err error) { |
| 52 | c.Lock() |
no outgoing calls