logo       

Missing peer_connection::setup_send() in peer_connection::on_connection_com: msg#00057

network.bit-torrent.libtorrent

Subject: Missing peer_connection::setup_send() in peer_connection::on_connection_complete()?

Hi Arvid and All,

I'm puzzled by some codes in peer_connection.cpp (asio branch).

void peer_connection::on_connection_complete(asio::error const&)
{
m_connecting = false;
}

As I understand, the initiator of a connection is expected to transmit its handshake immediately once the connection succeeds. It looks like the handshake message has been added to the send buffer in the constructor of bt_peer_connection. There are previous calls to peer_connection::setup_send(), but they shall all fail since m_connecting = true. Therefore I expect to see calls to peer_connection::setup_send() immediately after m_connecting = false. However I didn't see any. When is setup_send() called after the connection is completed?

Thanks,
--
Tianhao



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise