Documentation ¶
Index ¶
- type CwtchPeerListenChannel
- func (cplc *CwtchPeerListenChannel) Bidirectional() bool
- func (cplc *CwtchPeerListenChannel) Closed(err error)
- func (cplc *CwtchPeerListenChannel) OnlyClientCanOpen() bool
- func (cplc *CwtchPeerListenChannel) OpenInbound(channel *channels.Channel, raw *Protocol_Data_Control.OpenChannel) ([]byte, error)
- func (cplc *CwtchPeerListenChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
- func (cplc *CwtchPeerListenChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
- func (cplc *CwtchPeerListenChannel) Packet(data []byte)
- func (cplc *CwtchPeerListenChannel) RequiresAuthentication() string
- func (cplc *CwtchPeerListenChannel) Singleton() bool
- func (cplc *CwtchPeerListenChannel) Type() string
- type CwtchPeerSendChannelHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CwtchPeerListenChannel ¶
type CwtchPeerListenChannel struct { Handler CwtchPeerSendChannelHandler // contains filtered or unexported fields }
CwtchPeerListenChannel is the peer implementation of im.cwtch.server.listen
func (*CwtchPeerListenChannel) Bidirectional ¶
func (cplc *CwtchPeerListenChannel) Bidirectional() bool
Bidirectional - for Cwtch channels are not bidrectional
func (*CwtchPeerListenChannel) Closed ¶
func (cplc *CwtchPeerListenChannel) Closed(err error)
Closed is called when the channel is closed for any reason.
func (*CwtchPeerListenChannel) OnlyClientCanOpen ¶
func (cplc *CwtchPeerListenChannel) OnlyClientCanOpen() bool
OnlyClientCanOpen - for Cwtch server channels can only be opened by peers
func (*CwtchPeerListenChannel) OpenInbound ¶
func (cplc *CwtchPeerListenChannel) OpenInbound(channel *channels.Channel, raw *Protocol_Data_Control.OpenChannel) ([]byte, error)
OpenInbound - peers should never respond to open inbound requests from servers
func (*CwtchPeerListenChannel) OpenOutbound ¶
func (cplc *CwtchPeerListenChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
OpenOutbound sets up a new server listen channel
func (*CwtchPeerListenChannel) OpenOutboundResult ¶
func (cplc *CwtchPeerListenChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
OpenOutboundResult confirms a previous open channel request
func (*CwtchPeerListenChannel) Packet ¶
func (cplc *CwtchPeerListenChannel) Packet(data []byte)
Packet is called for each server packet received on this channel.
func (*CwtchPeerListenChannel) RequiresAuthentication ¶
func (cplc *CwtchPeerListenChannel) RequiresAuthentication() string
RequiresAuthentication - Cwtch channels require no auth channels
func (*CwtchPeerListenChannel) Singleton ¶
func (cplc *CwtchPeerListenChannel) Singleton() bool
Singleton - for Cwtch channels there can only be one instance per direction
func (*CwtchPeerListenChannel) Type ¶
func (cplc *CwtchPeerListenChannel) Type() string
Type returns the type string for this channel, e.g. "im.ricochet.server.listen".
type CwtchPeerSendChannelHandler ¶
type CwtchPeerSendChannelHandler interface {
HandleGroupMessage(*protocol.GroupMessage)
}
CwtchPeerSendChannelHandler is implemented by peers who want to listen to new messages