mirror of
https://github.com/openp2p-cn/openp2p.git
synced 2025-12-24 12:57:52 +08:00
17 lines
333 B
Go
17 lines
333 B
Go
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
|
|
}
|