smart-http 1.0.11 发布,7 行代码便可运行的 HTTP 服务器
smart-http 是一款比较简易的 http服务器,其通信内核采用了异步非阻塞通信框架 smart-socket。 更新内容 升级smart-socket至最新版:1.4.5。 优化Http协议解析算法以获得更好的性能表现(依旧模仿nginx解码思路)。 提供对HEAD请求的支持。 节省解码期间不必要的内存开销。 HttpRequest新增接口:getRemoteAddr、getRemoteHost。 代码重构,消除一些不合理的设计。 快速体验 在您的Maven工程中引入smart-http依赖。 <dependency> <groupId>org.smartboot.http</groupId> <artifactId>smart-http-server</artifactId> <version>1.0.11</version> </dependency> 拷贝以下代码并启动。 public class SimpleSmartHttp { public stati...