Trivial cleanup
This commit is contained in:
@@ -14,7 +14,7 @@ public:
|
|||||||
poller(poller),
|
poller(poller),
|
||||||
socket(socket)
|
socket(socket)
|
||||||
{}
|
{}
|
||||||
virtual ~SocketHandler() {}
|
virtual ~SocketHandler() = default;
|
||||||
SocketHandler(const SocketHandler&) = delete;
|
SocketHandler(const SocketHandler&) = delete;
|
||||||
SocketHandler(SocketHandler&&) = delete;
|
SocketHandler(SocketHandler&&) = delete;
|
||||||
SocketHandler& operator=(const SocketHandler&) = delete;
|
SocketHandler& operator=(const SocketHandler&) = delete;
|
||||||
|
|||||||
@@ -292,7 +292,8 @@ void TCPSocketHandler::on_send()
|
|||||||
// unconsting the content of s is ok, sendmsg will never modify it
|
// unconsting the content of s is ok, sendmsg will never modify it
|
||||||
msg_iov[msg.msg_iovlen].iov_base = const_cast<char*>(s.data());
|
msg_iov[msg.msg_iovlen].iov_base = const_cast<char*>(s.data());
|
||||||
msg_iov[msg.msg_iovlen].iov_len = s.size();
|
msg_iov[msg.msg_iovlen].iov_len = s.size();
|
||||||
if (++msg.msg_iovlen == UIO_FASTIOV)
|
msg.msg_iovlen++;
|
||||||
|
if (msg.msg_iovlen == UIO_FASTIOV)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ssize_t res = ::sendmsg(this->socket, &msg, MSG_NOSIGNAL);
|
ssize_t res = ::sendmsg(this->socket, &msg, MSG_NOSIGNAL);
|
||||||
|
|||||||
Reference in New Issue
Block a user