pipenet

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(path string) (net.Conn, error)

func DialContext

func DialContext(ctx context.Context, path string) (net.Conn, error)

func DialPipe

func DialPipe(laddr *PipeAddr, raddr *PipeAddr) (net.Conn, error)

func DialPipeContext

func DialPipeContext(ctx context.Context, laddr *PipeAddr, raddr *PipeAddr) (_ net.Conn, err error)

func ListenPipe

func ListenPipe(path, connDir string, perm os.FileMode) (net.Listener, error)

ListenPipe will create a named pipe at path and listen incomming message

Types

type PipeAddr

type PipeAddr struct {
	Path string
}

func (*PipeAddr) Network

func (a *PipeAddr) Network() string

func (*PipeAddr) String

func (a *PipeAddr) String() string

type PipeListener

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

func (*PipeListener) Accept

func (c *PipeListener) Accept() (net.Conn, error)

Accept new pipe connections, once we have received incoming coming message from `path`, the message content is expected to be the path of a named pipe listened by the client

If the provided path is a valid named pipe, the listener will create another named pipe for client and write to the pipe provided by the client

func (*PipeListener) Addr

func (c *PipeListener) Addr() net.Addr

func (*PipeListener) Close

func (c *PipeListener) Close() error

Jump to

Keyboard shortcuts

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