tree: 181d5b97d77306ffb490c088f8a9df5dd11732d2 [path history] [tgz]
  1. lib/
  2. test/
  3. .gitignore
  4. BUILD.gn
  5. pubspec.yaml
  6. README.md
samples/ffi/http/README.md

This is an example that shows how to use NativeCallable.listener to interact with a multi threaded native API.

The native API is a fake HTTP library with some hard coded requests and responses. To build the dynamic library, run this command:

c++ -shared -fpic lib/fake_http.cc -lstdc++ -o lib/libfake_http.so

On Windows the output library should be lib/fake_http.dll and on Mac it should be lib/libfake_http.dylib.