MCPcopy Create free account
hub / github.com/apache/brpc / Stream

Method Stream

src/brpc/stream.cpp:45–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43const static butil::IOBuf *TIMEOUT_TASK = (butil::IOBuf*)-1L;
44
45Stream::Stream()
46 : _host_socket(NULL)
47 , _fake_socket_weak_ref(NULL)
48 , _connected(false)
49 , _closed(false)
50 , _error_code(0)
51 , _produced(0)
52 , _remote_consumed(0)
53 , _cur_buf_size(0)
54 , _local_consumed(0)
55 , _atomic_local_consumed(0)
56 , _parse_rpc_response(false)
57 , _pending_buf(NULL)
58 , _start_idle_timer_us(0)
59 , _idle_timer(0)
60{
61 _connect_meta.on_connect = NULL;
62 CHECK_EQ(0, bthread_mutex_init(&_connect_mutex, NULL));
63 CHECK_EQ(0, bthread_mutex_init(&_congestion_control_mutex, NULL));
64}
65
66Stream::~Stream() {
67 // Clear pending buffer

Callers

nothing calls this directly

Calls 1

bthread_mutex_initFunction · 0.85

Tested by

no test coverage detected