csms

package
v0.20.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSMuxer

type SSMuxer struct {
	OrderPreference []string
	// contains filtered or unexported fields
}

SSMuxer is a multistream stream security transport multiplexer.

SSMuxer is safe to use without initialization. However, it's not safe to move after use.

func (*SSMuxer) AddTransport

func (sm *SSMuxer) AddTransport(path string, transport sec.SecureTransport)

AddTransport adds a stream security transport to this multistream muxer.

This method is *not* thread-safe. It should be called only when initializing the SSMuxer.

func (*SSMuxer) SecureInbound

func (sm *SSMuxer) SecureInbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, bool, error)

SecureInbound secures an inbound connection using this multistream multiplexed stream security transport.

func (*SSMuxer) SecureOutbound

func (sm *SSMuxer) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, bool, error)

SecureOutbound secures an outbound connection using this multistream multiplexed stream security transport.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL