| 167 | } |
| 168 | |
| 169 | static 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 | |
| 180 | static int restrecv (lua_State *L, StandaloneSocket& ss) { |
| 181 | if (!ss.recvd.empty()) { |
nothing calls this directly
no test coverage detected