xyfcode / zspeed Goto Github PK
View Code? Open in Web Editor NEW该项目是手机游戏《开心连三国》服务器源代码,使用nodejs编写。适用于中小型项目。
该项目是手机游戏《开心连三国》服务器源代码,使用nodejs编写。适用于中小型项目。
我想问下 有没客户端可以运行起来测试的
"___connect___" : new on_user_socket_connect(),// 这里调用的时候并没有传任何参数
function on_user_socket_connect()
{
this.handle = function(s) // 但这里却有参数
{
login_logic.on_user_socket_connect(s); // 而且还把这个参数传到了后面使用,这里的 s 里的值是从哪传过来的呢?
}
}
这个项目是只能在Linux上运行的嘛?
//定义发送消息方法,接收json数据对象,方法中会完成编码
//在这里会为每个sock创建一个send方法,为什么不写到原型里面
sock.send=function(msg){
msg = JSON.stringify(msg);
var len = Buffer.byteLength(msg);//buffer是全局的不需要导入,process也是全局的
//写入4个字节表示本次包长
var headBuf = new Buffer(4);
headBuf.writeUInt32LE(len, 0);
var bodyBuf = new Buffer(len+headBuf.length);
headBuf.copy(bodyBuf,0,0,headBuf.length);
bodyBuf.write(msg,headBuf.length);
if(sock.writable)
{
sock.write(bodyBuf);
}
else
{
global.err("socket write err,writable :" + sock.writable);
sock.emit("c_close");
}
}
在game>data里面有个key_words.txt????这是啥..... --!
没看到package.json 直接sh ./start_server.sh
也没反应。
望各位大大给点提示,非常感谢,学习学习。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.