mirror of
https://github.com/go-i2p/sam3.git
synced 2025-07-17 05:54:17 -04:00
experiment: try using base32 as String in address since most things are going to expect it anyway, I think
This commit is contained in:
@ -211,9 +211,9 @@ func (a I2PAddr) Base64() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
// Returns the I2P destination (base64-encoded)
|
||||
// Returns the I2P destination (base32-encoded)
|
||||
func (a I2PAddr) String() string {
|
||||
return string(a)
|
||||
return string(a.Base32())
|
||||
}
|
||||
|
||||
// Returns "I2P"
|
||||
|
@ -159,7 +159,7 @@ func (sam *PrimarySession) newGenericSubSessionWithSignatureAndPorts(style, id,
|
||||
|
||||
// Creates a new StreamSession with the I2CP- and streaminglib options as
|
||||
// specified. See the I2P documentation for a full list of options.
|
||||
func (sam *PrimarySession) NewStreamSubSession(id string) (*StreamSession, error) {
|
||||
func (sam *PrimarySession) NewStreamSubSession(id string, protocol string) (*StreamSession, error) {
|
||||
conn, err := sam.newGenericSubSession("STREAM", id, []string{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -177,6 +177,7 @@ func (sam *PrimarySession) NewStreamSubSessionWithPorts(id, from, to string) (*S
|
||||
return &StreamSession{sam.Config.I2PConfig.Sam(), id, conn, sam.keys, time.Duration(600 * time.Second), time.Now(), Sig_NONE, from, to}, nil
|
||||
}
|
||||
|
||||
/*
|
||||
func (s *PrimarySession) I2PListener(name string) (*StreamListener, error) {
|
||||
listener, err := s.NewStreamSubSession(name)
|
||||
if err != nil {
|
||||
@ -184,6 +185,7 @@ func (s *PrimarySession) I2PListener(name string) (*StreamListener, error) {
|
||||
}
|
||||
return listener.Listen()
|
||||
}
|
||||
*/
|
||||
|
||||
// Creates a new datagram session. udpPort is the UDP port SAM is listening on,
|
||||
// and if you set it to zero, it will use SAMs standard UDP port.
|
||||
|
Reference in New Issue
Block a user