项目源码在github上,请看这里-->Android Netty Server

Android netty server

Start a netty server on android

Download netty

Download url :https://netty.io/downloads.html

Download netty-all.jar and put it into libs. Then add as library.

Project structure

netty

AppServer

AppServerHandler

AppServerInitializer

IServer

MessageProtocol

TcpProtoCodec

MainActivity

MessageEvent

AppServerHandler: handle channel add, remove and activity. in this class, channelRead0 will handle the message which send by client.

AppServerInitializer: initialize AppServer. Then add Tcp Protocol Codec and AppServerHandler.

AppServer: start netty server.

MessageProtocol: netty send and receive message format.

MessageEvent: use for eventbus.

MainActivity: show receive message content.

Communication protocol

'R' + data.length + data

Android Netty Server的更多相关文章

  1. Android Netty Client

    Android netty client Start a netty client on android Download netty Download url :https://netty.io/d ...

  2. Android Http Server

    Android Http Server 1 引言          Android如何构建Http服务器呢?本文的小例子,约莫着,还是能做个参考的^^.恩,例子实现的是PC浏览手机文件,支持了下载和删 ...

  3. 【转】Android Web Server

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://vaero.blog.51cto.com/4350852/1188602 Andr ...

  4. 【转】Android Http Server

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://vaero.blog.51cto.com/4350852/939413 Andro ...

  5. How can I get a Netty server to reload a TLS certificate when it is renewed?

    java - How can I get a Netty server to reload a TLS certificate when it is renewed? - Stack Overflow ...

  6. 使用Netty进行Android与Server端通信实现文字发送接收与图片上传

    ANOTHER TITLE: Let’s use netty to achieve text send and receive and  image transfer to server based ...

  7. [Android]ADB Server didn't ACK错误的解决方法

    Eclipse中调试的时候报错 [2014-06-18 13:07:49 - DinnerBooker] The connection to adb is down, and a severe err ...

  8. Android ADB server didn't ACK * failed to start daemon * 简单有效的解决方案

    转载请注明出处:http://blog.csdn.net/xiaanming/article/details/9401981 ADB server didn't ACK 这个问题会困恼很多的新手朋友, ...

  9. android 向serverGet和Post请求的两种方式,android向server发送文件,自己组装协议和借助第三方开源

    一个适用于Android平台的第三方和apache的非常多东西类似,仅仅是用于Android上 我在项目里用的是这个 https://github.com/loopj/android-async-ht ...

随机推荐

  1. WCF类型共享技巧【转载】

    调用过WCF服务的同学可能都会遇到这样的问题,同一个实体类型,不同的服务Visual Studio生成了不同的版本,例如Service1.User和Service2.User,对于C#来说,这是两个不 ...

  2. win7环境下安装composer

    以前python有pip,但是PHP一直没有好的包管理工具,不过现在php也有比较好的包管理工具了,那就是composer 1:下载地址:https://getcomposer.org/downloa ...

  3. 关于JAVA文件的字节转字符练习

    PrintWriter向文件写入字符,接收Writer对象.BufferedWriter是Writer对象还具有缓冲作用让写入更加高效,同时最重要的是BufferedWriter接 收转换流对象Fil ...

  4. 测试教程网.unittest教程.2. 基本用法

    From: http://www.testclass.net/pyunit/basic_example/ 我们通过最简单的例子来看一下unittest的基本用法,下面的代码测试了3个python字符串 ...

  5. 【ApplicationListener】Springboot各类事件监听器

    Springboot中SpringApplicationEvent的种类 如下图: 主要包括6种: ApplicationEnvironmentPreparedListener Application ...

  6. 修改String中的内容

    例子:有一个字符串"abcdef",现在想让字符串中的字符各自加1,求修改后的字符 String 在Java中是不可修改的. 方法1:将String 变为字符数组,通过修改字符数组 ...

  7. Dubbo(3)Dubbo admin管理控制台

    dubbo-admin管理控制台: 可以管理服务,消费,以及其他配置: 在dubbo项目的zip包中有个demo-admin项目,可以打成war包,发布到tomcat运行里面: 我这里将dubbo-a ...

  8. 补充appium -api

    //锁屏 driver.lockScreen(2); //判断是否锁屏 driver.isLocked(); //截屏并保存至本地 File screen = driver.getScreenshot ...

  9. [Chrome]点击页面元素后全屏

    function isFullScreen() { return (document.fullScreenElement && document.fullScreenElement ! ...

  10. WordPress更换主题空白问题

    刚才尝试着更换了一个主题,后来发现预览主页的时候是一片空白.查了很多资料,有说是index.php的权限问题,有说是插件问题,有说是UTL-8编码的问题,我都试过了,发现都不行,后来仔细研究了一下,发 ...