Documentation ¶
Index ¶
- Constants
- Variables
- func Broatcast(msg string)
- func BroatcastToGroup(msg string)
- func GetEnodes() (int, string)
- func GetGroup() (int, string)
- func GetSelfID() discover.NodeID
- func HandlePeer(peer *p2p.Peer, rw p2p.MsgReadWriter) error
- func RegisterCallback(recvDcrmFunc func(interface{}))
- func RegisterDcrmCallback(dcrmcallback func(interface{}) <-chan string)
- func RegisterDcrmRetCallback(dcrmcallback func(interface{}))
- func RegisterRecvCallback(recvPrivkeyFunc func(interface{}))
- func SendMsg(msg string)
- func SendMsgToPeer(toid discover.NodeID, toaddr *net.UDPAddr, msg string) error
- func SendToDcrmGroup(msg string) string
- func SendToPeer(enode string, msg string)
- func StartTest()
- type Config
- type Dcrm
- type DcrmAPI
- type Emitter
- type Group
- type Peer
- type Transaction
Constants ¶
View Source
const ( ProtocolName = "dcrm" ProtocolVersion = 1 ProtocolVersionStr = "1" NumberOfMessageCodes = 8 + iota // msgLength )
TODO
Variables ¶
View Source
var DefaultConfig = Config{ DcrmNodes: make([]*discover.Node, 0), }
Functions ¶
func BroatcastToGroup ¶ added in v0.4.1
func BroatcastToGroup(msg string)
func HandlePeer ¶ added in v0.4.1
func HandlePeer(peer *p2p.Peer, rw p2p.MsgReadWriter) error
func RegisterCallback ¶
func RegisterCallback(recvDcrmFunc func(interface{}))
func RegisterDcrmCallback ¶ added in v0.4.1
func RegisterDcrmCallback(dcrmcallback func(interface{}) <-chan string)
func RegisterDcrmRetCallback ¶ added in v0.4.1
func RegisterDcrmRetCallback(dcrmcallback func(interface{}))
func RegisterRecvCallback ¶ added in v0.4.1
func RegisterRecvCallback(recvPrivkeyFunc func(interface{}))
func SendMsgToPeer ¶ added in v0.4.1
func SendToDcrmGroup ¶ added in v0.4.1
func SendToPeer ¶ added in v0.4.1
Types ¶
type Dcrm ¶ added in v0.4.1
type Dcrm struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.4.1
New creates a Whisper client ready to communicate through the Ethereum P2P network.
func (*Dcrm) APIs ¶ added in v0.4.1
APIs returns the RPC descriptors the Whisper implementation offers
func (*Dcrm) Protocols ¶ added in v0.4.1
Protocols returns the whisper sub-protocols ran by this particular client.
type DcrmAPI ¶ added in v0.4.1
type DcrmAPI struct {
// contains filtered or unexported fields
}
type Emitter ¶
func NewEmitter ¶
func NewEmitter() *Emitter
type Group ¶ added in v0.4.1
func NewDcrmGroup ¶ added in v0.4.1
func NewDcrmGroup() *Group
type Transaction ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.