资 源 简 介
package com.zhoudd.socket;
import java.util.Vector;
import android.util.Log;
/**
* @ClassName: SocketConnect
* @Description: Socket TCP连接、发送、接收(回调)、断开连接
* @author zhoudd
* @date 2016年1月4日 下午1:16:20
*
**/
public class SocketConnect implements Runnable{
private static final String TAG = "SocketConnect";
/**
* 连接服务器失败 默认等待时间
*/
private static final int DISCONNECT_WAIT_TIME = 6*1000;
private boolean isConnect = false;//是否连接了服务器
private boolean isWrite = false;//是否发送数据
private static final Vector datas = new Vector();//待发送数据队列
private SocketBase socketBase;//socket连接
private WriteRunnable writeRunnable;//发送数据线程
private String ip = null;
private int port = -1;
/**