Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
44fe2f07
Commit
44fe2f07
authored
Jan 26, 2015
by
Juan Batiz-Benet
Browse files
p2p/host: doc options
parent
d7a5d2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
host/basic/basic_host.go
View file @
44fe2f07
...
...
@@ -19,12 +19,24 @@ import (
var
log
=
eventlog
.
Logger
(
"p2p/host/basic"
)
// Option is a type used to pass in options to the host.
type
Option
int
const
(
// NATPortMap makes the host attempt to open port-mapping in NAT devices
// for all its listeners. Pass in this option in the constructor to
// asynchronously a) find a gateway, b) open port mappings, c) republish
// port mappings periodically. The NATed addresses are included in the
// Host's Addrs() list.
NATPortMap
Option
=
iota
)
// BasicHost is the basic implementation of the host.Host interface. This
// particular host implementation:
// * uses a protocol muxer to mux per-protocol streams
// * uses an identity service to send + receive node information
// * uses a relay service to allow hosts to relay conns for each other
// * uses a nat service to establish NAT port mappings
type
BasicHost
struct
{
network
inet
.
Network
mux
*
protocol
.
Mux
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment