MCPcopy Create free account
hub / github.com/CPChain/chain / newClientSubscription

Function newClientSubscription

api/rpc/client.go:721–732  ·  view source on GitHub ↗
(c *Client, namespace string, channel reflect.Value)

Source from the content-addressed store, hash-verified

719}
720
721func newClientSubscription(c *Client, namespace string, channel reflect.Value) *ClientSubscription {
722 sub := &ClientSubscription{
723 client: c,
724 namespace: namespace,
725 etype: channel.Type().Elem(),
726 channel: channel,
727 quit: make(chan struct{}),
728 err: make(chan error, 1),
729 in: make(chan json.RawMessage),
730 }
731 return sub
732}
733
734// Err returns the subscription error channel. The intended use of Err is to schedule
735// resubscription when the client connection is closed unexpectedly.

Callers 1

SubscribeMethod · 0.85

Calls 1

TypeMethod · 0.80

Tested by

no test coverage detected