0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 17:28:18 +02:00

ircd: Add iov size to client/server IO debug.

This commit is contained in:
Jason Volk 2017-12-22 17:38:05 -07:00
parent 56f4d156af
commit 8178d96f64
2 changed files with 6 additions and 6 deletions

View file

@ -129,9 +129,9 @@ ircd::write_closure(client &client)
// returns a function that can be called to send an iovector of data to a client // returns a function that can be called to send an iovector of data to a client
return [&client](const ilist<const_buffer> &iov) return [&client](const ilist<const_buffer> &iov)
{ {
//std::cout << "<<<<" << std::endl; //std::cout << "<<<< " << size(iov) << std::endl;
//std::cout << iov << std::endl; //std::cout << iov << std::endl;
//std::cout << "----" << std::endl; //std::cout << "---- " << std::endl;
const auto written const auto written
{ {
write(*client.sock, iov) write(*client.sock, iov)
@ -147,9 +147,9 @@ ircd::read_closure(client &client)
{ {
try try
{ {
const char *const got(start); char *const got(start);
read(client, start, stop); read(client, start, stop);
//std::cout << ">>>>" << std::endl; //std::cout << ">>>> " << std::distance(got, start) << std::endl;
//std::cout << string_view{got, start} << std::endl; //std::cout << string_view{got, start} << std::endl;
//std::cout << "----" << std::endl; //std::cout << "----" << std::endl;
} }

View file

@ -51,7 +51,7 @@ ircd::write_closure(server &server)
// returns a function that can be called to send an iovector of data to a server // returns a function that can be called to send an iovector of data to a server
return [&server](const ilist<const_buffer> &iov) return [&server](const ilist<const_buffer> &iov)
{ {
//std::cout << "<<<<" << std::endl; //std::cout << "<<<< " << size(iov) << std::endl;
//std::cout << iov << std::endl; //std::cout << iov << std::endl;
//std::cout << "----" << std::endl; //std::cout << "----" << std::endl;
write(server, iov); write(server, iov);
@ -66,7 +66,7 @@ ircd::read_closure(server &server)
{ {
char *const s(start); char *const s(start);
read(server, start, stop); read(server, start, stop);
//std::cout << ">>>>" << std::endl; //std::cout << ">>>> " << std::distance(s, start) << std::endl;
//std::cout << string_view{s, start} << std::endl; //std::cout << string_view{s, start} << std::endl;
//std::cout << "----" << std::endl; //std::cout << "----" << std::endl;
}; };