protoloader.lua 353 B

1234567891011
  1. local skynet = require "skynet"
  2. local sprotoparser = require "sprotoparser"
  3. local sprotoloader = require "sprotoloader"
  4. local proto = require "proto"
  5. skynet.start(function()
  6. sprotoloader.save(proto.c2s, 1)
  7. sprotoloader.save(proto.s2c, 2)
  8. -- don't call skynet.exit() , because sproto.core may unload and the global slot become invalid
  9. end)