Exemple #1
0
 public void Build(NetworkClientInitializer <IUdpClient> initializer)
 {
     bootstrap
     .Group(group)
     .Channel <SocketDatagramChannel>()
     .Option(ChannelOption.SoBroadcast, true)
     .Handler(new ActionChannelInitializer <IChannel>(channel => initializer.Init(channel)));
 }
Exemple #2
0
        public NettyTcpClient Build(NetworkClientInitializer <ITcpClient> initializer)
        {
            bootstrap
            .Group(group)
            .Channel <TcpSocketChannel>()
            .Option(ChannelOption.TcpNodelay, true)
            .Handler(new ActionChannelInitializer <IChannel>(channel => initializer.Init(channel)));

            return(this);
        }