Adding ipc.Server.Addr().
@@ -21,6 +21,8 @@ type Server interface {
// Close the port, and it causes loop end.
Close() error
+
+ Addr() net.Addr
}
type server struct {
@@ -29,6 +31,10 @@ type server struct {
handler ConnectionHandler
}
+func (s *server) Addr() net.Addr {
+ return s.listener.Addr()
+}
+
func (s *server) Listen(network, address string) error {
switch network {
case "unix":
