| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
Protocols
Protocols.Bittorrent
Protocols.Bittorrent.Peer

# Method Protocols.Bittorrent.Peer()->connect()

Method connect

  `void connect()`

Description

  Connect to the peer; this is done async. status/mode will change from `"connecting"` to `"dead"` or to `"connected"` depending on result. Will throw error if already online.

  Upon connect, protocol will be initiated in choked mode. When the protocol is up, status will change to `"online"` (or `"failed"` if the handshake failed).