mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
copy crypt to client.crypt, see #655
This commit is contained in:
4
Makefile
4
Makefile
@@ -46,7 +46,7 @@ update3rd :
|
|||||||
|
|
||||||
CSERVICE = snlua logger gate harbor
|
CSERVICE = snlua logger gate harbor
|
||||||
LUA_CLIB = skynet \
|
LUA_CLIB = skynet \
|
||||||
clientsocket \
|
client \
|
||||||
bson md5 sproto lpeg
|
bson md5 sproto lpeg
|
||||||
|
|
||||||
LUA_CLIB_SKYNET = \
|
LUA_CLIB_SKYNET = \
|
||||||
@@ -100,7 +100,7 @@ $(LUA_CLIB_PATH)/bson.so : lualib-src/lua-bson.c | $(LUA_CLIB_PATH)
|
|||||||
$(LUA_CLIB_PATH)/md5.so : 3rd/lua-md5/md5.c 3rd/lua-md5/md5lib.c 3rd/lua-md5/compat-5.2.c | $(LUA_CLIB_PATH)
|
$(LUA_CLIB_PATH)/md5.so : 3rd/lua-md5/md5.c 3rd/lua-md5/md5lib.c 3rd/lua-md5/compat-5.2.c | $(LUA_CLIB_PATH)
|
||||||
$(CC) $(CFLAGS) $(SHARED) -I3rd/lua-md5 $^ -o $@
|
$(CC) $(CFLAGS) $(SHARED) -I3rd/lua-md5 $^ -o $@
|
||||||
|
|
||||||
$(LUA_CLIB_PATH)/clientsocket.so : lualib-src/lua-clientsocket.c | $(LUA_CLIB_PATH)
|
$(LUA_CLIB_PATH)/client.so : lualib-src/lua-clientsocket.c lualib-src/lua-crypt.c lualib-src/lsha1.c | $(LUA_CLIB_PATH)
|
||||||
$(CC) $(CFLAGS) $(SHARED) $^ -o $@ -lpthread
|
$(CC) $(CFLAGS) $(SHARED) $^ -o $@ -lpthread
|
||||||
|
|
||||||
$(LUA_CLIB_PATH)/sproto.so : lualib-src/sproto/sproto.c lualib-src/sproto/lsproto.c | $(LUA_CLIB_PATH)
|
$(LUA_CLIB_PATH)/sproto.so : lualib-src/sproto/sproto.c lualib-src/sproto/lsproto.c | $(LUA_CLIB_PATH)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ if _VERSION ~= "Lua 5.3" then
|
|||||||
error "Use lua 5.3"
|
error "Use lua 5.3"
|
||||||
end
|
end
|
||||||
|
|
||||||
local socket = require "clientsocket"
|
local socket = require "client.socket"
|
||||||
local proto = require "proto"
|
local proto = require "proto"
|
||||||
local sproto = require "sproto"
|
local sproto = require "sproto"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package.cpath = "luaclib/?.so"
|
package.cpath = "luaclib/?.so"
|
||||||
|
|
||||||
local socket = require "clientsocket"
|
local socket = require "client.socket"
|
||||||
local crypt = require "crypt"
|
local crypt = require "client.crypt"
|
||||||
|
|
||||||
if _VERSION ~= "Lua 5.3" then
|
if _VERSION ~= "Lua 5.3" then
|
||||||
error "Use lua 5.3"
|
error "Use lua 5.3"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local msgserver = require "snax.msgserver"
|
local msgserver = require "snax.msgserver"
|
||||||
local crypt = require "crypt"
|
local crypt = require "skynet.crypt"
|
||||||
local skynet = require "skynet"
|
local skynet = require "skynet"
|
||||||
|
|
||||||
local loginservice = tonumber(...)
|
local loginservice = tonumber(...)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local login = require "snax.loginserver"
|
local login = require "snax.loginserver"
|
||||||
local crypt = require "crypt"
|
local crypt = require "skynet.crypt"
|
||||||
local skynet = require "skynet"
|
local skynet = require "skynet"
|
||||||
|
|
||||||
local server = {
|
local server = {
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ lreadstdin(lua_State *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LUAMOD_API int
|
LUAMOD_API int
|
||||||
luaopen_clientsocket(lua_State *L) {
|
luaopen_client_socket(lua_State *L) {
|
||||||
luaL_checkversion(L);
|
luaL_checkversion(L);
|
||||||
luaL_Reg l[] = {
|
luaL_Reg l[] = {
|
||||||
{ "connect", lconnect },
|
{ "connect", lconnect },
|
||||||
|
|||||||
@@ -933,3 +933,8 @@ luaopen_skynet_crypt(lua_State *L) {
|
|||||||
luaL_newlib(L,l);
|
luaL_newlib(L,l);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LUAMOD_API int
|
||||||
|
luaopen_client_crypt(lua_State *L) {
|
||||||
|
return luaopen_skynet_crypt(L);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user