Documentation
¶
Index ¶
Constants ¶
View Source
const ID = "/cmtls/1.0.0"
ID is the protocol ID (used when negotiating with multistream)
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( tlsCfg *tls.Config, host func() host.Host, logger api.Logger, ) func(key crypto.PrivKey) (*Transport, error)
New . @Description: return a function can create a new Transport instance. @param tlsCfg: @param host: @param logger: @param : @return func(key crypto.PrivKey) (*Transport, error):
Types ¶
type Transport ¶
Transport constructs secure communication sessions for a peer.
func (*Transport) SecureInbound ¶
SecureInbound . @Description: runs the TLS handshake as a server. @receiver t @param ctx: @param insecure: @return sec.SecureConn: @return error:
func (*Transport) SecureOutbound ¶
func (t *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error)
SecureOutbound . @Description: runs the TLS handshake as a client. @receiver t @param ctx: @param insecure: @param p: @return sec.SecureConn: @return error:
Click to show internal directories.
Click to hide internal directories.