pipenet

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 18 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 string) (net.Listener, error)

Types

type Dialer added in v0.4.0

type Dialer struct {
	LocalPath string
}

Dialer for pipe network

func (*Dialer) Dial added in v0.4.0

func (d *Dialer) Dial(path string) (net.Conn, error)

func (*Dialer) DialContext added in v0.4.0

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

func (*Dialer) DialPipe added in v0.4.0

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

func (*Dialer) DialPipeContext added in v0.4.0

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

type ListenConfig added in v0.4.0

type ListenConfig struct {

	// ConnectionDir for communication fifo
	ConnectionDir string

	// Permission of the listen fifo
	Permission uint32

	// SecurityDescriptor contains a Windows security descriptor in SDDL format.
	SecurityDescriptor string

	// MessageMode determines whether the pipe is in byte or message mode. In either
	// case the pipe is read in byte mode by default. The only practical difference in
	// this implementation is that CloseWrite() is only supported for message mode pipes;
	// CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only
	// transferred to the reader (and returned as io.EOF in this implementation)
	// when the pipe is in message mode.
	MessageMode bool

	// InputBufferSize specifies the size the input buffer, in bytes.
	InputBufferSize uint64

	// OutputBufferSize specifies the size the input buffer, in bytes.
	OutputBufferSize uint64
}

ListenConfig for pipe listener, only intended for unix fifo

func (*ListenConfig) ListenPipe added in v0.4.0

func (c *ListenConfig) ListenPipe(path string) (net.Listener, error)

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

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 {
	net.Conn
}

type PipeListener

type PipeListener struct {
	net.Listener
}

Jump to

Keyboard shortcuts

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