项目源码在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. 分页sql写法【只用最新的】

      offset m rows   FETCH NEXT n ROWS ONLY m=(pageindex-1)*pagesize n=pagesize sql server 2012以上适用.

  2. locaton.href传参数

    location.href = location.href.substring(0,location.href.lastIndexOf('?'))+'?typeId=' + fid + '&p ...

  3. WhereHows前后端配置文件

    前端: # This is the main configuration file for the application. # ~~~~~ # Secret key # ~~~~~ # The se ...

  4. asp.net利用HttpModule实现防sql注入和加载样式和JS文件

    1.新建一个类,实现IHttpModule接口 代码如下: public class SqlHttpModule : IHttpModule { public void Dispose() { } p ...

  5. SEO之HTML代码优化

    原文地址:http://www.admin5.com/article/20081128/117821.shtml   一.文档类型(DOCTYPE) XHTML1.0有三种DOCTYPE: 1.过渡型 ...

  6. mysql查询中取差集的问题

    有个场景 现在有个打卡的记录表(daka),记录了用户每天的打卡信息,同时还有个运动打卡表(sport_daka),如果用户有运动打卡则在运动打卡表里面记录. 现在要统计用户的每天的打开信息,包括运动 ...

  7. [UE4]蓝图:重写父类时调用父类方法

    右键重写的方法选择“Add call to parent function” 一定要善用这个功能,实现原有父类功能的同时实现子类特别的功能.

  8. phpmyadmin在nginx环境下配置错误

    location ~ \.css {           add_header  Content-Type    text/css;        } location ~ \.js {        ...

  9. c#类 对象 构造函数 析构函数——面向对象

    类: 也是复杂数据类型 也是需要我们先定义出类型,才能使用它的数据 对象: 是通过模板类实例化出来的个体,具有具体的属性和行为(方法),对象是不能索引到静态方法. 对象的生命周期 构造—— 使用—— ...

  10. restful 涵义

    REST,即Representational State Transfer的缩写: "表现层状态转化" REST的名称"表现层状态转化"中,省略了主语.&quo ...