Git Product home page Git Product logo

essential-netty-in-action's Introduction

Essential Netty in Action 《Netty 实战(精髓)》

It is a book about the Essentials of Norman Maurer's Netty in Action(base on MEAP v10). Through this book, you can quickly start with Netty. This is a GitBook version of the book: http://waylau.gitbooks.io/essential-netty-in-action/ Let's READ!

《Netty 实战(精髓)》是对 Norman Maurer 的 《Netty in Action》(基于 MEAP v10)的一个中文精简。取其精华,去其糟粕,带你快速掌握 Netty ,插入配图,图文并茂方便用户理解。本书利用业余时间编写,由于时间紧凑,精力和能力有限,书中未免有纰漏和错误,望读者能够热忱斧正。

对于初学者,也推荐参阅《Netty 4.x 用户指南》。与之类似的 NIO 框架还有 MINA, 可参阅《Apache MINA 2 用户指南

关于开源

本项目是针对当前市面上缺乏 Netty 的相关的参考资料而产生的,广大 Netty 爱好者通过开源方式来学习交流 Netty,推动 Netty 社区的繁荣。

当然,广大开发者需认识到,开源不等于免费,对于原著的版权,仍应抱有敬意。请支持原著!

如何开始阅读

选择下面入口之一:

意见、建议

如有勘误、意见或建议欢迎拍砖 https://github.com/waylau/essential-netty-in-action/issues

联系作者:

您也可以直接联系我:

其他书籍

若您对本书不感冒,笔者还写了其他方面的超过一打的书籍(可见https://waylau.com/books/),多是开源电子书。

本人也维护了一个books-collection项目,里面提供了优质的专门给程序员的开源、免费图书集合。

开源捐赠

开源捐赠

捐赠所得所有款项将用于开源事业!

essential-netty-in-action's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

essential-netty-in-action's Issues

typo

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

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

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

WIFI环境

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

翻译的太敷衍了吧

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

ByteBuf章节的小错误

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

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

image

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

image

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

image

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

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

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

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

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

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

请求

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

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

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

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

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

存在笔误【案例研究: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;
    }

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.