You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
562 B

// Package transport defines the interface for pluggable network transports.
package transport
import "context"
// Transport represents a network transport that serves the relay.
type Transport interface {
// Name returns the transport identifier (e.g., "tcp", "tls", "tor").
Name() string
// Start begins accepting connections through this transport.
Start(ctx context.Context) error
// Stop gracefully shuts down the transport.
Stop(ctx context.Context) error
// Addresses returns the addresses this transport is reachable on.
Addresses() []string
}