Documentation ¶
Index ¶
- Variables
- func Dial(a ma.Multiaddr) (manet.Conn, error)
- func DialPipe(ctx cxt.Context, d1, d2 ma.Multiaddr, o Opts) error
- func ForwardPipe(ctx cxt.Context, l, d ma.Multiaddr, o Opts) error
- func Listen(a ma.Multiaddr) (manet.Listener, error)
- func ListenPipe(ctx cxt.Context, l1, l2 ma.Multiaddr, o Opts) error
- func NewTraceFilenames() (string, string, string)
- func OpenTraceFiles(t *Trace, dir string) error
- func ProxyPipe(ctx cxt.Context, l ma.Multiaddr, o Opts) error
- type ConnErr
- type IOConn
- func (c *IOConn) Close() (err error)
- func (c *IOConn) LocalAddr() net.Addr
- func (c *IOConn) LocalMultiaddr() ma.Multiaddr
- func (c *IOConn) Read(b []byte) (n int, err error)
- func (c *IOConn) RemoteAddr() net.Addr
- func (c *IOConn) RemoteMultiaddr() ma.Multiaddr
- func (c *IOConn) SetDeadline(t time.Time) error
- func (c *IOConn) SetReadDeadline(t time.Time) error
- func (c *IOConn) SetWriteDeadline(t time.Time) error
- func (c *IOConn) Write(b []byte) (n int, err error)
- type Opts
- type StdioListener
- type Trace
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StdioMultiaddr = ma.StringCast("/unix/stdio") ProcStdioListener = StdioListener{} ProcStdioConn = IOConn{ R: os.Stdin, W: os.Stdout, LAddr: StdioMultiaddr, RAddr: StdioMultiaddr, } )
View Source
var ( TraceFilenameFmt = "ma-pipe-trace-<date>-<pid>-<direction>" TraceFilenameDateFmt = "2006-01-02-15:04:05Z" )
Functions ¶
func ForwardPipe ¶
ForwardPipe listens on one multiaddr, accepts one connection, dials to the second multiaddr, and pipes them to each other.
func ListenPipe ¶
ListenPipe listens on both multiaddrs, accepts one connection each, and pipes them to each other.
func NewTraceFilenames ¶
func OpenTraceFiles ¶
Types ¶
type IOConn ¶
func (*IOConn) LocalMultiaddr ¶
func (*IOConn) RemoteAddr ¶
func (*IOConn) RemoteMultiaddr ¶
type StdioListener ¶
type StdioListener struct {
// contains filtered or unexported fields
}
func (*StdioListener) Addr ¶
func (sl *StdioListener) Addr() net.Addr
func (*StdioListener) Close ¶
func (sl *StdioListener) Close() error
func (*StdioListener) Multiaddr ¶
func (sl *StdioListener) Multiaddr() ma.Multiaddr
func (*StdioListener) NetListener ¶
func (sl *StdioListener) NetListener() net.Listener
Click to show internal directories.
Click to hide internal directories.