This commit is contained in:
TenderIronh
2022-04-27 23:26:23 +08:00
parent 037f3cc34e
commit b2d35c6f97
28 changed files with 1810 additions and 608 deletions
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"time"
)
type underlay interface {
ReadBuffer() (*openP2PHeader, []byte, error)
WriteBytes(uint16, uint16, []byte) error
WriteBuffer([]byte) error
WriteMessage(uint16, uint16, interface{}) error
Close() error
SetReadDeadline(t time.Time) error
SetWriteDeadline(t time.Time) error
Protocol() string
}