use of reactor.netty.Connection in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
Connection server = UdpServer.create().host(// <1>
"localhost").port(// <2>
8080).bindNow(Duration.ofSeconds(30));
server.onDispose().block();
}
use of reactor.netty.Connection in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
Connection server = // <1>
UdpServer.create().bindNow(// <2>
Duration.ofSeconds(30));
server.onDispose().block();
}
use of reactor.netty.Connection in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
Connection server = UdpServer.create().doOnBound(// <1>
conn -> conn.addHandler(new LineBasedFrameDecoder(8192))).doOnChannelInit((observer, channel, remoteAddress) -> channel.pipeline().addFirst(// <2>
new LoggingHandler("reactor.netty.examples"))).bindNow(Duration.ofSeconds(30));
server.onDispose().block();
}
use of reactor.netty.Connection in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
Connection server = UdpServer.create().wiretap("logger-name", LogLevel.DEBUG, // <1>
AdvancedByteBufFormat.TEXTUAL).bindNow(Duration.ofSeconds(30));
server.onDispose().block();
}
use of reactor.netty.Connection in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
LoopResources loop = LoopResources.create("event-loop", 1, 4, true);
Connection server = UdpServer.create().runOn(loop).bindNow(Duration.ofSeconds(30));
server.onDispose().block();
}
Aggregations