func (b *TransportBase) GetRemoteCertificates() []*x509.Certificate {
	return b.session.GetRemoteCertificates()
}
GetRemoteCertificates returns the certificate chain in use by the remote side
package quic
import (
	"crypto"
	"crypto/x509"
	"errors"
	"net"
	"sync"
	"github.com/pion/logging"
	"github.com/pion/quic/internal/wrapper"
)
type TransportBase struct {
	lock                       sync.RWMutex
	onBidirectionalStreamHdlr  func(*BidirectionalStream)
	onUnidirectionalStreamHdlr func(*ReadableStream)
	session                    *wrapper.Session
	log                        logging.LeveledLogger
}
type Config struct {
	Client        bool
	Certificate   *x509.Certificate
	PrivateKey    crypto.PrivateKey
	LoggerFactory logging.LoggerFactory
}
func (b *TransportBase) StartBase(conn net.Conn, config *Config) error {
	lf := config.LoggerFactory
	if lf == nil {
		lf = logging.NewDefaultLoggerFactory()
	}
	b.log = lf.NewLogger("quic-wrapper")
	cfg := config.clone()
	cfg.SkipVerify = true  
	var s *wrapper.Session
	var err error
	if config.Client {
		s, err = wrapper.Client(conn, cfg)
	} else {
		var l *wrapper.Listener
		l, err = wrapper.Server(conn, cfg)
		if err != nil {
			return err
		}
		s, err = l.Accept()
	}
	if err != nil {
		return err
	}
	return b.startBase(s)
}
func (b *TransportBase) startBase(s *wrapper.Session) error {
	b.session = s
	go b.acceptStreams()
	go b.acceptUniStreams()
	return nil
}
func (c *Config) clone() *wrapper.Config {
	return &wrapper.Config{
		Certificate: c.Certificate,
		PrivateKey:  c.PrivateKey,
	}
}
func (b *TransportBase) CreateBidirectionalStream() (*BidirectionalStream, error) {
	s, err := b.session.OpenStream()
	if err != nil {
		return nil, err
	}
	return &BidirectionalStream{
		s: s,
	}, nil
}
func (b *TransportBase) CreateUnidirectionalStream() (*WritableStream, error) {
	s, err := b.session.OpenUniStream()
	if err != nil {
		return nil, err
	}
	return &WritableStream{
		s: s,
	}, nil
}
func (b *TransportBase) OnBidirectionalStream(f func(*BidirectionalStream)) {
	b.lock.Lock()
	defer b.lock.Unlock()
	b.onBidirectionalStreamHdlr = f
}
func (b *TransportBase) OnUnidirectionalStream(f func(*ReadableStream)) {
	b.lock.Lock()
	defer b.lock.Unlock()
	b.onUnidirectionalStreamHdlr = f
}
func (b *TransportBase) onBidirectionalStream(s *BidirectionalStream) {
	b.lock.Lock()
	f := b.onBidirectionalStreamHdlr
	b.lock.Unlock()
	if f != nil {
		go f(s)
	}
}
func (b *TransportBase) onUnidirectionalStream(s *ReadableStream) {
	b.lock.Lock()
	f := b.onUnidirectionalStreamHdlr
	b.lock.Unlock()
	if f != nil {
		go f(s)
	}
}