Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
func (*Message) MarshalJSONObject ¶
type Receiver ¶
type Receiver chan *Message
func (Receiver) UnmarshalStream ¶
func (s Receiver) UnmarshalStream(dec *gojay.StreamDecoder) error
type Sender ¶
type Sender chan gojay.MarshalerJSONObject
Here are defined our communication types
func (Sender) MarshalStream ¶
func (s Sender) MarshalStream(enc *gojay.StreamEncoder)
type SenderReceiver ¶
type SenderReceiver struct { Send Sender Receive Receiver Dec *gojay.StreamDecoder Enc *gojay.StreamEncoder Conn *websocket.Conn }
func (*SenderReceiver) Init ¶
func (sc *SenderReceiver) Init(sender int) *SenderReceiver
func (*SenderReceiver) OnMessage ¶
func (c *SenderReceiver) OnMessage(f func(*Message)) error
func (*SenderReceiver) SendMessage ¶
func (sc *SenderReceiver) SendMessage(m gojay.MarshalerJSONObject) error
func (*SenderReceiver) SetReceiver ¶
func (sc *SenderReceiver) SetReceiver()
func (*SenderReceiver) SetSender ¶
func (sc *SenderReceiver) SetSender(nCons int)
Click to show internal directories.
Click to hide internal directories.