Giter Site home page Giter Site logo

nettyjack's Introduction

Netty

1. 客户端连接到服务器
2. 建立连接后,发送或接受数据
3. 服务器处理所有的客户端连接

编写服务器
1. 配置服务器功能, 线程,端口等
2. 实现服务器处理程序,包含业务逻辑

通过ServerBootStrap对象启动服务器。
过程:
    (1) 指定接受和处理新连接对象    NioEventLoopGroup,Netty内部通过线程处理数据,EventLoopGroup管理和调度,实际上是一个线程池
    (2) 指定通道类型                NioServerSocketChannel,服务器和客户端得以传输信息的通过,维护连接或IO操作
    (3) 设置InetSocketAddress       设置主线程,并启动
    (4) childhandler                处理所有的连接请求。

nettyjack's People

Contributors

niuwenchen avatar

Watchers

James Cloos avatar

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.