revert back to pointers
This commit is contained in:
@ -81,7 +81,7 @@ func DestHashFromString(str string) (dhash I2PDestHash, err error) {
|
||||
}
|
||||
|
||||
// get string representation of i2p dest hash
|
||||
func (h *I2PDestHash) String() string {
|
||||
func (h I2PDestHash) String() string {
|
||||
b32addr := make([]byte, 56)
|
||||
i2pB32enc.Encode(b32addr, h[:])
|
||||
return string(b32addr[:52]) + ".b32.i2p"
|
||||
@ -172,7 +172,7 @@ func (addr I2PAddr) Base32() (str string) {
|
||||
return addr.DestHash().String()
|
||||
}
|
||||
|
||||
func (addr I2PAddr) DestHash() (h *I2PDestHash) {
|
||||
func (addr I2PAddr) DestHash() (h I2PDestHash) {
|
||||
hash := sha256.New()
|
||||
b, _ := addr.ToBytes()
|
||||
hash.Write(b)
|
||||
|
@ -94,12 +94,12 @@ Public domain.
|
||||
* Unknown Name (majestrate)
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAEBCgAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlxfTbUACgkQ11wDs5te
|
||||
FOHRHwf+IvUudGs75maj3pAZslmKvR4S8oiWo4uDFIwi0QyCXBz/Ce0YWIgNYV/2
|
||||
SR1I5hkmIJGXpTOhx5/xxAb62QAg1AcCO0nLgq4avd5TQJp2nS5PRdlS5teqvpZZ
|
||||
P6NrjxEZpdj1Ke2xFn9IFseh6XM7JKuFi8/EH6BkbAWW7rdaJKdJdfdajGPgmnZL
|
||||
xJ0EywI0Imw+3eJPxgvATCrGVMDvxtwSjTVNubrZCCf8Cl3T2u5mt13c5HTKr6PO
|
||||
pMa3QZF6zXnZKLLofJ8mywrvFyGoX3Uku0yXjlMx7zX0QQRBUPXJ5cPwuL8jdkZb
|
||||
yCXwni5u1mHsIgtVZRWAcm3OxBXA6A==
|
||||
=gt5S
|
||||
iQEzBAEBCgAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlxfT1MACgkQ11wDs5te
|
||||
FOFy8Af/VM3Qwk5Sonlh+RGJomdjtjE6hiMWw2Pm/CWG8WVVOURN3aVNP9NRXtcW
|
||||
Hv8j0SiIuOuAQ08McJjiCbOxYAD8kJmGqkKstie9vaVQNnkhLj6PB4a+gJUvmhp5
|
||||
F5mdpEiS/zidOqqYlCHnslGJaUxEQWu06wpuCP+855bfeHLVIP00Yil5KOor7bAI
|
||||
AWvvIYUEhleq/b5dz0AmYPCDuoH7FkONaTM8sfcF1cnq/WNS16YyksptzaFzlBk5
|
||||
7TFOfXbp2D4Mrvc7zvQyInpao6hovjr/KKGU8BQof0VPEm4PlZzTb77Rl6YHw5sl
|
||||
1e3i3exMZoaZEF+0tB7WoR1mRa/UVQ==
|
||||
=Ug2d
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -22,21 +22,21 @@ type StreamSession struct {
|
||||
}
|
||||
|
||||
// Returns the local tunnel name of the I2P tunnel used for the stream session
|
||||
func (ss StreamSession) ID() string {
|
||||
func (ss *StreamSession) ID() string {
|
||||
return ss.id
|
||||
}
|
||||
|
||||
func (ss StreamSession) Close() error {
|
||||
func (ss *StreamSession) Close() error {
|
||||
return ss.conn.Close()
|
||||
}
|
||||
|
||||
// Returns the I2P destination (the address) of the stream session
|
||||
func (ss StreamSession) Addr() I2PAddr {
|
||||
func (ss *StreamSession) Addr() I2PAddr {
|
||||
return ss.keys.Addr()
|
||||
}
|
||||
|
||||
// Returns the keys associated with the stream session
|
||||
func (ss StreamSession) Keys() I2PKeys {
|
||||
func (ss *StreamSession) Keys() I2PKeys {
|
||||
return ss.keys
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user