安卓TCP通信
2015-11-13 20:45
375 查看
tCPServer.java
服务器的两个socket都没有关闭:s,ss.两个都是一直开启,然后数据才有显示
View Code
总体而言,实现了服务器和客户端一发一收的效果,但是中文有乱码现象产生,并且不严谨,没有类封装
服务器的两个socket都没有关闭:s,ss.两个都是一直开启,然后数据才有显示
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.simpleclient" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
View Code
总体而言,实现了服务器和客户端一发一收的效果,但是中文有乱码现象产生,并且不严谨,没有类封装
相关文章推荐
- 判断网络状态
- HTTP协议基础
- HttpClient使用详解
- 给AFNetWorking添加http表头
- AFNetworking3.0网络请求方法封装(自带缓存功能)
- WMware Workstation 中几种网络连接的说明
- http://www.kwstu.com/ArticleView/kwstu_20144118313429
- VMware 虚拟机的网络连接方式详解
- OkHttp使用进阶
- python 网络编程
- Linux编程——网络编程
- PHP http://localhost:63342/untitled1/index.php/Home URL格式访问不到报404 的解决方案
- 自己关于Android 通过WebService进行网络编程的总结
- WebView 保存HttpResponse 中的Cookie
- HTTP Live Streaming直播(iOS直播)技术分析与实现
- bp神经网络算法
- 流媒体:搭建HTTP Live Streaming直播系统
- Android——使用Http的get方式获取数据
- UIImage、UIData之间转换、跨平台TCP传输
- codevs 1227 方格取数 网络流