svn 常用命令备忘录 svn info: 查看项目信息svn status:查看项目状态,M表示文件已经修改,A表示新添加的文件,?表示未追踪的文件。svn log:查看提交日志svn commit:提交修改到svn仓库, 加上-m参数可直接写日志,和git一样,比如svn commit -m "first commit "。svn ls:列出svn仓库中项目的文件。svn revert [PATH]:放弃文件的修改(undo local changes),比如svn revert README.md。详细说明.
git command note 删除没用的引用git remote prune origin删除没用的引用,比如git branch -a 出现远程目录已经删除的分支。放弃本地修改,强制从远程仓库更新git fetch --allgit reset --hard origin/mastergit pull删除远程仓库分支git push origin --delete [远程仓库分支名]...
skynet SERVICE_NAME定义 在看源码的时候发现这样的调用:-- loginserver.lua#L163table.insert(slave, skynet.newservice(SERVICE_NAME))可是上下文并没有找到SERVICE_NAME的定义,因为之前对Lua的全局变量理解有误,导致我没有想到调用一个没有定义的变量的原因是什么。后来经过前辈提醒,SERVICE_NAME是一个全局变量,我立马醒悟过来,最终在 loader.lua中找到了SERVICE_NAME的定义。先记录一下。以前对lua的全局变量的理
skynet demo cluster 分支(二)Gamegate 项目地址在gamagate中并没有注册消息处理函数,那么它是怎么分发消息的呢?我们可以去查看msgserver的源码:-- msgserver.lua...function server.start(conf) ... local CMD = { login = assert(conf.login_handler), logout = assert(conf.logout_handler), kick = assert(conf.kick_handler), } fu
skynet demo cluster 分支(一)main.lua Main.lua这次我们从main.lua开始讲起。main.lua 代码-- main.luaskynet.start(function() ... skynet.newservice("debug_console", skynet.getenv("debug_port")) skynet.newservice("mysqldb") skynet.newservice("redisdb") local protoloader = skynet.uniques
skynet demo plain text 分支(七)客户端代码 client.lua 代码debugtool 代码-- client.luapackage.cpath = "luaclib/?.so;/home/lks/code/skynet/luaclib/?.so"package.path = "lualib/?.lua;service/?.lua;/home/lks/code/skynet/lualib/?.lua"设置lua包和c的so库的路径,告诉lua VM应该到哪里去找包。-- client.lualocal f = io.open("p
skynet demo plain text 分支(六)agent 业务逻辑处理 agent.luadebugtool 代码消息处理-- agent.lualocal function request(name, args, response) -- debugtool.log("get request with name: %s", name) local f = assert(REQUEST[name]) local r = f(args) if response then return response(r) endendlocal function
skynet demo plain text 分支(五)看门狗 watchdog.lua 代码debugtool 代码-- watchdog.lualocal CMD = {}local SOCKET = {}...skynet.start(function() skynet.dispatch("lua", function(session, source, cmd, subcmd, ...) skynet.error(string.format("watchdog get cmd: %s", cmd)) if cmd == "socket" th
skynet demo plain text 分支(四)通讯协议的载入 -- protoloader.lualocal skynet = require "skynet"local sprotoparser = require "sprotoparser"local sprotoloader = require "sprotoloader"local data = {}local CMD = {}local function load(name) local filename = string.format("proto/%s", name) local f
skynet demo plain text 分支(三)redis业务处理 -- redis.lualocal skynet = require "skynet"local redis = require "skynet.db.redis"local debugtool = require "debugtool"require "skynet.manager"local dblocal CMD = {}function CMD.sigin(username, client_fd) debugtool.log("sigin with (%s, %d)", u
skynet demo plain text 分支(二)Mysql业务处理 -- mysqldb.lualocal skynet = require "skynet"local mysql = require "skynet.db.mysql"require "skynet.manager"local debugtool = require "debugtool"local dblocal CMD = {}-- 注册 function CMD.sinup(username, password, nickname) local stmt = db:pre
skynet demo plain text 分支(一)通讯协议 skynet demo 项目地址(plain text分支 )客户端到服务端c2s.sproto:.package { type 0 : integer session 1 : integer ud 2 : string}.User { username 0 : string password 1 : string nickname 2 : string}ping 1 {}sigup 2 { request User response { ok 0 : boole
skynet 基础部分(二) sproto 通讯协议 介绍在和客户端通讯时,需要制订一套通讯协议。 skynet 并没有规定任何通讯协议,所以你可以自由选择。sproto 是一套由 skynet 自身提供的协议,并没有特别推荐使用,只是一个选项。sproto 有一个独立项目存在 。同时也复制了一份在 skynet 的源码库中。它类似 google protobuffers ,但设计的更简单,也更利于 lua 使用。同时还提供了一套简单的 rpc 方案。以上内容来自 sproto简单来说,sproto是云风为skynet定制的通讯协议,它只支持四种
skynet 基础部分(一)启动及消息处理流程 介绍skynet 项目地址skydet demo 即本项目地址skynet 是一个轻量级的为在线游戏服务器打造的框架。在使用skynet之前,非常有必要把作者写的skyent说明看一遍。homeGettingStartedFAQAPIListLuaAPIsprotoGateServerConfigCoroutine以上是必看的内容。agentagent 用于处理来自客户端的请求。watchdog看门狗,主要负责启动agent来执行业务逻辑、处理来自客户端的请求,agen
kubernetes 安装 环境ubuntu-19.10-live-server-amd64关闭防火墙sudo ufw disable关闭系统swapsudo swapoff -a或者去修改/etc/fstab文件UUID=ae07b0eb-6d6b-4edd-8989-d07ef0226e0f / ext4 defaults 0 0#/swap.img none swap sw 0 0即注释掉 sw...
Gradle设置全局阿里云maven镜像 Gradle设置全局阿里云镜像去到 $USER_HOME/.gradle目录下,也就是C盘的C:\Users\{你的用户名}\.gradle下,创建init.d目录。在init.d目录下创建.init.gradle.kts脚本,写入apply<AliyunMavenRepositoryPlugin>()class AliyunMavenRepositoryPlugin: Pl...
lua 5.3 C函数库 我们从头开始讲起怎么为lua写一个C语言函数库。首先去下载源代码,我这里选择的是5.3.5版本的源代码。然后去安装好mingw64编译工具。我们将lua源代码解压,进入源代码目录,打开命令行,输入 make mingw。在命令make mingw运行完毕后,我们会得到一系列的.o、.a等文件,还有luac、lua,lua53.dll或者lua53.so(取决于你的系统,我这里用的windo...