<commit_before>Subevent
========

C++ Event Driven and Network Application Library

### Features
* Event driven App/Thread.
* Async TCP/UDP api.
* Multiple TCP connections in single thread.
* Header only.
* C++11, Linux/Windows.
* Easy to use.

### Compile Options
* `-std=c++11`
* `-pthread` or `-lpthread`

### Example
* A Simple Application
```C++
#include "subevent.hpp"

SEV_USING_NS

//---------------------------------------------------------------------------//
// MyApp
//---------------------------------------------------------------------------//

class MyApp : public NetApplication
{
protected:
    bool onInit() override
    {
        NetApplication::onInit();

        // Your initialization code here.

        return true;
    }

    void onExit() override
    {
        // Your deinitialization code here.

        NetApplication::onExit();
    }
};

//---------------------------------------------------------------------------//
// Main
//---------------------------------------------------------------------------//

SEV_IMPL_GLOBAL

int main(int, char**)
{
    MyApp app;
    return app.run();
}
```
* How to End MyApp
```C++
// call "void Application::stop()"
stop();
```
* Thread
```C++
class MyThread : public NetThread
{
protected:
    bool onInit() override
    {
        NetThread::onInit();

        // Your initialization code here.

        return true;
    }

    void onExit() override
    {
        // Your deinitialization code here.<commit_msg>fix readme<commit_after>Subevent
========

C++ Event Driven and Network Application Library

### Features
* Event driven App/Thread.
* Async TCP/UDP api.
* Multiple TCP connections in single thread.
* Header only.
* C++11, Linux/Windows.
* Easy to use.

### Compile Options
* `-std=c++11`
* `-pthread` or `-lpthread`

### Example
* A Simple Application
```C++
#include "subevent.hpp"

SEV_USING_NS

//---------------------------------------------------------------------------//
// MyApp
//---------------------------------------------------------------------------//

class MyApp : public NetApplication
{
protected:
    bool onInit() override
    {
        NetApplication::onInit();

        // Your initialization code here.

        return true;
    }

    void onExit() override
    {
        // Your deinitialization code here.

        NetApplication::onExit();
    }
};

//---------------------------------------------------------------------------//
// Main
//---------------------------------------------------------------------------//

SEV_IMPL_GLOBAL

int main(int, char**)
{
    MyApp app;
    return app.run();
}
```
* How to End MyApp
```C++
// call "void NetApplication::stop()"
stop();
```
* Thread
```C++
class MyThread : public NetThread
{
protected:
    bool onInit() override
    {
        NetThread::onInit();

        // Your initialization code here.

        return true;
    }

    void onExit() override
    {
        // Your deinitialization code here.
{'fraction_non_alphanumeric': 0.32207967589466574, 'fraction_numerical': 0.0027008777852802163, 'mean_word_length': 1.3184663536776213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3557939', 'n_tokens_mistral': 787, 'n_tokens_neox': 758, 'n_words': 216}