mini-tor icon indicating copy to clipboard operation
mini-tor copied to clipboard

Library Documentation

Open madhatter919 opened this issue 6 years ago • 1 comments

There appears to be no documentation on how to use the "lib" branch of Mini-Tor. I've tried compiling it into my messaging app several different ways, and I always seem to get different compilation errors. Can you please provide a guide on building your software into a static .lib, and how it's intended to be included into other C++ files?

madhatter919 avatar Aug 19 '19 06:08 madhatter919

look at the sample code, make a class out of it that you know you can work with. compile the library as a statistically linked library.

To avoid having to import a bunch of stuff from mini itself, only have function definitions that exclude any references to mini itself.

For example this is my client.h file:

    namespace net
    {
        class client
        {
        public:

            //--- these are all defined inside of mini-tor.lib (i use std::string instead of mini::net::uri for import reasons)
            client(std::string url);
            ~client();
            void write(void* buffer, std::size_t size);
            void read(void* buffer, std::size_t size);
            bool is_connected() const;
            void close();
        };
    }

ghost avatar Jan 30 '20 09:01 ghost