Git Product home page Git Product logo

reactor's Introduction

Reactor

依据 Doug Lea 的 Scalable IO in Java 基于 NIO 实现的 Reacotr 模式的回显服务器

  • BasicHandler: 单线程处理器
  • MultiReactor: 主从 Reactor
  • MultithreadHandler: 线程池处理器
  • Reactor: 接收连接,I/O 读写

Reactor 模型的说明:https://www.cnblogs.com/wskwbog/p/10725372.html

Getting started

编译

javac -encoding utf-8 *.java

运行

java Reactor
java MultiReactor

测试

使用 telnet 命令进行测试,在 windows 下记得打开回显(ctrl+] -> set localecho -> Enter)

D:\>telnet 127.0.0.1 10393
Implementation of Reactor Design Partten by tonwu.net
reactor> Hello World!
Hello World!
reactor>

遗失对主机的连接。
D:\>

reactor's People

Contributors

chuonye 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.