fetch

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CwtchPeerFetchChannel

type CwtchPeerFetchChannel struct {
	Handler CwtchPeerFetchChannelHandler
	// contains filtered or unexported fields
}

CwtchPeerFetchChannel is the peer implementation of the im.cwtch.server.fetch channel.

func (*CwtchPeerFetchChannel) Bidirectional

func (cpfc *CwtchPeerFetchChannel) Bidirectional() bool

Bidirectional - for Cwtch channels are not bidrectional

func (*CwtchPeerFetchChannel) Closed

func (cpfc *CwtchPeerFetchChannel) Closed(err error)

Closed is called when the channel is closed for any reason.

func (*CwtchPeerFetchChannel) FetchRequest

func (cpfc *CwtchPeerFetchChannel) FetchRequest() error

FetchRequest sends a FetchMessage to the Server.

func (*CwtchPeerFetchChannel) OnlyClientCanOpen

func (cpfc *CwtchPeerFetchChannel) OnlyClientCanOpen() bool

OnlyClientCanOpen - for Cwtch server channels only client can open

func (*CwtchPeerFetchChannel) OpenInbound

func (cpfc *CwtchPeerFetchChannel) OpenInbound(channel *channels.Channel, raw *Protocol_Data_Control.OpenChannel) ([]byte, error)

OpenInbound - cwtch server peer implementations shouldnever respond to inbound requests

func (*CwtchPeerFetchChannel) OpenOutbound

func (cpfc *CwtchPeerFetchChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)

OpenOutbound sets up a new cwtch fetch channel

func (*CwtchPeerFetchChannel) OpenOutboundResult

func (cpfc *CwtchPeerFetchChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)

OpenOutboundResult confirms a previous open channel request

func (*CwtchPeerFetchChannel) Packet

func (cpfc *CwtchPeerFetchChannel) Packet(data []byte)

Packet is called for each raw packet received on this channel.

func (*CwtchPeerFetchChannel) RequiresAuthentication

func (cpfc *CwtchPeerFetchChannel) RequiresAuthentication() string

RequiresAuthentication - Cwtch server channels require no auth.

func (*CwtchPeerFetchChannel) Singleton

func (cpfc *CwtchPeerFetchChannel) Singleton() bool

Singleton - for Cwtch channels there can only be one instance per direction

func (*CwtchPeerFetchChannel) Type

func (cpfc *CwtchPeerFetchChannel) Type() string

Type returns the type string for this channel, e.g. "im.ricochet.server.fetch)

type CwtchPeerFetchChannelHandler

type CwtchPeerFetchChannelHandler interface {
	HandleGroupMessage(*protocol.GroupMessage)
	HandleFetchDone()
}

CwtchPeerFetchChannelHandler should be implemented by peers to receive new messages.

Jump to

Keyboard shortcuts

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