Пример #1
0
// Accept implements the the PipeListener Accept method.
func (l *listener) Accept() (mangos.Pipe, error) {

	conn, err := l.listener.AcceptUnix()
	if err != nil {
		return nil, err
	}
	return mangos.NewConnPipeIPC(conn, l.sock)
}
Пример #2
0
// Dial implements the PipeDialer Dial method
func (d *dialer) Dial() (mangos.Pipe, error) {

	conn, err := net.DialUnix("unix", nil, d.addr)
	if err != nil {
		return nil, err
	}
	return mangos.NewConnPipeIPC(conn, d.sock)
}