netty server client 自定义消息协议通讯 ,及心跳检测例子
serverclient's Introduction
serverclient's People
Forkers
hanjk1234 bruce-yang chenld jnan77 cattles yame2009 nightdomain fysoft2006 turionboy davidyuan wxmarr xianrendzw gitenius weiersmile love61v hzwjava l86110 next0011 mrzhengliang edenlu19841223 laienliang toinfinity garnet-crow jasonlee1990 330314690 monkeymrge zeq9069 scut-fy airbrid chenjzcj marswon baneyue pangff mingj frandavid cxcco w693145258 youjava abc6527 yimengtianya yongshun netli mangolms zhuyihao linving cloudxtreme wannasmile brucelee0304 dave-zhou phantomes steelmask whitedevilban ismart-yuxi jmycheng lstoars immime hcjhope msdgwzhy6 chokees caojiandavid alpz5566 coolearn payorg gbtyy yuxd zuchuanzhang xwqiang fuhp zhousujian michaelshih santiagozhao zsg111 greenfruit mengqingbao acckcc lucasyue zhuangxiaoyun ewsq hulk904 nprhust leeonvector android-development-group numsea coveragewei codelyl wogyin crossoverjie trustnature huyang19881115 aeternu hehuilei baowei6698 cloudlyfree kenkao tangqiwen zhbzhb1126 bobbievan odora kings186 294033186serverclient's Issues
关于message的建议
Hi 楼主,很高兴能在网上看到你的项目,让我能够自学的时候练习一把
现在刚刚把server部分实现完,client还没到
我在实现的时候发现BaseMsg这个类可以改进一下,我增加了一个方法
public abstract void dealWithServerMsg(ChannelHandlerContext ctx);
这样在ServerHandler端就可以用回调的方法来handle不同type的message,而且如果后期加入别的message,只用实现接口,而不用更改server的设置
if(msg.getClientId() == null) {
AbstractMsg loginMsg = new LoginMsg();
ctx.channel().writeAndFlush(loginMsg);
} else {
// 回调机制,由message本身来完成操作
msg.dealWithMessage(ctx);
}
可以互相交流一下哈
请问服务端如何启动呢?
在代码 当中就是个main调用,打成包丢在Tomcat 里面就可以吗?求大佬指教,小白还请多包涵
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.