MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_server_close

Function lua_server_close

plugins/luasocket.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132}
133static void lua_server_close(int server_id)
134{
135 if(servers.count(server_id)==0)
136 {
137 throw std::runtime_error("Server with this id does not exist");
138 }
139 server &cur_server=servers[server_id];
140 try{
141 cur_server.close();
142 }
143 catch(...)
144 {
145 servers.erase(server_id);
146 throw;
147 }
148}
149static std::string lua_client_receive(int server_id,int client_id,int bytes,std::string pattern,bool fail_on_timeout)
150{
151 auto info=get_client(server_id,client_id);

Callers

nothing calls this directly

Calls 3

countMethod · 0.45
closeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected