2024-01-07 10:12:43 +00:00
|
|
|
package base
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/interfaces"
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/net"
|
|
|
|
"github.com/vmihailenco/msgpack/v5"
|
|
|
|
)
|
|
|
|
|
2024-01-08 06:16:20 +00:00
|
|
|
//go:generate mockgen -source=base.go -destination=../mocks/base/base.go -package=base
|
2024-01-08 05:16:32 +00:00
|
|
|
|
2024-01-07 10:12:43 +00:00
|
|
|
type IncomingMessage interface {
|
2024-01-07 11:35:41 +00:00
|
|
|
HandleMessage(node interfaces.Node, peer net.Peer, verifyId bool) error
|
2024-01-07 10:12:43 +00:00
|
|
|
SetIncomingMessage(msg IncomingMessage)
|
2024-01-08 03:55:57 +00:00
|
|
|
IncomingMessage() IncomingMessage
|
2024-01-07 15:37:42 +00:00
|
|
|
Self() IncomingMessage
|
|
|
|
SetSelf(self IncomingMessage)
|
2024-01-09 17:50:52 +00:00
|
|
|
Original() []byte
|
2024-01-09 17:49:16 +00:00
|
|
|
Kind() int
|
2024-01-13 16:22:01 +00:00
|
|
|
RequiresHandshake() bool
|
|
|
|
SetRequiresHandshake(value bool)
|
2024-01-07 10:12:43 +00:00
|
|
|
msgpack.CustomDecoder
|
|
|
|
}
|
|
|
|
|
|
|
|
type IncomingMessageTyped interface {
|
|
|
|
DecodeMessage(dec *msgpack.Decoder) error
|
|
|
|
IncomingMessage
|
|
|
|
}
|