Skip to content

Latest commit

 

History

History
551 lines (535 loc) · 21 KB

examples.md

File metadata and controls

551 lines (535 loc) · 21 KB

Sample logical plug-in engineering instructions

(1)TcpTest plugin

target

Implement standard TCP packet processing flow display。

Test message format

Test message id message description Packet information
COMMAND_BASE(0x1000) Test packet structure Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Packet length
stringPacket body content

(2)UdpTest plugin

target

Implement standard UDP packet processing flow display.

Test message format

Test message id message description Packet information
COMMAND_BASE(0x1000) Test packet structure Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Packet length
stringPacket body content

(3)AutoTest plugin

target

Realize the packet integrity detection function of PSS framework.

Test message format

Test message id message description Packet information
COMMAND_AUTOTEST_HEAD(0x5000) include header message Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
COMMAND_AUTOTEST_NOHEAD(0x5001) no include header message Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
COMMAND_AUTOTEST_HEADBUFF(0x5002) include header cache message Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
COMMAND_AUTOTEST_NOHEADBUFF(0x5003) no include header cache message Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
COMMAND_AUTOTEST_LOGDATA(0x5004) Test log Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
COMMAND_AUTOTEST_WORKAI(0x5006) Test workAI Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp

(4)FtpTest plugin

target

Realize simple FTP browse and download function for PSS framework.

Test message format

Test message id message description Packet information
COMMAND_LOGIN(0x2000) Login Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login length
stringLogin name
uint8Login password length
stringLogin password
COMMAND_LOGOUT(0x2001) exit Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login length
stringLogin name
COMMAND_FILELIST(0x2002) file and path list Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
uint8Current path length
stringCurrent path
COMMAND_FILE_DOWNLOAD(0x2003) download file Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
uint8Current file name length
stringCurrent file name
uint32paacket length
uint32Packet sequence number, first 0
COMMAND_FILE_UPLOAD(0x2004) upload file Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint64Packet timestamp
uint8Login name length
stringLogin name
uint8Current file name length
stringCurrent file name
uint32paacket length
uint32Packet sequence number, first 0
uint32File block size
stringFile block

(5)Http plugin

target

Implement http command parsing support for PSS.

Test message format

Test message id message description Packet information
COMMAND_HTTP_DATA(0xea01) Http data request protocol packet Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringHttpPacket body content

(6)kafka plugin

target

Implementation of PSS framework for Kafka interface support.

Test message format

No instructions received, this function is to demonstrate the integration of Kafka 's consumer thread and PSS, Kafka 's consumer information received and issued.

(7)LoginBuffer plugin

target

Realize the interaction between PSS and shared memory, and realize the reading and writing of users through shared memory.

Test message format

Test message id message description Packet information
COMMAND_LOGIN(0x2100) Login Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
uint8password length
stringpassword
COMMAND_LOGOUT(0x2101) exit Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
COMMAND_USERINFO(0x2102) Search user Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Login nameID
COMMAND_SET_USERINFO(0x2103) set user Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Login nameID
uint32user life
uint32user magic

(8)LoginBuffer plugin

target

Realize the interaction between PSS and shared memory, and realize the reading and writing of users through shared memory.

Test message format

Test message id message description Packet information
COMMAND_LOGIN(0x2100) Login Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
uint8Password length
stringPassword
COMMAND_LOGOUT(0x2101) exit Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8Login name length
stringLogin name
COMMAND_USERINFO(0x2102) Search user Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Login nameID
COMMAND_SET_USERINFO(0x2103) Set user Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint32Login nameID
uint32user life
uint32user magic

(9)LuaTest plugin

target

Implement call to PSS and Lua scripts.

Test message format

Test message id message description Packet information
COMMAND_BASE(0x1000) Login Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringparams

(10)PlugAtoB plugin

target

Implement call to PSS plug-ins.

Test message format

Test message id message description Packet information
COMMAND_PLUGA(0x2201) Implement inter-plug-in message notification Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
uint8data length
stringdata

(11)Proxy plugin

target

Message forwarding between client and server of PSS is realized.

Test message format

Test message id message description Packet information
COMMAND_PROXY(0x1030) Messages that need to be forwarded to other servers Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params

(12)TestTCPPost plugin

target

Tcp data transmission to PSS is realized.

Test message format

Test message id message description Packet information
COMMAND_PROXY(0x1030) Messages that need to be forwarded to other servers Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params

(13)TestUDPPost plugin

target

Realize UDP data transmission to PSS.

Test message format

Test message id message description Packet information
COMMAND_PROXY(0x1030) Messages that need to be forwarded to other servers Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params

(14)TimerTest plugin

target

Implements a timer call plug-in to PSS.

Test message format

Test message id message description Packet information
COMMAND_TIMER(0x1100) Timer call instruction Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params

(15)WebSocket plugin

target

Realize the WebSocket message parsing of PSS.

Test message format

Test message id message description Packet information
COMMAND_HANDIN(0xee01) websocket message header validation Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params
Test message id message description Packet information
COMMAND_DATAIN(0xee02) websocket message body Attribute description
uint16Packet version number
uint16Packet command id
uint32Packet length
string(32 chars)Packet session
stringData params

(15)ZooClient plugin

target

Implements the call to the zookeeper message by PSS.

Test message format

No packets, just realize the discovery function of zookeeper.