Socket循环发送图片,每隔20ms发送一张,该代码运行的线程中:
@Override
public void run() {
// TODO Auto-generated method stub
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();;
while (flag) {
if(client.isClosed()) break;
screenBitmap = TransferDataManager.cutBitmapListener.getBitmap();
if(screenBitmap != null && !screenBitmap.isRecycled()) {
try {
screenBitmap.compress(Bitmap.CompressFormat.PNG, 100<