File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ const DEFAULT_ADDRESS = process.platform === 'win32'
8
8
? { port : 27015 }
9
9
: { path : '/var/run/usbmuxd' } ;
10
10
11
+ const CLIENT_VERSION = 'usbmux-client' ;
12
+ const PROG_NAME = 'usbmux-client' ;
13
+
11
14
function plistSerialize ( value : any ) {
12
15
const plistString = plist . build ( value )
13
16
const plistBuffer = Buffer . from ( plistString , 'utf8' ) ;
@@ -35,8 +38,8 @@ const swap16bitEndianness = (port: number) => {
35
38
function requestTunnelMessage ( deviceId : number , port : number ) {
36
39
return plistSerialize ( {
37
40
MessageType : 'Connect' ,
38
- ClientVersionString : 'usbmux-client' ,
39
- ProgName : 'usbmux-client' ,
41
+ ClientVersionString : CLIENT_VERSION ,
42
+ ProgName : PROG_NAME ,
40
43
DeviceID : deviceId ,
41
44
PortNumber : swap16bitEndianness ( port )
42
45
} ) ;
@@ -188,8 +191,8 @@ export class UsbmuxClient {
188
191
// Start listening for connected devices:
189
192
conn . write ( plistSerialize ( {
190
193
MessageType : 'Listen' ,
191
- ClientVersionString : 'usbmux-client' ,
192
- ProgName : 'usbmux-client'
194
+ ClientVersionString : CLIENT_VERSION ,
195
+ ProgName : PROG_NAME
193
196
} ) ) ;
194
197
195
198
const response = await readPlistMessageFromStream ( conn ) ;
You can’t perform that action at this time.
0 commit comments