introduce abstraction for packet i/o

This commit is contained in:
Matthias Radestock committed 2014-08-20 11:18:12 +01:00
1 parent 5b7666a850
commit cb2cdc90cc
4 files changed
+78 -33

No files matched your search

+13
View File
@@ -272,3 +272,16 @@ type NaClDecryptorInstance struct {
highestOffsetSeen uint16
nonceChan chan *[24]byte
}
type PacketSource interface {
ReadPacket() ([]byte, error)
}
type PacketSink interface {
WritePacket([]byte) error
}
type PacketSourceSink interface {
PacketSource
PacketSink
}