Skip to content

Commit a2ddf62

Browse files
committed
Documentation cosmetics
1 parent 8dcfa57 commit a2ddf62

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

vertx-core/src/main/java/examples/NetExamples.java

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,18 @@ public void configureTrafficShapingForNetServer(Vertx vertx) {
474474

475475
public void dynamicallyUpdateTrafficShapingForNetServer(Vertx vertx) {
476476
NetServerOptions options = new NetServerOptions()
477-
.setHost("localhost")
478-
.setPort(1234)
479-
.setTrafficShapingOptions(new TrafficShapingOptions()
480-
.setInboundGlobalBandwidth(64 * 1024)
481-
.setOutboundGlobalBandwidth(128 * 1024));
477+
.setHost("localhost")
478+
.setPort(1234)
479+
.setTrafficShapingOptions(new TrafficShapingOptions()
480+
.setInboundGlobalBandwidth(64 * 1024)
481+
.setOutboundGlobalBandwidth(128 * 1024));
482+
482483
NetServer server = vertx.createNetServer(options);
484+
483485
TrafficShapingOptions update = new TrafficShapingOptions()
484-
.setInboundGlobalBandwidth(2 * 64 * 1024) // twice
485-
.setOutboundGlobalBandwidth(128 * 1024); // unchanged
486+
.setInboundGlobalBandwidth(2 * 64 * 1024) // twice
487+
.setOutboundGlobalBandwidth(128 * 1024); // unchanged
488+
486489
server
487490
.listen(1234, "localhost")
488491
// wait until traffic shaping handler is created for updates
@@ -503,15 +506,17 @@ public void configureTrafficShapingForHttpServer(Vertx vertx) {
503506

504507
public void dynamicallyUpdateTrafficShapingForHttpServer(Vertx vertx) {
505508
HttpServerOptions options = new HttpServerOptions()
506-
.setHost("localhost")
507-
.setPort(1234)
508-
.setTrafficShapingOptions(new TrafficShapingOptions()
509-
.setInboundGlobalBandwidth(64 * 1024)
510-
.setOutboundGlobalBandwidth(128 * 1024));
509+
.setHost("localhost")
510+
.setPort(1234)
511+
.setTrafficShapingOptions(new TrafficShapingOptions()
512+
.setInboundGlobalBandwidth(64 * 1024)
513+
.setOutboundGlobalBandwidth(128 * 1024));
514+
511515
HttpServer server = vertx.createHttpServer(options);
512516
TrafficShapingOptions update = new TrafficShapingOptions()
513-
.setInboundGlobalBandwidth(2 * 64 * 1024) // twice
514-
.setOutboundGlobalBandwidth(128 * 1024); // unchanged
517+
.setInboundGlobalBandwidth(2 * 64 * 1024) // twice
518+
.setOutboundGlobalBandwidth(128 * 1024); // unchanged
519+
515520
server
516521
.listen(1234, "localhost")
517522
// wait until traffic shaping handler is created for updates

0 commit comments

Comments
 (0)