summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/async/client.go
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2019-01-28 00:53:04 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-28 11:21:18 +0000
commit51ac989e85d13beda9cb304fb85e0aff18e9cd98 (patch)
tree335f5968c0d0c55a5c8e1a65e997a0d331c2210a /dhcpv4/async/client.go
parent82434691f0602844a2156a4d2037d43c51900b73 (diff)
dhcpv4: moved client into dhcpv4/client4
Diffstat (limited to 'dhcpv4/async/client.go')
-rw-r--r--dhcpv4/async/client.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/dhcpv4/async/client.go b/dhcpv4/async/client.go
index 617c711..4c2d3c1 100644
--- a/dhcpv4/async/client.go
+++ b/dhcpv4/async/client.go
@@ -7,8 +7,9 @@ import (
"sync"
"time"
- "github.com/fanliao/go-promise"
+ promise "github.com/fanliao/go-promise"
"github.com/insomniacslk/dhcp/dhcpv4"
+ "github.com/insomniacslk/dhcp/dhcpv4/client4"
)
// Default ports
@@ -41,8 +42,8 @@ type Client struct {
// NewClient creates an asynchronous client
func NewClient() *Client {
return &Client{
- ReadTimeout: dhcpv4.DefaultReadTimeout,
- WriteTimeout: dhcpv4.DefaultWriteTimeout,
+ ReadTimeout: client4.DefaultReadTimeout,
+ WriteTimeout: client4.DefaultWriteTimeout,
}
}
@@ -159,7 +160,7 @@ func (c *Client) receive(_ *dhcpv4.DHCPv4) {
c.connection.SetReadDeadline(time.Now().Add(c.ReadTimeout))
for {
- buffer := make([]byte, dhcpv4.MaxUDPReceivedPacketSize)
+ buffer := make([]byte, client4.MaxUDPReceivedPacketSize)
n, _, _, _, err := c.connection.ReadMsgUDP(buffer, oobdata)
if err != nil {
if err, ok := err.(net.Error); !ok || !err.Timeout() {