Alexey Polyudov 841b92e943 Merge branch 'google3'
this is a merge commit based on a work done here:

https://team-review.git.corp.google.com/c/nearby-eng/nearby/+/761959

the difference with the former is: this one is tracking both heads of a merge

Change-Id: I8b28b1d3a5280581f20e4edf9144641a12df8879
2020-06-04 18:08:45 +00:00
2020-04-04 12:55:01 -07:00
2020-06-04 18:08:45 +00:00
2020-05-04 13:13:13 -07:00
2020-06-04 18:08:45 +00:00
2020-06-02 12:12:18 +01:00
2020-04-16 16:19:46 -07:00
2020-04-04 12:55:01 -07:00
2020-04-06 09:03:11 -07:00
2020-04-04 12:55:01 -07:00
2020-05-04 13:13:13 -07:00
2020-05-04 13:13:13 -07:00

Nearby Connections Library

This is not an officially supported Google product.

Coathored by:

  • (Java/C++) Varun Kapoor “reznor”
  • (Java) Maria-Ines Carrera “marianines”
  • (Java) Will Harmon “xlythe”
  • (Java/C++/ObjC) Alex Kang “alexanderkang”
  • (Java/C++) Amanda Lee “ahlee”
  • (C++) Tracy Zhou “tracyzhou”
  • (ObjC) Dan Webb “dwebb”
  • (C++) John Kaczor “johngk”
  • (C++/ObjC) Edwin Wu “edwinwu”
  • (C++) Alexey Polyudov “apolyudov”

Status: Implemented in C++

Design reviewers: TODO

Implementation reviewer: TODO

Last Updated: TODO

Overview

Nearby Connections is a high level protocol on top of Bluetooth/WiFi that acts as a medium-agnostic socket. Devices are able to advertise, scan, and connect with one another over any shared medium (eg. BT <-> BT). Once connected, the two devices share a list of all supported mediums and attempt to upgrade to the one with the highest bandwidth (eg. BT -> WiFi). The connection is encrypted, reliable, and fully duplex. BYTE, FILE, and STREAM payloads are all supported and will be chunked & transferred internally and recombined on the receiving device. See Nearby Connections Overview for more information.

Checkout, build, test instructions

Checkout

pre-requisites: git

git clone https://github.com/google/nearby-connections
cd nearby-connections
git submodule update --init --recursive

this is a "source root" directory of the project

Build

pre-requisites: openssl, cmake, c++ toolchain (c++17-capable)

from "source root", run:

mkdir build; cd build
cmake -Dnearby_USE_LOCAL_PROTOBUF=ON -Dnearby_USE_LOCAL_ABSL=ON ..
make

Running unit tests

from "source root/build", run:

ctest -V
Languages
C++ 97.6%
Objective-C 1.1%
Objective-C++ 0.6%
Starlark 0.3%
C 0.2%
Other 0.1%