code: func go_on_connect_callback(privateCtx unsafe.Pointer) C.int {
  	log.Debug("go_on_connect_callback BEGIN")
  	defer log.Debug("go_on_connect_callback END")
  	context.lock.RLock()
  	defer context.lock.RUnlock()
  
  	// Get memif reference.
  	ifIndex := int(uintptr(privateCtx))
  	memif, exists := context.memifs[ifIndex]
  	if !exists {
  		return C.int(ErrNoConn.Code())
  	}
  
  	// Initialize Rx/Tx queues.
  	err := memif.initQueues()
  	if err != nil {
  		if memifErr, ok := err.(*MemifError); ok {
  			return C.int(memifErr.Code())
  		}
  		return C.int(ErrUnknown.Code())
  	}
  
  	// Call the user callback.
  	if memif.callbacks.OnConnect != nil {
  		memif.callbacks.OnConnect(memif)
  	}
  
  	// Start polling the RX queues for interrupts.
  	for i := 0; i < len(memif.queueIntCh); i++ {
  		memif.wg.Add(1)
  		go pollRxQueue(memif, uint8(i))
  	}
  
  	return C.int(0)
  }
docs: //export go_on_connect_callback