类 TcpMicroBootstrapFlow
java.lang.Object
com.iohao.game.external.core.netty.micro.TcpMicroBootstrapFlow
- 所有已实现的接口:
ExternalCoreSettingAware,MicroBootstrapFlow<io.netty.bootstrap.ServerBootstrap>
tcp 与真实玩家连接服务器的启动流程
- 作者:
- 渔民小镇
- 日期:
- 2023-05-28
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidchannelInitializer(io.netty.bootstrap.ServerBootstrap bootstrap) 给服务器做一些业务编排voidoption(io.netty.bootstrap.ServerBootstrap bootstrap) 给服务器做一些 option 设置voidpipelineCodec(PipelineContext context) 编解码相关的voidpipelineCustom(PipelineContext context) 自定义的业务编排(给服务器做一些业务编排)voidpipelineIdle(PipelineContext context) 心跳相关的voidsetExternalCoreSetting(ExternalCoreSetting externalCoreSetting) 框架会调用此方法,将 ExternalCoreSetting 对象传入从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.iohao.game.external.core.micro.MicroBootstrapFlow
createFlow, pipelineFlow
-
构造器详细资料
-
TcpMicroBootstrapFlow
public TcpMicroBootstrapFlow()
-
-
方法详细资料
-
option
public void option(io.netty.bootstrap.ServerBootstrap bootstrap) 从接口复制的说明:MicroBootstrapFlow给服务器做一些 option 设置构建时,此时服务器还没启动- 参数:
bootstrap- 服务器
-
pipelineCodec
从接口复制的说明:MicroBootstrapFlow编解码相关的新建连接时,服务器已经启动,每次有新连接进来时,会触发。- 参数:
context- PipelineContext
-
channelInitializer
public void channelInitializer(io.netty.bootstrap.ServerBootstrap bootstrap) 从接口复制的说明:MicroBootstrapFlow给服务器做一些业务编排构建时,此时服务器还没启动- 参数:
bootstrap- 服务器
-
pipelineIdle
从接口复制的说明:MicroBootstrapFlow心跳相关的新建连接时,服务器已经启动,每次有新连接进来时,会触发。- 参数:
context- PipelineContext
-
pipelineCustom
从接口复制的说明:MicroBootstrapFlow自定义的业务编排(给服务器做一些业务编排)新建连接时,服务器已经启动,每次有新连接进来时,会触发。- 参数:
context- PipelineContext
-
setExternalCoreSetting
从接口复制的说明:ExternalCoreSettingAware框架会调用此方法,将 ExternalCoreSetting 对象传入- 指定者:
setExternalCoreSetting在接口中ExternalCoreSettingAware- 参数:
externalCoreSetting- externalCoreSetting
-