AndroidSocket
AndroidSocket is a way to communicate with a process launched on the AndroidDevice. Use androidDevice.open() to open a socket.
方法 (Methods)
close
Added in: v1.9Closes the socket.
使用方式
await androidSocket.close();
傳回值
write
Added in: v1.9Writes some data to the socket.
使用方式
await androidSocket.write(data);
參數
傳回值
事件 (Events)
on('close')
Added in: v1.9Emitted when the socket is closed.
使用方式
androidSocket.on('close', data => {});
on('data')
Added in: v1.9Emitted when data is available to read from the socket.
使用方式
androidSocket.on('data', data => {});
事件資料