blob: 8351e9c504a43dac1bea1be7ddf87f29d7eb5244 [file] [log] [blame]
Nathan Skrzypczakcbb4e462021-10-13 12:40:42 +02001.. _cppvpp:
2
3==============
4C++ api client
5==============
6
7This describes how to write a C++ api client connecting to VPP's binary API.
8
9Connecting to VPP is done with :
10
11::
12
13 auto err = con.connect("example_client", nullptr, 32, 32);
14
15
16You can specify the path to the api socket/shared memory you want to connect to
17with the second parameter (set to ``nullptr``, meaning default)
18
19.. literalinclude:: ./api_example/api_example.cc
20 :language: cpp
21
22To build this you could use the following makefile
23
24.. literalinclude:: ./api_example/Makefile
25 :language: makefile
26