summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/async/client.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpv4/async/client.go b/dhcpv4/async/client.go
index 81b10f7..617c711 100644
--- a/dhcpv4/async/client.go
+++ b/dhcpv4/async/client.go
@@ -194,7 +194,11 @@ func (c *Client) remoteAddr() (*net.UDPAddr, error) {
// Send inserts a message to the queue to be sent asynchronously.
// Returns a future which resolves to response and error.
-func (c *Client) Send(message *dhcpv4.DHCPv4) *promise.Future {
+func (c *Client) Send(message *dhcpv4.DHCPv4, modifiers ...dhcpv4.Modifier) *promise.Future {
+ for _, mod := range modifiers {
+ mod(message)
+ }
+
p := promise.NewPromise()
c.packetsLock.Lock()
c.packets[message.TransactionID] = p