outbound

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: BSD-3-Clause, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client3DHAuthChannel

type Client3DHAuthChannel struct {
	// PrivateKey must be set for client-side authentication channels
	ClientIdentity   identity.Identity
	ServerHostname   string
	ClientAuthResult func(bool, bool)
	// contains filtered or unexported fields
}

Client3DHAuthChannel wraps implementation of im.ricochet.auth.hidden-service"

func (*Client3DHAuthChannel) Bidirectional

func (ah *Client3DHAuthChannel) Bidirectional() bool

Bidirectional Returns whether or not the given channel allows anyone to send messages

func (*Client3DHAuthChannel) Closed

func (ah *Client3DHAuthChannel) Closed(err error)

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

func (*Client3DHAuthChannel) OnlyClientCanOpen

func (ah *Client3DHAuthChannel) OnlyClientCanOpen() bool

OnlyClientCanOpen ...

func (*Client3DHAuthChannel) OpenInbound

func (ah *Client3DHAuthChannel) OpenInbound(channel *channels.Channel, oc *Protocol_Data_Control.OpenChannel) ([]byte, error)

OpenInbound is the first method called for an inbound channel request. Infof an error is returned, the channel is rejected. Infof a RawMessage is returned, it will be sent as the ChannelResult message. Remote -> [Open Authentication Channel] -> Local

func (*Client3DHAuthChannel) OpenOutbound

func (ah *Client3DHAuthChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)

OpenOutbound is the first method called for an outbound channel request. Infof an error is returned, the channel is not opened. Infof a RawMessage is returned, it will be sent as the OpenChannel message. Local -> [Open Authentication Channel] -> Remote

func (*Client3DHAuthChannel) OpenOutboundResult

func (ah *Client3DHAuthChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)

OpenOutboundResult is called when a response is received for an outbound OpenChannel request. Infof `err` is non-nil, the channel was rejected and Closed will be called immediately afterwards. `raw` contains the raw protocol message including any extension data. Input: Remote -> [ChannelResult] -> {Client} Output: {Client} -> [Proof] -> Remote

func (*Client3DHAuthChannel) Packet

func (ah *Client3DHAuthChannel) Packet(data []byte)

Packet is called for each raw packet received on this channel. Input: Client -> [Proof] -> Remote OR Input: Remote -> [Result] -> Client

func (*Client3DHAuthChannel) RequiresAuthentication

func (ah *Client3DHAuthChannel) RequiresAuthentication() string

RequiresAuthentication Returns whether or not the given channel type requires authentication

func (*Client3DHAuthChannel) Singleton

func (ah *Client3DHAuthChannel) Singleton() bool

Singleton Returns whether or not the given channel type is a singleton

func (*Client3DHAuthChannel) Type

func (ah *Client3DHAuthChannel) Type() string

Type returns the type string for this channel, e.g. "im.ricochet.chat".

Jump to

Keyboard shortcuts

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