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
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user