datas=newVector();//待发送数据队列privateSocketBasesocketBase;//socket连接privateWriteRunnablewriteRunnable;//发送数据线程privateStringip=null;privateintport=-1;/**-IMDN开发者社群-imdn.cn"> datas=newVector();//待发送数据队列privateSocketBasesocketBase;//socket连接privateWriteRunnablewriteRunnable;//发送数据线程privateStringip=null;privateintport=-1;/** - IMDN开发者社群-imdn.cn">
登录
首页 » java » tcp客户端

tcp客户端

于 2022-03-29 发布 文件大小:1.61 kB
0 118
下载积分: 2 下载次数: 1

代码说明:

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; /**

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • java书(俄罗斯)
    java book (in russian)
    2023-04-17 00:20:03下载
    积分:1
  • J2EETutorial
    This is J2EE Tutorial
    2010-03-17 03:45:47下载
    积分:1
  • 3D立体卡通文字特效
    一款效果使用纯js和CSS3制作的炫酷3D立体卡通文字特效(A cool 3D cartoon text special effect using pure JS and CSS3)
    2019-01-08 10:47:05下载
    积分:1
  • skqxg
    说明:  射孔取芯工专业技能培训系统,用于射孔取芯工的考试,日常测试学习等,学校与石油公司签订的项目.(Professional skill training system for perforating coring workers,It is used for the examination, daily test and study of perforator and corer)
    2020-07-31 09:35:57下载
    积分:1
  • ParsingXML
    android解析从服务器获得的XML文件(parsing xml file for android)
    2012-04-17 19:50:39下载
    积分:1
  • cryptochat
    Its about cryptography example. useful for chatting with some sort of security
    2009-04-01 15:13:33下载
    积分:1
  • matlab-picture
    MATLAB图形技术——绘图及图形用户接口(MATLAB graphics- graphics and graphical user interfaces)
    2013-10-19 21:02:51下载
    积分:1
  • android 3D相册 示例源码下载(有图有源码)
    android 3D相册 示例源码下载(有图有源码)
    2013-10-23下载
    积分:1
  • jspPdb
    jsp网页连接数据库(access),并进行读写操作。这是一个典型实例,针对的是学生基本信息内容读写。(jsp page connect to the database (access), and read and write operations. This is a typical example, is for students to read and write basic information content)
    2013-11-15 21:57:21下载
    积分:1
  • 02
    说明:  图书馆管理系统主要的目的是实现图书馆的信息化管理。图书馆的主要业务就是新书的借阅和归还,因此系统最核心的功能便是实现图书的借阅和归还。此外,还需要提供图书的信息查询、读者图书借阅情况的查询等功能。项目实施后,能够提高图书馆的图书借阅、归还流程,提高工作效率。整个项目需要在两个月的时间内交付用户使用。(The library management system of the main purpose is to realize the library information management. The main business is a new book borrowing and returned, so the core function of the system is the realization of the books borrowing and returned. In addition, also need to provide books information query, readers books borrowing in query etc. Function. After the implementation of the project, to improve the library s books lending, return the process, improve the work efficiency. The whole project needs to be in the two months of delivery time users. )
    2012-04-23 14:38:35下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载