pivotal-jbarrett commented on a change in pull request #630:
URL: https://github.com/apache/geode-native/pull/630#discussion_r466751011



##########
File path: cppcache/src/TcpConn.cpp
##########
@@ -318,14 +237,35 @@ size_t TcpConn::socketOp(TcpConn::SockOp op, char *buff, 
size_t len,
     return totalsend;
   }
 }
+ssize_t TcpConn::doOperation(const TcpConn::SockOp& op, void* buff,
+                             size_t sendlen, ACE_Time_Value& waitTime,
+                             size_t& readLen) const {
+  if (op == SOCK_READ) {
+    return stream_->recv_n(buff, sendlen, &waitTime, &readLen);
+  } else {
+    return stream_->send_n(buff, sendlen, &waitTime, &readLen);
+  }
+}
 
 //  Return the local port for this TCP connection.
 uint16_t TcpConn::getPort() {
   ACE_INET_Addr localAddr;
-  m_io->get_local_addr(localAddr);
+  stream_->get_local_addr(localAddr);
   return localAddr.get_port_number();
 }
 
+size_t TcpConn::getDefaultChunkSize() {
+  //
+  auto pageSize = boost::interprocess::mapped_region::get_page_size();
+  if (pageSize > 16000000) {
+    return 16000000;
+  } else if (pageSize > 0) {
+    return pageSize + (16000000 / pageSize) * pageSize;
+  }
+
+  return 16000000;

Review comment:
       As for the constant, sure, we could add one but its really outside the 
scope of the PR to make all the cleanups. Keep in mind while it appears this 
code is new its actually just moved from the external file to the internal 
file. GIt just can't see that.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to