mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-09-18 20:57:50 +02:00
device: accept any io.Reader in device.IpcSetOperation
Any io.Reader will do, and there are no performance concerns here. This is technically backwards incompatible, but it is very unlikely to break any existing code. It is compatible with the existing uses in wireguard-{windows,android,apple} and also will allow us to slightly simplify it if desired. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
77f5545896
commit
e950ce7bd2
@ -107,8 +107,8 @@ func (device *Device) IpcGetOperation(socket *bufio.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (device *Device) IpcSetOperation(socket *bufio.Reader) error {
|
||||
scanner := bufio.NewScanner(socket)
|
||||
func (device *Device) IpcSetOperation(r io.Reader) error {
|
||||
scanner := bufio.NewScanner(r)
|
||||
logError := device.log.Error
|
||||
logDebug := device.log.Debug
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user