pipenet

package
v0.2.1 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 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 PipeConn

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

func DialPipe

func DialPipe(laddr *PipeAddr, raddr *PipeAddr) (*PipeConn, error)

func DialPipeContext

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

func (*PipeConn) Close

func (c *PipeConn) Close() error

func (*PipeConn) LocalAddr

func (c *PipeConn) LocalAddr() net.Addr

func (*PipeConn) Read

func (c *PipeConn) Read(b []byte) (n int, err error)

func (*PipeConn) RemoteAddr

func (c *PipeConn) RemoteAddr() net.Addr

func (*PipeConn) SetDeadline

func (c *PipeConn) SetDeadline(t time.Time) error

func (*PipeConn) SetReadDeadline

func (c *PipeConn) SetReadDeadline(t time.Time) error

func (*PipeConn) SetWriteDeadline

func (c *PipeConn) SetWriteDeadline(t time.Time) error

func (*PipeConn) Write

func (c *PipeConn) Write(b []byte) (n int, err error)

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