VirtualBox

Changeset 27959 in vbox


Ignore:
Timestamp:
Apr 2, 2010 3:46:08 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59663
Message:

iprt: added RTTcpSetSendCoalescing.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/tcp.h

    r27787 r27959  
    220220
    221221/**
     222 * Enables or disable delaying sends to coalesce packets.
     223 *
     224 * The TCP/IP stack usually uses the Nagle algorithm (RFC 896) to implement the
     225 * coalescing.
     226 *
     227 * @returns iprt status code.
     228 * @param   Sock        Socket descriptor.
     229 */
     230RTR3DECL(int)  RTTcpSetSendCoalescing(RTSOCKET Sock, bool fEnable);
     231
     232/**
    222233 * Socket I/O multiplexing.
    223234 * Checks if the socket is ready for reading.
  • trunk/src/VBox/Runtime/r3/tcp.cpp

    r27787 r27959  
    984984RTR3DECL(int)  RTTcpFlush(RTSOCKET Sock)
    985985{
    986 
    987986    int fFlag = 1;
    988987    int rc = rtSocketSetOpt(Sock, IPPROTO_TCP, TCP_NODELAY, &fFlag, sizeof(fFlag));
     
    996995
    997996
     997RTR3DECL(int)  RTTcpSetSendCoalescing(RTSOCKET Sock, bool fEnable)
     998{
     999    int fFlag = fEnable ? 0 : 1;
     1000    return rtSocketSetOpt(Sock, IPPROTO_TCP, TCP_NODELAY, &fFlag, sizeof(fFlag));
     1001}
     1002
     1003
    9981004RTR3DECL(int)  RTTcpSelectOne(RTSOCKET Sock, RTMSINTERVAL cMillies)
    9991005{
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette