Exemplo n.º 1
0
func New(socketpath string) *USBMux {
	if socketpath == "" {
		socketpath = "/var/run/usbmuxd"
	}

	u := &USBMux{socketpath: socketpath, listener: MuxConnection.New(socketpath)}

	u.listener.Listen()
	u.Devices = u.listener.Devices
	return u
}
Exemplo n.º 2
0
func (u *USBMux) Connect(device *MuxDevice.MuxDevice, port int) net.Conn {
	connector := MuxConnection.New(u.socketpath)
	return connector.Connect(device, port)
}