send

package
v0.3.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL