| 43 | const static butil::IOBuf *TIMEOUT_TASK = (butil::IOBuf*)-1L; |
| 44 | |
| 45 | Stream::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 | |
| 66 | Stream::~Stream() { |
| 67 | // Clear pending buffer |
nothing calls this directly
no test coverage detected