MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / start

Method start

net/TcpConnection.cpp:121–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void TcpConnection::start() {
122 if (socket_pipe_) {
123 socket_pipe_.subscribe();
124 } else {
125 simple_pipe_.subscribe();
126 }
127 update_timer();
128 notify();
129
130 if (is_client_) {
131 LOG(DEBUG) << "tcp: sending handshake";
132 auto id = td::Random::secure_uint64();
133 auto data = create_serialize_tl_object<cocoon_api::tcp_connect>(id);
134 send_uninit(std::move(data));
135 }
136}
137
138void TcpConnection::send_uninit(td::BufferSlice data) {
139 send(std::move(data));

Callers 10

alarmMethod · 0.80
mainFunction · 0.80
TESTFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64