Documentation ¶
Index ¶
- type CwtchPeerSendChannel
- func (cpsc *CwtchPeerSendChannel) Bidirectional() bool
- func (cpsc *CwtchPeerSendChannel) Closed(err error)
- func (cpsc *CwtchPeerSendChannel) OnlyClientCanOpen() bool
- func (cpsc *CwtchPeerSendChannel) OpenInbound(channel *channels.Channel, raw *Protocol_Data_Control.OpenChannel) ([]byte, error)
- func (cpsc *CwtchPeerSendChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
- func (cpsc *CwtchPeerSendChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
- func (cpsc *CwtchPeerSendChannel) Packet(data []byte)
- func (cpsc *CwtchPeerSendChannel) RequiresAuthentication() string
- func (cpsc *CwtchPeerSendChannel) SendGroupMessage(gm *protocol.GroupMessage) error
- func (cpsc *CwtchPeerSendChannel) Singleton() bool
- func (cpsc *CwtchPeerSendChannel) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CwtchPeerSendChannel ¶
type CwtchPeerSendChannel struct {
// contains filtered or unexported fields
}
CwtchPeerSendChannel is the peer implementation of im.cwtch.server.send
func (*CwtchPeerSendChannel) Bidirectional ¶
func (cpsc *CwtchPeerSendChannel) Bidirectional() bool
Bidirectional - for Cwtch channels are not bidrectional
func (*CwtchPeerSendChannel) Closed ¶
func (cpsc *CwtchPeerSendChannel) Closed(err error)
Closed is called when the channel is closed for any reason.
func (*CwtchPeerSendChannel) OnlyClientCanOpen ¶
func (cpsc *CwtchPeerSendChannel) OnlyClientCanOpen() bool
OnlyClientCanOpen - for Cwtch server channels only peers may open.
func (*CwtchPeerSendChannel) OpenInbound ¶
func (cpsc *CwtchPeerSendChannel) OpenInbound(channel *channels.Channel, raw *Protocol_Data_Control.OpenChannel) ([]byte, error)
OpenInbound should never be called on peers.
func (*CwtchPeerSendChannel) OpenOutbound ¶
func (cpsc *CwtchPeerSendChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
OpenOutbound is used to set up a new send channel and initialize spamguard
func (*CwtchPeerSendChannel) OpenOutboundResult ¶
func (cpsc *CwtchPeerSendChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
OpenOutboundResult confirms the open channel request and sets the spamguard challenge
func (*CwtchPeerSendChannel) Packet ¶
func (cpsc *CwtchPeerSendChannel) Packet(data []byte)
Packet should never be
func (*CwtchPeerSendChannel) RequiresAuthentication ¶
func (cpsc *CwtchPeerSendChannel) RequiresAuthentication() string
RequiresAuthentication - Cwtch channels require no auth
func (*CwtchPeerSendChannel) SendGroupMessage ¶
func (cpsc *CwtchPeerSendChannel) SendGroupMessage(gm *protocol.GroupMessage) error
SendGroupMessage performs the spamguard proof of work and sends a message.
func (*CwtchPeerSendChannel) Singleton ¶
func (cpsc *CwtchPeerSendChannel) Singleton() bool
Singleton - for Cwtch channels there can only be one instance per direction
func (*CwtchPeerSendChannel) Type ¶
func (cpsc *CwtchPeerSendChannel) Type() string
Type returns the type string for this channel, e.g. "im.ricochet.server.send".