Giter Site home page Giter Site logo

server_demo's Introduction

README.MD

测试过的功能介绍

1.服务器链接多个客户端,可以保证任意一个客户端失去链接情况下不影响服务器的运行

2.一次性发送三个合并的消息,消息可以一个个正确的解析

3.一次发送半个消息,第二次再发送剩下半个消息,消息可以在第二次被正确的解析

4.广播和单播基本功能测试都正常

5.在确定单消息长度不会超过buffer总长度的情况下,但是多个消息会超过buffer指定长度的情况下,可以保证消息在从buffer尾到头移动正确

使用方式介绍

在test主目录下直接运行bash build_all.sh,会编译对应的可执行文件

服务端的使用方式在主目录下./server ${服务端的ip} ${服务端的端口}

客户端的使用方式在主目录下./client ${客户端的ip} ${客户端的端口} ${服务端的ip} ${服务端的端口}

客户端会在运行过程中需要用户手动输入发送信息格式为 ${发送消息的用户id} ${目的用户id(如果选择了单播,默认是广播)} ${消息内容}

TODO

Reactor架构重构

支持多线程

server_demo's People

Contributors

auioufiag avatar angrymilk 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.