socket 使Nagle算法无效

 //使Nagle算法无效
 const char chOpt = 1;
 nRet = setsockopt(m_s, IPPROTO_TCP, TCP_NODELAY, &chOpt, sizeof(char));
 if (SOCKET_ERROR == nRet)
 {
  return FALSE;
 }

你可能感兴趣的:(算法,socket,tcp)