Michal Iskierko 6d31343205 feat: Waku v2 bridge
Issue #12610
2024-02-22 17:07:59 +01:00

24 lines
383 B
Go

package udp
import "math/rand"
func RandomTransactionId() TransactionId {
return TransactionId(rand.Uint32())
}
type TransactionResponseHandler func(dr DispatchedResponse)
type Transaction struct {
id int32
d *Dispatcher
h TransactionResponseHandler
}
func (t *Transaction) Id() TransactionId {
return t.id
}
func (t *Transaction) End() {
t.d.forgetTransaction(t.id)
}