README.md

    ascs (a successor of st_asio_wrapper)

    Overview

    ascs is an asynchronous c/s framework based on Asio(non-Boost), besides all benefits brought by Asio, it also contains:

    1. Based on message just like UDP with several couple of build-in packer and unpacker;
    2. Support packer and unpacker customization, and replacing packer and unpacker at run-time;
    3. Automatically reconnect to the server after link broken;
    4. Widely support timers;
    5. Support object pool, object reusing;
    6. Support message buffer;
    7. Support ssl;
    8. Support TCP/UDP. Quick start:

    ###server: Derive your own socket from server_socket_base, you must at least re-write the on_msg or on_msg_handle virtual function and handle messages in it; Create a service_pump object, create a server_base object, call service_pump::start_service; Call server_socket_base::send_msg when you have messages need to send. ###client: Derive your own socket from connector_base, you must at least re-write the on_msg or on_msg_handle virtual function and handle messages in it; Create a service_pump object, create a tcp::client object, set server address via connector_base::set_server_addr, call service_pump::start_service; Call connector_base::send_msg when you have messages need to send. Directory structure:

    All source codes are placed in directory include/ascs/, demos are placed in directory examples, documents are placed in directory doc. Demos:

    ###echo_server: Demonstrate how to implement tcp servers, it cantains two servers, one is the simplest server (normal server), which just send characters from keyboard to all clients (from client demo), and receive messages from all clients (from client demo), then display them; the other is echo server, which send every received message from echo_client demo back. ###client: Demonstrate how to implement tcp client, it simply send characters from keyboard to normal server in echo_server, and receive messages from normal server in echo_server, then display them. ###echo_client: Used to test ascs's performance (whith echo server). ###file_server: A file transfer server. ###file_client: A file transfer client, use get <file name1> [file name2] [...] to fetch files from file_server. ###udp_client: Demonstrate how to implement UDP communication. ###ssl_test: Demonstrate how to implement TCP communication with ssl. Compiler requirement:

    Visual C++ 10.0, GCC 4.6 or Clang 3.1 at least, with c++14 features; Debug environment:

    win10 vc2015 32/64 bit Debian 8 32/64 bit Ubuntu 16 64 bit Fedora 23 64 bit FreeBSD 10 32/64 bit email: mail2tao@163.com

    Community on QQ: 198941541

    项目简介

    基于standalone asio的c/s框架。

    发行版本

    当前项目没有发行版本

    贡献者 4

    开发语言

    • C++ 100.0 %