项目源码在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. idea下的调试配置

    react和ts的整合 https://github.com/Microsoft/TypeScript-React-Starter vue的 https://github.com/ducksoupde ...

  2. putty删除键backspace设置

    putty连接unix登陆后,编辑命令输入错误时要修改,可是习惯性的按backspace键或者Delete键都出现一堆奇怪的字符,无法删除出错的命令语句. 修正方法如下: ************** ...

  3. Git常见使用方法

    图参考:http://www.ruanyifeng.com/blog/2014/06/git_remote.html 1.GitLab配置 git config --global user.name ...

  4. Linux Bash on Win10 (WSL)在cmder下使用vim时方向键失灵问题解决

    更改方法 由于cmder和bash.exe不兼容,如果你直接输入bash ~,那么进入子系统后将无法使用方向键和Home/PageUp/PageDown等键都无法使用,网上常见的cmder配置过程如下 ...

  5. mongodb并列查询,模糊查询

    在mongodb的查询语句中可以这么写{“a”:$gt(1),"a":$lt(5)} 但这么查询出来的值会做单个条件匹配,最终结果为a大于1的集合+a小于5的集合 如果需要实现去交 ...

  6. 使用jquery.mCustomScrollbar自定义滚动条(3)callback onCreate

    碰到了一个问题,想简洁,所以在页面上使用 <div class="div_box mCustomScrollbar" data-mcs-theme="dark-3& ...

  7. jquery下拉菜单

    下拉菜单或者导航是我们在网站开发中不可或缺的网站元素之一,使用jQuery可以制作出简洁易用.美观大方的下拉菜单或者导航效果. 下面展示的12款利用jQuery实现的下拉菜单即导航效果整理自前端大牛爱 ...

  8. Java NIO系列教程(二) Channel通道介绍及FileChannel详解

    目录: <Java NIO系列教程(二) Channel> <Java NIO系列教程(三) Channel之Socket通道> Channel是一个通道,可以通过它读取和写入 ...

  9. 关于oracle的sqlplus显示不完全的修改方法

    这样的显示看起来很痛苦 需要换行的时候没有进行换行,不需要换行的时候却进行了换行 参考的博客地址 https://blog.csdn.net/pan_tian/article/details/8059 ...

  10. HDOJ 2020 绝对值排序

    #include<iostream> #include<cmath> #include<algorithm> #include<vector> usin ...