msgsend

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 10 Imported by: 39

Documentation

Overview

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmMsg

type AlgorithmMsg struct {
	Account common.Address
	Data    NetData
}

AlgorithmMsg

type HD

type HD struct {
	// contains filtered or unexported fields
}

func NewHD

func NewHD() (*HD, error)

func (*HD) SendNodeMsg

func (self *HD) SendNodeMsg(subCode mc.EventCode, msg interface{}, Roles common.RoleType, nodes []common.Address)

func (*HD) SetBadMsg added in v1.1.2

func (self *HD) SetBadMsg(types string, subcode uint32, arg2 uint32, arg3 uint32)

type MsgCodec

type MsgCodec interface {
	EncodeFn(msg interface{}) ([]byte, error)
	DecodeFn(data []byte, from common.Address) (interface{}, error)
}

每个模块需要自己实现这两个接口

type NetData

type NetData struct {
	SubCode uint32
	Msg     []byte
}

NetData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL