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.
()
| 495 | // only to inspect fields of the currently running server, life cycle management |
| 496 | // should be left to this Node entity. |
| 497 | func (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. |
| 505 | func (n *Node) Service(service interface{}) error { |
no outgoing calls