Documentation ¶
Index ¶
- Constants
- func Decrypt(ciphertext []byte, key []byte) ([]byte, error)
- func Encrypt(plaintext []byte, key []byte) ([]byte, error)
- func GetConnBs(reader *bufio.Reader) (b []byte, err error)
- func MustBase64ToBytes(str string) []byte
- func MustMarshal(body interface{}) []byte
- func MustUnmarshal(b []byte, body interface{})
- func MustUnmarshalV2(inBody interface{}, outBody interface{})
- func NewId(n int) (str string)
- func Println(conn net.Conn, i ...any)
- func UnmarshalV2(inBody interface{}, outBody interface{}) error
- type CFCHookConfig
- type ConnMsg
- type Key
- func (k *Key) Decode(i interface{}, data []byte) error
- func (k *Key) Encode(i interface{}) (b [][]byte)
- func (k *Key) GetMsg(reader *bufio.Reader) (c ConnMsg, err error)
- func (k *Key) GetMsgV2(reader *bufio.Reader) (b []byte, err error)
- func (k *Key) SetMsg(header, id string, code int, data interface{}) [][]byte
- type MashBytes
- type OdjAddr
- type OdjClientInfo
- type OdjIdList
- type OdjInfo
- type OdjMsg
- type OdjPing
- type OdjSub
- type Ping
Constants ¶
View Source
const BufferSize = 4096
bytes size = 4096 data len 4004=4096-8-60-8-16
View Source
const DelayA = "DelayA"
View Source
const DelayQ = "DelayQ"
View Source
const HandshakeCheckStepA1 = "Hi! What's your Info?"
View Source
const HandshakeCheckStepA2 = "OK! Happy handshake"
View Source
const HandshakeCheckStepQ1 = "Hello! I want to shake hands."
View Source
const HandshakeCheckStepQ2 = "Here it is"
View Source
const PingMsg = "Ping"
View Source
const PongMsg = "Pong"
View Source
const SOpenA = "sOpenA"
View Source
const SOpenQ = "sOpenQ"
View Source
const TaskA = "TaskA"
View Source
const TaskQ = "TaskQ"
Variables ¶
This section is empty.
Functions ¶
func MustBase64ToBytes ¶ added in v1.2.1
func MustMarshal ¶
func MustMarshal(body interface{}) []byte
func MustUnmarshal ¶
func MustUnmarshal(b []byte, body interface{})
func MustUnmarshalV2 ¶
func MustUnmarshalV2(inBody interface{}, outBody interface{})
func UnmarshalV2 ¶
func UnmarshalV2(inBody interface{}, outBody interface{}) error
Types ¶
type CFCHookConfig ¶ added in v1.1.0
type CFCHookConfig struct { Ct struct { Key string `json:"Key"` Name string `json:"Name"` IP string `json:"IP"` Port string `json:"Port"` } `json:"Ct"` Tcp struct { Server []struct { Name string `json:"Name"` IP string `json:"IP"` Port string `json:"Port"` } `json:"Server"` Client []struct { Name string `json:"Name"` IP string `json:"IP"` Port string `json:"Port"` } `json:"Client"` } `json:"Tcp"` }
func GetCFCHookConfig ¶ added in v1.1.0
func GetCFCHookConfig(path string) *CFCHookConfig
type MashBytes ¶ added in v1.2.1
type MashBytes struct {
Data string `json:"go-CFC-Data"`
}
func MustBytesToBase64 ¶ added in v1.2.1
type OdjClientInfo ¶
type OdjClientInfo struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.