MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / l_send

Function l_send

src/lsocketlib.cpp:169–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static int l_send (lua_State *L) {
170 size_t len;
171 const char *str = luaL_checklstring(L, 2, &len);
172 StandaloneSocket& ss = *checksocket(L, 1);
173 if (ss.udp)
174 ss.sock->udpServerSend(ss.sock->peer, str, len);
175 else
176 ss.sock->send(str, len);
177 return 0;
178}
179
180static int restrecv (lua_State *L, StandaloneSocket& ss) {
181 if (!ss.recvd.empty()) {

Callers

nothing calls this directly

Calls 2

luaL_checklstringFunction · 0.85
checksocketFunction · 0.85

Tested by

no test coverage detected