uint64_t left_pbrs = outcoming_bl.buffers().size();
while (left_pbrs) {
struct msghdr msg;
- uint64_t size = MIN(left_pbrs, IOV_LEN);
+ uint64_t size = MIN(left_pbrs, sizeof(msgvec));
left_pbrs -= size;
memset(&msg, 0, sizeof(msg));
msg.msg_iovlen = 0;
#define CEPH_MSG_ASYNCCONNECTION_H
#include <pthread.h>
+#include <climits>
#include <list>
#include <map>
using namespace std;
* sequence, try to reconnect peer endpoint.
*/
class AsyncConnection : public Connection {
- const static uint64_t IOV_LEN = 1024;
int read_bulk(int fd, char *buf, int len);
int do_sendmsg(struct msghdr &msg, int len, bool more);
EventCallbackRef signal_handler;
EventCallbackRef local_deliver_handler;
bool keepalive;
- struct iovec msgvec[IOV_LEN];
+ struct iovec msgvec[IOV_MAX];
Mutex stop_lock; // used to protect `mark_down_cond`
Cond stop_cond;
set<uint64_t> register_time_events; // need to delete it if stop