mirror of
https://github.com/vacp2p/mvds.git
synced 2026-01-08 19:48:03 -05:00
This commits changes the behavior so that we don't rely on the presence of GroupID in the payload. Adds some tests to verify the basic functionalities of BATCH and INTERACTIVE mode, but more are required to ensure the correct functioning. Error handling and state management is probably also to be inspected more carefully.
19 lines
440 B
Go
19 lines
440 B
Go
// Package transport contains transport related logic for MVDS.
|
|
package transport
|
|
|
|
import (
|
|
"github.com/vacp2p/mvds/protobuf"
|
|
"github.com/vacp2p/mvds/state"
|
|
)
|
|
|
|
type Packet struct {
|
|
Sender state.PeerID
|
|
Payload protobuf.Payload
|
|
}
|
|
|
|
// Transport defines an interface allowing for agnostic transport implementations.
|
|
type Transport interface {
|
|
Watch() Packet
|
|
Send(sender state.PeerID, peer state.PeerID, payload protobuf.Payload) error
|
|
}
|