pipe

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// PermEveryone is the Linux permission string used in sockets to allow anyone to write and read
	// to the listening socket. This can be used for socket communcation between privilege boundaries.
	// This can be applied to the ListenPerm function.
	PermEveryone = "0766"
)

Variables

This section is empty.

Functions

func Dial

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

Dial connects to the specified Pipe path. This function will return a net.Conn instance or any errors that may occur during the connection attempt. Pipe names are in the form of "/<path>". This function blocks indefinitely. Use the DialTimeout or DialContext to specify a control method.

func DialContext

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

DialContext connects to the specified Pipe path. This function will return a net.Conn instance or any errors that may occur during the connection attempt. Pipe names are in the form of "/<path>. This function blocks until the supplied context is cancled and will return the context's Err() if the cancel occurs before the connection.

func DialTimeout

func DialTimeout(path string, t time.Duration) (net.Conn, error)

DialTimeout connects to the specified Pipe path. This function will return a net.Conn instance or any errors that may occur during the connection attempt. Pipe names are in the form of "/<path>". This function blocks for the specified amount of time and will return 'Errtimeout' if the timeout is reached.

func Format

func Format(s string) string

Format will ensure the path for this Pipe socket fits the proper OS based pathname. Valid pathnames will be returned without any changes.

func Listen

func Listen(path string) (net.Listener, error)

Listen returns a net.Listener that will listen for new connections on the Named Pipe path specified or any errors that may occur during listener creation. Pipe names are in the form of "/<path>".

func ListenPerms

func ListenPerms(path, perms string) (net.Listener, error)

ListenPerms returns a net.Listener that will listen for new connections on the Named Pipe path specified or any errors that may occur during listener creation. Pipe names are in the form of "/<path>". This function allows for specifying a SDDL string used to set the permissions of the listeneing Pipe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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