MCPcopy Create free account
hub / github.com/defold/defold / buffer_init

Function buffer_init

engine/script/src/luasocket/buffer.c:42–48  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 6

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

Calls 1

timeout_gettimeFunction · 0.85

Tested by

no test coverage detected