Versions in this module Expand all Collapse all v0 v0.5.3 Jun 14, 2019 v0.5.2 Jun 6, 2019 v0.5.1 May 25, 2019 v0.5.0 May 23, 2019 Changes in this version + const KS_EXIST + const KS_NOTEXIST + const MID_BLOCK + const MID_BLOCKHEADER + const MID_CHKK + const MID_EVENT + const MID_GCD + const MID_HANDSHAKE + const MID_INVALID + const MID_INVALID_EX + const MID_PCD + const MID_PING + const MID_PONG + const MID_RPTK + const MID_TX + const MaxProtocols + const P2pIndCb + const P2pIndPeerActivated + const P2pIndPeerClosed + const P2pPkgCb + const PEMGR_STOP4NAT + const PID_EXT + const PID_P2P + const PID_UNKNOWN + const PKI_FOR_BOUNDOUT_FAILED + const PKI_FOR_CLOSE_CFM + const PKI_FOR_FAILED_INST_CFM + const PKI_FOR_HANDSHAKE_FAILED + const PKI_FOR_IB2OB_DUPLICATED + const PKI_FOR_IBW_DUPLICATED + const PKI_FOR_OB2IB_DUPLICATED + const PKI_FOR_OBW_DUPLICATED + const PKI_FOR_RECONFIG + const PKI_FOR_TOOMUCH_INBOUNDS + const PKI_FOR_TOOMUCH_OUTBOUNDS + const PKI_FOR_TOOMUCH_WORKERS + const PeInstDirInbound + const PeInstDirNull + const PeInstDirOutbound + const PeInstMailboxSize + const PeInstMaxP2packages + const PeInstMaxPingpongCnt + const PeInstMaxPings + const PeInstPingpongCycle + const PeMgrEnoConfig + const PeMgrEnoDuplicated + const PeMgrEnoInternal + const PeMgrEnoMessage + const PeMgrEnoMismatched + const PeMgrEnoNetTemporary + const PeMgrEnoNone + const PeMgrEnoNotfound + const PeMgrEnoOs + const PeMgrEnoParameter + const PeMgrEnoPingpongTh + const PeMgrEnoRecofig + const PeMgrEnoResource + const PeMgrEnoScheduler + const PeMgrEnoSign + const PeMgrEnoUnknown + const PeMgrEnoVerify + const PeerAccepterName + const PeerLsnMgrName + type CheckKey struct + Extra []byte + Key []byte + func (ck *CheckKey) String() string + type ExtMessage struct + Chkk *CheckKey + Gcd *GetChainData + Mid uint32 + Pcd *PutChainData + Rptk *ReportKey + type GetChainData struct + Key []byte + Name string + Seq uint64 + func (gcd *GetChainData) String() string + type Handshake struct + ChainId uint32 + Dir int + IP net.IP + NodeId config.NodeID + ProtoNum uint32 + Protocols []Protocol + Snid SubNetworkID + TCP uint32 + UDP uint32 + type ListenerManager struct + func NewLsnMgr() *ListenerManager + func (lsnMgr *ListenerManager) TaskProc4Scheduler(ptn interface{}, msg *sch.SchMessage) sch.SchErrno + type MsgCloseCfm struct + type MsgCloseInd struct + type MsgPingpongReq struct + type P2pIndCallback func(what int, para interface{}, userData interface{}) interface + type P2pIndConnStatusPara struct + Description string + Flag bool + PeerInfo *Handshake + Ptn interface{} + Status int + type P2pIndPeerActivatedPara struct + P2pInst *sch.Scheduler + PeerInfo *Handshake + RxChan chan *P2pPackageRx + type P2pIndPeerClosedPara struct + Dir int + P2pInst *sch.Scheduler + PeerId PeerId + Snid SubNetworkID + type P2pMessage struct + Chkk *CheckKey + Handshake *Handshake + Mid uint32 + Ping *Pingpong + Pong *Pingpong + Rptk *ReportKey + type P2pPackage struct + Key []byte + Mid uint32 + Payload []byte + PayloadLength uint32 + Pid uint32 + func (upkg *P2pPackage) CheckKey(inst *PeerInstance, chkk *CheckKey, write bool) PeMgrErrno + func (upkg *P2pPackage) DebugPeerPackage() + func (upkg *P2pPackage) GetChainData(inst *PeerInstance, gcd *GetChainData, write bool) PeMgrErrno + func (upkg *P2pPackage) GetExtMessage(extMsg *ExtMessage) PeMgrErrno + func (upkg *P2pPackage) GetMessage(pmsg *P2pMessage) PeMgrErrno + func (upkg *P2pPackage) PutChainData(inst *PeerInstance, pcd *PutChainData, write bool) PeMgrErrno + func (upkg *P2pPackage) RecvPackage(inst *PeerInstance) PeMgrErrno + func (upkg *P2pPackage) ReportKey(inst *PeerInstance, rptk *ReportKey, write bool) PeMgrErrno + func (upkg *P2pPackage) SendPackage(inst *PeerInstance) PeMgrErrno + func (upkg *P2pPackage) String() string + type P2pPackage2Peer struct + Extra interface{} + IdList []PeerId + Key []byte + Mid int + P2pInst *sch.Scheduler + Payload []byte + PayloadLength int + ProtoId int + SubNetId SubNetworkID + type P2pPackageRx struct + Key []byte + MsgId int + Payload []byte + PayloadLength int + PeerInfo *PeerInfo + ProtoId int + Ptn interface{} + type P2pPkgCallback func(msg *P2pPackageRx, userData interface{}) interface + type PeMgrErrno int + func SendPackage(pkg *P2pPackage2Peer) PeMgrErrno + type PeerId = config.NodeID + type PeerIdEx struct + Dir int + Id config.NodeID + type PeerIdExx struct + Dir int + Node config.Node + Snid config.SubNetworkID + type PeerInfo Handshake + type PeerInstance struct + func (pi *PeerInstance) TaskProc4Scheduler(ptn interface{}, msg *sch.SchMessage) sch.SchErrno + type PeerManager struct + func NewPeerMgr() *PeerManager + func (peMgr *PeerManager) ClosePeer(snid *SubNetworkID, id *PeerId) PeMgrErrno + func (peMgr *PeerManager) GetInstIndChannel() chan interface{} + func (peMgr *PeerManager) GetLocalSubnetInfo() ([]config.SubNetworkID, map[config.SubNetworkID]config.Node) + func (peMgr *PeerManager) PeMgrInited() PeMgrErrno + func (peMgr *PeerManager) PeMgrStart() PeMgrErrno + func (peMgr *PeerManager) RegisterInstIndCallback(cb interface{}, userData interface{}) PeMgrErrno + func (peMgr *PeerManager) TaskProc4Scheduler(ptn interface{}, msg *sch.SchMessage) sch.SchErrno + type PeerReconfig struct + type Pingpong struct + Extra []byte + Seq uint64 + type Protocol struct + Pid uint32 + Ver [4]byte + type PutChainData struct + Data []byte + Key []byte + Name string + Seq uint64 + func (pcd *PutChainData) String() string + type ReportKey struct + Extra []byte + Key []byte + Status int32 + func (rk *ReportKey) String() string + type SubNetworkID = config.SubNetworkID