Make dhcp.Conn also be an io.Closer.

This commit is contained in:
David Anderson 2016-03-23 23:43:52 -07:00
parent 05cf66722e
commit 21d22e747d

View File

@ -14,7 +14,10 @@
package dhcp package dhcp
import "net" import (
"io"
"net"
)
// TxType describes how a Packet should be sent on the wire. // TxType describes how a Packet should be sent on the wire.
type TxType int type TxType int
@ -42,6 +45,7 @@ const (
// //
// Multiple goroutines may invoke methods on a Conn simultaneously. // Multiple goroutines may invoke methods on a Conn simultaneously.
type Conn interface { type Conn interface {
io.Closer
// RecvDHCP reads a Packet from the connection. It returns the // RecvDHCP reads a Packet from the connection. It returns the
// packet and the interface it was received on, which may be nil // packet and the interface it was received on, which may be nil
// if interface information cannot be obtained. // if interface information cannot be obtained.