xep0114

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ConnectTimeout defines connection timeout.
	ConnectTimeout time.Duration

	// KeepAliveTimeout defines the maximum amount of time that an inactive connection
	// would be considered alive.
	KeepAliveTimeout time.Duration

	// RequestTimeout defines component stream request timeout.
	RequestTimeout time.Duration

	// MaxStanzaSize is the maximum size a listener incoming stanza may have.
	MaxStanzaSize int

	// Secret is the external component shared secret.
	Secret string
}

Options defines component connection options.

type SocketListener

type SocketListener struct {
	// contains filtered or unexported fields
}

SocketListener represents a component socket listener type.

func NewSocketListener

func NewSocketListener(
	bindAddr string,
	port int,
	hosts *host.Hosts,
	comps *component.Components,
	extCompMng *extcomponentmanager.Manager,
	router router.Router,
	shapers shaper.Shapers,
	sn *sonar.Sonar,
	opts Options,
) *SocketListener

NewSocketListener returns a new external component socket listener.

func (*SocketListener) Start

func (l *SocketListener) Start(ctx context.Context) error

Start starts listening on the TCP network address bindAddr to handle incoming connections.

func (*SocketListener) Stop

func (l *SocketListener) Stop(ctx context.Context) error

Stop stops handling incoming connections and closes underlying TCP listener.

Jump to

Keyboard shortcuts

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