Connections do not accept transactions using a context

Having there be a mandatory context will just create more waste
and slow stuff down for transports which don't support it.
This commit is contained in:
Sasha Koshka 2025-01-19 19:18:35 -05:00
parent 41ff2164bd
commit 92b3da4282

View File

@ -1,19 +1,19 @@
package hopp
import "io"
import "context"
// Conn is a HOPP connection.
type Conn interface {
io.Closer
OpenTrans() (Trans, error)
AcceptTrans(ctx context.Context) (Trans, error)
AcceptTrans() (Trans, error)
}
// Trans is a HOPP transaction.
type Trans interface {
io.Closer
ID() int64
// Send sends a message.
Send(method uint16, data []byte) error
// Receive receives a message.