mirror of
https://github.com/openp2p-cn/openp2p.git
synced 2025-10-05 08:37:04 +08:00
17 lines
336 B
Go
17 lines
336 B
Go
package openp2p
|
|
|
|
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
|
|
}
|