Update README.md
parent
b9fa9cf7c7
commit
ca249094c1
|
@ -1,4 +1,6 @@
|
||||||
## Peer-to-peer C++ library for network
|
# PeerConnect
|
||||||
|
|
||||||
|
A peer-to-peer C++ library for network.
|
||||||
|
|
||||||
- Network connection **over** firewall or NAT
|
- Network connection **over** firewall or NAT
|
||||||
- No ip address and port number required
|
- No ip address and port number required
|
||||||
|
@ -83,6 +85,6 @@ $ cmake -G "Visual Studio 14 2015" .. \
|
||||||
-DDEPOT_TOOLS_DIR=/path/to/depot_tools
|
-DDEPOT_TOOLS_DIR=/path/to/depot_tools
|
||||||
```
|
```
|
||||||
Finally you can build generated makefile.
|
Finally you can build generated makefile.
|
||||||
```
|
```
|
||||||
$ make
|
$ make
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,51 +1,46 @@
|
||||||
# P2P NetCat
|
# Netcat over p2p network
|
||||||
|
This is PeerConnect library example.
|
||||||
|
|
||||||
Peer to peer netcat connection
|
# Usage
|
||||||
|
|
||||||
- Netcat over p2p connection
|
|
||||||
- Connection through different internal network
|
|
||||||
- No port forwarding required
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
```
|
```
|
||||||
Usage: p2pnc [-l] name
|
Usage: pnc [-l] name
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-l Listen mode, for inbound connections
|
-l Listen mode, for inbound connections
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
> p2pnc -l random_id : Listen randoom_id
|
> pnc -l random_id : Listen randoom_id
|
||||||
> p2pnc random_id : Connect to random_id
|
> pnc random_id : Connect to random_id
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
# Example
|
||||||
|
|
||||||
#### 1. Anonymous chat
|
### Anonymous chat
|
||||||
|
|
||||||
Peer A (listen)
|
Peer A (listen)
|
||||||
```
|
```
|
||||||
> p2pnc -l peer_a
|
$ p2pnc -l peer_a
|
||||||
Listening peer_a
|
Listening peer_a
|
||||||
Connected
|
Connected
|
||||||
Hello~
|
Hello~
|
||||||
```
|
```
|
||||||
Peer B (connect)
|
Peer B (connect)
|
||||||
```
|
```
|
||||||
> p2pnc peer_a
|
$ p2pnc peer_a
|
||||||
Connecting to peer_a
|
Connecting to peer_a
|
||||||
Connected
|
Connected
|
||||||
Hello~
|
Hello~
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Send and receive file
|
### Send and receive file
|
||||||
|
|
||||||
Quickly send and receive file between your devices without cloud server.
|
Quickly send and receive file between your devices directly.
|
||||||
|
|
||||||
Peer A (listen and receive)
|
Peer A (listen and receive)
|
||||||
```
|
```
|
||||||
> p2pnc -l peer_a > dst_file.txt
|
$ pnc -l peer_a > peer.txt
|
||||||
```
|
```
|
||||||
Peer B (connect and send)
|
Peer B (connect and send)
|
||||||
```
|
```
|
||||||
> p2pnc peer_a < src_file.txt
|
$ pnc peer_a < peer.txt
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue