2018-01-06 09:34:31 +08:00
|
|
|
package torrent
|
|
|
|
|
2018-01-25 10:14:37 +08:00
|
|
|
// Peer client ID.
|
2018-01-06 12:50:45 +08:00
|
|
|
type PeerID [20]byte
|
2018-01-06 09:34:31 +08:00
|
|
|
|
2018-02-05 14:47:47 +08:00
|
|
|
// // Pretty prints the ID as hex, except parts that adher to the Peer ID
|
|
|
|
// // Conventions of BEP 20.
|
|
|
|
// func (me PeerID) String() string {
|
|
|
|
// // if me[0] == '-' && me[7] == '-' {
|
|
|
|
// // return string(me[:8]) + hex.EncodeToString(me[8:])
|
|
|
|
// // }
|
|
|
|
// // return hex.EncodeToString(me[:])
|
|
|
|
// return fmt.Sprintf("%+q", me[:])
|
|
|
|
// }
|