improve closeup

This commit is contained in:
idk 2018-12-25 03:41:51 -05:00
parent 179b25e01c
commit beca8fff5a
No known key found for this signature in database
GPG key ID: D75C03B39B5E14E1
7 changed files with 30 additions and 2 deletions

View file

@ -31,6 +31,16 @@ func (c Conn) Keys() (*sam3.I2PKeys, error) {
return c.SaveKeys()
}
func (m Conn) Cleanup() error {
if err := m.SAMConn.Close(); err != nil {
return err
}
if err := m.StreamSession.Close(); err != nil {
return err
}
return nil
}
func NewConn(sam *sam3.SAM, addr, path string, opts []string) (*Conn, error) {
var c Conn
var err error

1
conn/conn_options.go Normal file
View file

@ -0,0 +1 @@
package conn

1
conn/conn_test.go Normal file
View file

@ -0,0 +1 @@
package conn