datas=newVector();//待发送数据队列privateSocketBasesocketBase;//socket连接privateWriteRunnablewriteRunnable;//发送数据线程privateStringip=null;privateintport=-1;/**-IMDN开发者社群-imdn.cn">
datas=newVector();//待发送数据队列privateSocketBasesocketBase;//socket连接privateWriteRunnablewriteRunnable;//发送数据线程privateStringip=null;privateintport=-1;/** - IMDN开发者社群-imdn.cn">
于 2022-03-29 发布
文件大小:1.61 kB
0 76
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;
/**
下载说明:请别用迅雷下载,失败请重下,重下不扣分!
一个简单的java 图像浏览器,可以作为GUI图像处理和文档…
一个简单的java图像浏览器,可以作为GUI和处理图像文件的学习例子。-a simple java image browser, the GUI can be used as image processing and document the learning examples.
2022-09-21 02:40:03下载
积分:1
JDBC
网上购物系统基本功能实现(首页、商品分类、后台数据库连接)(online shopping system;)
2018-01-12 10:27:14下载
积分:1
最新权限管理系统框架(RuoYi源码)
【实例简介】
2021-06-09 00:31:21下载
积分:1
Java日期工具类DateUtils
整理出的Java日期工具类DateUtils
2022-09-01 12:20:03下载
积分:1
jquery支持图片点击放大缩小效果
适合做图文并茂效果,图片点击放大缩小,并可左右切换(Suitable for graphic and image effects, pictures click enlarge and reduce, and can switch around.)
2018-11-11 15:03:33下载
积分:1
超市进销存系统 car-type-spider-master
我这我自己开发的超市进销存系统,包含销售员的管理,商品的管理(I developed my own supermarket purchase, sale and storage system)
2020-06-19 00:20:02下载
积分:1
java written in the html parser parser, can learn under the
java写的html的解析器parser,可以学习下-java written in the html parser parser, can learn under the
2022-07-09 06:05:00下载
积分:1
343312
实现简单图书入库和流通管理,图书证管理和查询统计的功能,(Implement a simple book storage and circulation management and the function of the library card management and query statistics,)
2017-05-29 18:07:09下载
积分:1
复数计算.实现复数的加,减,乘,除运算
复数计算.实现复数的加,减,乘,除运算-complex calculation. Plural achieving the addition, subtraction, multiplication and Operational
2022-12-21 07:45:03下载
积分:1
The message of the use of JSP+ JavaBean+ Access development, directly into the T...
该留言本采用JSP+JavaBean+Access开发,直接放到Tomcat下就能运行,不用配置数据源。
含有UBB代码和UBB头像,采用正则表达式制作。
管理登陆加入验证码,数据库管理密码采用MD5加密。-The message of the use of JSP+ JavaBean+ Access development, directly into the Tomcat will be able to run under, do not configure the data source. Contain UBB code and UBB portrait, using regular expression production. Verification Code landing to join the management, database administration password using MD5 encryption.
2022-05-27 02:00:06下载
积分:1