Update README.md

master
Ryan Lee 2016-09-14 19:00:54 -04:00
parent 3e904101cf
commit 609d7f218e
1 changed files with 13 additions and 42 deletions

View File

@ -34,40 +34,33 @@ pc.On("connect", function_pc(string peer) {
pc.Open();
```
### Example
## Example
See the **examples** directory.
#### [p2p netcat](https://github.com/peersio/peerconnect/tree/master/examples/p2p_netcat): netcat on peer-to-peer way
```
Usage: pnc [-l] name
Options:
-l Listen mode, for inbound connections
Example:
> pnc -l random_id : Listen randoom_id
> pnc random_id : Connect to random_id
```
* [p2p netcat](https://github.com/peersio/peerconnect/tree/master/examples/p2p_netcat): netcat on peer-to-peer way
## Build
The currently supported platforms are Windows, Mac OS X and Linux.
#### Before You Start
### Before You Start
First, be sure to get WebRTC source and install prerequisite software.
1. In the [WebRTC development](https://webrtc.org/native-code/development/) instruction:
In the [WebRTC development](https://webrtc.org/native-code/development/) instruction
* Follow 'Before You Start' step
* Follow 'Getting the code' step
2. Currently PeerConnect supports branch-heads/54 so run:
Currently PeerConnect supports branch-heads/54 so run
```
$ git checkout -b peers54 refs/remotes/branch-heads/54
```
3. To update build toolchain and dependencies of WebRTC, run:
To update build toolchain and dependencies of WebRTC, run:
```
$ gclient sync
```
@ -75,9 +68,9 @@ $ gclient sync
Note that you don't have to follow 'Generating Ninja project files' or 'Compiling' step. PeerConnect will do that internally.
#### Build PeerConnect
### Build PeerConnect
1. Generate the build files
Generate the build files
```
$ cd /path/to/src
$ mkdir build
@ -91,29 +84,7 @@ $ cmake -G "Visual Studio 14 2015" .. \
-DWEBRTC_ROOT_DIR=/path/to/webrtc-checkout/src \
-DDEPOT_TOOLS_DIR=/path/to/depot_tools
```
2. Finally you can build generated makefile.
Finally you can build generated makefile.
```
$ make
```
#### Prerequisit software
**Windows**
* You must have Visual Studio 2015 Update 2.
* You must have Windows7 x64 or later. x86 OSs are unsupported
* CMake 2.8 or later
**Mac OS X**
* Xcode5 or later
* CMake 3.2 or later
**Linux**
* We except you will have the most luck on Ubuntu 14.04
* CMake 2.8 or later
## API