Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@

import io.grpc.ChannelCredentials;
import io.grpc.netty.NettyChannelBuilder;
import io.netty.channel.MultiThreadIoEventLoopGroup;
import io.netty.channel.epoll.EpollDomainSocketChannel;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.epoll.EpollIoHandler;
import io.netty.channel.unix.DomainSocketAddress;

/**
* {@link GrpcChannelFactory} that creates Netty-based gRPC channels.
*
* @author Chris Bono
* @author Andrey Litvitski
*/
public class NettyGrpcChannelFactory extends DefaultGrpcChannelFactory<NettyChannelBuilder> {

Expand All @@ -48,7 +50,7 @@ protected NettyChannelBuilder newChannelBuilder(String target, ChannelCredential
target = target.substring(5);
return NettyChannelBuilder.forAddress(new DomainSocketAddress(target))
.channelType(EpollDomainSocketChannel.class)
.eventLoopGroup(new EpollEventLoopGroup());
.eventLoopGroup(new MultiThreadIoEventLoopGroup(EpollIoHandler.newFactory()));
}
return NettyChannelBuilder.forTarget(target, credentials);
}
Expand Down
Loading