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:
parent
41ff2164bd
commit
92b3da4282
@ -1,19 +1,19 @@
|
|||||||
package hopp
|
package hopp
|
||||||
|
|
||||||
import "io"
|
import "io"
|
||||||
import "context"
|
|
||||||
|
|
||||||
// Conn is a HOPP connection.
|
// Conn is a HOPP connection.
|
||||||
type Conn interface {
|
type Conn interface {
|
||||||
io.Closer
|
io.Closer
|
||||||
OpenTrans() (Trans, error)
|
OpenTrans() (Trans, error)
|
||||||
AcceptTrans(ctx context.Context) (Trans, error)
|
AcceptTrans() (Trans, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trans is a HOPP transaction.
|
// Trans is a HOPP transaction.
|
||||||
type Trans interface {
|
type Trans interface {
|
||||||
io.Closer
|
io.Closer
|
||||||
ID() int64
|
ID() int64
|
||||||
|
|
||||||
// Send sends a message.
|
// Send sends a message.
|
||||||
Send(method uint16, data []byte) error
|
Send(method uint16, data []byte) error
|
||||||
// Receive receives a message.
|
// Receive receives a message.
|
||||||
|
Loading…
Reference in New Issue
Block a user