Documentation
¶
Index ¶
Constants ¶
View Source
const OpType_DEBUG = 0x00
Highest bit indicates if it is a reply
View Source
const OpType_PROOFREP = 0x82
View Source
const OpType_PROOFREQ = 0x02
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MajorVersion ¶
type MajorVersion uint8
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents a message sent between two peers. It can contain multiple Op's Wire Format: 0 - Major Version 1 - Minor Version 2:4 - Message Length, computed by len(m.data) 4:8 - Message ID 8: - Message Data
func NewMessage ¶
func NewMessage() *Message
type MinorVersion ¶
type MinorVersion uint8
type Op ¶
type Op struct {
// contains filtered or unexported fields
}
Op represents the op of a single operation. There can be multiple within a single Message Wire Format: 0 - Message Type 1 - Reserved 2:4 - Op Length, computed by len(b.data) 4:8 - Op ID 8: - Op Data
func (*Op) GetContent ¶
type Op_Debug ¶
func Unmarshal_Debug ¶
type Op_ProofRep ¶
type Op_ProofRep struct { Proof []byte `msgpack:"p"` ReplyingToID OpID `msgpack:"r"` ReplyingOp }
func Unmarshal_ProofRep ¶
func Unmarshal_ProofRep(data []byte) (*Op_ProofRep, error)
func (Op_ProofRep) GetReplyingTo ¶
func (o Op_ProofRep) GetReplyingTo() OpID
func (Op_ProofRep) Marshal ¶
func (r Op_ProofRep) Marshal() ([]byte, error)
type Op_ProofReq ¶
type Op_ProofReq struct { Domain string `msgpack:"d"` Challenge []byte `msgpack:"p"` HashFunc crypto.Hash `msgpack:"h"` SigType netcommon.SigType `msgpack:"s"` }
func Unmarshal_ProofReq ¶
func Unmarshal_ProofReq(data []byte) (*Op_ProofReq, error)
func (*Op_ProofReq) Marshal ¶
func (o *Op_ProofReq) Marshal() ([]byte, error)
type ProtoServer ¶
type ReplyingOp ¶
type ReplyingOp interface {
GetReplyingTo() OpID
}
Click to show internal directories.
Click to hide internal directories.