Add SelectNetwork command

This commit is contained in:
Matias Doyle 2017-11-06 13:11:22 +01:00
parent becc4580a5
commit ba0f86f6a1
2 changed files with 7 additions and 0 deletions

View File

@ -273,6 +273,10 @@ func (uc *unixgramConn) EnableNetwork(networkID int) error {
return uc.runCommand(fmt.Sprintf("ENABLE_NETWORK %d", networkID))
}
func (uc *unixgramConn) SelectNetwork(networkID int) error {
return uc.runCommand(fmt.Sprintf("SELECT_NETWORK %d", networkID))
}
func (uc *unixgramConn) DisableNetwork(networkID int) error {
return uc.runCommand(fmt.Sprintf("DISABLE_NETWORK %d", networkID))
}

View File

@ -166,6 +166,9 @@ type Conn interface {
// EnableNetwork enables a network. Returns error if the command fails.
EnableNetwork(int) error
// SelectNetwork selects a network (and disables the others).
SelectNetwork(int) error
// DisableNetwork disables a network.
DisableNetwork(int) error