| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // UnixAddr represents the address of a Unix domain socket end point. |
| // Network returns the address's network name, "unix", "unixgram" or |
| func (a *UnixAddr) Network() string { |
| func (a *UnixAddr) String() string { |
| func (a *UnixAddr) toAddr() Addr { |
| // ResolveUnixAddr parses addr as a Unix domain socket address. |
| // The string net gives the network name, "unix", "unixgram" or |
| func ResolveUnixAddr(net, addr string) (*UnixAddr, error) { |
| case "unix", "unixgram", "unixpacket": |
| return &UnixAddr{Name: addr, Net: net}, nil |
| return nil, UnknownNetworkError(net) |