After the week I've had, I deserve to make a commit like this lmao

This commit is contained in:
2025-01-19 13:09:37 -05:00
parent 6f55ee1b45
commit 68961f8ad8
11 changed files with 440 additions and 64 deletions

View File

@@ -6,7 +6,7 @@ import "context"
// Conn is a HOPP connection.
type Conn interface {
io.Closer
OpenTrans(ctx context.Context) (Trans, error)
OpenTrans() (Trans, error)
AcceptTrans(ctx context.Context) (Trans, error)
}
@@ -14,8 +14,8 @@ type Conn interface {
type Trans interface {
io.Closer
ID() int64
Send(ctx context.Context, method uint16, data []byte) error
Receive(ctx context.Context) (method uint16, data []byte, err error)
SendDatagram(ctx context.Context, method uint16, data []byte) error
ReceiveDatagram(ctx context.Context) (method uint16, data []byte, err error)
// Send sends a message.
Send(method uint16, data []byte) error
// Receive receives a message.
Receive() (method uint16, data []byte, err error)
}