pull/865/head
Darien Raymond 7 years ago
parent 94e930175a
commit d801be71ea
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -112,6 +112,7 @@ func ListenUDP(address net.Address, port net.Port, option ListenOption) (*Hub, e
return hub, nil return hub, nil
} }
// Close implements net.Listener.
func (h *Hub) Close() error { func (h *Hub) Close() error {
h.conn.Close() h.conn.Close()
return nil return nil
@ -161,6 +162,7 @@ func (h *Hub) start() {
h.queue.Close() h.queue.Close()
} }
// Addr implements net.Listener.
func (h *Hub) Addr() net.Addr { func (h *Hub) Addr() net.Addr {
return h.conn.LocalAddr() return h.conn.LocalAddr()
} }

Loading…
Cancel
Save