feat(go): Port full Ananta private server to Go architecture
This commit is contained in:
1 parent
ca2e80f9b7
commit
c73d744649
28 files changed
+3585
-57
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package protocol
|
||||
|
||||
type RpcPacketKind byte
|
||||
|
||||
const (
|
||||
PacketKindUnknown RpcPacketKind = 0x00
|
||||
PacketKindInvoke RpcPacketKind = 0x01
|
||||
PacketKindReturn RpcPacketKind = 0x02
|
||||
PacketKindNotify RpcPacketKind = 0x03
|
||||
)
|
||||
|
||||
type RpcPacket struct {
|
||||
Kind RpcPacketKind
|
||||
MethodID uint32
|
||||
InvokeID int32
|
||||
Error int32
|
||||
Body []byte
|
||||
}
|
||||
|
||||
func (p RpcPacket) IsInvoke() bool { return p.Kind == PacketKindInvoke }
|
||||
func (p RpcPacket) IsNotify() bool { return p.Kind == PacketKindNotify }
|
||||
func (p RpcPacket) IsReturn() bool { return p.Kind == PacketKindReturn }
|
||||
Reference in new issue
Block a user