Increase number of buffers that may be sent or received in a single

operation.
This commit is contained in:
chris_kohlhoff 2007-08-09 12:14:18 +00:00
parent 739cdbf78d
commit f4d1ef5682
3 changed files with 8 additions and 2 deletions

View File

@ -86,7 +86,7 @@ public:
};
// The maximum number of buffers to support in a single operation.
enum { max_buffers = 16 };
enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
// Constructor.
reactive_socket_service(asio::io_service& io_service)

View File

@ -141,6 +141,11 @@ const int shutdown_both = SD_BOTH;
const int message_peek = MSG_PEEK;
const int message_out_of_band = MSG_OOB;
const int message_do_not_route = MSG_DONTROUTE;
# if defined (_WIN32_WINNT)
const int max_iov_len = 64;
# else
const int max_iov_len = 16;
# endif
#else
typedef int socket_type;
const int invalid_socket = -1;
@ -166,6 +171,7 @@ const int shutdown_both = SHUT_RDWR;
const int message_peek = MSG_PEEK;
const int message_out_of_band = MSG_OOB;
const int message_do_not_route = MSG_DONTROUTE;
const int max_iov_len = IOV_MAX;
#endif
const int custom_socket_option_level = 0xA5100000;
const int enable_connection_aborted_option = 1;

View File

@ -171,7 +171,7 @@ public:
typedef detail::select_reactor<true> reactor_type;
// The maximum number of buffers to support in a single operation.
enum { max_buffers = 16 };
enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
// Constructor.
win_iocp_socket_service(asio::io_service& io_service)