本文整理了Java中io.reactivex.netty.RxNetty.newUdpServerBuilder
方法的一些代码示例,展示了RxNetty.newUdpServerBuilder
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RxNetty.newUdpServerBuilder
方法的具体详情如下:
包路径:io.reactivex.netty.RxNetty
类名称:RxNetty
方法名:newUdpServerBuilder
暂无
代码示例来源:origin: io.reactivex/rxnetty
public static <I, O> UdpServer<I, O> createUdpServer(final int port, PipelineConfigurator<I, O> pipelineConfigurator,
ConnectionHandler<I, O> connectionHandler) {
return newUdpServerBuilder(port, connectionHandler).pipelineConfigurator(pipelineConfigurator).build();
}
代码示例来源:origin: com.netflix.rxnetty/rx-netty
public static <I, O> UdpServer<I, O> createUdpServer(final int port, PipelineConfigurator<I, O> pipelineConfigurator,
ConnectionHandler<I, O> connectionHandler) {
return newUdpServerBuilder(port, connectionHandler).pipelineConfigurator(pipelineConfigurator).build();
}
代码示例来源:origin: com.netflix.karyon/karyon2-governator
/**
* Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
* handling to {@link ConnectionHandler}.
* The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
*
* @param port Port for the server.
* @param handler Connection Handler
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
BootstrapModule... bootstrapModules) {
UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
return new RxNettyServerBackedServer(server, bootstrapModules);
}
代码示例来源:origin: com.netflix.karyon/karyon-governator
/**
* Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
* handling to {@link ConnectionHandler}.
* The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
*
* @param port Port for the server.
* @param handler Connection Handler
* @param suites Additional suites if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
LifecycleInjectorBuilderSuite... suites) {
UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
return new RxNettyServerBackedServer(server, suites);
}
代码示例来源:origin: com.netflix.karyon2/karyon-governator
/**
* Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
* handling to {@link ConnectionHandler}.
* The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
*
* @param port Port for the server.
* @param handler Connection Handler
* @param bootstrapModules Additional bootstrapModules if any.
*
* @return {@link KaryonServer} which is to be used to start the created server.
*/
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
BootstrapModule... bootstrapModules) {
UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
return new RxNettyServerBackedServer(server, bootstrapModules);
}
内容来源于网络,如有侵权,请联系作者删除!