欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

netty入门

程序员文章站 2022-05-22 21:14:04
...

netty介绍

Netty是一个NIO客户端服务器框架,可以快速和简单地开发网络应用程序,
极大地简化了网络程序的开发过程,例如TCP和UDP的 Socket服务的开发。

netty的特性

快速和简单并不意味netty应用程序会存在维护苦难和性能低下的问题,Netty是
一个设计巧妙的框架,它参考了FTP、SMTP、HTTP和许多二进制和基于文本的
传统协议,在不降低效率、稳定、性能、灵活的情况下,找到了一种更优的解决
方案。Netty和其它框架最大的差别是Netty的哲学设计理念。Netty从为用户
提供了用户体验最优的的API以及实现设计。

Features

Design

Unified API for various transport types - blocking and non-blocking socket
Based on a flexible and extensible event model which allows clear separation of concerns
Highly customizable thread model - single thread, one or more thread pools such as SEDA
True connectionless datagram socket support (since 3.1)

Ease of use

Well-documented Javadoc, user guide and examples

No additional dependencies, JDK 5 (Netty 3.x) or 6 (Netty 4.x) is enough

Note: Some components such as HTTP/2 might have more requirements.
Please refer to
the Requirements page
for more information.

Performance

Better throughput, lower latency
Less resource consumption
Minimized unnecessary memory copy

Security

Complete SSL/TLS and StartTLS support

Community

Release early, release often
The author has been writing similar frameworks since 2003 and he still finds your feed back precious!

netty入门