net_transport.go
func NewNetworkTransport(
	stream StreamLayer,
	maxPool int,
	timeout time.Duration,
	logOutput io.Writer,
) *NetworkTransport {
	if logOutput == nil {
		logOutput = os.Stderr
	}
	logger := log.New(logOutput, "", log.LstdFlags)
	config := &NetworkTransportConfig{Stream: stream, MaxPool: maxPool, Timeout: timeout, Logger: logger}
	return NewNetworkTransportWithConfig(config)
}
func NewNetworkTransport(
	stream StreamLayer,
	maxPool int,
	timeout time.Duration,
	logOutput io.Writer,
) *NetworkTransport {
	if logOutput == nil {
		logOutput = os.Stderr
	}
	logger := log.New(logOutput, "", log.LstdFlags)
	config := &NetworkTransportConfig{Stream: stream, MaxPool: maxPool, Timeout: timeout, Logger: logger}
	return NewNetworkTransportWithConfig(config)
}
func NewNetworkTransport ( stream StreamLayer , maxPool int , timeout time . Duration , logOutput io . Writer , ) * NetworkTransport { if logOutput == nil { logOutput = os . Stderr } logger := log . New ( logOutput , " " , log . LstdFlags ) config := & NetworkTransportConfig { Stream : stream , MaxPool : maxPool , Timeout : timeout , Logger : logger } return NewNetworkTransportWithConfig ( config ) }
// NewNetworkTransport creates a new network transport with the given dialer
// and listener. The maxPool controls how many connections we will pool. The
// timeout is used to apply I/O deadlines. For InstallSnapshot, we multiply
// the timeout by (SnapshotSize / TimeoutScale).
NewNetworkTransport creates a new network transport with the given dialer and listener . The maxPool controls how many connections we will pool . The timeout is used to apply I / O deadlines . For InstallSnapshot we multiply the timeout by ( SnapshotSize / TimeoutScale ) .