transport

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTransport

func RegisterTransport(t Transport)

RegisterTransport is used to register the transport globally, after which it will be available for all sockets. The transport will override any others registered for the same scheme.

func ResolveTCPAddr

func ResolveTCPAddr(addr string) (*net.TCPAddr, error)

ResolveTCPAddr is like net.ResolveTCPAddr, but it handles the wildcard used in nanomsg URLs, replacing it with an empty string to indicate that all local interfaces be used.

func StripScheme

func StripScheme(t Transport, addr string) (string, error)

StripScheme removes the leading scheme (such as "http://") from an address string. This is mostly a utility for benefit of transport providers.

Types

type Dialer

type Dialer = mangos.TranDialer

Dialer is a factory that creates Pipes by connecting to remote listeners.

type Listener

type Listener = mangos.TranListener

Listener is a factory that creates Pipes by listening to inbound dialers.

type Message

type Message = mangos.Message

Message is an alias for the mangos.Message

type Pipe

type Pipe = mangos.TranPipe

Pipe is a transport pipe.

func NewConnPipe

func NewConnPipe(c net.Conn, proto ProtocolInfo, options map[string]interface{}) (Pipe, error)

NewConnPipe allocates a new Pipe using the supplied net.Conn, and initializes it. It performs the handshake required at the SP layer, only returning the Pipe once the SP layer negotiation is complete.

Stream oriented transports can utilize this to implement a Transport. The implementation will also need to implement PipeDialer, PipeAccepter, and the Transport enclosing structure. Using this layered interface, the implementation needn't bother concerning itself with passing actual SP messages once the lower layer connection is established.

func NewConnPipeIPC

func NewConnPipeIPC(c net.Conn, proto ProtocolInfo, options map[string]interface{}) (Pipe, error)

NewConnPipeIPC allocates a new Pipe using the IPC exchange protocol.

type ProtocolInfo

type ProtocolInfo = mangos.ProtocolInfo

ProtocolInfo is stuff that describes a protocol.

type Transport

type Transport = mangos.Transport

Transport is our transport operations.

func GetTransport

func GetTransport(scheme string) Transport

GetTransport is used by a socket to lookup the transport for a given scheme.

Directories

Path Synopsis
Package all is used to register all transports.
Package all is used to register all transports.
Package inproc implements an simple inproc transport for mangos.
Package inproc implements an simple inproc transport for mangos.
Package ipc implements the IPC transport on top of UNIX domain sockets.
Package ipc implements the IPC transport on top of UNIX domain sockets.
Package tcp implements the TCP transport for mangos.
Package tcp implements the TCP transport for mangos.
Package tlstcp implements the TLS over TCP transport for mangos.
Package tlstcp implements the TLS over TCP transport for mangos.
Package ws implements a simple WebSocket transport for mangos.
Package ws implements a simple WebSocket transport for mangos.
Package wss implements a secure WebSocket transport for mangos.
Package wss implements a secure WebSocket transport for mangos.

Jump to

Keyboard shortcuts

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