Giter Site home page Giter Site logo

tcp_android's Introduction

经过一段时间的Android开发学习,本着学习的心态,再网上找了一个资源,做了一个TCP/IP 的调试助手,主要涉及socket通信。最后, 由于感觉一个手机界面太过难看,用了现在网上用的普遍的方法,导入SlidingMenu-master包,做了个手机侧滑界面。总之,类似一些电脑上的串口调试助手, 有数据发送区和数据接收区,主要有TCP客户端和TCP服务端两种模式。

 程序大体流程:     1.在侧滑界面,由用户选择把手机作为连接模式,有“TCP客户端模式”和“TCP服务器模式”两种模式选择;     2.对应不同的模式,分配不同的功能       a.服务器模式:界面信息显示本地IP,可自行设置端口号,点击开启服务器按钮,开启TCP_service连接线程,启动serversocket,进行监听,当有客户端socket连接时,开启连接线程,进行数据的交互。       b.客户端模式:用户设置所要连接的服务器的IP地址和端口号,点击连接,开启连接线程,连接成功后,进行与木目标服务器的数据交互。 3.本demo还对交互数据进行了处理,可分为十六进制显示和ascll显示。加了一些自动自动发送,自动换行等的功能。

详情说明请前往 我的博客:https://blog.csdn.net/sinat_27064327/article/details/69950287

欢迎大家留言,以后我会把博客用起来,多开源项目出来一起学习

tcp_android's People

Contributors

loumeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.