transport

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultTransportType

func GetDefaultTransportType() sipc_proto.TransportType

Types

type DomainSocketTransport

type DomainSocketTransport struct {
	Transport
}

func (*DomainSocketTransport) Connect

func (t *DomainSocketTransport) Connect(path string) (net.Conn, error)

func (*DomainSocketTransport) GetPeerCredentials

func (t *DomainSocketTransport) GetPeerCredentials(conn net.Conn) (*PeerCredentials, error)

func (*DomainSocketTransport) Listen

func (t *DomainSocketTransport) Listen(path string) (net.Listener, error)

func (*DomainSocketTransport) NewDefaultPath

func (t *DomainSocketTransport) NewDefaultPath() string

func (*DomainSocketTransport) TransportType

func (t *DomainSocketTransport) TransportType() sipc_proto.TransportType

type PeerCredentials

type PeerCredentials struct {
	Pid int
}

type TcpTransport added in v0.2.3

type TcpTransport struct {
	Transport
}

func NewTcpTransport added in v0.2.3

func NewTcpTransport() *TcpTransport

func (*TcpTransport) Connect added in v0.2.3

func (t *TcpTransport) Connect(path string) (net.Conn, error)

func (*TcpTransport) GetPeerCredentials added in v0.2.3

func (t *TcpTransport) GetPeerCredentials(conn net.Conn) (*PeerCredentials, error)

func (*TcpTransport) Listen added in v0.2.3

func (t *TcpTransport) Listen(path string) (net.Listener, error)

func (*TcpTransport) NewDefaultPath added in v0.2.3

func (t *TcpTransport) NewDefaultPath() string

func (*TcpTransport) TransportType added in v0.2.3

func (t *TcpTransport) TransportType() sipc_proto.TransportType

type Transport

type Transport interface {
	TransportType() sipc_proto.TransportType
	Connect(path string) (net.Conn, error)
	Listen(path string) (net.Listener, error)
	NewDefaultPath() string
	GetPeerCredentials(conn net.Conn) (*PeerCredentials, error)
}

func NewTransport

func NewTransport(transportType sipc_proto.TransportType) (Transport, error)

Jump to

Keyboard shortcuts

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