VirtualBox

Changeset 30270 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jun 17, 2010 6:56:26 AM (15 years ago)
Author:
vboxsync
Message:

Runtime/tcp+socket: Add function to write to a socket using a scatter/gather buffer

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r28800 r30270  
    3131#include <iprt/thread.h>
    3232#include <iprt/net.h>
     33#include <iprt/sg.h>
    3334
    3435#ifdef IN_RING0
     
    176177RTDECL(int) RTSocketGetPeerAddress(RTSOCKET hSocket, PRTNETADDR pAddr);
    177178
     179/**
     180 * Send data from a scatter/gather buffer to a socket.
     181 *
     182 * @returns IPRT status code.
     183 * @retval  VERR_INTERRUPTED if interrupted before anything was written.
     184 *
     185 * @param   hSocket         The socket handle.
     186 * @param   pSgBuf          Scatter/gather buffer to write data to socket.
     187 */
     188RTDECL(int) RTSocketSgWrite(RTSOCKET hSocket, PCRTSGBUF pSgBuf);
     189
    178190/** @} */
    179191RT_C_DECLS_END
  • trunk/include/iprt/tcp.h

    r28800 r30270  
    44
    55/*
    6  * Copyright (C) 2006-2007 Oracle Corporation
     6 * Copyright (C) 2006-2010 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3131#include <iprt/thread.h>
    3232#include <iprt/net.h>
     33#include <iprt/sg.h>
    3334
    3435#ifdef IN_RING0
     
    216217
    217218/**
    218  * Enables or disable delaying sends to coalesce packets.
     219 * Enables or disables delaying sends to coalesce packets.
    219220 *
    220221 * The TCP/IP stack usually uses the Nagle algorithm (RFC 896) to implement the
     
    223224 * @returns iprt status code.
    224225 * @param   Sock        Socket descriptor.
     226 * @param   fEnable     When set to true enables coalescing.
    225227 */
    226228RTR3DECL(int)  RTTcpSetSendCoalescing(RTSOCKET Sock, bool fEnable);
     
    279281RTR3DECL(int) RTTcpGetPeerAddress(RTSOCKET Sock, PRTNETADDR pAddr);
    280282
     283/**
     284 * Send data from a scatter/gather buffer to a socket.
     285 *
     286 * @returns iprt status code.
     287 * @retval  VERR_INTERRUPTED if interrupted before anything was written.
     288 *
     289 * @param   Sock        Socket descriptor.
     290 * @param   pSgBuf      Scatter/gather buffer to write data to socket.
     291 */
     292RTR3DECL(int)  RTTcpSgWrite(RTSOCKET Sock, PCRTSGBUF pSgBuf);
     293
    281294/** @} */
    282295RT_C_DECLS_END
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