router

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastMsgByServerType

func BroadcastMsgByServerType(svrType uint32, uid uint64, cmd uint32, sendSeq uint16, data []byte) error

func BroadcastPbMsgByServerType

func BroadcastPbMsgByServerType(svrType uint32, uid uint64, cmd uint32, sendSeq uint16, pbMsg proto.Message) error

func InitAndRun

func InitAndRun(selfBusId string, cb CbOnRecvSSPacket, rabbitmqAddr string,
	routeRules map[uint32]uint32, zookeeperAddr string) error

cb CbOnRecvSSPacket将由底层(bus)协程调用

func SelfBusId

func SelfBusId() uint32

func SelfSvrType

func SelfSvrType() uint32

func SendMsg

func SendMsg(packetHeader *sharedstruct.SSPacketHeader, packetBody []byte) error

最终通过bus发消息的地方(其他都是易用性封装)

func SendMsgBack

func SendMsgBack(originalHeader sharedstruct.SSPacketHeader, srcTransId uint32, pbMsg proto.Message)

func SendMsgByBusId

func SendMsgByBusId(busId uint32, uid uint64, cmd uint32, sendSeq uint16, srcTransId uint32, data []byte) error

func SendMsgBySvrType

func SendMsgBySvrType(svrType uint32, uid uint64, cmd uint32, sendSeq uint16, srcTransId uint32, data []byte) error

func SendMsgBySvrTypeConn

func SendMsgBySvrTypeConn(svrType uint32, uid uint64, cmd uint32, sendSeq uint16, srcTransId uint32, data []byte, remoteAddr string) error

func SendPbMsg

func SendPbMsg(packetHeader *sharedstruct.SSPacketHeader, pbMsg proto.Message) error

func SendPbMsgByBusId

func SendPbMsgByBusId(busId uint32, uid uint64, cmd uint32, sendSeq uint16, srcTransId uint32, pbMsg proto.Message) error

func SendPbMsgByBusIdSimple

func SendPbMsgByBusIdSimple(busId uint32, uid uint64, cmd uint32, pbMsg proto.Message) error

func SendPbMsgBySvrType

func SendPbMsgBySvrType(svrType uint32, uid uint64, cmd uint32, sendSeq uint16, srcTransId uint32, pbMsg proto.Message) error

func SendPbMsgBySvrTypeSimple

func SendPbMsgBySvrTypeSimple(svrType uint32, uid uint64, cmd uint32, pbMsg proto.Message) error

Types

type CbOnRecvSSPacket

type CbOnRecvSSPacket func(*sharedstruct.SSPacket) // frameMsg的所有权,归回调函数

type CbOnRecvSSPacket func(*sharedstruct.SSPacketHeader, []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL