Documentation ¶
Index ¶
- type HTTP
- type SessionProtocol
- func (s *SessionProtocol) Accept() (net.Conn, error)
- func (s *SessionProtocol) Addr() net.Addr
- func (s *SessionProtocol) Close() error
- func (q *SessionProtocol) Dial(network, addr string) (net.Conn, error)
- func (s *SessionProtocol) DialContext(ctx context.Context, network, addrstr string) (net.Conn, error)
- func (q *SessionProtocol) DialTLS(network, addr string) (net.Conn, error)
- func (q *SessionProtocol) DialTLSContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (q *SessionProtocol) HTTP() *HTTP
- func (s *SessionProtocol) Sessions() []ed25519.PublicKey
- type Sessions
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionProtocol ¶ added in v0.8.0
type SessionProtocol struct {
// contains filtered or unexported fields
}
func (*SessionProtocol) Accept ¶ added in v0.8.0
func (s *SessionProtocol) Accept() (net.Conn, error)
Accept blocks until a new connection request is received. The connection returned by this function will be TLS-encrypted.
func (*SessionProtocol) Addr ¶ added in v0.8.0
func (s *SessionProtocol) Addr() net.Addr
func (*SessionProtocol) Close ¶ added in v0.8.0
func (s *SessionProtocol) Close() error
func (*SessionProtocol) Dial ¶ added in v0.8.0
func (q *SessionProtocol) Dial(network, addr string) (net.Conn, error)
Dial dials a given public key using the supplied network. The address must be the destination public key specified in hex.
func (*SessionProtocol) DialContext ¶ added in v0.8.0
func (s *SessionProtocol) DialContext(ctx context.Context, network, addrstr string) (net.Conn, error)
DialContext dials a given public key using the supplied network. The network field can be used to specify which routing algorithm to use for the connection: "ed25519+greedy" for greedy routing or "ed25519+source" for source routing - DHT lookups and pathfinds will be performed for these networks automatically. Otherwise, the default "ed25519" will use snake routing. The address must be the destination public key specified in hex. If the context expires then the connection will be torn down automatically.
func (*SessionProtocol) DialTLS ¶ added in v0.8.0
func (q *SessionProtocol) DialTLS(network, addr string) (net.Conn, error)
DialTLS is an alias for Dial, as all sessions are TLS-encrypted.
func (*SessionProtocol) DialTLSContext ¶ added in v0.8.0
func (q *SessionProtocol) DialTLSContext(ctx context.Context, network, addr string) (net.Conn, error)
DialTLSContext is an alias for DialContext, as all sessions are TLS-encrypted.
func (*SessionProtocol) HTTP ¶ added in v0.8.0
func (q *SessionProtocol) HTTP() *HTTP
func (*SessionProtocol) Sessions ¶ added in v0.8.0
func (s *SessionProtocol) Sessions() []ed25519.PublicKey