MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / tcpConnect

Function tcpConnect

emmy_debugger/src/debugger/emmy_debugger_lib.cpp:37–49  ·  view source on GitHub ↗

emmy.tcpConnect(host: string, port: int): bool

Source from the content-addressed store, hash-verified

35
36// emmy.tcpConnect(host: string, port: int): bool
37int tcpConnect(lua_State* L)
38{
39 luaL_checkstring(L, 1);
40 std::string err;
41 const auto host = lua_tostring(L, 1);
42 luaL_checknumber(L, 2);
43 const auto port = lua_tointeger(L, 2);
44 const auto suc = EmmyFacade::Get().TcpConnect(L, host, static_cast<int>(port), err);
45 lua_pushboolean(L, suc);
46 if (suc) return 1;
47 lua_pushstring(L, err.c_str());
48 return 2;
49}
50
51// emmy.pipeListen(pipeName: string): bool
52int pipeListen(lua_State* L)

Callers

nothing calls this directly

Calls 5

TcpConnectMethod · 0.80
luaL_checknumberFunction · 0.50
lua_tointegerFunction · 0.50
lua_pushbooleanFunction · 0.50
lua_pushstringFunction · 0.50

Tested by

no test coverage detected