// newTransport creates a transport based on the session options.
newTransport creates a transport based on the session options.
// newTransport creates a transport based on the session options .
func (s *Session) newTransport() (*transport, error) {
	if s.conn != nil {
		return &transport{conn: s.conn}, nil
	}
	conn, err := s.dialer(context.Background(), s.network, s.addr)
	if err != nil {
		return nil, err
	}
	t := &transport{
		conn: conn,
	}
	return t, nil
}
func ( s * Session ) newTransport ( ) ( * transport , error ) { if s . conn != nil { return & transport { conn : s . conn } , nil } conn , err := s . dialer ( context . Background ( ) , s . network , s . addr ) if err != nil { return nil , err } t := & transport { conn : conn , } return t , nil }
newTransport creates a transport based on the session options.
newTransport creates a transport based on the session options .
// Check if a net.Conn was supplied already (testing only).