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

Method TcpConnect

emmy_debugger/src/emmy_facade.cpp:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124bool EmmyFacade::TcpConnect(lua_State *L, const std::string &host, int port, std::string &err) {
125 Destroy();
126
127 _emmyDebuggerManager.AddDebugger(L);
128
129 SetReadyHook(L);
130
131 const auto c = std::make_shared<SocketClientTransporter>();
132 transporter = c;
133 // c->SetHandler(shared_from_this());
134 const auto suc = c->Connect(host, port, err);
135 if (suc) {
136 WaitIDE(true);
137 } else {
138 lua_pushcfunction(L, LuaError);
139 lua_pushstring(L, err.c_str());
140 lua_call(L, 1, 0);
141 }
142 return suc;
143}
144
145bool EmmyFacade::PipeListen(lua_State *L, const std::string &name, std::string &err) {
146 Destroy();

Callers 1

tcpConnectFunction · 0.80

Calls 4

AddDebuggerMethod · 0.80
lua_pushstringFunction · 0.50
lua_callFunction · 0.50
ConnectMethod · 0.45

Tested by

no test coverage detected