func (tm *TransactionManager) AddFrame(id, connectionID string, frame Frame) error {
	internalTxId := internalTxId(id, connectionID)

	tx, ok := tm.transactions[internalTxId]
	if ok {
		tm.transactions[internalTxId] = Transaction{
			frames: append(tx.frames, frame),
		}
	} else {
		return errors.New("no such transaction found")
	}

	log.Printf("client %s: added frame to transaction %s\n", connectionID, id)

	return nil
}
// AddFrame is called by the engine when it handles a frame that includes a transaction id header
// the frame is added iff a matching tx has been BEGINed by the same client
AddFrame is called by the engine when it handles a frame that includes a transaction id header
the frame is added iff a matching tx has been BEGINed by the same client
// AddFrame is called by the engine when it handles a frame that includes a transaction id header // the frame is added iff a matching tx has been BEGINed by the same client
func (tm *TransactionManager) AddFrame(id, connectionID string, frame Frame) error {
	internalTxId := internalTxId(id, connectionID)
	tx, ok := tm.transactions[internalTxId]
	if ok {
		tm.transactions[internalTxId] = Transaction{
			frames: append(tx.frames, frame),
		}
	} else {
		return errors.New("no such transaction found")
	}
	log.Printf("client %s: added frame to transaction %s\n", connectionID, id)
	return nil
}
func ( tm * TransactionManager ) AddFrame ( id , connectionID string , frame Frame ) error { internalTxId := internalTxId ( id , connectionID ) tx , ok := tm . transactions [ internalTxId ] if ok { tm . transactions [ internalTxId ] = Transaction { frames : append ( tx . frames , frame ) , } } else { return errors . New ( " " ) } log . Printf ( " \n " , connectionID , id ) return nil }
AddFrame is called by the engine when it handles a frame that includes a transaction id header
the frame is added iff a matching tx has been BEGINed by the same client
AddFrame is called by the engine when it handles a frame that includes a transaction id header the frame is added iff a matching tx has been BEGINed by the same client