Skip to content

hq-cml/unicorn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 __    __   __   __   __    ______   ______   .______    __   __  
|  |  |  | |  \ |  | |  |  /      | /  __  \  |   _  \  |  \ |  | 
|  |  |  | |   \|  | |  | |  ,----'|  |  |  | |  |_)  | |   \|  | 
|  |  |  | |  . `  | |  | |  |     |  |  |  | |      /  |  . `  | 
|  `--'  | |  |\   | |  | |  `----.|  `--'  | |  |\  \-.|  |\   | 
 \______/  |__| \__| |__|  \______| \______/  | _| `.__||__| \__| 

========================== Description ============================
    Unicorn is a TCP client framework that you can customize your 
logical business code and not to care about networking processing 
and event process. Unicorn is responsible for them.
    
    In cases directory, there are some production cases baseed on 
unicorn. You can refer them to write your business code.
    
    ./cases/tcp -- a tcp pressure tester for echo back server.
    ./cases/http -- a http pressure tester similar to Apache ab.

========================== Installation ===========================
1.compile unicorn
  #cd src
  #make
  #make install

2.compile client case 
  #cd cases/tcp
  #make
  #make install

3.run
  #cd bin
  #./Unicorn

4.enjoy it ~


============================== Usage ===============================
Unicorn [-h <host>] [-p <port>] [-c <clients>] [-n requests]> [-k <boolean>]

 -h <hostname>      server hostname (default 127.0.0.1)
 -p <port>          server port (default 9527)
 -c <clients>       number of parallel connections (default 1)
 -n <requests>      total number of requests (default 1)
 -s <so file>       so file (default ./libfunc.so)
 -f <request file>  request file(default NULL)
 -k <boolean>       1 = keep alive, 0 = reconnect (default 1)
 -w <boolean>       whether define done if server close connection.(default 1)
 -q                 quiet. Just print basic info
 -l                 loop. Run the tests forever. For persistent test
 -D                 print the debug info.(default null)
 -H                 show help information


About

A TCP client framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages