8000 GitHub - lfxgroove/cpptiip: C++ implementation of the TIIP protocol
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lfxgroove/cpptiip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPP Tiip

A C++ implementation of the TIIP protocol.

Building

These steps should work for buildling the library:

    git clone https://github.com/lfxgroove/cpptiip --recurse-submodules
    cd cpptiip
    mkdir obj
    meson obj
    cd obj
    ninja

Usage

Basic usage is to create a tiip::Message from a std::string or std::stringstream:

    std::string str{"..."};
    tiip::Message msg{str};
    std::cout << "Message ID:" << msg.mid << std::endl;

Fields may be empty, that is usually signified by an empty string, a json::Object that returns true for obj.blank(), a time value of 0, or a Bool that returns false for Bool::set().

You might also want to create a TIIP message, then the builder is probably what you want:

    tiip::MessageBuilder builder{};
    tiip::Message msg{builder.sig("hello")
        .ok(false)
        .build()};
    doStuff(msg);

See the documentation for libutil for information about how to extract data from json::Object and similar structures.

About

C++ implementation of the TIIP protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0