上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 使用node.js + redis + mysql实现的短连接多进程游戏服务器先上流程图,求大神指点 阅读全文
posted @ 2014-12-12 23:50 ajunfly 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 开启redis端口,修改防火墙配置文件 vi /etc/sysconfig/iptables加入端口配置 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT -A RH-Firewall-... 阅读全文
posted @ 2014-12-10 22:25 ajunfly 阅读(50164) 评论(0) 推荐(1) 编辑
摘要: 1,准备mySql源码安装 # wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.19.tar.gz2:对于centos 7 安装mySql依赖项 # yum install gcc-c++ make cmake bison bison... 阅读全文
posted @ 2014-12-10 22:22 ajunfly 阅读(29211) 评论(1) 推荐(0) 编辑
摘要: redis对事务的支持还是比较差的,就是把所有的执行命令方到队列中一个一个执行multi开启一个事务,exec执行事务集合中的命令代码:var redisClient;redisClient.multi([ ["set", "ttt_1", "1111111"], ["incr", "ttt_2"]... 阅读全文
posted @ 2014-10-17 18:14 ajunfly 阅读(2258) 评论(0) 推荐(0) 编辑
摘要: //判断value是小于等于max的数字function isNumberMax(value, max){ if(!isNumber(value) || !isNumber(max)){ return false; } if(parseInt(value) = min){ return true; ... 阅读全文
posted @ 2014-04-30 16:21 ajunfly 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 首先安装async包用到的有http、cluster包http和cluster都会node自带的包,无需安装1:创建cluster.js,代码如下,更具cpu创建多个进程var cluster = require("cluster");var http = require("http");var n... 阅读全文
posted @ 2014-03-27 16:55 ajunfly 阅读(3772) 评论(0) 推荐(1) 编辑
摘要: 下载nginx-1.0.11.zip,解压到到nginx目录下 D:\nginx\conf修改conf下的nginx.conf文件,默认是80端口,若该端口被占则可以修改listen 8073;运行nginx下的nginx.exe,此时运行进程中会多两个nginx服务nginx安装完成NginxTray 1.0是管理nginx服务的,可以停止、重启、启动下载NginxTray 1.0,解压后,执行NginxTray.exe即可nginx的反向代理负载均衡配置打开nginx.conf添加如下配置upstream Server_Cluster{ server 127.0.0.1:30001; se 阅读全文
posted @ 2014-03-22 16:51 ajunfly 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 用到两个模块,http和fsvar http = require("http");var fs = require("fs");var server = http.createServer(function(req, res){}).listen(50082);console.log("http start");var url = "http://s0.hao123img.com/res/img/logo/logonew.png";http.get(url, function(res){ var imgData = 阅读全文
posted @ 2014-03-04 17:47 ajunfly 阅读(22560) 评论(0) 推荐(6) 编辑
摘要: //时间戳转换成指定格式的日期DateTool.IntDatetimeTo = function(time, format){ var testDate = new Date(time); var o = { "M+" : testDate.getMonth()+1, "d+" : testDate.getDate(), "h+" : testDate.getHours(), "m+" : testDate.getMinutes(), "s+" : testDate.getSeconds(), 阅读全文
posted @ 2014-03-03 11:36 ajunfly 阅读(2086) 评论(0) 推荐(0) 编辑
摘要: 就是把现有文件转移到隔离空间即可代码如下private async void CopyDB() { StorageFile fage = await ApplicationData.Current.LocalFolder.GetFileAsync("Logos.png"); if (!File.Exists(fage.Path)) { StorageFile storageFile = await Package.Current.InstalledLocation.GetFileAsync(@"Assets\Logos.png"); var path = 阅读全文
posted @ 2014-02-28 17:08 ajunfly 阅读(564) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页