Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Madan Jampani
2014-10-21 13:47:12 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
99e9fe2c15fbeedc14f12289aa31f7de0726e542
99e9fe2c
1 parent
14154350
Better netty transport initialization
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
utils/netty/src/main/java/org/onlab/netty/NettyMessagingService.java
utils/netty/src/main/java/org/onlab/netty/NettyMessagingService.java
View file @
99e9fe2
...
...
@@ -18,7 +18,6 @@ import io.netty.channel.ChannelOption;
import
io.netty.channel.EventLoopGroup
;
import
io.netty.channel.ServerChannel
;
import
io.netty.channel.SimpleChannelInboundHandler
;
import
io.netty.channel.epoll.Epoll
;
import
io.netty.channel.epoll.EpollEventLoopGroup
;
import
io.netty.channel.epoll.EpollServerSocketChannel
;
import
io.netty.channel.epoll.EpollSocketChannel
;
...
...
@@ -64,18 +63,13 @@ public class NettyMessagingService implements MessagingService {
// try Epoll first and if that does work, use nio.
// TODO: make this configurable.
try
{
if
(
Epoll
.
isAvailable
())
{
clientGroup
=
new
EpollEventLoopGroup
();
serverGroup
=
new
EpollEventLoopGroup
();
serverChannelClass
=
EpollServerSocketChannel
.
class
;
clientChannelClass
=
EpollSocketChannel
.
class
;
return
;
}
else
{
log
.
info
(
"Netty epoll support is not available. Proceeding with nio."
);
}
clientGroup
=
new
EpollEventLoopGroup
();
serverGroup
=
new
EpollEventLoopGroup
();
serverChannelClass
=
EpollServerSocketChannel
.
class
;
clientChannelClass
=
EpollSocketChannel
.
class
;
return
;
}
catch
(
Throwable
t
)
{
log
.
warn
(
"Failed to initialize
epoll sockets
. Proceeding with nio."
,
t
);
log
.
warn
(
"Failed to initialize
native (epoll) transport
. Proceeding with nio."
,
t
);
}
clientGroup
=
new
NioEventLoopGroup
();
serverGroup
=
new
NioEventLoopGroup
();
...
...
Please
register
or
login
to post a comment