Documentation ¶
Index ¶
- Variables
- func Decapsulation(messageType string, m *protobuf.Message) any
- func Encapsulation(messageType string, ID []byte, sender uint32, payloadMessage any) *protobuf.Message
- func MakeDispatcheChannels(receiveChannel chan *protobuf.Message, N uint32) *sync.Map
- func MakeReceiveChannel(port string) chan *protobuf.Message
- func MakeSendChannel(hostIP string, hostPort string) chan *protobuf.Message
Constants ¶
This section is empty.
Variables ¶
View Source
var MAXMESSAGE = 1024
MAXMESSAGE is the size of channels
Functions ¶
func Decapsulation ¶
Decapsulation decapsulates a message to it's original type
func Encapsulation ¶
func Encapsulation(messageType string, ID []byte, sender uint32, payloadMessage any) *protobuf.Message
Encapsulation encapsulates a message to a general type(*protobuf.Message)
func MakeDispatcheChannels ¶
MakeDispatcheChannels dispatche messages from receiveChannel and make a double layer Map : (messageType) --> (id) --> (channel)
func MakeReceiveChannel ¶
MakeReceiveChannel returns a channel receiving messages
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.