Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "send", Usage: "make the given file available to your peer", Aliases: []string{"s"}, Action: Action, Flags: []cli.Flag{ &cli.IntFlag{ Name: "w", Aliases: []string{"word-count"}, Usage: "the number of random words to use (min 3)", EnvVars: []string{"PCP_WORD_COUNT"}, Value: 4, }, }, ArgsUsage: `FILE`, Description: ` The send subcommand generates four random words based on the first bytes of a newly generated peer identity. The first word and the current time are used to generate an identifier that is broadcasted in your local network via mDNS and provided through the distributed hash table of the IPFS network. After a peer attempts to connect it starts a password authen- ticated key exchange (PAKE) with the remaining three words to proof that the peer is in possession of the password. While this is happening the tool still searches for other peers as the currently connected one could fail the authentication procedure. After the authentication was successful and the peer confirmed the file transfer the transmission is started. `, }
Command holds the `send` subcommand configuration.
Functions ¶
Types ¶
type Advertiser ¶
type Node ¶
Node encapsulates the logic of advertising and transmitting a particular file to a peer.
func InitNode ¶
InitNode returns a fully configured node ready to start advertising that we want to send a specific file.
func (*Node) HandleSuccessfulKeyExchange ¶
func (*Node) StartAdvertising ¶ added in v0.3.0
func (n *Node) StartAdvertising(c *cli.Context)
StartAdvertising asynchronously advertises the given code through the means of all registered advertisers. Currently these are multicast DNS and DHT.
func (*Node) StopAdvertising ¶
func (n *Node) StopAdvertising()
Click to show internal directories.
Click to hide internal directories.