package com.saki.service;

import com.saki.client.IClient;
import com.saki.encode.Canvart;
import com.saki.log.Log;
import com.saki.qq.global.Key;
import com.saki.qq.wtlogin.pack.send.StatSvc;

public class SimpleGetThread implements Runnable {

    private IClient send;
    private boolean stop = false;
    private long sleepTime = 270000;

    public SimpleGetThread(IClient send) {
        this.send = send;
    }
    public void destroy(){
        stop = true;
    }
    @Override
    public void run() {
        while (!Thread.interrupted()&&!stop) {
            try {
                Thread.sleep(sleepTime);
                int id = send.getRequstionID();
                byte[] bin =new StatSvc.SimpleGet(id) .toByteArray();
                send.send(bin);
            } catch (InterruptedException e) {
                break;
            }
        }
    }

}
