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

Struct ClientSubscription

api/rpc/client.go:707–719  ·  view source on GitHub ↗

Subscriptions. A ClientSubscription represents a subscription established through EthSubscribe.

Source from the content-addressed store, hash-verified

705
706// A ClientSubscription represents a subscription established through EthSubscribe.
707type ClientSubscription struct {
708 client *Client
709 etype reflect.Type
710 channel reflect.Value
711 namespace string
712 subid string
713 in chan json.RawMessage
714
715 quitOnce sync.Once // ensures quit is closed once
716 quit chan struct{} // quit is closed when the subscription exits
717 errOnce sync.Once // ensures err is closed once
718 err chan error
719}
720
721func newClientSubscription(c *Client, namespace string, channel reflect.Value) *ClientSubscription {
722 sub := &ClientSubscription{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected