Skip to content

Getting Started

Gil Maimon edited this page Mar 5, 2019 · 3 revisions

Installation

In order to get started and building the first TinyWebsockets demo on your machine, you should:

  1. Clone the repo
git clone https://github.com/gilmaimon/TinyWebsockets.git
  1. Run cmake
mkdir build
cd build
cmake ..
make demo_echo_client
  1. Run the demo:
./demo_echo_client

Linking to Your Own Project

CMake

Using cmake, first you need to incldue the library folder (named tiny_websockets_lib) as a subdirectory in your own project's CMakeLists.txt.

For example, if you place the directory under in libs/tiny_websockets_lib add to your CMakeLists.txt:

add_subdirectory(libs/tiny_websockets_lib)

Then, add the library to the executable by adding:

target_link_libraries (my_executable tiny_websockets_lib)

Whats Next?

Now that you got the library working on your machine, you can start playing with the demos and seeing the library in action.

The next sections will provide you with code samples and API Reference for the core classes.

Next: Examples

Clone this wiki locally