2018-01-06 01:34:31 +00:00
|
|
|
package torrent
|
|
|
|
|
2018-01-25 02:14:37 +00:00
|
|
|
// Peer client ID.
|
2018-01-06 04:50:45 +00:00
|
|
|
type PeerID [20]byte
|
2018-01-06 01:34:31 +00:00
|
|
|
|
2018-02-05 06:47:47 +00: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[:])
|
|
|
|
// }
|