项目源码在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. php 安装mongo扩展(其他扩展同理)

    很多次安装mogo扩展不成功,总结出来,无非就是一个原因.对应的版本选择不正确 简单来说这篇文章就是来教你如何选择php对应的mongo.ll版本 查看phpinfo https://pecl.php ...

  2. STL进阶--vector vs deque

    vector class Dog; // 例 1: vector<Dog> vec(6); // vec.capacity() == 6, vec.size() == 6, // 默认构造 ...

  3. [Easyui - Grid]为easyui的datagrid、treegrid增加表头菜单,用于显示或隐藏列

    为easyui的datagrid.treegrid增加表头菜单,用于显示或隐藏列 /** * @author 孙宇 * * @requires jQuery,EasyUI * * 为datagrid. ...

  4. 若是汉字的一半,就舍弃这个汉字输出,例如:“js3范ad啊asd”,截取4,则输出:“js3”

    package com.jt.test.redis; import org.junit.Test; /* 题目要求 * 编码:GBK,一个英文字符占一个字节,一个汉字占2个字节 * 随机给定一个字符串 ...

  5. opengl 入门浅学(一)

    因为要做图形学的实验,又是要以OPENGL为基础,所以就稍微在网上查了一些资料. 我是带着目的去学习的,所以就没有打基础之类的学很深,浅尝. 今天试着搭简单框架,画出一个图形.大神请出门左转. #in ...

  6. 廖雪峰Java6 IO编程-2input和output-4Filter模式

    1.JDK提供的InputStream分为两类: 直接提供数据的InputStream * FileInputStream:从文件读取 * ServletInputStream:从HTTP请求读取数据 ...

  7. Python:员工信息增删改查

    一:需求 homework.txt文件中有如下格式的人员信息: 1,Jack Wang,28,13451024608,HR,2015‐01‐072,Rain Wang,21,13451054608,I ...

  8. [UE4]使用Is Locally Controlled解决第一人称和第三人称武器位置问题

    一.在第一人称网络游戏中,自己看到的是第一人称,其他玩家看到的自己是第三人称. 二.由于第一人称和第三人称是不同的模型,所以枪在模型上面的插槽位置也会不一样. 三.在武器挂载在人物模型的使用,使用“I ...

  9. linux环境下运行程序格式错误的问题,bash: ./helloworld: cannot execute binary file: Exec format error

    在编译完quecOpen的example helloworld之后,我运行此程序,结果报错,详情如下: ricks@ubuntu:~/share/project/ql-ol-sdk/ql-ol-ext ...

  10. 【原创】重装Windows系统后Android studio无需重装,直接迁移

    每次重装Windows系统后重装各种开发环境让人苦不堪言,比如VS2013 +补丁,没有个小半天根本搞不定! 对与Android的开发者,同样安装JDK+Android Studio + Adnroi ...