Use DialMode/ListenMode
This commit is contained in:
		| @@ -58,7 +58,7 @@ func (t *tunBroker) Disconnect() error { | ||||
| func (t *tunBroker) Publish(topic string, m *broker.Message, opts ...broker.PublishOption) error { | ||||
| 	// TODO: this is probably inefficient, we might want to just maintain an open connection | ||||
| 	// it may be easier to add broadcast to the tunnel | ||||
| 	c, err := t.tunnel.Dial(topic, tunnel.DialMulticast()) | ||||
| 	c, err := t.tunnel.Dial(topic, tunnel.DialMode(tunnel.Multicast)) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| @@ -71,7 +71,7 @@ func (t *tunBroker) Publish(topic string, m *broker.Message, opts ...broker.Publ | ||||
| } | ||||
|  | ||||
| func (t *tunBroker) Subscribe(topic string, h broker.Handler, opts ...broker.SubscribeOption) (broker.Subscriber, error) { | ||||
| 	l, err := t.tunnel.Listen(topic, tunnel.ListenMulticast()) | ||||
| 	l, err := t.tunnel.Listen(topic, tunnel.ListenMode(tunnel.Multicast)) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user