MCPcopy Create free account
hub / github.com/apache/thrift / l_socket_send

Function l_socket_send

lib/lua/src/luasocket.c:236–244  ·  view source on GitHub ↗

send(socket, data)

Source from the content-addressed store, hash-verified

234
235// send(socket, data)
236static int l_socket_send(lua_State *L) {
237 p_tcp self = (p_tcp) checktype(L, 1, SOCKET_CONN);
238 p_tcp tcp = (p_tcp) checktype(L, 2, SOCKET_CONN);
239 size_t len;
240 const char *data = luaL_checklstring(L, 3, &len);
241 const char *err =
242 tcp_send(&tcp->sock, data, len, tcp->timeout);
243 LUA_CHECK_RETURN(L, err);
244}
245
246#define LUA_READ_STEP 8192
247static int l_socket_receive(lua_State *L) {

Callers

nothing calls this directly

Calls 2

checktypeFunction · 0.85
tcp_sendFunction · 0.85

Tested by

no test coverage detected