2014-09-11 11:17:59 -07:00
|
|
|
# P2P Module
|
|
|
|
|
|
|
|
P2P provides an abstraction around peer-to-peer communication.<br/>
|
2014-09-14 15:37:32 -07:00
|
|
|
Communication happens via Reactors that react to messages from peers.<br/>
|
|
|
|
Each Reactor has one or more Channels of communication for each Peer.<br/>
|
2014-09-11 11:17:59 -07:00
|
|
|
Channels are multiplexed automatically and can be configured.<br/>
|
|
|
|
A Switch is started upon app start, and handles Peer management.<br/>
|
2014-09-14 15:37:32 -07:00
|
|
|
A PEXReactor implementation is provided to automate peer discovery.<br/>
|
2014-09-11 11:17:59 -07:00
|
|
|
|
2014-06-25 11:58:34 -07:00
|
|
|
## Channels
|
|
|
|
|
2014-06-26 20:51:19 -07:00
|
|
|
Each peer connection is multiplexed into channels.
|
2014-09-10 02:43:16 -07:00
|
|
|
The p2p module comes with a channel implementation used for peer
|
|
|
|
discovery (called PEX, short for "peer exchange").
|
2014-06-24 23:49:06 -07:00
|
|
|
|
2014-06-24 23:58:38 -07:00
|
|
|
<table>
|
2014-06-25 11:58:34 -07:00
|
|
|
<tr>
|
|
|
|
<td><b>Channel</b></td>
|
2014-07-06 16:08:25 -07:00
|
|
|
<td>"PEX"</td>
|
2014-06-25 11:58:34 -07:00
|
|
|
</tr>
|
2014-06-24 23:58:38 -07:00
|
|
|
<tr>
|
2014-06-25 11:58:34 -07:00
|
|
|
<td><b>Messages</b></td>
|
2014-06-24 23:58:38 -07:00
|
|
|
<td>
|
|
|
|
<ul>
|
2014-07-06 16:08:25 -07:00
|
|
|
<li>pexRequestMsg</li>
|
|
|
|
<li>pexResponseMsg</li>
|
2014-06-24 23:58:38 -07:00
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2014-06-25 11:58:34 -07:00
|
|
|
<hr />
|
2014-06-24 23:49:06 -07:00
|
|
|
|
2014-06-27 17:01:59 -07:00
|
|
|
## Resources
|
|
|
|
|
|
|
|
* http://www.upnp-hacks.org/upnp.html
|