GeezerVison is showing github.com — Use smaller number of boss threads in the example · netty/netty@87b853c
File tree
Expand file treeCollapse file tree
Open diff view settings
example/src/main/java/io/netty/example
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/applet/AppletDiscardServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,7 @@ public class AppletDiscardServer extends JApplet { |
41 | 41 |
|
42 | 42 | @Override |
43 | 43 | public void init() { |
44 | | - bossGroup = new NioEventLoopGroup(); |
| 44 | + bossGroup = new NioEventLoopGroup(1); |
45 | 45 | workerGroup = new NioEventLoopGroup(); |
46 | 46 | try { |
47 | 47 | ServerBootstrap bootstrap = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/discard/DiscardServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -35,7 +35,7 @@ public DiscardServer(int port) { |
35 | 35 | } |
36 | 36 |
|
37 | 37 | public void run() throws Exception { |
38 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 38 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
39 | 39 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
40 | 40 | try { |
41 | 41 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/echo/EchoServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -39,7 +39,7 @@ public EchoServer(int port) { |
39 | 39 |
|
40 | 40 | public void run() throws Exception { |
41 | 41 | // Configure the server. |
42 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 42 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
43 | 43 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
44 | 44 | try { |
45 | 45 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/factorial/FactorialServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ public FactorialServer(int port) { |
33 | 33 | } |
34 | 34 |
|
35 | 35 | public void run() throws Exception { |
36 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 36 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
37 | 37 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
38 | 38 | try { |
39 | 39 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/filetransfer/FileServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -50,7 +50,7 @@ public FileServer(int port) { |
50 | 50 |
|
51 | 51 | public void run() throws Exception { |
52 | 52 | // Configure the server. |
53 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 53 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
54 | 54 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
55 | 55 | try { |
56 | 56 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/cors/HttpServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -75,7 +75,7 @@ public HttpServer(int port) { |
75 | 75 | } |
76 | 76 |
|
77 | 77 | public void run() throws Exception { |
78 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 78 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
79 | 79 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
80 | 80 | try { |
81 | 81 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/file/HttpStaticFileServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,7 +29,7 @@ public HttpStaticFileServer(int port) { |
29 | 29 | } |
30 | 30 |
|
31 | 31 | public void run() throws Exception { |
32 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 32 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
33 | 33 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
34 | 34 | try { |
35 | 35 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/helloworld/HttpHelloWorldServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -36,7 +36,7 @@ public HttpHelloWorldServer(int port) { |
36 | 36 |
|
37 | 37 | public void run() throws Exception { |
38 | 38 | // Configure the server. |
39 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 39 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
40 | 40 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
41 | 41 | try { |
42 | 42 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/snoop/HttpSnoopServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -35,7 +35,7 @@ public HttpSnoopServer(int port) { |
35 | 35 |
|
36 | 36 | public void run() throws Exception { |
37 | 37 | // Configure the server. |
38 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 38 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
39 | 39 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
40 | 40 | try { |
41 | 41 | ServerBootstrap b = new ServerBootstrap(); |
|
Collapse file
Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -34,7 +34,7 @@ public HttpUploadServer(int port) { |
34 | 34 | } |
35 | 35 |
|
36 | 36 | public void run() throws Exception { |
37 | | - EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| 37 | + EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
38 | 38 | EventLoopGroup workerGroup = new NioEventLoopGroup(); |
39 | 39 | try { |
40 | 40 | ServerBootstrap b = new ServerBootstrap(); |
|