mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化rpc-减少gc
This commit is contained in:
@@ -30,7 +30,6 @@ type TcpGateService struct {
|
||||
|
||||
func (gateService *TcpGateService) OnInit() error {
|
||||
gateService.OnLoad()
|
||||
|
||||
//注册监听客户连接断开事件
|
||||
gateService.processor.SetDisConnectedHandler(gateService.router.OnDisconnected)
|
||||
//注册监听客户连接事件
|
||||
@@ -44,6 +43,10 @@ func (gateService *TcpGateService) OnInit() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (gateService *TcpGateService) SetEventChannel(channelNum int){
|
||||
gateService.GetEventProcessor().SetEventChannel(channelNum)
|
||||
}
|
||||
|
||||
func (gateService *TcpGateService) OnLoad() {
|
||||
//设置默认LoadBalance
|
||||
if gateService.loadBalance == nil {
|
||||
|
||||
Reference in New Issue
Block a user