From a6f2d5fff89b7322009c46a9272668ca4c32ce64 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Nov 2018 08:32:38 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/net/je_lua_net.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lua/modules/net/je_lua_net.cpp') 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, JIN_NETWORK_SOCKET)); + Proxy* proxy = luax_newinstance(L, Jin_Lua_Socket); + proxy->bind(new Shared(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, JIN_NETWORK_BUFFER)); + proxy->bind(new Shared(buffer, Jin_Lua_Buffer)); return 1; } -- cgit v1.1-26-g67d0