那我为什么bp不了socket函数呢?bp send bp recv....chrome甚至都没有调用socket库。
我贴的代码没看到吗?而且socket就只有send,就没有sendto了?为什么就是不去看代码呢
int TCPClientSocketLibevent::InternalWrite(IOBuffer* buf, int buf_len) {
int nwrite;
if (use_tcp_fastopen_ && !tcp_fastopen_connected_) {
// We have a limited amount of data to send in the SYN packet.
int kMaxFastOpenSendLength = 1420;
int flags = 0x20000000; // Magic flag to enable TCP_FASTOPEN
nwrite = HANDLE_EINTR(sendto(socket_,
buf->data(),
buf_len,
flags,
current_ai_->ai_addr,
static_cast<int>(current_ai_->ai_addrlen)));
tcp_fastopen_connected_ = true;
if (nwrite < 0) {
// Non-blocking mode is returning EINPROGRESS rather than EAGAIN.
if (errno == EINPROGRESS)
errno = EAGAIN;
// Unlike "normal" nonblocking sockets, the data is already queued,
// so tell the app that we've consumed it.
return buf_len;
}
} else {
nwrite = HANDLE_EINTR(write(socket_, buf->data(), buf_len));
}
return nwrite;
}
------解决思路----------------------
看好了,这是在最新代码上做的搜索
那我为什么bp不了socket函数呢?bp send bp recv....chrome甚至都没有调用socket库。
我贴的代码没看到吗?而且socket就只有send,就没有sendto了?为什么就是不去看代码呢
int TCPClientSocketLibevent::InternalWrite(IOBuffer* buf, int buf_len) {
int nwrite;
if (use_tcp_fastopen_ && !tcp_fastopen_connected_) {
// We have a limited amount of data to send in the SYN packet.
int kMaxFastOpenSendLength = 1420;
int flags = 0x20000000; // Magic flag to enable TCP_FASTOPEN
nwrite = HANDLE_EINTR(sendto(socket_,
buf->data(),
buf_len,
flags,
current_ai_->ai_addr,
static_cast<int>(current_ai_->ai_addrlen)));
tcp_fastopen_connected_ = true;
if (nwrite < 0) {
// Non-blocking mode is returning EINPROGRESS rather than EAGAIN.
if (errno == EINPROGRESS)
errno = EAGAIN;
// Unlike "normal" nonblocking sockets, the data is already queued,
// so tell the app that we've consumed it.
return buf_len;
}
} else {
nwrite = HANDLE_EINTR(write(socket_, buf->data(), buf_len));
}
return nwrite;
}
那我为什么bp不了socket函数呢?bp send bp recv....chrome甚至都没有调用socket库。
我贴的代码没看到吗?而且socket就只有send,就没有sendto了?为什么就是不去看代码呢
int TCPClientSocketLibevent::InternalWrite(IOBuffer* buf, int buf_len) {
int nwrite;
if (use_tcp_fastopen_ && !tcp_fastopen_connected_) {
// We have a limited amount of data to send in the SYN packet.
int kMaxFastOpenSendLength = 1420;
int flags = 0x20000000; // Magic flag to enable TCP_FASTOPEN
nwrite = HANDLE_EINTR(sendto(socket_,
buf->data(),
buf_len,
flags,
current_ai_->ai_addr,
static_cast<int>(current_ai_->ai_addrlen)));
tcp_fastopen_connected_ = true;
if (nwrite < 0) {
// Non-blocking mode is returning EINPROGRESS rather than EAGAIN.
if (errno == EINPROGRESS)
errno = EAGAIN;
// Unlike "normal" nonblocking sockets, the data is already queued,
// so tell the app that we've consumed it.
return buf_len;
}
} else {
nwrite = HANDLE_EINTR(write(socket_, buf->data(), buf_len));
}
return nwrite;
}