VirtualBox

Changeset 31254 in vbox


Ignore:
Timestamp:
Jul 30, 2010 3:42:19 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64269
Message:

ConsoleImplTeleporter.cpp: Disable Nagel's algorithm and completely drop the flush calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImplTeleporter.cpp

    r30777 r31254  
    4040#include <VBox/com/string.h>
    4141#include "VBox/com/ErrorInfo.h"
     42
    4243
    4344/*******************************************************************************
     
    288289{
    289290    int vrc = RTTcpSgWriteL(pState->mhSocket, 2, pszCommand, strlen(pszCommand), "\n", sizeof("\n") - 1);
    290     if (RT_SUCCESS(vrc))
    291         vrc = RTTcpFlush(pState->mhSocket);
    292291    if (RT_FAILURE(vrc))
    293292        return setError(E_FAIL, tr("Failed writing command '%s': %Rrc"), pszCommand, vrc);
     
    529528        EofHdr.cb       = fCanceled ? UINT32_MAX : 0;
    530529        int rc = RTTcpWrite(pState->mhSocket, &EofHdr, sizeof(EofHdr));
    531         if (RT_SUCCESS(rc))
    532             rc = RTTcpFlush(pState->mhSocket);
    533530        if (RT_FAILURE(rc))
    534531        {
     
    540537    {
    541538        ASMAtomicWriteBool(&pState->mfStopReading, true);
    542         RTTcpFlush(pState->mhSocket);
    543539    }
    544540
     
    639635
    640636    /*
    641      * Try connect to the destination machine.
     637     * Try connect to the destination machine, disable Nagel.
    642638     * (Note. The caller cleans up mhSocket, so we can return without worries.)
    643639     */
     
    646642        return setError(E_FAIL, tr("Failed to connect to port %u on '%s': %Rrc"),
    647643                        pState->muPort, pState->mstrHostname.c_str(), vrc);
     644    vrc = RTTcpSetSendCoalescing(pState->mhSocket, false /*fEnable*/);
     645    AssertRC(vrc);
    648646
    649647    /* Read and check the welcome message. */
     
    11971195            teleporterTrgUnlockMedia(pState);
    11981196    }
    1199     RTTcpFlush(pState->mhSocket);
    12001197    return rc;
    12011198}
     
    12241221    if (RT_FAILURE(rc))
    12251222        LogRel(("Teleporter: RTTcpWrite(,%s,%zu) -> %Rrc\n", szMsg, cch, rc));
    1226     RTTcpFlush(pState->mhSocket);
    12271223    return rc;
    12281224}
Note: See TracChangeset for help on using the changeset viewer.

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