Skip to content

Commit 817926c

Browse files
committed
Fix for multiple value return of connections
1 parent 4de04cc commit 817926c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

example_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
package dhcp4_test
33

44
import (
5-
dhcp "github.com/krolaw/dhcp4"
5+
dhcp "github.com/krolaw/dhcp4"
6+
//dhcpConn "github.com/krolaw/dhcp4"
67

78
"log"
89
"math/rand"
@@ -26,8 +27,10 @@ func ExampleHandler() {
2627
},
2728
}
2829
log.Fatal(dhcp.ListenAndServe(handler))
29-
// log.Fatal(dhcp.Serve(dhcp.NewUDP4BoundListener("eth0",":67"), handler)) // Select interface on multi interface device - just linux for now
30-
// log.Fatal(dhcp.Serve(dhcp.NewUDP4FilterListener("en0",":67"), handler)) // Work around for other OSes
30+
31+
// conn, _ := dhcpConn.NewUDP4BoundListener("eth0",":67"), handler) // Select interface on multi interface device - just linux for now
32+
// conn, _ := dhcpConn.NewUDP4FilterListener("en0",":67"), handler) // Work around for other OSes
33+
// log.Fatal(dhcp.Serve(conn, handler))
3134
}
3235

3336
type lease struct {

0 commit comments

Comments
 (0)