// Use Dial to connect to a server and read messages from it. func ExampleDial() { conn, err := npipe.Dial(`\\.\pipe\mypipe`) if err != nil { // handle error } if _, err := fmt.Fprintln(conn, "Hi server!"); err != nil { // handle error } r := bufio.NewReader(conn) msg, err := r.ReadString('\n') if err != nil { // handle eror } fmt.Println(msg) }
func connect(pathName string) (net.Conn, error) { return npipe.Dial(pathName) }
func (s SocketNamedPipe) DialSocket() (ret net.Conn, err error) { return npipe.Dial(s.pipename) }
func Connect(network, path string) (net.Conn, error) { return npipe.Dial(path) }
func (s SocketInfo) DialSocket() (ret net.Conn, err error) { return npipe.Dial(s.file) }