mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Work in progress, add a linkInterfaceMsgIO interface type and make stream implement it, this will be used by link
This commit is contained in:
parent
c8e1be0f73
commit
5a4d6481dd
4 changed files with 110 additions and 6 deletions
|
@ -17,6 +17,15 @@ type link struct {
|
|||
interfaces map[string]*linkInterface
|
||||
}
|
||||
|
||||
type linkInterfaceMsgIO interface {
|
||||
readMsg() ([]byte, error)
|
||||
writeMsg([]byte) (int, error)
|
||||
close() error
|
||||
// These are temporary workarounds to stream semantics
|
||||
_sendMetaBytes([]byte) error
|
||||
_recvMetaBytes() ([]byte, error)
|
||||
}
|
||||
|
||||
type linkInterface struct {
|
||||
name string
|
||||
link *link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue