Versions in this module Expand all Collapse all v1 v1.0.1 Sep 22, 2023 v1.0.0 Jul 26, 2023 Changes in this version + const CLIENT + const DEFAULT_PACK_HEADER + const DEFAULT_PORT + const DEFAULT_SERVER_UID + const DEFAULT_TIMEOUT_C + const DEFAULT_TIMEOUT_S + const DataLengthOfLenth + const FAILURE + const HEARTBEAT + const IDENTITY + const LLLEGAL + const LOOP_TIMEOUT + const SERVER + const SUCCESS + func BytesToInt(b []byte) int + func HashString(encode string) uint64 + func IntToBytes(n int) []byte + func MakeHash(s string) string + func MakeMd5(obj interface{}, length int) string + func MakeUnique(obj interface{}) string + type API map[string]Handle + type Connect struct + Buffer []byte + Short bool + TmpBuffer []byte + Usable bool + WriteChan chan *NetData + func NewConnect(conn net.Conn, bufferLen int, wChanCap int) (k string, v *Connect) + func (self *Connect) Addr() string + type Handle interface + Process func(*NetData) *NetData + type NetData struct + Body interface{} + Flag string + From string + Operation string + Status int + To string + func NewNetData(from, to, operation string, flag string, body interface{}) *NetData + func ReturnData(body interface{}, OpAndToAndFrom ...string) *NetData + func ReturnError(receive *NetData, status int, msg string, nodeuid ...string) *NetData + type Protocol struct + func NewProtocol(packetHeader string) *Protocol + func (self *Protocol) Packet(message []byte) []byte + func (self *Protocol) ReSet(header string) + func (self *Protocol) Unpack(buffer []byte) (readerSlice [][]byte, bufferOver []byte) + type TP struct + func (self *TP) Client(serverAddr string, port string, isShort ...bool) + func (self *TP) Close(nodeuid ...string) + func (self *TP) CountNodes() int + func (self *TP) GetMode() int + func (self *TP) Request(body interface{}, operation string, flag string, nodeuid ...string) + func (self *TP) Server(port ...string) + func (self *TP) SetAPI(api API) Teleport + func (self *TP) SetApiRChan(length int) Teleport + func (self *TP) SetConnBuffer(length int) Teleport + func (self *TP) SetConnWChan(length int) Teleport + func (self *TP) SetPackHeader(header string) Teleport + func (self *TP) SetTimeout(long time.Duration) Teleport + func (self *TP) SetUID(mine string, server ...string) Teleport + type Teleport interface + Client func(serverAddr string, port string, isShort ...bool) + Close func(nodeuid ...string) + CountNodes func() int + GetMode func() int + Request func(body interface{}, operation string, flag string, nodeuid ...string) + Server func(port ...string) + SetAPI func(api API) Teleport + SetApiRChan func(int) Teleport + SetConnBuffer func(int) Teleport + SetConnWChan func(int) Teleport + SetPackHeader func(string) Teleport + SetTimeout func(time.Duration) Teleport + SetUID func(mine string, server ...string) Teleport + func New() Teleport