func (s *Socket) resolveAddr(addr string) (net.Addr, error) { n := s.network() if n == "inproc" { return inproc.ResolveAddr(n, addr) } return net.ResolveUDPAddr(n, addr) }
func (s *Socket) strNetAddr(str string) (a net.Addr) { var err error switch n := s.network(); n { case "udp": a, err = net.ResolveUDPAddr(n, str) case "inproc": a, err = inproc.ResolveAddr(n, str) default: panic(n) } if err != nil { panic(err) } return }