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

Method Server

node/node.go:497–502  ·  view source on GitHub ↗

Server retrieves the currently running P2P network layer. This method is meant only to inspect fields of the currently running server, life cycle management should be left to this Node entity.

()

Source from the content-addressed store, hash-verified

495// only to inspect fields of the currently running server, life cycle management
496// should be left to this Node entity.
497func (n *Node) Server() *p2p.Server {
498 n.lock.RLock()
499 defer n.lock.RUnlock()
500
501 return n.server
502}
503
504// Service retrieves and sets a currently running service registered of a specific type.
505func (n *Node) Service(service interface{}) error {

Callers 7

AddPeerMethod · 0.80
RemovePeerMethod · 0.80
PeerEventsMethod · 0.80
PeersMethod · 0.80
NodeInfoMethod · 0.80
ClientVersionMethod · 0.80
TestProtocolGatherFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestProtocolGatherFunction · 0.64