Git Product home page Git Product logo

essential-netty-in-action's Issues

WIFI环境

请问netty可以使用在wifi 环境下 Android 无服务器 点对点的通讯吗

请求

读起来感觉就像有道翻译的。最近在学Netty,可以加入翻译吗?

翻译的太敷衍了吧

感觉就是直接机器翻译的吧,还没有读原文理解的快。以后还会更新吗

存在笔误【案例研究:Transport 的迁移】

essential-netty-in-action/CORE FUNCTIONS/Case study transport migration.md

NettyNioServer的说明第二条写错了:

2.使用 OioEventLoopGroup 允许阻塞模式(Old-IO)

应该是

2.使用 NioEventLoopGroup 允许非阻塞模式(NIO)

《写一个 echo 服务器》这节似乎存在错误

第7步是关键:在这里我们使用一个特殊的类,ChannelInitializer 。当一个新的连接被接受,一个新的子 Channel 将被创建, ChannelInitializer 会添加我们EchoServerHandler 的实例到 Channel 的 ChannelPipeline。正如我们如前所述,如果有入站信息,这个处理器将被通知。

这里当一个新的连接被接受,一个新的子 Channel 将被创建似乎不正确,我翻了下源码,传递给channel方法的NioServerSocketChannel类,似乎在bind后已经调用了initAndRegister方法,在方法中创建了NioServerSocketChannel的对象,对象注册给parentEventLoopGroup

final ChannelFuture initAndRegister() {
        Channel channel = null;
        try {
            channel = channelFactory.newChannel();
            init(channel);
        } catch (Throwable t) {
            if (channel != null) {
                // channel can be null if newChannel crashed (eg SocketException("too many open files"))
                channel.unsafe().closeForcibly();
            }
            // as the Channel is not registered yet we need to force the usage of the GlobalEventExecutor
            return new DefaultChannelPromise(channel, GlobalEventExecutor.INSTANCE).setFailure(t);
        }

        ChannelFuture regFuture = config().group().register(channel);
        if (regFuture.cause() != null) {
            if (channel.isRegistered()) {
                channel.close();
            } else {
                channel.unsafe().closeForcibly();
            }
        }

        // If we are here and the promise is not failed, it's one of the following cases:
        // 1) If we attempted registration from the event loop, the registration has been completed at this point.
        //    i.e. It's safe to attempt bind() or connect() now because the channel has been registered.
        // 2) If we attempted registration from the other thread, the registration request has been successfully
        //    added to the event loop's task queue for later execution.
        //    i.e. It's safe to attempt bind() or connect() now:
        //         because bind() or connect() will be executed *after* the scheduled registration task is executed
        //         because register(), bind(), and connect() are all bound to the same thread.

        return regFuture;
    }

2.4.3节Encoder(编码器)勘误类名ChanneOutboundHandler错误

2.4.3节Encoder(编码器)类名错误:
本章节第一句话原文:

回顾之前的定义,encoder是用来把出站数据从一种格式转换到另外一种格式,因此它实现了ChanneOutboundHandler 。

这里的ChanneOutboundHandler类名错误,应为ChannelOutboundHandler

typo

感谢翻译,读到的一些笔误:

1.1.1 章节
反过来,Netty 也从这些项目中获益。随着这些项目的作用,也提高其范围和灵活性,比如实现的实现的协议 FTP, SMTP, HTTP, WebSocket 和 SPDY 以及其他二进制和基于文本的。

1.2.3
所以 Netty 服务器都需要下面这些:

Netty In Action的中文正版书籍很快就要上市了

您好:很感谢您对Netty推广的付出:

目前Netty的正版书籍马上就要上市了,其中中文对应的源代码已经更新,详见下面的地址.
https://github.com/ReactivePlatform/netty-in-action-cn

因为按照版权法,没有得到版权的话其实是无法自己随便翻译的,所以请至少在您的REPO中鲜明地说明相应地信息,并且链接到对应的Repo. 以及人民邮电出版社,异步社区对应的本书页面,谢谢.

http://www.epubit.com.cn/

再次感谢您对Netty社区的贡献.

ByteBuf章节的小错误

这是我发现的与 《netty实战》 的一个不同之处:

你写的是CompositeByteBuf.hasArray总是返回false,

image

而《Netty实战》 上写的是 如果CompositeByteBuf 只有一个ByteBuf , 那么CompositeByteBuf的hasArray返回该ByteBuf的hasArray的结果,否则返回false,

image

在我查阅相关源码之后,发现源码应该是符合 《Netty实战》 的描述,所以可能是你的描述错误。

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.