VirtualBox

Changeset 45948 in vbox for trunk/include


Ignore:
Timestamp:
May 8, 2013 12:32:54 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85595
Message:

IPRT: Added RTTcpClientConnectEx and RTTcpClientCancelConnect.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r45400 r45948  
    14451445# define RTTarOpen                                      RT_MANGLER(RTTarOpen)
    14461446# define RTTarSeekNextFile                              RT_MANGLER(RTTarSeekNextFile)
     1447# define RTTcpClientCancelConnect                       RT_MANGLER(RTTcpClientCancelConnect)
    14471448# define RTTcpClientClose                               RT_MANGLER(RTTcpClientClose)
    14481449# define RTTcpClientCloseEx                             RT_MANGLER(RTTcpClientCloseEx)
    14491450# define RTTcpClientConnect                             RT_MANGLER(RTTcpClientConnect)
     1451# define RTTcpClientConnectEx                           RT_MANGLER(RTTcpClientConnectEx)
    14501452# define RTTcpFlush                                     RT_MANGLER(RTTcpFlush)
    14511453# define RTTcpGetLocalAddress                           RT_MANGLER(RTTcpGetLocalAddress)
  • trunk/include/iprt/tcp.h

    r33540 r45948  
    171171RTR3DECL(int) RTTcpClientConnect(const char *pszAddress, uint32_t uPort, PRTSOCKET pSock);
    172172
     173/** Opaque pointer used by RTTcpClientConnectEx and RTTcpClientCancelConnect. */
     174typedef struct RTTCPCLIENTCONNECTCANCEL *PRTTCPCLIENTCONNECTCANCEL;
     175
     176/**
     177 * Connect (as a client) to a TCP Server, extended version.
     178 *
     179 * @returns iprt status code.
     180 * @param   pszAddress      The address to connect to.
     181 * @param   uPort           The port to connect to.
     182 * @param   pSock           Where to store the handle to the established connection.
     183 * @param   ppCancelCookie  Where to store information for canceling the
     184 *                          operation (from a different thread). Optional.
     185 *
     186 *                          The pointer _must_ be initialized to NULL before a
     187 *                          series of connection attempts begins, i.e. at a time
     188 *                          where there will be no RTTcpClientCancelConnect
     189 *                          calls racing access.  RTTcpClientCancelConnect will
     190 *                          set it to a special non-NULL value that causes the
     191 *                          current or/and next connect call to fail.
     192 *
     193 * @sa      RTTcpClientCancelConnect
     194 */
     195RTR3DECL(int) RTTcpClientConnectEx(const char *pszAddress, uint32_t uPort, PRTSOCKET pSock,
     196                                   PRTTCPCLIENTCONNECTCANCEL volatile *ppCancelCookie);
     197
     198/**
     199 * Cancels a RTTcpClientConnectEx call on a different thread.
     200 *
     201 * @returns iprt status code.
     202 * @param   ppCancelCookie  The address of the cookie pointer shared with the
     203 *                          connect call.
     204 */
     205RTR3DECL(int) RTTcpClientCancelConnect(PRTTCPCLIENTCONNECTCANCEL volatile *ppCancelCookie);
     206
    173207/**
    174208 * Close a socket returned by RTTcpClientConnect().
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