fix(net/multiconn) data race in test

https://build.protocol-dev.com/job/go-ipfs.test.go.race.nofuse/276/console

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
feat(core/commands): expose commands to allow for the development of high-level interface

+ style: sort command list

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(cmd/id) determine offline-ness with `!node.OnlineMode()`

It's better to have one mechanism for determining whether we're offline
and to improve the SnR of this mechanism over time. We presently have
too many arbitrary heuristics for determining whether we're running in
offline mode. TRTTD is to use polymorphism to eliminate these
conditional checks. (instantiate the node with offline versions of
routing, network, etc.) It'll clean up the core constructor, make it
easier to create ephemeral nodes, and eliminate a class of errors.

@whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix: s/bootstrap rm/boostrap remove

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
core/commands: Fixed build on Windows
commands/http: Fixed client panic when sending a Request with nil 'Files'
commands/http: Fixed bug with client arg querystring
commands/cli: Fixed file path formatting on Windows
fix(routing/dht) _always_ close chan on exit of FindProvidersAsync

the important change here is that within FindProvidersAsync, the channel
is closed using a `defer`. This ensures the channel is always closed,
regardless of the path taken to exit.

+ misc cleanup

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(dht/routing) make GetProviders respect context

This commit makes GetProviders (sync) respect the request context. It
also amends all of GetProviders' callsites to pass a context in. This
meant changing the signature of the dht's handlerfunc.

I think I'll start referring to the request context as Vito Corleone.

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(dht/routing) buffer promise response to prevent resource leak

When performing this "promise" pattern, it is important to
provide a
channel with space for one value. Otherwise the sender may
block forever
in the case of a receiver that decides to abandon the
request. A subtle
detail, but one that is important for avoiding
leaked goroutines.

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow
<brian@perfmode.com>

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(net/mux) rate-limit producers by handling outgoing message synchronously

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
style: readability

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(cmd/bootstrap) s/remove/rm

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix: multiconn s/Conns()/getConns()

@jbenet

must be getConns to avoid clash with private var

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Merge pull request #395 from jbenet/misc/2014-11-11th-hour

miscellaneous +/- (commands, dht, net)