aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/net/je_lua_net.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-15 08:32:38 +0800
committerchai <chaifix@163.com>2018-11-15 08:32:38 +0800
commita6f2d5fff89b7322009c46a9272668ca4c32ce64 (patch)
treeff81127c3be8bde426e57db544d69b9616ddc25b /src/lua/modules/net/je_lua_net.cpp
parent611d12bdd245dd43b7434661d3e24f2b435378cb (diff)
*修改代码结构
Diffstat (limited to 'src/lua/modules/net/je_lua_net.cpp')
-rw-r--r--src/lua/modules/net/je_lua_net.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lua/modules/net/je_lua_net.cpp b/src/lua/modules/net/je_lua_net.cpp
index 1d0204a..795eb18 100644
--- a/src/lua/modules/net/je_lua_net.cpp
+++ b/src/lua/modules/net/je_lua_net.cpp
@@ -1,8 +1,10 @@
#include "lua/modules/luax.h"
-#include "lua/modules/types.h"
+
#include "libjin/jin.h"
#include "lua/common/je_lua_common.h"
+
#include "je_lua_buffer.h"
+#include "je_lua_socket.h"
namespace JinEngine
{
@@ -48,17 +50,17 @@ namespace Lua
}
}
Socket* socket = new Socket(info);
- Proxy* proxy = luax_newinstance(L, JIN_NETWORK_SOCKET);
- proxy->bind(new Shared<Socket>(socket, JIN_NETWORK_SOCKET));
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Socket);
+ proxy->bind(new Shared<Socket>(socket, Jin_Lua_Socket));
return 1;
}
LUA_IMPLEMENT int l_Buffer(lua_State* L)
{
int size = luax_checkinteger(L, 1);
- Proxy* proxy = luax_newinstance(L, JIN_NETWORK_BUFFER);
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Buffer);
Net::Buffer* buffer = new Net::Buffer(size);
- proxy->bind(new Shared<Buffer>(buffer, JIN_NETWORK_BUFFER));
+ proxy->bind(new Shared<Buffer>(buffer, Jin_Lua_Buffer));
return 1;
}