Ejemplo n.º 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)));
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public NettyTcpClient(ILogger <NettyTcpClient> logger, NetworkClientInitializer <ITcpClient> initializer)
 {
     this.logger = logger;
     Build(initializer);
 }
Ejemplo n.º 4
0
 public UdpClient(NetworkClientInitializer <IUdpClient> initializer)
 {
     Build(initializer);
 }