mirror of
https://github.com/taigrr/golang-wpasupplicant
synced 2025-01-18 04:43:18 -08:00
Add function to close unixgram connection
This commit is contained in:
parent
03f5226fe0
commit
0402bbb5de
@ -199,6 +199,10 @@ func (err *ParseError) Error() string {
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func (uc *unixgramConn) Close() error {
|
||||
return uc.c.Close()
|
||||
}
|
||||
|
||||
func (uc *unixgramConn) Ping() error {
|
||||
resp, err := uc.cmd("PING")
|
||||
if err != nil {
|
||||
|
@ -143,6 +143,9 @@ func (r *configuredNetwork) Flags() []string { return r.flags }
|
||||
// Conn is a connection to wpa_supplicant over one of its communication
|
||||
// channels.
|
||||
type Conn interface {
|
||||
// Close closes the unixgram connection
|
||||
Close() error
|
||||
|
||||
// Ping tests the connection. It returns nil if wpa_supplicant is
|
||||
// responding.
|
||||
Ping() error
|
||||
|
Loading…
x
Reference in New Issue
Block a user