code: func NewCommInstance(s *grpc.Server, certs *common.TLSCertificates, idStore identity.Mapper,
  	peerIdentity api.PeerIdentityType, secureDialOpts api.PeerSecureDialOpts, sa api.SecurityAdvisor,
  	commMetrics *metrics.CommMetrics, config CommConfig, dialOpts ...grpc.DialOption) (Comm, error) {
  
  	commInst := &commImpl{
  		sa:             sa,
  		pubSub:         util.NewPubSub(),
  		PKIID:          idStore.GetPKIidOfCert(peerIdentity),
  		idMapper:       idStore,
  		logger:         util.GetLogger(util.CommLogger, ""),
  		peerIdentity:   peerIdentity,
  		opts:           dialOpts,
  		secureDialOpts: secureDialOpts,
  		msgPublisher:   NewChannelDemultiplexer(),
  		lock:           &sync.Mutex{},
  		deadEndpoints:  make(chan common.PKIidType, 100),
  		stopping:       int32(0),
  		exitChan:       make(chan struct{}),
  		subscriptions:  make([]chan proto.ReceivedMessage, 0),
  		tlsCerts:       certs,
  		metrics:        commMetrics,
  		dialTimeout:    config.DialTimeout,
  		connTimeout:    config.ConnTimeout,
  		recvBuffSize:   config.RecvBuffSize,
  		sendBuffSize:   config.SendBuffSize,
  	}
  
  	connConfig := ConnConfig{
  		RecvBuffSize: config.RecvBuffSize,
  		SendBuffSize: config.SendBuffSize,
  	}
  
  	commInst.connStore = newConnStore(commInst, commInst.logger, connConfig)
  
  	proto.RegisterGossipServer(s, commInst)
  
  	return commInst, nil
  }
docs: // NewCommInstance creates a new comm instance that binds itself to the given gRPC server