use sproto global slot

This commit is contained in:
Cloud Wu
2015-02-28 13:33:56 +08:00
parent 318ee300e3
commit 688cc843ce
8 changed files with 86 additions and 40 deletions

View File

@@ -1,8 +1,5 @@
package.path = "./examples/?.lua;" .. package.path
local skynet = require "skynet"
local netpack = require "netpack"
local proto = require "proto"
local CMD = {}
local SOCKET = {}
@@ -12,7 +9,7 @@ local agent = {}
function SOCKET.open(fd, addr)
skynet.error("New client from : " .. addr)
agent[fd] = skynet.newservice("agent")
skynet.call(agent[fd], "lua", "start", gate, fd, proto)
skynet.call(agent[fd], "lua", "start", gate, fd)
end
local function close_agent(fd)