MCPcopy Create free account
hub / github.com/Tencent/UnLua / buffer_init

Function buffer_init

Plugins/UnLuaExtensions/LuaSocket/Source/src/buffer.cpp:40–46  ·  view source on GitHub ↗

-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

38* Initializes C structure
39\*-------------------------------------------------------------------------*/
40void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
41 buf->first = buf->last = 0;
42 buf->io = io;
43 buf->tm = tm;
44 buf->received = buf->sent = 0;
45 buf->birthday = timeout_gettime();
46}
47
48/*-------------------------------------------------------------------------*\
49* object:getstats() interface

Callers 7

global_createFunction · 0.85
meth_acceptFunction · 0.85
tcp_createFunction · 0.85
global_connectFunction · 0.85
global_createFunction · 0.85
meth_acceptFunction · 0.85
global_createFunction · 0.85

Calls 1

timeout_gettimeFunction · 0.85

Tested by

no test coverage detected